rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
MidiDevice dev = null; | private static MidiDevice getOutputMidiDevice(int port) throws MidiUnavailableException { MidiDevice dev = null; if (outputMidiDeviceInfo.length == 0) return null; dev = MidiSystem.getMidiDevice(outputMidiDeviceInfo[port]); if (!dev.isOpen()) { ErrorMsg.reportStatus("open outport: " + dev.getDeviceInfo().getName()); dev.open(); } return dev; } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/802283d7342850dab8e016ad3a05ecb69e622096/MidiUtil.java/buggy/JSynthLib/core/MidiUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
490,
350,
77,
3654,
11062,
20711,
77,
3654,
12,
474,
1756,
13,
202,
15069,
490,
350,
77,
15357,
288,
202,
20711,
77,
3654,
4461,
273,
446,
31,
202,
430,
261,
2844,
20711,
77,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
490,
350,
77,
3654,
11062,
20711,
77,
3654,
12,
474,
1756,
13,
202,
15069,
490,
350,
77,
15357,
288,
202,
20711,
77,
3654,
4461,
273,
446,
31,
202,
430,
261,
2844,
20711,
77,... | |
log.error(e); | System.err.println(e); | public void run() { Object tmp; Message msg=null; DrawCommand comm; while(true) { try { tmp=data_channel.receive(0); if(tmp == null) continue; if(tmp instanceof View) { View v=(View)tmp; System.out.println("** View=" + v); member_size=v.size(); if(mainFrame != null) setTitle(); continue; } if(tmp instanceof ExitEvent) { System.out.println("-- Draw2Channels.main(): received EXIT, waiting for ChannelReconnected callback"); break; } if(!(tmp instanceof Message)) continue; msg=(Message)tmp; comm=null; Object obj=msg.getObject(); if(obj instanceof DrawCommand) comm=(DrawCommand)obj; else if(obj instanceof Message) { System.out.println("*** Draw2Channels.run(): message is " + Util.printMessage((Message)obj)); Util.dumpStack(false); continue; } else { if(obj != null) System.out.println("*** Draw2Channels.run(): obj is " + obj.getClass() + ", hdrs are" + msg.printObjectHeaders()); else System.out.println("*** Draw2Channels.run(): hdrs are" + msg.printObjectHeaders()); Util.dumpStack(false); continue; } switch(comm.mode) { case DrawCommand.DRAW: if(panel != null) panel.drawPoint(comm); break; case DrawCommand.CLEAR: clearPanel(); continue; default: log.error("***** Draw2Channels.run(): received invalid draw command " + comm.mode); break; } } catch(ChannelNotConnectedException not) { log.error("Draw2Channels: " + not); break; } catch(ChannelClosedException closed) { break; } catch(Exception e) { log.error(e); continue; } } } | 47927 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47927/5ad015d9a78e1da3350d9b398b46b2f5d4508564/Draw2Channels.java/buggy/src/org/jgroups/demos/Draw2Channels.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
565,
1033,
1377,
1853,
31,
202,
565,
2350,
377,
1234,
33,
2011,
31,
202,
565,
10184,
2189,
1543,
31,
202,
565,
1323,
12,
3767,
13,
288,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
565,
1033,
1377,
1853,
31,
202,
565,
2350,
377,
1234,
33,
2011,
31,
202,
565,
10184,
2189,
1543,
31,
202,
565,
1323,
12,
3767,
13,
288,
202,
202,
... |
if (ypTakenInCallerCMID == STACKFRAME_SENTINEL_FP.toInt() || ypTakenInCallerCMID == INVISIBLE_METHOD_ID || | if (ypTakenInCallerCMID == INVISIBLE_METHOD_ID || | public static void threadSwitch(int whereFrom) throws VM_PragmaNoInline { VM_Processor.getCurrentProcessor().threadSwitchRequested = 0; //-#if RVM_FOR_POWERPC /* give a chance to check the sync request */ if (VM_Processor.getCurrentProcessor().needsSync) { VM_Processor.getCurrentProcessor().needsSync = false; // make sure not get stale data VM_Magic.isync(); VM_Synchronization.fetchAndDecrement(VM_Magic.getJTOC(), VM_Entrypoints.toSyncProcessorsField.getOffset(), 1); } //-#endif if (!VM_Processor.getCurrentProcessor().threadSwitchingEnabled()) { // thread in critical section: can't switch right now, defer 'till later VM_Processor.getCurrentProcessor().threadSwitchPending = true; return; } /* * Thread switch only when interruptQuantumCounter == schedulingMultiplier. * Otherwise sample HPM counter values and return. * This code must go after checking for thread switch enabled to ensure that we don't * interrupt thread switch disabled code! In particular, the VM.write(String) method. */ VM_Processor.getCurrentProcessor().interruptQuantumCounter++; boolean threadSwitch = ! (VM_Processor.getCurrentProcessor().interruptQuantumCounter < VM.schedulingMultiplier); //-#if RVM_WITH_HPM if (VM_HardwarePerformanceMonitors.sample || threadSwitch) { // sample HPM counter values at every interrupt or a thread switch. if (VM.BuildForHPM && VM_HardwarePerformanceMonitors.safe && ! VM_HardwarePerformanceMonitors.hpm_thread_group) { VM_Thread myThread = getCurrentThread(); VM_Processor.getCurrentProcessor().hpm.updateHPMcounters(myThread, myThread, true, threadSwitch); } } //-#endif if (! threadSwitch) return; VM_Processor.getCurrentProcessor().interruptQuantumCounter = 0; if (VM_Scheduler.debugRequested && VM_Scheduler.allProcessorsInitialized) { // service "debug request" generated by external signal VM_Scheduler.debuggerMutex.lock(); if (VM_Scheduler.debuggerQueue.isEmpty()) { // debugger already running VM_Scheduler.debuggerMutex.unlock(); } else { // awaken debugger VM_Thread t = VM_Scheduler.debuggerQueue.dequeue(); VM_Scheduler.debuggerMutex.unlock(); t.schedule(); } } if (!VM_Scheduler.attachThreadRequested.isZero()) { // service AttachCurrentThread request from an external pthread VM_Scheduler.attachThreadMutex.lock(); if (VM_Scheduler.attachThreadQueue.isEmpty()) { // JNIServiceThread already running VM_Scheduler.attachThreadMutex.unlock(); } else { // awaken JNIServiceThread VM_Thread t = VM_Scheduler.attachThreadQueue.dequeue(); VM_Scheduler.attachThreadMutex.unlock(); t.schedule(); } } if (VM_Scheduler.wakeupQueue.isReady()) { VM_Scheduler.wakeupMutex.lock(); VM_Thread t = VM_Scheduler.wakeupQueue.dequeue(); VM_Scheduler.wakeupMutex.unlock(); if (t != null) { // VM_Scheduler.trace("VM_Thread", // "threadSwitch: awaken ", t.getIndex()); t.schedule(); } } // Reset thread switch count for deterministic thread switching if(VM.BuildForDeterministicThreadSwitching) VM_Processor.getCurrentProcessor().deterministicThreadSwitchCount = VM.deterministicThreadSwitchInterval; //-#if RVM_WITH_ADAPTIVE_SYSTEM // We use threadswitches as a rough approximation of time. // Every threadswitch is a clock tick. VM_Controller.controllerClock++; // // "The idle thread is boring, and does not deserve to be sampled" // -- AOS Commandment Number 1 if (!VM_Thread.getCurrentThread().isIdleThread) { // First, get the cmid for the method in which the yieldpoint was taken. // Get pointer to my caller's frame VM_Address fp = VM_Magic.getCallerFramePointer(VM_Magic.getFramePointer()); // Skip over wrapper to "real" method fp = VM_Magic.getCallerFramePointer(fp); int ypTakenInCMID = VM_Magic.getCompiledMethodID(fp); // Next, get the cmid for that method's caller. fp = VM_Magic.getCallerFramePointer(fp); int ypTakenInCallerCMID = VM_Magic.getCompiledMethodID(fp); // Determine if ypTakenInCallerCMID actually corresponds to a real // Java stackframe. boolean ypTakenInCallerCMIDValid = true; VM_CompiledMethod ypTakenInCM = VM_CompiledMethods.getCompiledMethod(ypTakenInCMID); // Check for one of the following: // Caller is top-of-stack psuedo-frame // Caller is out-of-line assembly (no VM_Method object) // Caller is a native method if (ypTakenInCallerCMID == STACKFRAME_SENTINEL_FP.toInt() || ypTakenInCallerCMID == INVISIBLE_METHOD_ID || ypTakenInCM.getMethod().getDeclaringClass().isBridgeFromNative()) { ypTakenInCallerCMIDValid = false; } //-#if RVM_WITH_OSR // check if there are pending osr request if ((VM_Controller.osrOrganizer != null) && (VM_Controller.osrOrganizer.osr_flag)) { VM_Controller.osrOrganizer.activate(); } if (!VM_Thread.getCurrentThread().isSystemThread) { boolean baseToOptOSR = false; if (whereFrom == VM_Thread.BACKEDGE) { if (ypTakenInCM.isOutdated()) { baseToOptOSR = true; } } if (baseToOptOSR || (whereFrom == VM_Thread.OSROPT)) { // get this fram pointer VM_Address tsFP = VM_Magic.getFramePointer(); // Get pointer to my caller's frame VM_Address tsFromFP = VM_Magic.getCallerFramePointer(tsFP); // Skip over wrapper to "real" method VM_Address realFP = VM_Magic.getCallerFramePointer(tsFromFP); VM_Address stackbeg = VM_Magic.objectAsAddress(VM_Thread.getCurrentThread().stack); VM_Offset tsFromFPoff = tsFromFP.diff(stackbeg); VM_Offset realFPoff = realFP.diff(stackbeg); OSR_OnStackReplacementTrigger.trigger(ypTakenInCMID, tsFromFPoff, realFPoff, whereFrom); } } //-#endif // Now that we have the basic information we need, // notify all currently registered listeners if (VM_RuntimeMeasurements.hasMethodListener()){ // set the Caller CMID to -1 if invalid if (!ypTakenInCallerCMIDValid) ypTakenInCallerCMID = -1; VM_RuntimeMeasurements.activateMethodListeners(ypTakenInCMID, ypTakenInCallerCMID, whereFrom); } if (ypTakenInCallerCMIDValid && VM_RuntimeMeasurements.hasContextListener()) { // Have to start over again in case an intervening GC has moved fp // since the last time we did this. // Get pointer to my caller's frame fp = VM_Magic.getCallerFramePointer(VM_Magic.getFramePointer()); // Skip over wrapper to "real" method fp = VM_Magic.getCallerFramePointer(fp); VM_RuntimeMeasurements.activateContextListeners(fp, whereFrom); } if (VM_RuntimeMeasurements.hasNullListener()){ VM_RuntimeMeasurements.activateNullListeners(whereFrom); } } //-#endif // VM_Scheduler.trace("VM_Thread", "threadSwitch"); timerTickYield(whereFrom); //-#if RVM_WITH_OSR VM_Thread myThread = getCurrentThread(); if (myThread.isWaitingForOsr) { OSR_PostThreadSwitch.postProcess(myThread); } //-#endif } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/0e932032d2b74418e4a58a84f352ae8b1e4ccb6e/VM_Thread.java/clean/rvm/src/vm/scheduler/VM_Thread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2650,
10200,
12,
474,
1625,
1265,
13,
1216,
8251,
67,
2050,
9454,
2279,
10870,
282,
288,
565,
8251,
67,
5164,
18,
588,
3935,
5164,
7675,
5930,
10200,
11244,
282,
273,
374,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2650,
10200,
12,
474,
1625,
1265,
13,
1216,
8251,
67,
2050,
9454,
2279,
10870,
282,
288,
565,
8251,
67,
5164,
18,
588,
3935,
5164,
7675,
5930,
10200,
11244,
282,
273,
374,... |
DatabaseService dbService = new MSSQLDatabaseService( "localhost", SQLSERVER_PORT, "test", "sa", "sa", new Integer(20) ); | DatabaseService dbService = new MSSQLDatabaseService( "ratatosk", SQLSERVER_PORT, "kreiger_imcmstest", "sa", "nonac", new Integer(20) ); | static DatabaseService static_initSqlServer() throws IOException { DatabaseService dbService = new MSSQLDatabaseService( "localhost", SQLSERVER_PORT, "test", "sa", "sa", new Integer(20) ); //DatabaseService dbService = new MSSQLDatabaseService( "ratatosk", SQLSERVER_PORT, "kreiger_imcmstest", "sa", "nonac", new Integer(20) ); dbService.setupDatabaseWithTablesAndData( FILE_PATH ); return dbService; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/18d858d81637b83fdc76f5367d317659f9559af4/DatabaseTestInitializer.java/buggy/server/src/imcode/server/db/DatabaseTestInitializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
5130,
1179,
760,
67,
2738,
5101,
2081,
1435,
1216,
1860,
288,
540,
5130,
1179,
1319,
1179,
273,
394,
490,
1260,
2024,
4254,
1179,
12,
315,
17048,
270,
538,
79,
3113,
3063,
4370,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
5130,
1179,
760,
67,
2738,
5101,
2081,
1435,
1216,
1860,
288,
540,
5130,
1179,
1319,
1179,
273,
394,
490,
1260,
2024,
4254,
1179,
12,
315,
17048,
270,
538,
79,
3113,
3063,
4370,
67,
... |
for(int i = 0; i < iBaseAxisCount; i++) | for (int i = 0; i < iBaseAxisCount; i++) | public void initialize(Chart cModel, IUIManager uiManager) { // Register sheet collections uiManager.registerSheetCollection(BASE_SERIES_SHEET_COLLECTION, BASE_SERIES_SHEETS); uiManager.registerSheetCollection(ORTHOGONAL_SERIES_SHEET_COLLECTION, ORTHOGONAL_SERIES_SHEETS); uiManager.registerSheetCollection(BASE_AXIS_SHEET_COLLECTION, BASE_AXIS_SHEETS); uiManager.registerSheetCollection(ORTHOGONAL_AXIS_SHEET_COLLECTION, ORTHOGONAL_AXIS_SHEETS); uiManager.registerSheetCollection(LABEL_BLOCK_SHEET_COLLECTION, LABEL_BLOCK_SHEETS); iLabelBlockCount = 0; if(cModel instanceof ChartWithAxes) { iBaseAxisCount = ((ChartWithAxes) cModel).getAxes().size(); iOrthogonalAxisCount = 0; iBaseSeriesCount = 0; iOrthogonalSeriesCount = 0; for(int i = 0; i < iBaseAxisCount; i++) { iBaseSeriesCount += ((Axis) ((ChartWithAxes) cModel).getAxes().get(i)).getSeriesDefinitions().size(); iOrthogonalAxisCount += ((Axis) ((ChartWithAxes) cModel).getAxes().get(i)).getAssociatedAxes().size(); for(int iS = 0; iS < iOrthogonalAxisCount; iS++) { iOrthogonalSeriesCount += ((Axis) ((Axis) ((ChartWithAxes) cModel).getAxes().get(i)).getAssociatedAxes().get(iS)).getSeriesDefinitions().size(); } } // Start from 1 because there will always be at least 1 entry for each registered sheet when this method is called for (int iBA = 1; iBA < iBaseAxisCount; iBA++) { uiManager.addCollectionInstance(BASE_AXIS_SHEET_COLLECTION); } for (int iOA = 1; iOA < iOrthogonalAxisCount; iOA++) { uiManager.addCollectionInstance(ORTHOGONAL_AXIS_SHEET_COLLECTION); } } else { iBaseAxisCount = 0; iOrthogonalAxisCount = 0; iBaseSeriesCount = ((ChartWithoutAxes) cModel).getSeriesDefinitions().size(); iOrthogonalSeriesCount = 0; for(int iS = 0; iS < iBaseSeriesCount; iS++) { iOrthogonalSeriesCount += ((SeriesDefinition) ((ChartWithoutAxes) cModel).getSeriesDefinitions().get(iS)).getSeriesDefinitions().size(); } // Remove axis sheets since they are not needed for Charts Without Axes uiManager.removeCollectionInstance(ORTHOGONAL_AXIS_SHEET_COLLECTION); uiManager.removeCollectionInstance(BASE_AXIS_SHEET_COLLECTION); } Iterator iter = cModel.getBlock().getChildren().iterator(); while(iter.hasNext()) { Block block = (Block) iter.next(); if(block instanceof LabelBlock && !(block instanceof TitleBlock)) { iLabelBlockCount++; } } // Start from 1 because there will always be at least 1 entry for each registered sheet when this method is called for (int iBS = 1; iBS < iBaseSeriesCount; iBS++) { uiManager.addCollectionInstance(BASE_SERIES_SHEET_COLLECTION); } for (int iOS = 1; iOS < iOrthogonalSeriesCount; iOS++) { uiManager.addCollectionInstance(ORTHOGONAL_SERIES_SHEET_COLLECTION); } if(iLabelBlockCount == 0) { uiManager.removeCollectionInstance(LABEL_BLOCK_SHEET_COLLECTION); } else { for (int iLB = 1; iLB < iLabelBlockCount; iLB++) { uiManager.addCollectionInstance(LABEL_BLOCK_SHEET_COLLECTION); } } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/258bad0d502f0759055374875005f9978172c4d7/ChangeListenerImpl.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/event/ChangeListenerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
12,
7984,
276,
1488,
16,
467,
5370,
1318,
5915,
1318,
13,
565,
288,
3639,
368,
5433,
6202,
6980,
3639,
5915,
1318,
18,
4861,
8229,
2532,
12,
8369,
67,
2123,
8805,
67,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
12,
7984,
276,
1488,
16,
467,
5370,
1318,
5915,
1318,
13,
565,
288,
3639,
368,
5433,
6202,
6980,
3639,
5915,
1318,
18,
4861,
8229,
2532,
12,
8369,
67,
2123,
8805,
67,
2... |
System.err.println("2 presses.."); | System.err.println("2 presses. node is "+node); | private void mousePressedLinkingModules(PNode node,PInputEvent e) { int count = e.getClickCount(); System.err.println("node is..."+node); if (node instanceof ParamLink) System.err.println("param link"); if (node instanceof ModuleLink) System.err.println("module link"); System.err.println("caling mouse pressed linking modules.."); if (count ==2) { System.err.println("2 presses.."); if (node instanceof FormalParameter) { FormalParameter p = (FormalParameter) node; ModuleView mod = p.getModuleView(); finishModuleLinks(mod); } else if (node instanceof ModuleView) { finishModuleLinks((ModuleView) node); } else cancelModuleLinks(); } else if (node instanceof PCamera){ // single click on camera System.err.println("on camera"); //when linking modules.. System.err.println("adding an intermediate point to modules link"); Iterator iter = links.iterator(); Point2D pos = e.getPosition(); ParamLink lnk; int size = links.size(); float y = ((float) pos.getY()) - size/2*SPACING; while (iter.hasNext()) { lnk = (ParamLink) iter.next(); lnk.setIntermediatePoint((float) pos.getX(),y); y += SPACING; } } e.setHandled(true); } | 55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/b43c516841167db470871a08179b393619ad59cf/ChainCreationEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
7644,
24624,
2098,
310,
7782,
12,
52,
907,
756,
16,
52,
1210,
1133,
425,
13,
288,
202,
202,
474,
1056,
273,
425,
18,
588,
6563,
1380,
5621,
202,
202,
3163,
18,
370,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
7644,
24624,
2098,
310,
7782,
12,
52,
907,
756,
16,
52,
1210,
1133,
425,
13,
288,
202,
202,
474,
1056,
273,
425,
18,
588,
6563,
1380,
5621,
202,
202,
3163,
18,
370,
18... |
public void readSettings(Element element) throws InvalidDataException { | public void readSettings(Element element) throws InvalidDataException{ | public void readSettings(Element element) throws InvalidDataException { super.readSettings(element); parseCallCheckString(); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/fc3fc1341db4aa6d26930bf45116ec44c28fc569/BadExceptionDeclaredInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/errorhandling/BadExceptionDeclaredInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
855,
2628,
12,
1046,
930,
13,
1216,
1962,
22480,
95,
3639,
2240,
18,
896,
2628,
12,
2956,
1769,
3639,
1109,
1477,
1564,
780,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
855,
2628,
12,
1046,
930,
13,
1216,
1962,
22480,
95,
3639,
2240,
18,
896,
2628,
12,
2956,
1769,
3639,
1109,
1477,
1564,
780,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
... |
ArchiverStub.ArchiverFile archiveFile = (ArchiverStub.ArchiverFile) archiveMap.get( expected.getFile() ); | JarArchiverStub.ArchiverFile archiveFile = (JarArchiverStub.ArchiverFile) archiveMap.get( expected.getFile() ); | public void testPackedDependencySetWithFilenameMappingAndClassifier() throws Exception { AssemblyMojo mojo = getMojo( "depSet-filename-mapping-and-classifier-plugin-config.xml" ); MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "executedProject" ); Set artifactSet = project.getArtifacts(); mojo.execute(); Map archiveMap = ArchiverManagerStub.archiverStub.getFiles(); Collection archivedFiles = archiveMap.keySet(); assertEquals( "Test number of files in archive", artifactSet.size() + 1, archivedFiles.size() ); for ( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); ) { Artifact expected = (Artifact) artifacts.next(); assertTrue( "Test expected dependency artifacts in archive", archivedFiles.contains( expected.getFile() ) ); assertTrue( "Test expected dependency is not unpacked", expected.getFile().getName().endsWith( ".jar" ) ); ArchiverStub.ArchiverFile archiveFile = (ArchiverStub.ArchiverFile) archiveMap.get( expected.getFile() ); String archivePath = archiveFile.getOutputName(); String expectedName; if ( StringUtils.isEmpty( expected.getClassifier() ) ) { expectedName = "libs/" + expected.getVersion() + "." + expected.getArtifactId() + "." + expected.getGroupId(); } else { expectedName = "libs/" + expected.getVersion() + "." + expected.getArtifactId() + "-classifier" + "." + expected.getGroupId(); } assertEquals( "Test filename mapping was used", archivePath, expectedName ); assertFalse( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) ); } assertTrue( "Test project is in archive", archivedFiles.contains( project.getArtifact().getFile() ) ); assertTrue( "Test project is not unpacked", project.getArtifact().getFile().getName().endsWith( ".jar" ) ); ArchiverStub.ArchiverFile archiveFile = (ArchiverStub.ArchiverFile) archiveMap.get( project.getArtifact().getFile() ); String archivePath = archiveFile.getOutputName(); assertFalse( "Test includeBaseDirectory", archivePath.startsWith( "assembly/" ) ); } | 51807 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51807/48c7b948a87dd88a4fa822a246fc1caa00432529/AssemblyMojoTest.java/clean/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/AssemblyMojoTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4420,
329,
7787,
694,
1190,
5359,
3233,
1876,
13860,
1435,
3639,
1216,
1185,
565,
288,
3639,
2970,
11534,
49,
10007,
312,
10007,
273,
2108,
10007,
12,
315,
15037,
694,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4420,
329,
7787,
694,
1190,
5359,
3233,
1876,
13860,
1435,
3639,
1216,
1185,
565,
288,
3639,
2970,
11534,
49,
10007,
312,
10007,
273,
2108,
10007,
12,
315,
15037,
694,
17,
... |
public void setFullName(String fullname, XWikiContext context) { if (fullname == null) return; int i0 = fullname.lastIndexOf(":"); int i1 = fullname.lastIndexOf("."); if (i0 != -1) { database = fullname.substring(0, i0); web = fullname.substring(i0 + 1, i1); name = fullname.substring(i1 + 1); } else { if (i1 == -1) { try { web = context.getDoc().getWeb(); } catch (Exception e) { web = "XWiki"; } name = fullname; } else { web = fullname.substring(0, i1); name = fullname.substring(i1 + 1); } } if (name.equals("")) name = "WebHome"; | public void setFullName(String name) { setFullName(name, null); | public void setFullName(String fullname, XWikiContext context) { if (fullname == null) return; int i0 = fullname.lastIndexOf(":"); int i1 = fullname.lastIndexOf("."); if (i0 != -1) { database = fullname.substring(0, i0); web = fullname.substring(i0 + 1, i1); name = fullname.substring(i1 + 1); } else { if (i1 == -1) { try { web = context.getDoc().getWeb(); } catch (Exception e) { web = "XWiki"; } name = fullname; } else { web = fullname.substring(0, i1); name = fullname.substring(i1 + 1); } } if (name.equals("")) name = "WebHome"; } | 54519 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54519/1c721da44d5bd19fbce2381fd14e5751bd38520c/XWikiDocument.java/buggy/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
19223,
12,
780,
13321,
16,
1139,
25438,
1042,
819,
13,
288,
3639,
309,
261,
21885,
422,
446,
13,
5411,
327,
31,
3639,
509,
277,
20,
273,
13321,
18,
2722,
31985,
2932,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
19223,
12,
780,
13321,
16,
1139,
25438,
1042,
819,
13,
288,
3639,
309,
261,
21885,
422,
446,
13,
5411,
327,
31,
3639,
509,
277,
20,
273,
13321,
18,
2722,
31985,
2932,
27... |
} | }*/ | public void actionPerformed(ActionEvent e) { String command = ((JToggleButton) e.getSource()).getActionCommand(); if (command.equals(LayoutPlugin.VIEW_PAN_ZOOM)) { _pluginRef.setView(LayoutPlugin.VIEW_PAN_ZOOM); } else if (command.equals(LayoutPlugin.VIEW_ROTATE)) { _pluginRef.setView(LayoutPlugin.VIEW_ROTATE); } } | 11096 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11096/c23d1a87a30b95c0c482e570d455f8174fc4e7b4/LayoutPlugin.java/clean/trunk/src/nv2d/plugins/standard/layout/LayoutPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
5411,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
202,
7734,
514,
1296,
273,
14015,
46,
17986,
3616,
13,
425,
18,
588,
1830,
1435,
2934,
588,
1803,
2189,
5621,
202,
7734,
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,
3196,
5411,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
202,
7734,
514,
1296,
273,
14015,
46,
17986,
3616,
13,
425,
18,
588,
1830,
1435,
2934,
588,
1803,
2189,
5621,
202,
7734,
309,
261,
... |
if (oldValue == newValue) return; | if (oldValue == newValue) { return; } | protected void fireStateChanged(String property, boolean oldValue, boolean newValue) { if (oldValue == newValue) return; fireValueChanged(property, new Boolean(oldValue), new Boolean(newValue)); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/391f2606b4ea2c1fb5052d938ca90877ee7631f6/FieldEditor.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/FieldEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4452,
1119,
5033,
12,
780,
1272,
16,
1250,
11144,
16,
5411,
1250,
6129,
13,
288,
3639,
309,
261,
1673,
620,
422,
6129,
13,
5411,
327,
31,
3639,
4452,
620,
5033,
12,
4468,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4452,
1119,
5033,
12,
780,
1272,
16,
1250,
11144,
16,
5411,
1250,
6129,
13,
288,
3639,
309,
261,
1673,
620,
422,
6129,
13,
5411,
327,
31,
3639,
4452,
620,
5033,
12,
4468,
16,... |
source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); | sourceAdd((char)ts.FINALLY); sourceAdd((char)ts.LC); sourceAdd((char)ts.EOL); finallyblock = statement(ts); sourceAdd((char)ts.RC); sourceAdd((char)ts.EOL); | private Object statementHelper(TokenStream ts, Source source) throws IOException, JavaScriptException { Object pn = null; // If skipsemi == true, don't add SEMI + EOL to source at the // end of this statment. For compound statements, IF/FOR etc. boolean skipsemi = false; int tt; int lastExprType = 0; // For wellTerminated. 0 to avoid warning. tt = ts.getToken(); switch(tt) { case TokenStream.IF: { skipsemi = true; source.append((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object ifTrue = statement(ts, source); Object ifFalse = null; if (ts.matchToken(ts.ELSE)) { source.append((char)ts.RC); source.append((char)ts.ELSE); source.append((char)ts.LC); source.append((char)ts.EOL); ifFalse = statement(ts, source); } source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createIf(cond, ifTrue, ifFalse, lineno); break; } case TokenStream.SWITCH: { skipsemi = true; source.append((char)ts.SWITCH); pn = nf.createSwitch(ts.getLineno()); Object cur_case = null; // to kill warning Object case_statements; mustMatchToken(ts, ts.LP, "msg.no.paren.switch"); source.append((char)ts.LP); nf.addChildToBack(pn, expr(ts, source, false)); mustMatchToken(ts, ts.RP, "msg.no.paren.after.switch"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.switch"); source.append((char)ts.LC); source.append((char)ts.EOL); while ((tt = ts.getToken()) != ts.RC && tt != ts.EOF) { switch(tt) { case TokenStream.CASE: source.append((char)ts.CASE); cur_case = nf.createUnary(ts.CASE, expr(ts, source, false)); source.append((char)ts.COLON); source.append((char)ts.EOL); break; case TokenStream.DEFAULT: cur_case = nf.createLeaf(ts.DEFAULT); source.append((char)ts.DEFAULT); source.append((char)ts.COLON); source.append((char)ts.EOL); // XXX check that there isn't more than one default break; default: reportError(ts, "msg.bad.switch"); break; } mustMatchToken(ts, ts.COLON, "msg.no.colon.case"); case_statements = nf.createLeaf(TokenStream.BLOCK); while ((tt = ts.peekToken()) != ts.RC && tt != ts.CASE && tt != ts.DEFAULT && tt != ts.EOF) { nf.addChildToBack(case_statements, statement(ts, source)); } // assert cur_case nf.addChildToBack(cur_case, case_statements); nf.addChildToBack(pn, cur_case); } source.append((char)ts.RC); source.append((char)ts.EOL); break; } case TokenStream.WHILE: { skipsemi = true; source.append((char)ts.WHILE); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWhile(cond, body, lineno); break; } case TokenStream.DO: { source.append((char)ts.DO); source.append((char)ts.LC); source.append((char)ts.EOL); int lineno = ts.getLineno(); Object body = statement(ts, source); source.append((char)ts.RC); mustMatchToken(ts, ts.WHILE, "msg.no.while.do"); source.append((char)ts.WHILE); Object cond = condition(ts, source); pn = nf.createDoWhile(body, cond, lineno); break; } case TokenStream.FOR: { skipsemi = true; source.append((char)ts.FOR); int lineno = ts.getLineno(); Object init; // Node init is also foo in 'foo in Object' Object cond; // Node cond is also object in 'foo in Object' Object incr = null; // to kill warning Object body; mustMatchToken(ts, ts.LP, "msg.no.paren.for"); source.append((char)ts.LP); tt = ts.peekToken(); if (tt == ts.SEMI) { init = nf.createLeaf(ts.VOID); } else { if (tt == ts.VAR) { // set init to a var list or initial ts.getToken(); // throw away the 'var' token init = variables(ts, source, true); } else { init = expr(ts, source, true); } } tt = ts.peekToken(); if (tt == ts.RELOP && ts.getOp() == ts.IN) { ts.matchToken(ts.RELOP); source.append((char)ts.IN); // 'cond' is the object over which we're iterating cond = expr(ts, source, false); } else { // ordinary for loop mustMatchToken(ts, ts.SEMI, "msg.no.semi.for"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.SEMI) { // no loop condition cond = nf.createLeaf(ts.VOID); } else { cond = expr(ts, source, false); } mustMatchToken(ts, ts.SEMI, "msg.no.semi.for.cond"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.RP) { incr = nf.createLeaf(ts.VOID); } else { incr = expr(ts, source, false); } } mustMatchToken(ts, ts.RP, "msg.no.paren.for.ctrl"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); if (incr == null) { // cond could be null if 'in obj' got eaten by the init node. pn = nf.createForIn(init, cond, body, lineno); } else { pn = nf.createFor(init, cond, incr, body, lineno); } break; } case TokenStream.TRY: { int lineno = ts.getLineno(); Object tryblock; Object catchblocks = null; Object finallyblock = null; skipsemi = true; source.append((char)ts.TRY); source.append((char)ts.LC); source.append((char)ts.EOL); tryblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); catchblocks = nf.createLeaf(TokenStream.BLOCK); boolean sawDefaultCatch = false; int peek = ts.peekToken(); if (peek == ts.CATCH) { while (ts.matchToken(ts.CATCH)) { if (sawDefaultCatch) { reportError(ts, "msg.catch.unreachable"); } source.append((char)ts.CATCH); mustMatchToken(ts, ts.LP, "msg.no.paren.catch"); source.append((char)ts.LP); mustMatchToken(ts, ts.NAME, "msg.bad.catchcond"); String varName = ts.getString(); source.addString(ts.NAME, varName); Object catchCond = null; if (ts.matchToken(ts.IF)) { source.append((char)ts.IF); catchCond = expr(ts, source, false); } else { sawDefaultCatch = true; } mustMatchToken(ts, ts.RP, "msg.bad.catchcond"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.catchblock"); source.append((char)ts.LC); source.append((char)ts.EOL); nf.addChildToBack(catchblocks, nf.createCatch(varName, catchCond, statements(ts, source), ts.getLineno())); mustMatchToken(ts, ts.RC, "msg.no.brace.after.body"); source.append((char)ts.RC); source.append((char)ts.EOL); } } else if (peek != ts.FINALLY) { mustMatchToken(ts, ts.FINALLY, "msg.try.no.catchfinally"); } if (ts.matchToken(ts.FINALLY)) { source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); } pn = nf.createTryCatchFinally(tryblock, catchblocks, finallyblock, lineno); break; } case TokenStream.THROW: { int lineno = ts.getLineno(); source.append((char)ts.THROW); pn = nf.createThrow(expr(ts, source, false), lineno); if (lineno == ts.getLineno()) wellTerminated(ts, ts.ERROR); break; } case TokenStream.BREAK: { int lineno = ts.getLineno(); source.append((char)ts.BREAK); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createBreak(label, lineno); break; } case TokenStream.CONTINUE: { int lineno = ts.getLineno(); source.append((char)ts.CONTINUE); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createContinue(label, lineno); break; } case TokenStream.WITH: { skipsemi = true; source.append((char)ts.WITH); int lineno = ts.getLineno(); mustMatchToken(ts, ts.LP, "msg.no.paren.with"); source.append((char)ts.LP); Object obj = expr(ts, source, false); mustMatchToken(ts, ts.RP, "msg.no.paren.after.with"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWith(obj, body, lineno); break; } case TokenStream.VAR: { int lineno = ts.getLineno(); pn = variables(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); break; } case TokenStream.RETURN: { Object retExpr = null; int lineno = 0; source.append((char)ts.RETURN); // bail if we're not in a (toplevel) function if ((ts.flags & ts.TSF_FUNCTION) == 0) reportError(ts, "msg.bad.return"); /* This is ugly, but we don't want to require a semicolon. */ ts.flags |= ts.TSF_REGEXP; tt = ts.peekTokenSameLine(); ts.flags &= ~ts.TSF_REGEXP; if (tt != ts.EOF && tt != ts.EOL && tt != ts.SEMI && tt != ts.RC) { lineno = ts.getLineno(); retExpr = expr(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); ts.flags |= ts.TSF_RETURN_EXPR; } else { ts.flags |= ts.TSF_RETURN_VOID; } // XXX ASSERT pn pn = nf.createReturn(retExpr, lineno); break; } case TokenStream.LC: skipsemi = true; pn = statements(ts, source); mustMatchToken(ts, ts.RC, "msg.no.brace.block"); break; case TokenStream.ERROR: // Fall thru, to have a node for error recovery to work on case TokenStream.EOL: case TokenStream.SEMI: pn = nf.createLeaf(ts.VOID); skipsemi = true; break; default: { lastExprType = tt; int tokenno = ts.getTokenno(); ts.ungetToken(tt); int lineno = ts.getLineno(); pn = expr(ts, source, false); if (ts.peekToken() == ts.COLON) { /* check that the last thing the tokenizer returned was a * NAME and that only one token was consumed. */ if (lastExprType != ts.NAME || (ts.getTokenno() != tokenno)) reportError(ts, "msg.bad.label"); ts.getToken(); // eat the COLON /* in the C source, the label is associated with the * statement that follows: * nf.addChildToBack(pn, statement(ts)); */ String name = ts.getString(); pn = nf.createLabel(name, lineno); // depend on decompiling lookahead to guess that that // last name was a label. source.append((char)ts.COLON); source.append((char)ts.EOL); return pn; } if (lastExprType == ts.FUNCTION) nf.setFunctionExpressionStatement(pn); pn = nf.createExprStatement(pn, lineno); /* * Check explicitly against (multi-line) function * statement. * lastExprEndLine is a hack to fix an * automatic semicolon insertion problem with function * expressions; the ts.getLineno() == lineno check was * firing after a function definition even though the * next statement was on a new line, because * speculative getToken calls advanced the line number * even when they didn't succeed. */ if (ts.getLineno() == lineno || (lastExprType == ts.FUNCTION && ts.getLineno() == lastExprEndLine)) { wellTerminated(ts, lastExprType); } break; } } ts.matchToken(ts.SEMI); if (!skipsemi) { source.append((char)ts.SEMI); source.append((char)ts.EOL); } return pn; } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/92ccdd736e7a1516e4fb6d1eaf915e7021c8dc95/Parser.java/clean/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... |
if(ASS)ER.T(null!=sti,"bad SourceTextItem in getUserAdjustedLineArray",this); | if(AS.S)ER.T(null!=sti,"bad SourceTextItem in getUserAdjustedLineArray",this); | public int[] getUserAdjustedLineArray( SourceTextItem sti ) { if(ASS)ER.T(null!=sti,"bad SourceTextItem in getUserAdjustedLineArray",this); if( null == _adjustments ) return null; Vector v = (Vector) _adjustments.get(sti); if( null == v ) return null; int count = v.count(); int[] a = new int[count]; for(int i = 0; i < count; i++) { AdjustmentItem adj = (AdjustmentItem) v.elementAt(i); int val = adj.line + adj.cummulative_offset; if( adj.offset < 0 ) val *= -1; a[i] = val; } return a; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/2de73cf99dce60cce549e7757f841284b68d1220/SourceTyrant.java/buggy/js/jsdj/classes/com/netscape/jsdebugging/ifcui/SourceTyrant.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
8526,
4735,
10952,
329,
1670,
1076,
12,
4998,
1528,
1180,
384,
77,
262,
565,
288,
3639,
309,
12,
3033,
18,
55,
13,
654,
18,
56,
12,
2011,
5,
33,
334,
77,
10837,
8759,
4998,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
8526,
4735,
10952,
329,
1670,
1076,
12,
4998,
1528,
1180,
384,
77,
262,
565,
288,
3639,
309,
12,
3033,
18,
55,
13,
654,
18,
56,
12,
2011,
5,
33,
334,
77,
10837,
8759,
4998,... |
else { long tmp=decrementCredit(sent, dest, length); if(tmp != -1) lowest_credit=Math.min(tmp, lowest_credit); | finally { Util.release(lock); | private void handleDownMessage(Event evt) { Message msg=(Message)evt.getArg(); int length=msg.getLength(); Address dest=msg.getDest(); synchronized(mutex) { if(lowest_credit <= length) { determineCreditors(dest, length); insufficient_credit=true; num_blockings++; start_blocking=System.currentTimeMillis(); while(insufficient_credit && running) { try {mutex.wait(max_block_time);} catch(InterruptedException e) {} if(insufficient_credit && running) { if(trace) log.trace("timeout occurred waiting for credits; sending credit request to " + creditors); for(int i=0; i < creditors.size(); i++) { sendCreditRequest((Address)creditors.get(i)); } } } stop_blocking=System.currentTimeMillis(); long block_time=stop_blocking - start_blocking; if(trace) log.trace("total time blocked: " + block_time + " ms"); total_time_blocking+=block_time; last_blockings.add(new Long(block_time)); } else { long tmp=decrementCredit(sent, dest, length); if(tmp != -1) lowest_credit=Math.min(tmp, lowest_credit); } } // send message - either after regular processing, or after blocking (when enough credits available again) passDown(evt); } | 48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/56aca63f74a8b9244588bca684e01ecfbae24fbc/FC.java/buggy/src/org/jgroups/protocols/FC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1640,
4164,
1079,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
28657,
1079,
13,
73,
11734,
18,
588,
4117,
5621,
3639,
509,
377,
769,
33,
3576,
18,
588,
1782,
5621,
3639,
5267,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
4164,
1079,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
28657,
1079,
13,
73,
11734,
18,
588,
4117,
5621,
3639,
509,
377,
769,
33,
3576,
18,
588,
1782,
5621,
3639,
5267,
... |
throw new RuntimeException("Immutable"); | if (!CalFacadeUtil.eqObjval(ref.getOwner(), val)) { ref.setOwner(val); setRefChanged(true); } | public void setOwner(BwUser val) { throw new RuntimeException("Immutable"); } | 50848 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50848/3a7b16a977ef7b88e2278d31177aa130e5e243c8/BwEventProxy.java/buggy/calendar3/calFacade/src/org/bedework/calfacade/BwEventProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
31309,
12,
38,
91,
1299,
1244,
13,
288,
565,
309,
16051,
3005,
12467,
1304,
18,
11253,
2675,
1125,
12,
1734,
18,
588,
5541,
9334,
1244,
3719,
288,
1278,
18,
542,
5541,
12,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
31309,
12,
38,
91,
1299,
1244,
13,
288,
565,
309,
16051,
3005,
12467,
1304,
18,
11253,
2675,
1125,
12,
1734,
18,
588,
5541,
9334,
1244,
3719,
288,
1278,
18,
542,
5541,
12,
11... |
if (functionType != CONSTRUCTOR_ONLY) { return master.execMethod(methodId, this, cx, scope, thisObj, args); } else { return Undefined.instance; } | return master.execMethod(methodId, this, cx, scope, thisObj, args); | public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { if (functionType != CONSTRUCTOR_ONLY) { return master.execMethod(methodId, this, cx, scope, thisObj, args); } else { return Undefined.instance; } } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/9aa69b8a87d4efbd57dc0e8f2c35494eefbcca0f/IdFunction.java/buggy/js/rhino/src/org/mozilla/javascript/IdFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
745,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
15604,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
309,
261,
915,
559,
480,
3492,
13915,
916,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
745,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
15604,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
309,
261,
915,
559,
480,
3492,
13915,
916,
67,
... |
public String curly_chunk() throws RecognitionException { String text; Token any=null; String c = null; text = null; try { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:556:17: ( ( options {greedy=false; } : '{' c= curly_chunk '}' | any= . )* ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:556:17: ( options {greedy=false; } : '{' c= curly_chunk '}' | any= . )* { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:556:17: ( options {greedy=false; } : '{' c= curly_chunk '}' | any= . )* loop46: do { int alt46=3; switch ( input.LA(1) ) { case 24: alt46=3; break; case 23: alt46=1; break; case EOL: case ID: case INT: case STRING: case FLOAT: case MISC: case WS: case SH_STYLE_SINGLE_LINE_COMMENT: case C_STYLE_SINGLE_LINE_COMMENT: case MULTI_LINE_COMMENT: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: alt46=2; break; } switch (alt46) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:557:25: '{' c= curly_chunk '}' { match(input,23,FOLLOW_23_in_curly_chunk1884); following.push(FOLLOW_curly_chunk_in_curly_chunk1888); c=curly_chunk(); following.pop(); match(input,24,FOLLOW_24_in_curly_chunk1890); System.err.println( "chunk [" + c + "]" ); if ( c == null ) { c = ""; } if ( text == null ) { text = "{ " + c + " }"; } else { text = text + " { " + c + " }"; } } break; case 2 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:569:19: any= . { any=(Token)input.LT(1); matchAny(input); System.err.println( "any [" + any.getText() + "]" ); if ( text == null ) { text = any.getText(); } else { text = text + " " + any.getText(); } } break; default : break loop46; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return text; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/138d9a6805db25e18a7f8c70bebca33cce7b95e5/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
29270,
67,
6551,
1435,
1216,
9539,
288,
6647,
514,
977,
31,
3639,
3155,
1281,
33,
2011,
31,
3639,
514,
276,
273,
446,
31,
540,
202,
202,
955,
273,
446,
31,
540,
202,
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,
514,
29270,
67,
6551,
1435,
1216,
9539,
288,
6647,
514,
977,
31,
3639,
3155,
1281,
33,
2011,
31,
3639,
514,
276,
273,
446,
31,
540,
202,
202,
955,
273,
446,
31,
540,
202,
3639,
... | ||
org.exist.xquery.parser.XQueryAST tmp191_AST = null; tmp191_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp191_AST); | org.exist.xquery.parser.XQueryAST tmp192_AST = null; tmp192_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp192_AST); | public final void multiplicativeExpr() throws RecognitionException, TokenStreamException, XPathException { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST multiplicativeExpr_AST = null; unaryExpr(); astFactory.addASTChild(currentAST, returnAST); { _loop169: do { if ((_tokenSet_5.member(LA(1)))) { { switch ( LA(1)) { case STAR: { org.exist.xquery.parser.XQueryAST tmp189_AST = null; tmp189_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp189_AST); match(STAR); break; } case LITERAL_div: { org.exist.xquery.parser.XQueryAST tmp190_AST = null; tmp190_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp190_AST); match(LITERAL_div); break; } case LITERAL_idiv: { org.exist.xquery.parser.XQueryAST tmp191_AST = null; tmp191_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp191_AST); match(LITERAL_idiv); break; } case LITERAL_mod: { org.exist.xquery.parser.XQueryAST tmp192_AST = null; tmp192_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp192_AST); match(LITERAL_mod); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } unaryExpr(); astFactory.addASTChild(currentAST, returnAST); } else { break _loop169; } } while (true); } multiplicativeExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; returnAST = multiplicativeExpr_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/10544e5ec103a411822c6180ed81ef38eab15de8/XQueryParser.java/buggy/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3309,
28884,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3309,
28884,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
... |
visit_if_icmp(address, X86Constants.JGE); } | visit_if_icmp(address, X86Constants.JGE); } | public final void visit_if_icmpge(int address) { visit_if_icmp(address, X86Constants.JGE); // JGE } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/55b12818040bb69b51502c4cd0f42118d2046977/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
3757,
67,
430,
67,
335,
1291,
908,
12,
474,
1758,
13,
288,
3639,
3757,
67,
430,
67,
335,
1291,
12,
2867,
16,
1139,
5292,
2918,
18,
46,
7113,
1769,
368,
804,
7113,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
3757,
67,
430,
67,
335,
1291,
908,
12,
474,
1758,
13,
288,
3639,
3757,
67,
430,
67,
335,
1291,
12,
2867,
16,
1139,
5292,
2918,
18,
46,
7113,
1769,
368,
804,
7113,
565,... |
returnValue = obj.getMetaClass().invokeStaticMethod(obj,"listOrderByFirstName", new Object[]{}); | argsMap = new HashMap(); argsMap.put("order", "desc"); argsMap.put("sort", "firstName"); returnValue = obj.getMetaClass().invokeStaticMethod(obj, "listOrderByFirstName", new Object[] { argsMap }); | public void testListPersistentMethods() { GrailsDomainClass domainClass = this.grailsApplication.getGrailsDomainClass("PersistentMethodTests"); GroovyObject obj = (GroovyObject)domainClass.newInstance(); obj.setProperty( "id", new Long(1) ); obj.setProperty( "firstName", "fred" ); obj.setProperty( "lastName", "flintstone" ); obj.invokeMethod("save", null); GroovyObject obj2 = (GroovyObject)domainClass.newInstance(); obj2.setProperty( "id", new Long(2) ); obj2.setProperty( "firstName", "wilma" ); obj2.setProperty( "lastName", "flintstone" ); obj2.invokeMethod("save", null); GroovyObject obj3 = (GroovyObject)domainClass.newInstance(); obj3.setProperty( "id", new Long(3) ); obj3.setProperty( "firstName", "dino" ); obj3.setProperty( "lastName", "dinosaur" ); obj3.invokeMethod("save", null); // test plain list Object returnValue = obj.getMetaClass().invokeStaticMethod(obj,"list", null); assertNotNull(returnValue); assertTrue(returnValue instanceof List); List returnList = (List)returnValue; assertEquals(3, returnList.size()); // test list with max value Map argsMap = new HashMap(); argsMap.put("max",new Integer(1)); returnValue = obj.getMetaClass().invokeStaticMethod(obj,"list", new Object[]{ argsMap }); assertNotNull(returnValue); assertTrue(returnValue instanceof List); returnList = (List)returnValue; assertEquals(1, returnList.size()); // test list with order by returnValue = obj.getMetaClass().invokeStaticMethod(obj,"listOrderByFirstName", new Object[]{}); assertNotNull(returnValue); assertTrue(returnValue instanceof List); returnList = (List)returnValue; obj = (GroovyObject)returnList.get(0); obj2 = (GroovyObject)returnList.get(1); assertEquals("dino", obj.getProperty("firstName")); assertEquals("fred", obj2.getProperty("firstName")); } | 6460 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6460/e9d854b9228c3bcfc2f773f4823262cabe16e471/PersistentMethodTests.java/clean/test/persistence/org/codehaus/groovy/grails/orm/hibernate/PersistentMethodTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
682,
11906,
4712,
1435,
288,
3639,
10812,
14573,
3748,
797,
2461,
797,
273,
333,
18,
2752,
14573,
3208,
18,
588,
14571,
14573,
3748,
797,
2932,
11906,
1305,
14650,
8863,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
682,
11906,
4712,
1435,
288,
3639,
10812,
14573,
3748,
797,
2461,
797,
273,
333,
18,
2752,
14573,
3208,
18,
588,
14571,
14573,
3748,
797,
2932,
11906,
1305,
14650,
8863,
36... |
if (sm != null) { sm.checkPermission(new AdminPermission(bundle, action)); } | if (sm != null) sm.checkPermission(getAdminPermission(bundle, action)); | protected void checkAdminPermission(Bundle bundle, String action) { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AdminPermission(bundle, action)); } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/f6578870fae3e88404fb3d10c3416822040a908a/Framework.java/buggy/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
866,
4446,
5041,
12,
3405,
3440,
16,
514,
1301,
13,
288,
202,
202,
4368,
1318,
3029,
273,
2332,
18,
588,
4368,
1318,
5621,
202,
202,
430,
261,
4808,
480,
446,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
866,
4446,
5041,
12,
3405,
3440,
16,
514,
1301,
13,
288,
202,
202,
4368,
1318,
3029,
273,
2332,
18,
588,
4368,
1318,
5621,
202,
202,
430,
261,
4808,
480,
446,
13,
288,
... |
private void processNameBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber) throws DOMException { | private void processNameBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber, LimitTo limitTo) throws DOMException { if (limitTo == null) { | private void processNameBinding(IASTName name, IBinding binding, IASTFileLocation loc, int fileNumber) throws DOMException { if (name.isDeclaration()) { processNameDeclBinding(name, binding, loc, fileNumber); } else if (name.isReference()) { processNameRefBinding(name, binding, loc, fileNumber); } // else // ICSearchConstants.UNKNOWN_LIMIT_TO; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/2bd5fd9dfadaa20f9b25d55de4fb018a57a032fa/CPPGenerateIndexVisitor.java/clean/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/domsourceindexer/CPPGenerateIndexVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
461,
5250,
12,
45,
9053,
461,
508,
16,
467,
5250,
5085,
16,
467,
9053,
812,
2735,
1515,
16,
509,
585,
1854,
16,
7214,
774,
1800,
774,
13,
1216,
4703,
503,
288,
225,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
461,
5250,
12,
45,
9053,
461,
508,
16,
467,
5250,
5085,
16,
467,
9053,
812,
2735,
1515,
16,
509,
585,
1854,
16,
7214,
774,
1800,
774,
13,
1216,
4703,
503,
288,
225,
3... |
if(Character.isLetterOrDigit(c) || c == '-' || c == '.') | if(Character.isLetterOrDigit(c) || (c == '-') || (c == '.')) | private String sanitize(String fnam) { if(fnam == null) return ""; StringBuffer sb = new StringBuffer(fnam.length()); for(int i=0;i<fnam.length();i++) { char c = fnam.charAt(i); if(Character.isLetterOrDigit(c) || c == '-' || c == '.') sb.append(c); } return sb.toString(); } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/TextModeClientInterface.java/clean/src/freenet/node/TextModeClientInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
8881,
12,
780,
2295,
301,
13,
288,
377,
202,
430,
12,
4293,
301,
422,
446,
13,
327,
1408,
31,
3639,
6674,
2393,
273,
394,
6674,
12,
4293,
301,
18,
2469,
10663,
3639,
364,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
8881,
12,
780,
2295,
301,
13,
288,
377,
202,
430,
12,
4293,
301,
422,
446,
13,
327,
1408,
31,
3639,
6674,
2393,
273,
394,
6674,
12,
4293,
301,
18,
2469,
10663,
3639,
364,
1... |
if (!isEditorRemovable(oldDefaultItem)) oldDefaultItem .setText(oldDefaultItem.getText() + " " + WorkbenchMessages.FileEditorPreference_isLocked); | if (!isEditorRemovable(oldDefaultItem)) setLockedItemText(oldDefaultItem, oldDefaultItem.getText()); | public void setSelectedEditorAsDefault() { TableItem[] items = editorTable.getSelection(); if (items.length > 0) { // First change the label of the old default TableItem oldDefaultItem = editorTable.getItem(0); oldDefaultItem .setText(((EditorDescriptor) oldDefaultItem.getData(DATA_EDITOR)) .getLabel()); // update the label to reflect the locked state if (!isEditorRemovable(oldDefaultItem)) oldDefaultItem .setText(oldDefaultItem.getText() + " " + WorkbenchMessages.FileEditorPreference_isLocked); //$NON-NLS-1$ // Now set the new default EditorDescriptor editor = (EditorDescriptor) items[0].getData(DATA_EDITOR); getSelectedResourceType().setDefaultEditor(editor); Boolean fromContentType = (Boolean) items[0].getData(DATA_FROM_CONTENT_TYPE); items[0].dispose(); //Table is single selection TableItem item = new TableItem(editorTable, SWT.NULL, 0); item.setData(DATA_EDITOR, editor); if (fromContentType != null) item.setData(DATA_FROM_CONTENT_TYPE, fromContentType); item .setText(editor.getLabel() + " " + WorkbenchMessages.FileEditorPreference_defaultLabel); //$NON-NLS-1$ item.setImage(getImage(editor)); if (!isEditorRemovable(item)) item .setText(item.getText() + " " + WorkbenchMessages.FileEditorPreference_isLocked); //$NON-NLS-1$ editorTable.setSelection(new TableItem[] { item }); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/d3fa32bbfcb40ea2e6d5950eaa2d6bab56c82e4a/FileEditorsPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FileEditorsPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23006,
6946,
1463,
1868,
1435,
288,
3639,
3555,
1180,
8526,
1516,
273,
4858,
1388,
18,
588,
6233,
5621,
3639,
309,
261,
3319,
18,
2469,
405,
374,
13,
288,
5411,
368,
5783,
2549... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23006,
6946,
1463,
1868,
1435,
288,
3639,
3555,
1180,
8526,
1516,
273,
4858,
1388,
18,
588,
6233,
5621,
3639,
309,
261,
3319,
18,
2469,
405,
374,
13,
288,
5411,
368,
5783,
2549... |
public boolean add(T o) { return getListCache().add(o); | public void add(int index, T o) { getListCache().add(index, o); | public boolean add(T o) { return getListCache().add(o); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ff85486c4bc88d3b82d27fe4f951dc7bafeafa6f/BootableArrayList.java/buggy/core/src/core/org/jnode/util/BootableArrayList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
527,
12,
56,
320,
13,
288,
202,
202,
2463,
10033,
1649,
7675,
1289,
12,
83,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
1250,
527,
12,
56,
320,
13,
288,
202,
202,
2463,
10033,
1649,
7675,
1289,
12,
83,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
e1.printStackTrace(new PrintWriter(writer)); | public void actionPerformed(ActionEvent e) { Object obj = e.getSource(); if (obj == btnBack) { java2CodeFrame.backButtonImpl(); } else if (obj == btnCancel) { java2CodeFrame.setVisible(false); Thread.currentThread().setContextClassLoader(java2CodeFrame.getClassLoader()); } else if (obj == btnFinish) { File outputDir = new File(java2CodeFrame.outputpane.txtoutput.getText().trim()); if (java2CodeFrame.outputpane.radCustomLocation.isSelected() ) { if (!outputDir.isDirectory()) { JOptionPane.showMessageDialog(java2CodeFrame, "The Output Directory specified is invalid. Please provide a valid directory", "Error!", JOptionPane.ERROR_MESSAGE); java2CodeFrame.repaint(); return; } } String selected = java2CodeFrame.optionPane.buttonGroup.getSelection().getActionCommand(); if (selected.equalsIgnoreCase("radDefaultClient")) { File temp = java2CodeFrame.optionPane.setDefaultClientConfigurations(); try { java2CodeFrame.generateDefaultClientCode(temp); } catch (Exception e1) { e1.printStackTrace(); StringWriter writer = new StringWriter(); e1.printStackTrace(new PrintWriter(writer)); JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(), "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE); java2CodeFrame.setVisible(false); } JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!", "Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE); java2CodeFrame.setVisible(false); return; } else if (selected.equalsIgnoreCase("radCustom")) { String output = java2CodeFrame.outputpane.buttonGroup.getSelection().getActionCommand(); if (output.equalsIgnoreCase("radCurrentProject")) { File temp = java2CodeFrame.secondPanel.codegenBean.getTemp(); java2CodeFrame.secondPanel.codegenBean.setOutput(temp.getAbsolutePath()); try { java2CodeFrame.generatecode(); java2CodeFrame.copyDirectory(new File(temp + File.separator + "src"), new File((String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem())); File src = new File(temp + File.separator + "resources"); if (src.isDirectory()) java2CodeFrame.copyDirectory(src, new File((String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem() + File.separator + ".." + File.separator + "resources")); java2CodeFrame.deleteDirectory(temp); } catch (Exception e1) { e1.printStackTrace(); StringWriter writer = new StringWriter(); e1.printStackTrace(new PrintWriter(writer)); JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(), "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE); java2CodeFrame.setVisible(false); } } else { try { java2CodeFrame.generatecode(); } catch (Exception e1) { e1.printStackTrace(); StringWriter writer = new StringWriter(); e1.printStackTrace(new PrintWriter(writer)); JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(), "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE); java2CodeFrame.setVisible(false); } } } else if (selected.equalsIgnoreCase("radDefaultServer")) { File temp = java2CodeFrame.optionPane.setDefaultServerConfigurations(); String output = java2CodeFrame.outputpane.buttonGroup.getSelection().getActionCommand(); if (output.equalsIgnoreCase("radCurrentProject")) { try { java2CodeFrame.generateDefaultServerCode(temp, (String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem()); } catch (Exception e1) { e1.printStackTrace(); StringWriter writer = new StringWriter(); e1.printStackTrace(new PrintWriter(writer)); JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(), "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE); java2CodeFrame.setVisible(false); } } else { String path = java2CodeFrame.outputpane.txtoutput.getText(); File outputPath = new File(path); if (outputPath.exists()) { try { java2CodeFrame.generateDefaultServerCodeCustomLocation(path); } catch (Exception e1) { e1.printStackTrace(); StringWriter writer = new StringWriter(); e1.printStackTrace(new PrintWriter(writer)); JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(), "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE); java2CodeFrame.setVisible(false); } } else { JOptionPane.showMessageDialog(java2CodeFrame, "Invalid file path!", "Error!!!", JOptionPane.INFORMATION_MESSAGE); return; } } } else if (selected.equalsIgnoreCase("radDefaultBoth")) { File temp = java2CodeFrame.optionPane.setDefaultServerConfigurations(); String output = java2CodeFrame.outputpane.buttonGroup.getSelection().getActionCommand(); if (output.equalsIgnoreCase("radCurrentProject")) { try { java2CodeFrame.generateDefaultServerCode(temp, (String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem()); File temp2 = java2CodeFrame.optionPane.setDefaultClientConfigurations(); java2CodeFrame.generateDefaultClientCode(temp2); } catch (Exception e1) { e1.printStackTrace(); StringWriter writer = new StringWriter(); e1.printStackTrace(new PrintWriter(writer)); JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(), "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE); java2CodeFrame.setVisible(false); } } else { String path = java2CodeFrame.outputpane.txtoutput.getText(); File outputPath = new File(path); if (outputPath.exists()) { try { java2CodeFrame.generateDefaultServerCodeCustomLocation(path); File temp2 = java2CodeFrame.optionPane.setDefaultClientConfigurations(); java2CodeFrame.generateDefaultClientCode(temp2); } catch (Exception e1) { e1.printStackTrace(); StringWriter writer = new StringWriter(); e1.printStackTrace(new PrintWriter(writer)); JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(), "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE); java2CodeFrame.setVisible(false); } } else { JOptionPane.showMessageDialog(java2CodeFrame, "Invalid file path!", "Error!!!", JOptionPane.INFORMATION_MESSAGE); return; } } } JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!", "Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE); java2CodeFrame.setVisible(false); } else if (obj == btnNext) { if (java2CodeFrame.optionPane.isVisible()) { String selected = java2CodeFrame.optionPane.buttonGroup.getSelection().getActionCommand(); if (selected.equalsIgnoreCase("radDefaultServer") || selected.equalsIgnoreCase("radDefaultBoth")) { java2CodeFrame.increasePanelID(); } } java2CodeFrame.setPane(); } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/4cb72a8c91a6c2de095996f2ac577bf5331d4f49/BottomPanel.java/buggy/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
3639,
1033,
1081,
273,
425,
18,
588,
1830,
5621,
3639,
309,
261,
2603,
422,
10638,
2711,
13,
288,
5411,
2252,
22,
1085,
3219,
18,
823,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
3639,
1033,
1081,
273,
425,
18,
588,
1830,
5621,
3639,
309,
261,
2603,
422,
10638,
2711,
13,
288,
5411,
2252,
22,
1085,
3219,
18,
823,
36... | |
if (fileList == null) loadFiles(null, true); if (linkList == null) loadLinks(null, true); | if (this.fileList == null) this.loadFiles(null, true); if (this.linkList == null) this.loadLinks(null, true); | public boolean isEmpty() { if (fileList == null) loadFiles(null, true); if (linkList == null) loadLinks(null, true); if (fileList.size() == 0 && linkList.size() == 0) return true; return false; } | 47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/88402a3bc59123261d50a7cfed0ac20de2b772f6/Index.java/buggy/src/thaw/plugins/index/Index.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
2709,
1435,
288,
202,
202,
430,
261,
768,
682,
422,
446,
13,
1082,
202,
945,
2697,
12,
2011,
16,
638,
1769,
202,
202,
430,
261,
1232,
682,
422,
446,
13,
1082,
202,
945... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2709,
1435,
288,
202,
202,
430,
261,
768,
682,
422,
446,
13,
1082,
202,
945,
2697,
12,
2011,
16,
638,
1769,
202,
202,
430,
261,
1232,
682,
422,
446,
13,
1082,
202,
945... |
public void set(org.quickfix.field.CollInquiryQualifier value) | public void set(quickfix.field.CollInquiryQualifier value) | public void set(org.quickfix.field.CollInquiryQualifier value) { setField(value); } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/CollateralInquiry.java/buggy/src/java/src/quickfix/fix44/CollateralInquiry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
12,
19525,
904,
18,
1518,
18,
13535,
382,
372,
6913,
16185,
460,
13,
225,
288,
16331,
12,
1132,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
12,
19525,
904,
18,
1518,
18,
13535,
382,
372,
6913,
16185,
460,
13,
225,
288,
16331,
12,
1132,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return RuleBasedCollator.ceiNext(this); | return collator.ceiNext(this); | public int next () { if (index == text.length()) return NULLORDER; return RuleBasedCollator.ceiNext(this); } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/d41dfd6cc95692f13ca6dde18e9717679c00595d/CollationElementIterator.java/buggy/libjava/java/text/CollationElementIterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
1024,
1832,
225,
288,
565,
309,
261,
1615,
422,
977,
18,
2469,
10756,
1377,
327,
3206,
7954,
31,
565,
327,
4508,
639,
18,
311,
77,
2134,
12,
2211,
1769,
225,
289,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
1024,
1832,
225,
288,
565,
309,
261,
1615,
422,
977,
18,
2469,
10756,
1377,
327,
3206,
7954,
31,
565,
327,
4508,
639,
18,
311,
77,
2134,
12,
2211,
1769,
225,
289,
2,
-100,
... |
protected void scanAttribute(XMLAttributesImpl attributes) throws IOException, XNIException { if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanAttribute()"); // name fEntityScanner.scanQName(fAttributeQName); // equals fEntityScanner.skipSpaces(); if (!fEntityScanner.skipChar('=')) { reportFatalError("EqRequiredInAttribute", new Object[]{fAttributeQName.rawname}); } fEntityScanner.skipSpaces(); // content int oldLen = attributes.getLength(); attributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol, null); // WFC: Unique Att Spec if (oldLen == attributes.getLength()) { reportFatalError("AttributeNotUnique", new Object[]{fCurrentElement.rawname, fAttributeQName.rawname}); } //REVISIT: one more case needs to be included: external PE and standalone is no boolean isVC = fHasExternalDTD && !fStandalone; // REVISIT: it seems that this function should not take attributes, and length scanAttributeValue(this.fTempString, fTempString2, fAttributeQName.rawname, attributes, oldLen, isVC); String value = fTempString.toString(); attributes.setValue(oldLen, value); attributes.setNonNormalizedValue(oldLen, fTempString2.toString()); attributes.setSpecified(oldLen, true); // record namespace declarations if any. if (fBindNamespaces) { String localpart = fAttributeQName.localpart; String prefix = fAttributeQName.prefix != null ? fAttributeQName.prefix : XMLSymbols.EMPTY_STRING; // when it's of form xmlns="..." or xmlns:prefix="...", // it's a namespace declaration. but prefix:xmlns="..." isn't. if (prefix == XMLSymbols.PREFIX_XMLNS || prefix == XMLSymbols.EMPTY_STRING && localpart == XMLSymbols.PREFIX_XMLNS) { // get the internalized value of this attribute String uri = fSymbolTable.addSymbol(value); // 1. "xmlns" can't be bound to any namespace if (prefix == XMLSymbols.PREFIX_XMLNS && localpart == XMLSymbols.PREFIX_XMLNS) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "CantBindXMLNS", new Object[]{fAttributeQName}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } // 2. the namespace for "xmlns" can't be bound to any prefix if (uri == NamespaceContext.XMLNS_URI) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "CantBindXMLNS", new Object[]{fAttributeQName}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } // 3. "xml" can't be bound to any other namespace than it's own if (localpart == XMLSymbols.PREFIX_XML) { if (uri != NamespaceContext.XML_URI) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "CantBindXML", new Object[]{fAttributeQName}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } } // 4. the namespace for "xml" can't be bound to any other prefix else { if (uri ==NamespaceContext.XML_URI) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "CantBindXML", new Object[]{fAttributeQName}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } } prefix = localpart != XMLSymbols.PREFIX_XMLNS ? localpart : XMLSymbols.EMPTY_STRING; // http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-prefix // We should only report an error if there is a prefix, // that is, the local part is not "xmlns". -SG if (uri == XMLSymbols.EMPTY_STRING && localpart != XMLSymbols.PREFIX_XMLNS) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "EmptyPrefixedAttName", new Object[]{fAttributeQName}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } // declare prefix in context fNamespaceContext.declarePrefix(prefix, uri.length() != 0 ? uri : null); // bind namespace attribute to a namespace attributes.setURI(oldLen, fNamespaceContext.getURI(XMLSymbols.PREFIX_XMLNS)); // call handler if (fDocumentHandler != null) { fDocumentHandler.startPrefixMapping(prefix, uri, null); } } else { // attempt to bind attribute if (fAttributeQName.prefix != null) { attributes.setURI(oldLen, fNamespaceContext.getURI(fAttributeQName.prefix)); } } } if (DEBUG_CONTENT_SCANNING) System.out.println("<<< scanAttribute()"); } // scanAttribute(XMLAttributes) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/6835148a89437ff2d73ad76777ac7f9d6de44771/XMLNSDocumentScannerImpl.java/clean/src/org/apache/xerces/impl/XMLNSDocumentScannerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
4750,
918,
4135,
1499,
12,
4201,
2498,
2828,
1677,
13,
225,
1216,
1860,
16,
1139,
50,
45,
503,
288,
225,
309,
261,
9394,
67,
9689,
67,
2312,
11489,
1360,
13,
2332,
18,
659,
18,
8222,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
918,
4135,
1499,
12,
4201,
2498,
2828,
1677,
13,
225,
1216,
1860,
16,
1139,
50,
45,
503,
288,
225,
309,
261,
9394,
67,
9689,
67,
2312,
11489,
1360,
13,
2332,
18,
659,
18,
8222,
... | ||
String[] attributes = {"sn", "cn", "o", "mail", "city"}; | String[] attributes = {"sn", "cn", "o", "mail", "city"}; | public Vector queryLDAP (String aServerName, int aPort, String aSearchString) { Vector retVecVec = new Vector(); //return vector of vectors.// try { //open a connection to the LDAP serverSystem.out.println ("Opening server " + aServerName); ICardSource Four11AddressBook = new LDAP_Server (aServerName); //create the query ITerm query = new TermEqual (new AC_Attribute ("sn", aSearchString)); String[] attributes = {"sn", "cn", "o", "mail", "city"}; //query the LDAP server.System.out.println ("Send query" + query); ICardSet cardSet = Four11AddressBook.getCardSet (query, attributes); //Sort the list. String[] sortOrder = {"sn", "cn"}; cardSet.sort (sortOrder); //hack. I've put the for loop in a try block to catch the exception //thrown when cardEnum.hasMoreElements() incorrectly returns true. try { //enumerate thru the cards. for (Enumeration cardEnum = cardSet.getEnumeration(); cardEnum.hasMoreElements(); ) {System.out.println ("got card"); ICard card = (ICard) cardEnum.nextElement(); //get the addres card IAttributeSet attrSet = card.getAttributeSet (); //get the attributes for this card Vector thisRow = new Vector(6); //create a simple vector to hold the attributes values for this card. String commonName = ""; String organization = ""; String mail = ""; String phone = ""; String city = ""; String nickName = ""; // enumerate thru the card attributes. for (Enumeration attEnum = attrSet.getEnumeration(); attEnum.hasMoreElements(); ) { IAttribute attr = (IAttribute) attEnum.nextElement(); String attrName = attr.getName(); if (attrName.equals ("cn")) { commonName = attr.getValue(); } else if (attrName.equals ("o")) { organization = attr.getValue(); } else if (attrName.equals ("mail")) { mail = attr.getValue(); } else if (attrName.equals ("sn")) { phone = attr.getValue(); } else if (attrName.equals ("city")) { city = attr.getValue(); } } //create this row for the table. thisRow.addElement (commonName); thisRow.addElement (mail); thisRow.addElement (organization); thisRow.addElement (phone); thisRow.addElement (city); thisRow.addElement (nickName); //add this row to the table retVecVec.addElement (thisRow); } } catch (Exception e) { }// }// catch( LDAPException e ) {// System.out.println( "Error: " + e.toString() );// }System.out.println ("Done."); return retVecVec; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/b0fa2f56cd2dcc90452b768e6b38187cfb8c30eb/AddressBook.java/buggy/grendel/addressbook/AddressBook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5589,
843,
15496,
261,
780,
279,
28434,
16,
509,
279,
2617,
16,
514,
279,
2979,
780,
13,
288,
3639,
5589,
325,
12991,
12991,
273,
394,
5589,
5621,
282,
368,
2463,
3806,
434,
10046,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5589,
843,
15496,
261,
780,
279,
28434,
16,
509,
279,
2617,
16,
514,
279,
2979,
780,
13,
288,
3639,
5589,
325,
12991,
12991,
273,
394,
5589,
5621,
282,
368,
2463,
3806,
434,
10046,
... |
int tibAddress = bootImageAddress + tibImageOffset; VM_ObjectModel.setTIB(bootImage, mapEntry.imageOffset, VM_Address.fromIntZeroExtend(tibAddress), rvmType); | VM_Address tibAddress = bootImageAddress.add(tibImageOffset); VM_ObjectModel.setTIB(bootImage, mapEntry.imageOffset, tibAddress, rvmType); | private static int copyToBootImage(Object jdkObject, boolean allocOnly, int overwriteOffset, Object parentObject) throws IllegalAccessException { // // Return object if it is already copied and not being overwritten // BootImageMap.Entry mapEntry = BootImageMap.findOrCreateEntry(jdkObject); if (mapEntry.imageOffset != OBJECT_NOT_ALLOCATED && overwriteOffset == -1) return mapEntry.imageOffset; if (verbose >= 2) depth++; // // fetch object's type information // Class jdkType = jdkObject.getClass(); VM_Type rvmType = getRvmType(jdkType); if (rvmType == null) { if (verbose >= 2) traverseObject(jdkObject); if (verbose >= 2) depth--; return OBJECT_NOT_PRESENT; // object not part of bootimage } // // copy object to image // if (jdkType.isArray()) { VM_Array rvmArrayType = rvmType.asArray(); // // allocate space in image // int arrayCount = Array.getLength(jdkObject); int arrayImageOffset = (overwriteOffset == -1) ? bootImage.allocateArray(rvmArrayType, arrayCount) : overwriteOffset; mapEntry.imageOffset = arrayImageOffset; if (verbose >= 2) { if (depth == depthCutoff) say(SPACES.substring(0,depth+1), "TOO DEEP: cutting off"); else if (depth < depthCutoff) { String tab = SPACES.substring(0,depth+1); if (depth == 0 && jtocCount >= 0) tab = tab + "jtoc #" + String.valueOf(jtocCount) + ": "; int arraySize = rvmArrayType.getInstanceSize(arrayCount); say(tab, "Copying array ", jdkType.getName(), " length=", String.valueOf(arrayCount), (arraySize >= LARGE_ARRAY_SIZE) ? " large object!!!" : ""); } } VM_Type rvmElementType = rvmArrayType.getElementType(); // Show info on reachability of int arrays // if (false && rvmElementType.equals(VM_Type.IntType)) { if (parentObject != null) { Class parentObjectType = parentObject.getClass(); VM.sysWrite("Copying int array (", 4 * ((int []) jdkObject).length); VM.sysWriteln(" bytes) from parent object of type ", parentObjectType.toString()); } else { VM.sysWriteln("Copying int array from no parent object"); } } // // copy array elements from host jdk address space into image // recurse on values that are references // if (rvmElementType.isPrimitiveType()) { // array element is logical or numeric type if (rvmElementType.equals(VM_Type.BooleanType)) { boolean values[] = (boolean[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setByte(arrayImageOffset + i, values[i] ? 1 : 0); } else if (rvmElementType.equals(VM_Type.ByteType)) { byte values[] = (byte[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setByte(arrayImageOffset + i, values[i]); } else if (rvmElementType.equals(VM_Type.CharType)) { char values[] = (char[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setHalfWord(arrayImageOffset + (i << LOG_BYTES_IN_CHAR), values[i]); } else if (rvmElementType.equals(VM_Type.ShortType)) { short values[] = (short[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setHalfWord(arrayImageOffset + (i << LOG_BYTES_IN_SHORT), values[i]); } else if (rvmElementType.equals(VM_Type.IntType)) { int values[] = (int[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setFullWord(arrayImageOffset + (i << LOG_BYTES_IN_INT), values[i]); } else if (rvmElementType.equals(VM_Type.LongType)) { long values[] = (long[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setDoubleWord(arrayImageOffset + (i << LOG_BYTES_IN_LONG), values[i]); } else if (rvmElementType.equals(VM_Type.FloatType)) { float values[] = (float[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setFullWord(arrayImageOffset + (i << LOG_BYTES_IN_FLOAT), Float.floatToIntBits(values[i])); } else if (rvmElementType.equals(VM_Type.DoubleType)) { double values[] = (double[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setDoubleWord(arrayImageOffset + (i << LOG_BYTES_IN_DOUBLE), Double.doubleToLongBits(values[i])); } else fail("unexpected primitive array type: " + rvmArrayType); } else { // array element is reference type Object values[] = (Object []) jdkObject; Class jdkClass = jdkObject.getClass(); if (!allocOnly) { for (int i = 0; i<arrayCount; ++i) { if (values[i] != null) { if (verbose >= 2) traceContext.push(values[i].getClass().getName(), jdkClass.getName(), i); int imageOffset = copyToBootImage(values[i], allocOnly, -1, jdkObject); if (imageOffset == OBJECT_NOT_PRESENT) { // object not part of bootimage: install null reference if (verbose >= 2) traceContext.traceObjectNotInBootImage(); bootImage.setNullAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS)); } else { bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS), bootImageAddress + imageOffset); } if (verbose >= 2) traceContext.pop(); } } } } } else { if (rvmType == VM_Type.AddressArrayType) { if (verbose >= 2) depth--; VM_AddressArray addrArray = (VM_AddressArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.OffsetArrayType) { if (verbose >= 2) depth--; VM_OffsetArray addrArray = (VM_OffsetArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.WordArrayType) { if (verbose >= 2) depth--; VM_WordArray addrArray = (VM_WordArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.ExtentArrayType) { if (verbose >= 2) depth--; VM_ExtentArray addrArray = (VM_ExtentArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.CodeArrayType) { if (verbose >= 2) depth--; VM_CodeArray codeArray = (VM_CodeArray) jdkObject; Object backing = codeArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType.isMagicType()) { VM.sysWriteln("Unhandled copying of magic type: " + rvmType.getDescriptor().toString()); VM.sysFail("incomplete boot image support"); } // // allocate space in image // VM_Class rvmScalarType = rvmType.asClass(); int scalarImageOffset = (overwriteOffset == -1) ? bootImage.allocateScalar(rvmScalarType) : overwriteOffset; mapEntry.imageOffset = scalarImageOffset; if (verbose >= 2) { if (depth == depthCutoff) say(SPACES.substring(0,depth+1), "TOO DEEP: cutting off"); else if (depth < depthCutoff) { String tab = SPACES.substring(0,depth+1); if (depth == 0 && jtocCount >= 0) tab = tab + "jtoc #" + String.valueOf(jtocCount) + " "; int scalarSize = rvmScalarType.getInstanceSize(); say(tab, "Copying object ", jdkType.getName(), " size=", String.valueOf(scalarSize), (scalarSize >= LARGE_SCALAR_SIZE) ? " large object!!!" : ""); } } // // copy object fields from host jdk address space into image // recurse on values that are references // VM_Field[] rvmFields = rvmScalarType.getInstanceFields(); for (int i = 0, n = rvmFields.length; i < n; ++i) { VM_Field rvmField = rvmFields[i]; VM_TypeReference rvmFieldType = rvmField.getType(); int rvmFieldOffset = scalarImageOffset + rvmField.getOffset(); String rvmFieldName = rvmField.getName().toString(); Field jdkFieldAcc = getJdkFieldAccessor(jdkType, i, INSTANCE_FIELD); if (jdkFieldAcc == null) { if (verbose >= 2) traceContext.push(rvmFieldType.toString(), jdkType.getName(), rvmFieldName); if (verbose >= 2) traceContext.traceFieldNotInHostJdk(); if (verbose >= 2) traceContext.pop(); if (rvmFieldType.isPrimitiveType()) switch (rvmField.getType().getSize()) { case 4: bootImage.setFullWord(rvmFieldOffset, 0); break; case 8: bootImage.setDoubleWord(rvmFieldOffset, 0L); break; default:fail("unexpected field type: " + rvmFieldType); break; } else bootImage.setNullAddressWord(rvmFieldOffset); continue; } if (rvmFieldType.isPrimitiveType()) { // field is logical or numeric type if (rvmFieldType.isBooleanType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getBoolean(jdkObject) ? 1 : 0); } else if (rvmFieldType.isByteType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getByte(jdkObject)); } else if (rvmFieldType.isCharType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getChar(jdkObject)); } else if (rvmFieldType.isShortType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getShort(jdkObject)); } else if (rvmFieldType.isIntType()) { try { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getInt(jdkObject)); } catch (IllegalArgumentException ex) { System.err.println( "type " + rvmScalarType + ", field " + rvmField); throw ex; } } else if (rvmFieldType.isLongType()) { bootImage.setDoubleWord(rvmFieldOffset, jdkFieldAcc.getLong(jdkObject)); } else if (rvmFieldType.isFloatType()) { float f = jdkFieldAcc.getFloat(jdkObject); bootImage.setFullWord(rvmFieldOffset, Float.floatToIntBits(f)); } else if (rvmFieldType.isDoubleType()) { double d = jdkFieldAcc.getDouble(jdkObject); bootImage.setDoubleWord(rvmFieldOffset, Double.doubleToLongBits(d)); } else if (rvmFieldType.equals(VM_TypeReference.Address) || rvmFieldType.equals(VM_TypeReference.Word) || rvmFieldType.equals(VM_TypeReference.Extent) || rvmFieldType.equals(VM_TypeReference.Offset)) { Object o = jdkFieldAcc.get(jdkObject); String msg = " instance field " + rvmField.toString(); boolean warn = rvmFieldType.equals(VM_TypeReference.Address); bootImage.setAddressWord(rvmFieldOffset, getAddressValue(o, msg, warn)); } else { fail("unexpected primitive field type: " + rvmFieldType); } } else { // field is reference type Object value = jdkFieldAcc.get(jdkObject); if (!allocOnly && value != null) { Class jdkClass = jdkFieldAcc.getDeclaringClass(); if (verbose >= 2) traceContext.push(value.getClass().getName(), jdkClass.getName(), jdkFieldAcc.getName()); int imageOffset = copyToBootImage(value, allocOnly, -1, jdkObject); if (imageOffset == OBJECT_NOT_PRESENT) { // object not part of bootimage: install null reference if (verbose >= 2) traceContext.traceObjectNotInBootImage(); bootImage.setNullAddressWord(rvmFieldOffset); } else bootImage.setAddressWord(rvmFieldOffset, bootImageAddress + imageOffset); if (verbose >= 2) traceContext.pop(); } } } } // // copy object's type information block into image, if it's not there // already // if (!allocOnly) { if (verbose >= 2) traceContext.push("", jdkObject.getClass().getName(), "tib"); int tibImageOffset = copyToBootImage(rvmType.getTypeInformationBlock(), allocOnly, -1, jdkObject); if (verbose >= 2) traceContext.pop(); if (tibImageOffset == OBJECT_NOT_ALLOCATED) fail("can't copy tib for " + jdkObject); int tibAddress = bootImageAddress + tibImageOffset; VM_ObjectModel.setTIB(bootImage, mapEntry.imageOffset, VM_Address.fromIntZeroExtend(tibAddress), rvmType); } if (verbose >= 2) depth--; return mapEntry.imageOffset; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/7655e8d3e9c72b63fa893cd5b4f4d0f45bf79ee4/BootImageWriter.java/clean/rvm/src/tools/bootImageWriter/BootImageWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
509,
29817,
15817,
2040,
12,
921,
525,
2883,
921,
16,
4766,
1377,
1250,
4767,
3386,
16,
509,
6156,
2335,
16,
4766,
1377,
1033,
982,
921,
13,
565,
1216,
11900,
565,
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,
509,
29817,
15817,
2040,
12,
921,
525,
2883,
921,
16,
4766,
1377,
1250,
4767,
3386,
16,
509,
6156,
2335,
16,
4766,
1377,
1033,
982,
921,
13,
565,
1216,
11900,
565,
288,
1377,
... |
if(mode != VFSBrowser.SAVE_DIALOG) panel.add(Box.createGlue()); | public VFSFileChooserDialog(View view, String path, int mode, boolean multipleSelection) { super(view,jEdit.getProperty("vfs.browser.title"),true); JPanel content = new JPanel(new BorderLayout()); content.setBorder(new EmptyBorder(12,12,12,12)); setContentPane(content); String name; if(path == null || path.endsWith(File.separator) || path.endsWith("/")) name = null; else { VFS vfs = VFSManager.getVFSForPath(path); name = vfs.getFileName(path); path = vfs.getParentOfPath(path); } browser = new VFSBrowser(view,path,mode,multipleSelection,true); browser.addBrowserListener(new BrowserHandler()); content.add(BorderLayout.CENTER,browser); JPanel bottomPanel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS)); panel.setBorder(new EmptyBorder(12,0,0,0)); JLabel label = new JLabel(jEdit.getProperty("vfs.browser.dialog.filename")); panel.add(label); panel.add(Box.createHorizontalStrut(12)); filenameField = new JTextField(); filenameField.setText(name); filenameField.addKeyListener(new KeyHandler()); filenameField.selectAll(); label.setDisplayedMnemonic(jEdit.getProperty( "vfs.browser.dialog.filename.mnemonic").charAt(0)); label.setLabelFor(filenameField); Dimension dim = filenameField.getPreferredSize(); dim.width = Integer.MAX_VALUE; filenameField.setMaximumSize(dim); Box box = new Box(BoxLayout.Y_AXIS); box.add(Box.createGlue()); box.add(filenameField); box.add(Box.createGlue()); panel.add(box); panel.add(Box.createHorizontalStrut(12)); if(mode == VFSBrowser.BROWSER || mode == VFSBrowser.OPEN_DIALOG) { GUIUtilities.requestFocus(this,browser.getBrowserView() .getDefaultFocusComponent()); } else { GUIUtilities.requestFocus(this,filenameField); } ok = new JButton(jEdit.getProperty("vfs.browser.dialog." + (mode == VFSBrowser.OPEN_DIALOG ? "open" : "save"))); ok.addActionListener(new ActionHandler()); getRootPane().setDefaultButton(ok); panel.add(ok); panel.add(Box.createHorizontalStrut(6)); cancel = new JButton(jEdit.getProperty("common.cancel")); cancel.addActionListener(new ActionHandler()); panel.add(cancel); if(mode != VFSBrowser.SAVE_DIALOG) panel.add(Box.createGlue()); bottomPanel.add(BorderLayout.NORTH,panel); status = new JLabel(" "); status.setBorder(new EmptyBorder(12,0,0,0)); bottomPanel.add(BorderLayout.SOUTH,status); content.add(BorderLayout.SOUTH,bottomPanel); VFSManager.getIOThreadPool().addProgressListener(this); pack(); GUIUtilities.loadGeometry(this,"vfs.browser.dialog"); show(); } //}}} | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/b20a306d85153e340b55107bf8a75f3d1c48f5bb/VFSFileChooserDialog.java/buggy/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
23567,
812,
17324,
6353,
12,
1767,
1476,
16,
514,
589,
16,
202,
202,
474,
1965,
16,
1250,
3229,
6233,
13,
202,
95,
202,
202,
9565,
12,
1945,
16,
78,
4666,
18,
588,
1396,
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,
225,
202,
482,
23567,
812,
17324,
6353,
12,
1767,
1476,
16,
514,
589,
16,
202,
202,
474,
1965,
16,
1250,
3229,
6233,
13,
202,
95,
202,
202,
9565,
12,
1945,
16,
78,
4666,
18,
588,
1396,
293... | |
defaultLayout.setBackgroundColor(color); | defaultLayout.setBackgroundColor(color); | public void setDefaultCellBackgroundColor(Color color) { defaultLayout.setBackgroundColor(color); } | 6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/913d133febf0c5fd6ac6f0b71398cf5fa320da91/Table.java/clean/src/com/lowagie/text/Table.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9277,
4020,
21699,
12,
2957,
2036,
13,
288,
3639,
805,
3744,
18,
542,
21699,
12,
3266,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9277,
4020,
21699,
12,
2957,
2036,
13,
288,
3639,
805,
3744,
18,
542,
21699,
12,
3266,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
FreeForm.REPORT_ITEMS_SLOT ); | IFreeFormModel.REPORT_ITEMS_SLOT ); | public AbstractParseState startElement( String tagName ) { if ( tagName.equalsIgnoreCase( DesignSchemaConstants.LABEL_TAG ) ) return new LabelState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.DATA_TAG ) ) return new DataItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.TEXT_TAG ) ) return new TextItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.IMAGE_TAG ) ) return new ImageState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.LINE_TAG ) ) return new LineItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.RECTANGLE_TAG ) ) return new AnyElementState( handler ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.GRID_TAG ) ) return new GridItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName .equalsIgnoreCase( DesignSchemaConstants.BROWSER_CONTROL_TAG ) ) return new AnyElementState( handler ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.LIST_TAG ) ) return new ListItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.TABLE_TAG ) ) return new TableItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.INCLUDE_TAG ) ) return new AnyElementState( handler ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.FREE_FORM_TAG ) ) return new FreeFormState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName .equalsIgnoreCase( DesignSchemaConstants.EXTENDED_ITEM_TAG ) ) return new ExtendedItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName .equalsIgnoreCase( DesignSchemaConstants.MULTI_LINE_DATA_TAG ) || tagName .equalsIgnoreCase( DesignSchemaConstants.TEXT_DATA_TAG ) ) return new TextDataItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.TEMPLATE_REPORT_ITEM_TAG ) ) return new TemplateReportItemState( handler, element, FreeForm.REPORT_ITEMS_SLOT ); return super.startElement( tagName ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/d802c33711e0d111551ae23575895cd060f085b6/FreeFormState.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/FreeFormState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
4115,
3201,
1119,
13591,
12,
514,
7196,
262,
202,
202,
95,
1082,
202,
430,
261,
7196,
18,
14963,
5556,
12,
29703,
3078,
2918,
18,
13545,
67,
7927,
262,
262,
9506,
202,
2463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4115,
3201,
1119,
13591,
12,
514,
7196,
262,
202,
202,
95,
1082,
202,
430,
261,
7196,
18,
14963,
5556,
12,
29703,
3078,
2918,
18,
13545,
67,
7927,
262,
262,
9506,
202,
2463,
... |
public void visitBlockPassNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitBlockPassNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitBlockPassNode(Node iVisited) { visit(iVisited); leave(iVisited); } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/d31a76ee29d5978a9bec41e3ac9134cee024bcab/NodeVisitorAdapter.java/clean/org/jruby/nodes/NodeVisitorAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
1768,
6433,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
1768,
6433,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
... |
double capacity = 0; | public double calc(PeerProfile profile) { double capacity = 0; RateStat acceptStat = profile.getTunnelCreateResponseTime(); RateStat rejectStat = profile.getTunnelHistory().getRejectionRate(); RateStat failedStat = profile.getTunnelHistory().getFailedRate(); capacity += estimatePartial(acceptStat, rejectStat, failedStat, 10*60*1000); capacity += estimatePartial(acceptStat, rejectStat, failedStat, 30*60*1000); capacity += estimatePartial(acceptStat, rejectStat, failedStat, 60*60*1000); capacity += estimatePartial(acceptStat, rejectStat, failedStat, 24*60*60*1000); if (tooOld(profile)) capacity = 1; capacity += profile.getReliabilityBonus(); return capacity; } | 27433 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27433/9e16bc203acad926f1d4c7750311694f35c88100/CapacityCalculator.java/buggy/router/java/src/net/i2p/router/peermanager/CapacityCalculator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
7029,
12,
6813,
4029,
3042,
13,
288,
8227,
13025,
5000,
2791,
5000,
273,
3042,
18,
588,
20329,
1684,
1064,
950,
5621,
3639,
13025,
5000,
4925,
5000,
273,
3042,
18,
588,
20329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
7029,
12,
6813,
4029,
3042,
13,
288,
8227,
13025,
5000,
2791,
5000,
273,
3042,
18,
588,
20329,
1684,
1064,
950,
5621,
3639,
13025,
5000,
4925,
5000,
273,
3042,
18,
588,
20329,
... | |
} | } else { if ( (_host != null) && (_port > 0) ) rv.append("ssu: else rv.append("ssu: } | public String toString() { StringBuffer rv = new StringBuffer(64); rv.append("[SSU "); if (_host != null) rv.append("host: ").append(_host).append(' '); if (_port > 0) rv.append("port: ").append(_port).append(' '); if (_introKey != null) rv.append("key: ").append(Base64.encode(_introKey)).append(' '); if (_introHosts != null) { for (int i = 0; i < _introHosts.length; i++) { rv.append("intro[" + i + "]: ").append(_introHosts[i]); rv.append(':').append(_introPorts[i]); rv.append('/').append(Base64.encode(_introKeys[i])).append(' '); } } return rv.toString(); } | 27433 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27433/c8c109093dbd7f26e169c3c73fed09b232a02fe8/UDPAddress.java/clean/router/java/src/net/i2p/router/transport/udp/UDPAddress.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
3639,
6674,
5633,
273,
394,
6674,
12,
1105,
1769,
3639,
5633,
18,
6923,
2932,
63,
1260,
57,
315,
1769,
3639,
309,
261,
67,
2564,
480,
446,
13,
5411,
5633,
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,
1762,
1435,
288,
3639,
6674,
5633,
273,
394,
6674,
12,
1105,
1769,
3639,
5633,
18,
6923,
2932,
63,
1260,
57,
315,
1769,
3639,
309,
261,
67,
2564,
480,
446,
13,
5411,
5633,
18... |
String name = heads.text(); columnBindings[i] = Binding.create(this, name); | columnBindings[i] = createBinding(i, heads); | protected void bind(Parse heads) { try { columnBindings = new Binding[heads.size()]; for(int i = 0; heads != null; i++, heads = heads.more) { String name = heads.text(); columnBindings[i] = Binding.create(this, name); } } catch(Throwable throwable) { exception(heads, throwable); } } | 49785 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49785/ec2576158a28bfaeeb5879001e3d4802a1e122b1/ColumnFixture.java/buggy/src/fit/ColumnFixture.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1993,
12,
3201,
22742,
13,
225,
288,
202,
225,
775,
202,
225,
288,
1082,
225,
1057,
10497,
273,
394,
15689,
63,
20263,
18,
1467,
1435,
15533,
1082,
225,
364,
12,
474,
277,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1993,
12,
3201,
22742,
13,
225,
288,
202,
225,
775,
202,
225,
288,
1082,
225,
1057,
10497,
273,
394,
15689,
63,
20263,
18,
1467,
1435,
15533,
1082,
225,
364,
12,
474,
277,
27... |
documentVisitor.visitUrlDocument(this) ; | documentVisitor.visitUrlDocument( this ); | public void accept( DocumentVisitor documentVisitor ) { documentVisitor.visitUrlDocument(this) ; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/1ad33c9099b6999235d960a1be2d0fd723408b1c/UrlDocumentDomainObject.java/buggy/server/src/imcode/server/document/UrlDocumentDomainObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2791,
12,
4319,
7413,
1668,
7413,
262,
288,
3639,
1668,
7413,
18,
11658,
1489,
2519,
12,
333,
11272,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2791,
12,
4319,
7413,
1668,
7413,
262,
288,
3639,
1668,
7413,
18,
11658,
1489,
2519,
12,
333,
11272,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if(!dir.mkdirs()) { | if (!dir.mkdirs()) { | public File getPrivatePersistentDirectory(String dirName) throws Exception { // TODO: Validate: Assert.assertNonNull(dirName, "Parameter dirName should be non-null"); String fullPath = getFullPath(dirName); File dir = new File(fullPath, dirName); if(dir.exists()) { if(!dir.isDirectory()) { throw new RuntimeException("Could not create directory " + "because: A file exists with this name:" + dir.getAbsolutePath()); } } else { if(!dir.mkdirs()) { throw new IOException("Could not create directory"); } } return dir; } | 27035 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27035/dd511f0f97892bf31dc2a7a1989480bf6b6b5308/FileAccessServiceImpl.java/clean/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1387,
27914,
11906,
2853,
12,
780,
20878,
13,
3639,
1216,
1185,
565,
288,
3639,
368,
2660,
30,
3554,
30,
5452,
18,
11231,
8921,
12,
1214,
461,
16,
315,
1662,
20878,
1410,
506,
1661,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1387,
27914,
11906,
2853,
12,
780,
20878,
13,
3639,
1216,
1185,
565,
288,
3639,
368,
2660,
30,
3554,
30,
5452,
18,
11231,
8921,
12,
1214,
461,
16,
315,
1662,
20878,
1410,
506,
1661,... |
throw new AuthorizationException(ex.getMessage()); | throw new AuthorizationException(ex); | public void update(IPermission[] perms) throws AuthorizationException{ if ( perms.length > 0 ) { try { primUpdate(perms); } catch (Exception ex) { log.error("Exception updating permissions " + perms, ex); throw new AuthorizationException(ex.getMessage()); } }} | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/948a50c00c52659556ab3183d5ea2e316077d789/RDBMPermissionImpl.java/clean/source/org/jasig/portal/security/provider/RDBMPermissionImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1089,
12,
2579,
2635,
8526,
13793,
13,
1216,
10234,
503,
95,
565,
309,
261,
13793,
18,
2469,
405,
374,
262,
565,
288,
3639,
775,
3639,
288,
5411,
15610,
1891,
12,
15969,
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,
1071,
918,
1089,
12,
2579,
2635,
8526,
13793,
13,
1216,
10234,
503,
95,
565,
309,
261,
13793,
18,
2469,
405,
374,
262,
565,
288,
3639,
775,
3639,
288,
5411,
15610,
1891,
12,
15969,
1769,
3639,... |
private Map getPluginConfigurationFromExpressions( MojoDescriptor goal, PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator ) throws ExpressionEvaluationException, PluginConfigurationException { List parameters = goal.getParameters(); Map map = new HashMap(); for ( int i = 0; i < parameters.size(); i++ ) { Parameter parameter = (Parameter) parameters.get( i ); // the key for the configuration map we're building. String key = parameter.getName(); // the key used to lookup the parameter in the config from the POM, etc. String lookupKey = parameter.getAlias(); if ( StringUtils.isEmpty( lookupKey ) ) { lookupKey = key; } String expression; if ( configuration.getChild( lookupKey, false ) == null ) { expression = parameter.getExpression(); } else { expression = configuration.getChild( lookupKey, false ).getValue( null ); if ( expression != null && parameter.getDeprecated() != null ) { if ( !expression.equals( goal.getConfiguration().getChild( lookupKey, false ).getValue( null ) ) ) { getLogger().warn( "DEPRECATED: " + parameter.getName() + " is deprecated.\n\t" + parameter.getDeprecated() ); } } } Object value = expressionEvaluator.evaluate( expression ); getLogger().debug( "Evaluated mojo parameter expression: \'" + expression + "\' to: " + value ); if ( value == null ) { if ( parameter.getDefaultValue() != null ) { value = expressionEvaluator.evaluate( parameter.getDefaultValue() ); } } // ---------------------------------------------------------------------- // We will perform a basic check here for parameters values that are // required. Required parameters can't be null so we throw an // Exception in the case where they are. We probably want some // pluggable // mechanism here but this will catch the most obvious of // misconfigurations. // ---------------------------------------------------------------------- if ( value == null && parameter.isRequired() ) { throw new PluginConfigurationException( createPluginParameterRequiredMessage( goal, parameter ) ); } map.put( key, value ); } return map; } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/ab91b7f4c29e6f0f9421e0cc03eedeffe9b478f5/DefaultPluginManager.java/clean/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1635,
16319,
1750,
1265,
8927,
12,
15931,
3187,
17683,
16,
453,
4149,
407,
1750,
1664,
16,
4766,
15604,
5371,
15876,
2652,
15876,
262,
3639,
1216,
5371,
13468,
503,
16,
6258,
10737,
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,
3238,
1635,
16319,
1750,
1265,
8927,
12,
15931,
3187,
17683,
16,
453,
4149,
407,
1750,
1664,
16,
4766,
15604,
5371,
15876,
2652,
15876,
262,
3639,
1216,
5371,
13468,
503,
16,
6258,
10737,
5... | ||
int escapeVal = 0; | escapeVal = 0; | public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. for (;;) { c = getChar(); if (c == EOF_CHAR) { return EOF; } else if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) { break; } } else if (!isJSSpace(c)) { if (c != '-') { flags |= TSF_DIRTYLINE; } break; } } // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = getChar(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; ungetChar(c); c = '\\'; } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = getChar(); if (c == '\\') { c = getChar(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (c == EOF_CHAR || !Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } ungetChar(c); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); } } } this.string = (String)allStrings.intern(str); return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(peekChar()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = getChar(); if (c == 'x' || c == 'X') { base = 16; c = getChar(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = getChar(); } } else { while ('0' <= c && c <= '9') { /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } addToString(c); c = getChar(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = getChar(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = getChar(); if (c == '+' || c == '-') { addToString(c); c = getChar(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = getChar(); } while (isDigit(c)); } } ungetChar(c); String numString = getStringFromBuffer(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. int quoteChar = c; int val = 0; stringBufferTop = 0; c = getChar(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character c = getChar(); switch (c) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. */ int escapeStart = stringBufferTop; addToString('u'); int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; } break; case 'x': { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ c = getChar(); int escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } } break; default: if ('0' <= c && c < '8') { val = c - '0'; c = getChar(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = getChar(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only if // the resulting val <= 0377 val = 8 * val + c - '0'; c = getChar(); } } ungetChar(c); c = val; } } } addToString(c); c = getChar(); } String str = getStringFromBuffer(); this.string = (String)allStrings.intern(str); return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (matchChar('|')) { return OR; } else if (matchChar('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (matchChar('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (matchChar('&')) { return AND; } else if (matchChar('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (matchChar('=')) { if (matchChar('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (matchChar('=')) { if (matchChar('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (matchChar('!')) { if (matchChar('-')) { if (matchChar('-')) { skipLine(); return getToken(); // in place of 'goto retry' } ungetChar('-'); } ungetChar('!'); } if (matchChar('<')) { if (matchChar('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (matchChar('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (matchChar('>')) { if (matchChar('>')) { if (matchChar('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (matchChar('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (matchChar('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (matchChar('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (matchChar('/')) { skipLine(); return getToken(); } if (matchChar('*')) { while ((c = getChar()) != -1 && !(c == '*' && matchChar('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = getChar()) != '/') { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = getChar(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (matchChar('g')) addToString('g'); else if (matchChar('i')) addToString('i'); else if (matchChar('m')) addToString('m'); else break; } if (isAlpha(peekChar())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } if (matchChar('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (matchChar('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (matchChar('=')) { this.op = ADD; return ASSIGN; } else if (matchChar('+')) { return INC; } else { return ADD; } case '-': if (matchChar('=')) { this.op = SUB; c = ASSIGN; } else if (matchChar('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (matchChar('>')) { skipLine(); return getToken(); } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/b1de655726ffc5e0dce2133a442d2908e9efa092/TokenStream.java/clean/js/rhino/src/org/mozilla/javascript/TokenStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... |
(nDstPhase - numInitDstExec) / numSteadyDstExec; | (nDstPhase - (numInitDstExec + 1)) / numSteadyDstExec; | public int getSrcPhase4DstPhase(int nDstPhase) { if (nDstPhase < numInitDstExec) { return dst2srcDependency[nDstPhase]; } else { int nSteadyStates = (nDstPhase - numInitDstExec) / numSteadyDstExec; int nSmallerDstPhase = ((nDstPhase - numInitDstExec) % numSteadyDstExec) + numInitDstExec; return dst2srcDependency[nSmallerDstPhase] + nSteadyStates * numSteadySrcExec; } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/5490094e1691320a01edf04fcab46d984e8b04ad/LatencyEdge.java/buggy/streams/src/streamit/scheduler2/constrained/LatencyEdge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1322,
1310,
11406,
24,
15295,
11406,
12,
474,
290,
15295,
11406,
13,
565,
288,
3639,
309,
261,
82,
15295,
11406,
411,
818,
2570,
15295,
1905,
13,
3639,
288,
5411,
327,
3046,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1322,
1310,
11406,
24,
15295,
11406,
12,
474,
290,
15295,
11406,
13,
565,
288,
3639,
309,
261,
82,
15295,
11406,
411,
818,
2570,
15295,
1905,
13,
3639,
288,
5411,
327,
3046,
22... |
stringBuffer.append(TEXT_53); | stringBuffer.append(TEXT_60); | public String generate(Object argument) { StringBuffer stringBuffer = new StringBuffer(); GenDiagram genDiagram = (GenDiagram) argument;List genNodes = genDiagram.getNodes();List genLinks = genDiagram.getLinks();Collection allContainers = AccessUtil.getAllContainers(genDiagram); stringBuffer.append(TEXT_1); stringBuffer.append(genDiagram.getEditorPackageName()); stringBuffer.append(TEXT_2); ImportUtil importManager = new ImportUtil(genDiagram.getEditorPackageName());importManager.addImport("org.eclipse.emf.ecore.EClass");importManager.addImport("org.eclipse.emf.ecore.EObject");importManager.addImport("org.eclipse.gmf.runtime.notation.View");importManager.markImportLocation(stringBuffer); stringBuffer.append(TEXT_3); stringBuffer.append(genDiagram.getVisualIDRegistryClassName()); stringBuffer.append(TEXT_4); stringBuffer.append(genDiagram.getVisualIDRegistryClassName()); stringBuffer.append(TEXT_5); stringBuffer.append(genDiagram.getVisualIDRegistryClassName()); stringBuffer.append(TEXT_6); GenPackage genPackage = genDiagram.getDomainMetaModel();String semanticPackageInterfaceName = importManager.getImportedName(genPackage.getQualifiedPackageInterfaceName());{ String classifierAccessorName = genDiagram.getDomainDiagramElement().getClassifierAccessorName(); String interfaceName = importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName()); stringBuffer.append(TEXT_7); stringBuffer.append(semanticPackageInterfaceName); stringBuffer.append(TEXT_8); stringBuffer.append(classifierAccessorName); stringBuffer.append(TEXT_9); stringBuffer.append(genDiagram.getUniqueIdentifier()); stringBuffer.append(TEXT_10); stringBuffer.append(interfaceName); stringBuffer.append(TEXT_11); stringBuffer.append(genDiagram.getVisualID()); stringBuffer.append(TEXT_12); } stringBuffer.append(TEXT_13); stringBuffer.append(genDiagram.getVisualID()); stringBuffer.append(TEXT_14); for (int i = 0; i < genNodes.size(); i++) { GenNode genNode = (GenNode) genNodes.get(i); String classifierAccessorName = genNode.getDomainMetaClass().getClassifierAccessorName(); String interfaceName = importManager.getImportedName(genNode.getDomainMetaClass().getQualifiedInterfaceName()); stringBuffer.append(TEXT_15); stringBuffer.append(semanticPackageInterfaceName); stringBuffer.append(TEXT_16); stringBuffer.append(classifierAccessorName); stringBuffer.append(TEXT_17); stringBuffer.append(genNode.getUniqueIdentifier()); stringBuffer.append(TEXT_18); stringBuffer.append(interfaceName); stringBuffer.append(TEXT_19); stringBuffer.append(genNode.getVisualID()); stringBuffer.append(TEXT_20); } stringBuffer.append(TEXT_21); for (Iterator containers = allContainers.iterator(); containers.hasNext();) { GenChildContainer nextContainer = (GenChildContainer) containers.next(); stringBuffer.append(TEXT_22); stringBuffer.append(nextContainer.getVisualID()); stringBuffer.append(TEXT_23); if (nextContainer instanceof GenNode) { GenNode node = (GenNode) nextContainer; String semanticHintsClassName = importManager.getImportedName(genDiagram.getSemanticHintsQualifiedClassName()); for (Iterator labels = node.getLabels().iterator(); labels.hasNext();) { GenNodeLabel label = (GenNodeLabel) labels.next(); String labelTextViewId = semanticHintsClassName + '.' + node.getUniqueIdentifier() + "Labels." + label.getSemanticHintFieldName(); stringBuffer.append(TEXT_24); stringBuffer.append(labelTextViewId); stringBuffer.append(TEXT_25); stringBuffer.append(label.getVisualID()); stringBuffer.append(TEXT_26); } for (Iterator compartments = node.getCompartments().iterator(); compartments.hasNext();) { GenCompartment compartment = (GenCompartment) compartments.next(); String compartmentId = semanticHintsClassName + '.' + node.getUniqueIdentifier() + "Compartments." + compartment.getSemanticHintFieldName(); stringBuffer.append(TEXT_27); stringBuffer.append(compartmentId); stringBuffer.append(TEXT_28); stringBuffer.append(compartment.getVisualID()); stringBuffer.append(TEXT_29); } } stringBuffer.append(TEXT_30); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_31); for (Iterator childNodes = nextContainer.getChildNodes().iterator(); childNodes.hasNext();) { GenNode childNode = (GenNode) childNodes.next(); String classifierAccessorName = childNode.getDomainMetaClass().getClassifierAccessorName(); String interfaceName = importManager.getImportedName(childNode.getDomainMetaClass().getQualifiedInterfaceName()); stringBuffer.append(TEXT_32); stringBuffer.append(semanticPackageInterfaceName); stringBuffer.append(TEXT_33); stringBuffer.append(classifierAccessorName); stringBuffer.append(TEXT_34); stringBuffer.append(childNode.getUniqueIdentifier()); stringBuffer.append(TEXT_35); stringBuffer.append(interfaceName); stringBuffer.append(TEXT_36); stringBuffer.append(childNode.getVisualID()); stringBuffer.append(TEXT_37); } stringBuffer.append(TEXT_38); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_39); }for (Iterator links = genLinks.iterator(); links.hasNext();) { GenLink link = (GenLink) links.next(); String semanticHintsClassName = importManager.getImportedName(genDiagram.getSemanticHintsQualifiedClassName()); stringBuffer.append(TEXT_40); stringBuffer.append(link.getVisualID()); stringBuffer.append(TEXT_41); for (Iterator linkLabels = link.getLabels().iterator(); linkLabels.hasNext();) { GenLinkLabel linkLabel = (GenLinkLabel) linkLabels.next(); String labelViewId = semanticHintsClassName + '.' + link.getUniqueIdentifier() + "Labels." + linkLabel.getSemanticHintLabelFieldName(); stringBuffer.append(TEXT_42); stringBuffer.append(labelViewId); stringBuffer.append(TEXT_43); stringBuffer.append(linkLabel.getVisualID()); stringBuffer.append(TEXT_44); } stringBuffer.append(TEXT_45); stringBuffer.append(link.getUniqueIdentifier()); stringBuffer.append(TEXT_46); for (Iterator linkLabels = link.getLabels().iterator(); linkLabels.hasNext();) { GenLinkLabel linkLabel = (GenLinkLabel) linkLabels.next(); String labelTextViewId = semanticHintsClassName + '.' + link.getUniqueIdentifier() + "Labels." + linkLabel.getSemanticHintFieldName(); stringBuffer.append(TEXT_47); stringBuffer.append(linkLabel.getVisualID()); stringBuffer.append(TEXT_48); stringBuffer.append(labelTextViewId); stringBuffer.append(TEXT_49); stringBuffer.append(linkLabel.getVisualID()); stringBuffer.append(TEXT_50); stringBuffer.append(link.getUniqueIdentifier()); stringBuffer.append(TEXT_51); }} stringBuffer.append(TEXT_52); for (int i = 0; i < genLinks.size(); i++) { GenLink genLink = (GenLink) genLinks.get(i); if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); String semanticLinkInterfaceName = modelFacet.getMetaClass().getClassifierAccessorName(); String qualifiedInterfaceName = modelFacet.getMetaClass().getQualifiedInterfaceName(); stringBuffer.append(TEXT_53); stringBuffer.append(semanticPackageInterfaceName); stringBuffer.append(TEXT_54); stringBuffer.append(semanticLinkInterfaceName); stringBuffer.append(TEXT_55); stringBuffer.append(genLink.getUniqueIdentifier()); stringBuffer.append(TEXT_56); stringBuffer.append(importManager.getImportedName(qualifiedInterfaceName)); stringBuffer.append(TEXT_57); stringBuffer.append(genLink.getVisualID()); stringBuffer.append(TEXT_58); } } stringBuffer.append(TEXT_59); stringBuffer.append(genDiagram.getUniqueIdentifier()); stringBuffer.append(TEXT_60); stringBuffer.append(importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName())); stringBuffer.append(TEXT_61); String acceptAllMatcherAccessor = "acceptAllMatcher()"; //$NON-NLS-1$for (int i = 0; i < genNodes.size(); i++) { GenNode genNode = (GenNode) genNodes.get(i); String qualifiedNodeInterfaceName = genNode.getDomainMetaClass().getQualifiedInterfaceName(); String nodeSelector = genNode.getModelFacet() != null && genNode.getModelFacet().getModelElementSelector() != null ? genNode.getUniqueIdentifier() : acceptAllMatcherAccessor; stringBuffer.append(TEXT_62); stringBuffer.append(genNode.getUniqueIdentifier()); stringBuffer.append(TEXT_63); stringBuffer.append(importManager.getImportedName(qualifiedNodeInterfaceName)); stringBuffer.append(TEXT_64); stringBuffer.append(nodeSelector); stringBuffer.append(TEXT_65); }for (Iterator containers = allContainers.iterator(); containers.hasNext();) { GenChildContainer nextContainer = (GenChildContainer) containers.next(); for (Iterator childNodes = nextContainer.getChildNodes().iterator(); childNodes.hasNext();) { GenChildNode nextChildNode = (GenChildNode) childNodes.next(); String qualifiedChildNodeInterfaceName = nextChildNode.getDomainMetaClass().getQualifiedInterfaceName(); String childNodeSelector = nextChildNode.getModelFacet() != null && nextChildNode.getModelFacet().getModelElementSelector() != null ? nextChildNode.getUniqueIdentifier() : acceptAllMatcherAccessor; stringBuffer.append(TEXT_66); stringBuffer.append(nextChildNode.getUniqueIdentifier()); stringBuffer.append(TEXT_67); stringBuffer.append(importManager.getImportedName(qualifiedChildNodeInterfaceName)); stringBuffer.append(TEXT_68); stringBuffer.append(childNodeSelector); stringBuffer.append(TEXT_69); }} stringBuffer.append(TEXT_70); for (Iterator containers = allContainers.iterator(); containers.hasNext();) { GenChildContainer nextContainer = (GenChildContainer) containers.next(); stringBuffer.append(TEXT_71); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_72); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_73); }for (Iterator links = genLinks.iterator(); links.hasNext();) { GenLink link = (GenLink) links.next(); stringBuffer.append(TEXT_74); stringBuffer.append(link.getUniqueIdentifier()); stringBuffer.append(TEXT_75); if (link.getLabels().size() > 0) { stringBuffer.append(TEXT_76); stringBuffer.append(link.getUniqueIdentifier()); stringBuffer.append(TEXT_77); }} stringBuffer.append(TEXT_78); for (int i = 0; i < genLinks.size(); i++) { GenLink genLink = (GenLink) genLinks.get(i); if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); String qualifiedInterfaceName = modelFacet.getMetaClass().getQualifiedInterfaceName(); String linkSelector = modelFacet.getModelElementSelector() != null ? genLink.getUniqueIdentifier() : acceptAllMatcherAccessor; stringBuffer.append(TEXT_79); stringBuffer.append(genLink.getUniqueIdentifier()); stringBuffer.append(TEXT_80); stringBuffer.append(importManager.getImportedName(qualifiedInterfaceName)); stringBuffer.append(TEXT_81); stringBuffer.append(linkSelector); stringBuffer.append(TEXT_82); }} stringBuffer.append(TEXT_83); stringBuffer.append(TEXT_84); stringBuffer.append(TEXT_85); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation")); stringBuffer.append(TEXT_86); int selectorCounter = 0;for (Iterator it = genDiagram.eAllContents(); it.hasNext();) { Object next = it.next(); String id = null; TypeModelFacet modelFacet = null; if (next instanceof GenNode) { id = ((GenNode) next).getUniqueIdentifier(); modelFacet = ((GenNode) next).getModelFacet(); } else if (next instanceof GenLink && ((GenLink) next).getModelFacet() instanceof TypeLinkModelFacet) { id = ((GenLink) next).getUniqueIdentifier(); modelFacet = (TypeLinkModelFacet) ((GenLink) next).getModelFacet(); } if (modelFacet == null || modelFacet.getModelElementSelector() == null) { continue; } ModelElementSelector selector = modelFacet.getModelElementSelector(); selectorCounter++; stringBuffer.append(TEXT_87); stringBuffer.append(id); stringBuffer.append(TEXT_88); stringBuffer.append(selector.getLanguage()); stringBuffer.append(TEXT_89); stringBuffer.append(selector.getBody()); stringBuffer.append(TEXT_90); stringBuffer.append(id); stringBuffer.append(TEXT_91); stringBuffer.append(selector.getBody()); stringBuffer.append(TEXT_92); } stringBuffer.append(TEXT_93); if(selectorCounter > 0) { stringBuffer.append(TEXT_94); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.query.ocl.conditions.OclConstraintCondition")); stringBuffer.append(TEXT_95); } stringBuffer.append(TEXT_96); importManager.emitSortedImports(); stringBuffer.append(TEXT_97); return stringBuffer.toString(); } | 7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/1f75243d34f39fcfc1a7bad4ed738ec9438432b9/VisualIDRegistryGenerator.java/buggy/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/VisualIDRegistryGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
12,
921,
1237,
13,
225,
288,
565,
6674,
533,
1892,
273,
394,
6674,
5621,
565,
10938,
14058,
1940,
3157,
14058,
1940,
273,
261,
7642,
14058,
1940,
13,
1237,
31,
682,
3157,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
12,
921,
1237,
13,
225,
288,
565,
6674,
533,
1892,
273,
394,
6674,
5621,
565,
10938,
14058,
1940,
3157,
14058,
1940,
273,
261,
7642,
14058,
1940,
13,
1237,
31,
682,
3157,... |
public String getMarginBottom() | public DimensionType getMarginBottom( ) | public String getMarginBottom() { // TODO Auto-generated method stub return null; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/83de512a7dc3a128ad54fa2607c01f0ef928234c/PageContent.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/content/impl/PageContent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
2108,
5243,
10393,
1435,
202,
95,
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,
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,
514,
2108,
5243,
10393,
1435,
202,
95,
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,
-1... |
return MOVE_REDUCED; | return DefUseEffect.MOVE_REDUCED; | private static byte longDiv(OPT_Instruction s) { if (CF_LONG) { OPT_Operand op1 = GuardedBinary.getVal1(s); OPT_Operand op2 = GuardedBinary.getVal2(s); if (op1.similar(op2)) { // THE SAME OPERAND: x / x == 1 Move.mutate(s, LONG_MOVE, GuardedBinary.getClearResult(s), LC(1)); return MOVE_FOLDED; } if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; if (val2 == 0L) { // TODO: This instruction is actually unreachable. // There will be a LONG_ZERO_CHECK // guarding this instruction that will result in an // ArithmeticException. We // should probabbly just remove the LONG_DIV as dead code. return UNCHANGED; } if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, GuardedBinary.getClearResult(s), LC(val1/val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 1L) { // x / 1L == x Move.mutate(s, LONG_MOVE, GuardedBinary.getClearResult(s), GuardedBinary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/4f52a59569c48e68010a63e605ee6691083a9e97/OPT_Simplifier.java/buggy/rvm/src/com/ibm/jikesrvm/opt/OPT_Simplifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
1525,
7244,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
14639,
13,
288,
1377,
16456,
67,
10265,
1061,
21,
273,
6467,
17212,
5905,
18,
588,
3053,
21,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
1525,
7244,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
14639,
13,
288,
1377,
16456,
67,
10265,
1061,
21,
273,
6467,
17212,
5905,
18,
588,
3053,
21,
12... |
manager.addRepository(repository1); manager.addRepository(repository2); | manager.addRepository(repository1, TasksUiPlugin.getDefault().getRepositoriesFilePath()); manager.addRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath()); | public void testRepositoryPersistance() throws MalformedURLException { // assertEquals("", // MylarTaskListPlugin.getMylarCorePrefs().getString(TaskRepositoryManager.PREF_REPOSITORIES)); TaskRepository repository1 = new TaskRepository("bugzilla", "http://bugzilla"); TaskRepository repository2 = new TaskRepository("jira", "http://jira"); manager.addRepository(repository1); manager.addRepository(repository2); // assertNotNull(MylarTaskListPlugin.getMylarCorePrefs().getString(TaskRepositoryManager.PREF_REPOSITORIES)); List<TaskRepository> repositoryList = new ArrayList<TaskRepository>(); repositoryList.add(repository2); repositoryList.add(repository1); manager.readRepositories(); // NOTE: different conditions for running with and without the JIRA // Connector if (manager.getRepositoryConnectors().size() > 1) { assertTrue(manager.getAllRepositories().contains(repository1)); assertTrue(manager.getAllRepositories().contains(repository2)); // assertEquals(repositoryList, manager.getAllRepositories()); } else { // TODO there is something wrong with this assertEquals("all: " + manager.getAllRepositories(), 1, manager.getAllRepositories().size()); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/38084d17211d43d5e9d6fa4b76deec1145d5b2e5/TaskRepositoryManagerTest.java/clean/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3305,
12771,
1359,
1435,
1216,
20710,
288,
202,
202,
759,
1815,
8867,
2932,
3113,
202,
202,
759,
8005,
7901,
2174,
682,
3773,
18,
588,
12062,
7901,
4670,
1386,
2556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3305,
12771,
1359,
1435,
1216,
20710,
288,
202,
202,
759,
1815,
8867,
2932,
3113,
202,
202,
759,
8005,
7901,
2174,
682,
3773,
18,
588,
12062,
7901,
4670,
1386,
2556,
... |
public PublishedAssessmentData( String title, String description, String comments, Long typeId, Integer instructorNotification, Integer testeeNotification, Integer multipartAllowed, Integer status, String createdBy, Date createdDate, String lastModifiedBy, Date lastModifiedDate) { this.title = title; this.description = description; this.comments = comments; this.typeId = typeId; this.instructorNotification = instructorNotification; this.testeeNotification = testeeNotification; this.multipartAllowed = multipartAllowed; this.status = status; this.createdBy = createdBy; this.createdDate = createdDate; this.lastModifiedBy = lastModifiedBy; this.lastModifiedDate = lastModifiedDate; } | public PublishedAssessmentData() {} | public PublishedAssessmentData( String title, String description, String comments, Long typeId, Integer instructorNotification, Integer testeeNotification, Integer multipartAllowed, Integer status, String createdBy, Date createdDate, String lastModifiedBy, Date lastModifiedDate) { this.title = title; this.description = description; this.comments = comments; this.typeId = typeId; this.instructorNotification = instructorNotification; this.testeeNotification = testeeNotification; this.multipartAllowed = multipartAllowed; this.status = status; this.createdBy = createdBy; this.createdDate = createdDate; this.lastModifiedBy = lastModifiedBy; this.lastModifiedDate = lastModifiedDate; } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/7711f54e01c56cc0646b72e7a3449d4f53af2c31/PublishedAssessmentData.java/buggy/samigo/component/src/java/org/sakaiproject/tool/assessment/data/dao/assessment/PublishedAssessmentData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9761,
329,
15209,
751,
12,
1377,
514,
2077,
16,
514,
2477,
16,
514,
5678,
16,
1377,
3407,
24361,
16,
1377,
2144,
316,
2732,
4386,
16,
2144,
1842,
1340,
4386,
16,
1377,
2144,
10263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9761,
329,
15209,
751,
12,
1377,
514,
2077,
16,
514,
2477,
16,
514,
5678,
16,
1377,
3407,
24361,
16,
1377,
2144,
316,
2732,
4386,
16,
2144,
1842,
1340,
4386,
16,
1377,
2144,
10263,
... |
return (LineStyle)AttributeFactory.eINSTANCE.createFromString(AttributePackage.eINSTANCE.getLineStyle(), initialValue); | return (LineStyle) AttributeFactory.eINSTANCE.createFromString(AttributePackage.eINSTANCE.getLineStyle(), initialValue); | public LineStyle createLineStyleObjectFromString(EDataType eDataType, String initialValue) { return (LineStyle)AttributeFactory.eINSTANCE.createFromString(AttributePackage.eINSTANCE.getLineStyle(), initialValue); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/AttributeFactoryImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/AttributeFactoryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5377,
2885,
752,
1670,
2885,
921,
9193,
12,
41,
6273,
11479,
16,
514,
11837,
13,
565,
288,
3639,
327,
261,
1670,
2885,
13,
3601,
1733,
18,
73,
13341,
18,
2640,
9193,
12,
1499,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5377,
2885,
752,
1670,
2885,
921,
9193,
12,
41,
6273,
11479,
16,
514,
11837,
13,
565,
288,
3639,
327,
261,
1670,
2885,
13,
3601,
1733,
18,
73,
13341,
18,
2640,
9193,
12,
1499,
226... |
p.add(host, 0, 1, 1, 1, CENTER, HORIZONTAL, 0, 0); | p.add(host, 0, 1, 1, 1, CENTER, HORIZONTAL, 1, 0); | protected Component buildNetwork(){ JGridBagPanel p = new JGridBagPanel(); host = new JTextField(Resources.getInteger(CONFIG_HOST_TEXT_FIELD_LENGTH)); JLabel hostLabel = new JLabel(Resources.getString(LABEL_HOST)); port = new JTextField(Resources.getInteger(CONFIG_PORT_TEXT_FIELD_LENGTH)); JLabel portLabel = new JLabel(Resources.getString(LABEL_PORT)); p.add(hostLabel, 0, 0, 1, 1, WEST, HORIZONTAL, 0, 0); p.add(host, 0, 1, 1, 1, CENTER, HORIZONTAL, 0, 0); p.add(portLabel, 1, 0, 1, 1, WEST, HORIZONTAL, 0, 0); p.add(port, 1, 1, 1, 1, CENTER, HORIZONTAL, 0, 0); p.add(new JLabel(""), 2, 1, 1, 1, CENTER, HORIZONTAL, 1, 0); p.setBorder(BorderFactory.createCompoundBorder (BorderFactory.createTitledBorder (BorderFactory.createEtchedBorder(), Resources.getString(TITLE_BEHAVIOR)), BorderFactory.createEmptyBorder(10, 10, 10, 10))); return p; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/8cc623ebc3242f8eeb337fb35ee9b3665df1f6c8/PreferenceDialog.java/clean/sources/org/apache/batik/apps/svgbrowser/PreferenceDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
5435,
1361,
3906,
1435,
95,
3639,
804,
6313,
5013,
5537,
293,
273,
394,
804,
6313,
5013,
5537,
5621,
3639,
1479,
273,
394,
804,
16157,
12,
3805,
18,
588,
4522,
12,
7203,
67,
8908,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5435,
1361,
3906,
1435,
95,
3639,
804,
6313,
5013,
5537,
293,
273,
394,
804,
6313,
5013,
5537,
5621,
3639,
1479,
273,
394,
804,
16157,
12,
3805,
18,
588,
4522,
12,
7203,
67,
8908,
... |
public Argument evaluate(ContextStack context, Argument arg1) | public Argument evaluate(ContextStack context, ArrayList args) | public Argument evaluate(ContextStack context, Argument arg1) throws MapyrusException { Argument retval; double degrees = 0, minutes = 0, seconds = 0; int sign = 1; String geo = arg1.toString().toLowerCase().trim(); try { /* * Parse any leading N, S, E, W letter. */ if (geo.startsWith("n") || geo.startsWith("e")) { geo = geo.substring(1); } else if (geo.startsWith("s") || geo.startsWith("w")) { geo = geo.substring(1); sign = -1; } /* * Search for end of degree value. */ int dIndex = geo.indexOf('d'); if (dIndex < 0) dIndex = geo.indexOf(''); if (dIndex < 0) dIndex = geo.indexOf('\ufffd'); if (dIndex >= 0) { String geo2 = geo.substring(0, dIndex).trim(); degrees = Double.parseDouble(geo2); /* * Search for end of minutes value, then parse it. */ int mIndex = geo.indexOf('m', dIndex); if (mIndex < 0) mIndex = geo.indexOf('\'', dIndex); if (mIndex > 0) { String geo3 = geo.substring(dIndex + 1, mIndex); if (geo3.startsWith("eg")) geo3 = geo3.substring(2); minutes = Double.parseDouble(geo3.trim()); /* * Search for end of seconds value. */ int sIndex = geo.indexOf('s', mIndex); if (sIndex < 0) sIndex = geo.indexOf('\"', mIndex); if (sIndex > 0) { String geo4 = geo.substring(mIndex + 1, sIndex); if (geo4.startsWith("in")) geo4 = geo4.substring(2); seconds = Double.parseDouble(geo4.trim()); /* * Parsed seconds value, with an 's'. * Remove parts of string we've parsed to avoid * interpreting it as meaning south. */ geo = geo.substring(sIndex + 1).trim(); } } } /* * Parse any trailing N, S, E, W letter. */ if (geo.endsWith("n") || geo.endsWith("e")) { geo = geo.substring(0, geo.length() - 1); } else if (geo.endsWith("s") || geo.endsWith("w")) { geo = geo.substring(0, geo.length() - 1); sign = -1; } if (dIndex < 0) { /* * Parse degrees as a plain number. */ degrees = Double.parseDouble(geo); } degrees *= sign; if (degrees >= 0) degrees = degrees + (minutes / 60) + (seconds / 3600); else degrees = degrees - (minutes / 60) - (seconds / 3600); } catch (NumberFormatException e) { throw new MapyrusException(MapyrusMessages.get(MapyrusMessages.INVALID_GEOGRAPHIC) + ": " + geo); } retval = new Argument(degrees); return(retval); } | 2501 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2501/99eacb486a6bc9c0e00f18bc69509ced249040e6/Parsegeo.java/clean/src/org/mapyrus/function/Parsegeo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5067,
5956,
12,
1042,
2624,
819,
16,
5067,
1501,
21,
13,
202,
202,
15069,
1635,
93,
8010,
503,
202,
95,
202,
202,
1379,
5221,
31,
202,
202,
9056,
10904,
273,
374,
16,
6824,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5067,
5956,
12,
1042,
2624,
819,
16,
5067,
1501,
21,
13,
202,
202,
15069,
1635,
93,
8010,
503,
202,
95,
202,
202,
1379,
5221,
31,
202,
202,
9056,
10904,
273,
374,
16,
6824,
... |
} | } | final public int DateModifier() throws ParseException { trace_call("DateModifier"); try { Token mod = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NOT_TOKEN: jj_consume_token(NOT_TOKEN); {if (true) return NOT_TOKEN;} break; default: jj_la1[2] = jj_gen; {if (true) return 0;} } throw new Error("Missing return statement in function"); } finally { trace_return("DateModifier"); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/1fc33da8eddd8249205ff3612ffbf86557b572ab/ZimbraQueryParser.java/buggy/ZimbraServer/src/java/com/zimbra/cs/index/queryparser/ZimbraQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
509,
2167,
9829,
1435,
1216,
10616,
288,
565,
2606,
67,
1991,
2932,
1626,
9829,
8863,
565,
775,
288,
565,
3155,
681,
273,
446,
31,
1377,
1620,
14015,
78,
78,
67,
496,
79,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
2167,
9829,
1435,
1216,
10616,
288,
565,
2606,
67,
1991,
2932,
1626,
9829,
8863,
565,
775,
288,
565,
3155,
681,
273,
446,
31,
1377,
1620,
14015,
78,
78,
67,
496,
79,
631... |
Logger.minor(this, "Failed to fetch ARK for "+peer.getPeer()+", now backing off ARK fetches for "+(int) (backoff / 1000)+" seconds"); | Logger.minor(this, "Failed to fetch ARK for "+peer.getPeer()+", now backing off ARK fetches for "+(backoff / 1000)+" seconds"); | public void onFailure(FetchException e, ClientGetter state) { synchronized(this) { started = false; Logger.minor(this, "Failed to fetch ARK for "+peer+" : "+e, e); if(isFetching) { node.removeARKFetcher(identity,this); if(node.arkFetchManager.hasReadyARKFetcher(this)) { node.arkFetchManager.removeReadyARKFetcher(this); } isFetching = false; } // If it's a redirect, follow the redirect and update the ARK. // If it's any other error, wait a while then retry. getter = null; if(!shouldRun) return; if(e.newURI == null) { backoff += backoff; if(backoff > MAX_BACKOFF) backoff = MAX_BACKOFF; } } if(e.newURI != null) { Logger.minor(this, "Failed to fetch ARK for "+peer.getPeer()+", "+fetchingURI+" gave redirect to "+e.newURI); peer.updateARK(e.newURI); queueWithBackoff(); return; } Logger.minor(this, "Failed to fetch ARK for "+peer.getPeer()+", now backing off ARK fetches for "+(int) (backoff / 1000)+" seconds"); // We may be on the PacketSender thread. // FIXME should this be exponential backoff? queueWithBackoff(); } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/ARKFetcher.java/clean/src/freenet/node/ARKFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
27748,
12,
5005,
503,
425,
16,
2445,
8461,
919,
13,
288,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
14561,
273,
629,
31,
1082,
202,
3328,
18,
17364,
12,
2211,
16,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
27748,
12,
5005,
503,
425,
16,
2445,
8461,
919,
13,
288,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
14561,
273,
629,
31,
1082,
202,
3328,
18,
17364,
12,
2211,
16,
3... |
ColorDefinition definition = copyOfDefinitions[i]; installColor(definition, theme, store); } | FontDefinition definition = copyOfDefinitions[i]; installFont(definition, theme, store, true); } if (defaults != null) { for (int i = 0; i < defaults.length; i++) { installFont(defaults[i], theme, store, false); } } | public static void populateRegistry(ITheme theme, ColorDefinition [] definitions, IPreferenceStore store) { // sort the definitions by dependant ordering so that we process // ancestors before children. ColorDefinition [] copyOfDefinitions = null; if (!theme.getId().equals(IThemeManager.DEFAULT_THEME)) { definitions = addDefaulted(definitions); } copyOfDefinitions = new ColorDefinition[definitions.length]; System.arraycopy(definitions, 0, copyOfDefinitions, 0, definitions.length); Arrays.sort(copyOfDefinitions, new IThemeRegistry.HierarchyComparator(definitions)); for (int i = 0; i < copyOfDefinitions.length; i++) { ColorDefinition definition = copyOfDefinitions[i]; installColor(definition, theme, store); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/d94edf054bdce936ee21432861f9b30b09bccff1/ThemeElementHelper.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
6490,
4243,
12,
1285,
76,
4698,
5006,
16,
5563,
1852,
5378,
6377,
16,
467,
9624,
2257,
1707,
13,
288,
202,
202,
759,
1524,
326,
6377,
635,
2447,
970,
9543,
1427,
716,
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,
760,
918,
6490,
4243,
12,
1285,
76,
4698,
5006,
16,
5563,
1852,
5378,
6377,
16,
467,
9624,
2257,
1707,
13,
288,
202,
202,
759,
1524,
326,
6377,
635,
2447,
970,
9543,
1427,
716,
73... |
if (year < 0) result.append("-"); for (i = yearStr.length(); i < 4; i++) result.append("0"); result.append(yearStr); | if (format != FORMATSPEC_DATE) { if (hourStr.length() == 1) result.append("0"); result.append(hourStr); if (minStr.length() == 1) result.append(":0"); else result.append(":"); result.append(minStr); if (secStr.length() == 1) result.append(":0"); else result.append(":"); result.append(secStr); if (offset > 0) result.append(" GMT+"); else result.append(" GMT-"); for (int i = offsetStr.length(); i < 4; i++) result.append("0"); result.append(offsetStr); if (timeZoneFormatter == null) timeZoneFormatter = new java.text.SimpleDateFormat("zzz"); if (timeZoneFormatter != null) { result.append(" ("); java.util.Date date = new Date((long) t); result.append(timeZoneFormatter.format(date)); result.append(")"); } if (format != FORMATSPEC_TIME) result.append(" "); } if (format != FORMATSPEC_TIME) { if (year < 0) result.append("-"); for (int i = yearStr.length(); i < 4; i++) result.append("0"); result.append(yearStr); } | private static String date_format(double t) { StringBuffer result = new StringBuffer(60); double local = LocalTime(t); /* offset from GMT in minutes. The offset includes daylight savings, if it applies. */ int minutes = (int) Math.floor((LocalTZA + DaylightSavingTA(t)) / msPerMinute); /* map 510 minutes to 0830 hours */ int offset = (minutes / 60) * 100 + minutes % 60; String dateStr = Integer.toString(DateFromTime(local)); String hourStr = Integer.toString(HourFromTime(local)); String minStr = Integer.toString(MinFromTime(local)); String secStr = Integer.toString(SecFromTime(local)); String offsetStr = Integer.toString(offset > 0 ? offset : -offset); int year = YearFromTime(local); String yearStr = Integer.toString(year > 0 ? year : -year); result.append(days[WeekDay(local)]); result.append(" "); result.append(months[MonthFromTime(local)]); if (dateStr.length() == 1) result.append(" 0"); else result.append(" "); result.append(dateStr); if (hourStr.length() == 1) result.append(" 0"); else result.append(" "); result.append(hourStr); if (minStr.length() == 1) result.append(":0"); else result.append(":"); result.append(minStr); if (secStr.length() == 1) result.append(":0"); else result.append(":"); result.append(secStr); if (offset > 0) result.append(" GMT+"); else result.append(" GMT-"); int i; for (i = offsetStr.length(); i < 4; i++) result.append("0"); result.append(offsetStr); // ask Java for a time zone string, if we've been able to find // a formatter for it. if (timeZoneFormatter != null) { result.append(" ("); java.util.Date date = new Date((long) t); result.append(timeZoneFormatter.format(date)); result.append(") "); } else { result.append(" "); } if (year < 0) result.append("-"); for (i = yearStr.length(); i < 4; i++) result.append("0"); result.append(yearStr); return result.toString(); } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/ca67aac5d505ef113698592ea20ab0848ed7f40d/NativeDate.java/clean/js/rhino/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1509,
67,
2139,
12,
9056,
268,
13,
288,
3639,
6674,
563,
273,
394,
6674,
12,
4848,
1769,
3639,
1645,
1191,
273,
25515,
12,
88,
1769,
3639,
1748,
1384,
628,
21706,
316,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1509,
67,
2139,
12,
9056,
268,
13,
288,
3639,
6674,
563,
273,
394,
6674,
12,
4848,
1769,
3639,
1645,
1191,
273,
25515,
12,
88,
1769,
3639,
1748,
1384,
628,
21706,
316,
6... |
if (COMPLETION.equals(property)) | if (COMPLETION.equals(property)) { | public Object getValue(Object element, String property) { if (element instanceof ConcreteMarker) { IMarker marker = ((ConcreteMarker) element).getMarker(); if (COMPLETION.equals(property)) return new Boolean(marker.getAttribute(IMarker.DONE, false)); if (IMarker.PRIORITY.equals(property)) return new Integer(IMarker.PRIORITY_HIGH - marker.getAttribute(IMarker.PRIORITY, IMarker.PRIORITY_NORMAL)); if (IMarker.MESSAGE.equals(property)) return marker.getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$ } return null; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/TaskView.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TaskView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1033,
2366,
12,
921,
930,
16,
514,
1272,
13,
288,
1082,
202,
430,
261,
2956,
1276,
735,
6883,
7078,
13,
288,
9506,
202,
3445,
1313,
264,
5373,
273,
14015,
25845,
7078,
13,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
2366,
12,
921,
930,
16,
514,
1272,
13,
288,
1082,
202,
430,
261,
2956,
1276,
735,
6883,
7078,
13,
288,
9506,
202,
3445,
1313,
264,
5373,
273,
14015,
25845,
7078,
13,
93... |
CompositeElement codeBlock = parseCodeBlock(lexer, DEEP_PARSE_BLOCKS_IN_STATEMENTS); | TreeElement codeBlock = parseCodeBlock(lexer, DEEP_PARSE_BLOCKS_IN_STATEMENTS); | private CompositeElement parseSwitchStatement(Lexer lexer) { LOG.assertTrue(lexer.getTokenType() == SWITCH_KEYWORD); CompositeElement element = Factory.createCompositeElement(SWITCH_STATEMENT); TreeUtil.addChildren(element, ParseUtil.createTokenElement(lexer, myContext.getCharTable())); lexer.advance(); if (!processExpressionInParens(lexer, element)){ return element; } CompositeElement codeBlock = parseCodeBlock(lexer, DEEP_PARSE_BLOCKS_IN_STATEMENTS); if (codeBlock == null){ TreeUtil.addChildren(element, Factory.createErrorElement("'{' expected")); return element; } TreeUtil.addChildren(element, codeBlock); return element; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/7cc49f57fd75f032b80560ecde54c4a99bda9ac7/StatementParsing.java/clean/source/com/intellij/psi/impl/source/parsing/StatementParsing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
14728,
1046,
1109,
10200,
3406,
12,
13356,
8512,
13,
288,
565,
2018,
18,
11231,
5510,
12,
31731,
18,
588,
28675,
1435,
422,
16392,
25588,
67,
28813,
1769,
565,
14728,
1046,
930,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
14728,
1046,
1109,
10200,
3406,
12,
13356,
8512,
13,
288,
565,
2018,
18,
11231,
5510,
12,
31731,
18,
588,
28675,
1435,
422,
16392,
25588,
67,
28813,
1769,
565,
14728,
1046,
930,
273,
... |
event = new ListDataEvent(source, ListDataEvent.CONTENTS_CHANGED, startIndex, endIndex); listeners = getListDataListeners(); for (index = 0; index < listeners.length; index++) { listener = (ListDataListener) listeners[index]; listener.contentsChanged(event); } | for (int index = 0; index < listeners.length; index++) listeners[index].contentsChanged(event); | protected void fireContentsChanged(Object source, int startIndex, int endIndex) { // Variables ListDataEvent event; ListDataListener[] listeners; ListDataListener listener; int index; // Create Event event = new ListDataEvent(source, ListDataEvent.CONTENTS_CHANGED, startIndex, endIndex); // Get Listeners listeners = getListDataListeners(); // Process Listeners for (index = 0; index < listeners.length; index++) { listener = (ListDataListener) listeners[index]; listener.contentsChanged(event); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/9e763280cf1369c9681ea91b32ae758840a76dc3/AbstractListModel.java/buggy/core/src/classpath/javax/javax/swing/AbstractListModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
4452,
6323,
5033,
12,
921,
1084,
16,
509,
10588,
16,
19694,
509,
13818,
13,
225,
288,
565,
368,
23536,
565,
987,
751,
1133,
871,
31,
565,
987,
751,
2223,
8526,
4679,
31,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
4452,
6323,
5033,
12,
921,
1084,
16,
509,
10588,
16,
19694,
509,
13818,
13,
225,
288,
565,
368,
23536,
565,
987,
751,
1133,
871,
31,
565,
987,
751,
2223,
8526,
4679,
31,
565,... |
if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { | if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { | public static Expression createFunction( BrokerPool pool, StaticContext context, PathExpr parent, String fnName, Vector params) throws EXistException, PermissionDeniedException { Expression step = null; if (fnName.equals("document")) { DocumentSet docs = null; DBBroker broker = null; try { broker = pool.get(); if (params.size() == 0) docs = broker.getAllDocuments(context.getUser()); else { docs = new DocumentSet(); String next; DocumentImpl doc; for (int i = 0; i < params.size(); i++) { next = ((PathExpr) params.elementAt(i)).getLiteralValue(); doc = (DocumentImpl) broker.getDocument(context.getUser(), next); if (doc != null) docs.add(doc); } } } finally { pool.release(broker); } step = new RootNode(pool); parent.add(step); parent.setDocumentSet(docs); } if (fnName.equals("collection") || fnName.equals("xcollection")) { DocumentSet docs = new DocumentSet(); DBBroker broker = null; boolean inclusive = fnName.equals("collection"); try { broker = pool.get(); String next; DocumentSet temp; for (int i = 0; i < params.size(); i++) { next = ((PathExpr) params.elementAt(i)).getLiteralValue(); temp = broker.getDocumentsByCollection(context.getUser(), next, inclusive); docs.addAll(temp); } } finally { pool.release(broker); } step = new RootNode(pool); parent.add(step); parent.setDocumentSet(docs); } if (fnName.equals("doctype")) { DocumentSet docs = new DocumentSet(); DBBroker broker = null; try { broker = pool.get(); String next; DocumentSet temp; for (int i = 0; i < params.size(); i++) { next = ((PathExpr) params.elementAt(i)).getLiteralValue(); temp = broker.getDocumentsByDoctype(context.getUser(), next); docs.addAll(temp); } } finally { pool.release(broker); } step = new RootNode(pool); parent.add(step); parent.setDocumentSet(docs); } // near(node-set, string) if (fnName.equals("near")) { if (params.size() < 2) throw new IllegalArgumentException("Function near requires two arguments"); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to near is empty"); Expression e1 = p1.getExpression(0); if(!(e1 instanceof Literal)) throw new IllegalArgumentException("Second argument has to be a literal expression"); ExtNear near = new ExtNear(pool); near.addTerms(((Literal)e1).getLiteral()); near.setPath((PathExpr)params.elementAt(0)); step = near; parent.addPath(near); } // ends-with(node-set, string) if (fnName.equals("starts-with")) { if (params.size() < 2) throw new IllegalArgumentException("Function starts-with requires two arguments"); PathExpr p0 = (PathExpr) params.elementAt(0); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to starts-with is empty"); Expression e1 = p1.getExpression(0); if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { Literal l = (Literal) e1; l.setLiteral(l.getLiteral() + '%'); OpEquals op = new OpEquals(pool, p0, e1, Constants.EQ); parent.addPath(op); step = op; } } // ends-with(node-set, string) if (fnName.equals("ends-with")) { if (params.size() < 2) throw new IllegalArgumentException("Function ends-with requires two arguments"); PathExpr p0 = (PathExpr) params.elementAt(0); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to ends-with is empty"); Expression e1 = p1.getExpression(0); if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { Literal l = (Literal) e1; l.setLiteral('%' + l.getLiteral()); OpEquals op = new OpEquals(pool, p0, e1, Constants.EQ); parent.addPath(op); step = op; } } // contains(node-set, string) if (fnName.equals("contains")) { if (params.size() < 2) throw new IllegalArgumentException("Function contains requires two arguments"); PathExpr p0 = (PathExpr) params.elementAt(0); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to contains is empty"); Expression e1 = p1.getExpression(0); if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { Literal l = (Literal) e1; l.setLiteral('%' + l.getLiteral() + '%'); OpEquals op = new OpEquals(pool, p0, e1, Constants.EQ); parent.addPath(op); step = op; } } if (step == null) { String clazz = context.getClassForFunction(fnName); if (clazz == null) throw new EXistException("function " + fnName + " not defined"); Function func = Function.createFunction(pool, clazz); parent.addPath(func); for (int i = 0; i < params.size(); i++) func.addArgument((PathExpr) params.elementAt(i)); step = func; } return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/bfcf33dba9c98234a0edaa282c8909b27b6a6ac4/Util.java/buggy/src/org/exist/parser/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
5371,
752,
2083,
12,
202,
202,
11194,
2864,
2845,
16,
202,
202,
5788,
1042,
819,
16,
202,
202,
743,
4742,
982,
16,
202,
202,
780,
2295,
461,
16,
202,
202,
5018,
859,
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,
225,
202,
482,
760,
5371,
752,
2083,
12,
202,
202,
11194,
2864,
2845,
16,
202,
202,
5788,
1042,
819,
16,
202,
202,
743,
4742,
982,
16,
202,
202,
780,
2295,
461,
16,
202,
202,
5018,
859,
13... |
x = clob.getSubString(0, (int) clob.length()); | x = clob.getSubString(1, (int) clob.length()); | static Object convert(Object callerReference, Object x, int jdbcType, String charSet) throws SQLException { try { switch (jdbcType) { case java.sql.Types.TINYINT: case java.sql.Types.SMALLINT: case java.sql.Types.INTEGER: if (x == null) { return INTEGER_ZERO; } else if (x instanceof Byte) { return new Integer(((Byte)x).byteValue() & 0xFF); } else if (x instanceof Number) { return new Integer(((Number) x).intValue()); } else if (x instanceof String) { return new Integer(((String) x).trim()); } else if (x instanceof Boolean) { return ((Boolean) x).booleanValue() ? INTEGER_ONE : INTEGER_ZERO; } break; case java.sql.Types.BIGINT: if (x == null) { return LONG_ZERO; } else if (x instanceof Long) { return x; } else if (x instanceof Byte) { return new Long(((Byte)x).byteValue() & 0xFF); } else if (x instanceof Number) { return new Long(((Number) x).longValue()); } else if (x instanceof String) { return new Long(((String) x).trim()); } else if (x instanceof Boolean) { return ((Boolean) x).booleanValue() ? LONG_ONE : LONG_ZERO; } break; case java.sql.Types.REAL: if (x == null) { return FLOAT_ZERO; } else if (x instanceof Float) { return x; } else if (x instanceof Byte) { return new Float(((Byte)x).byteValue() & 0xFF); } else if (x instanceof Number) { return new Float(((Number) x).floatValue()); } else if (x instanceof String) { return new Float(((String) x).trim()); } else if (x instanceof Boolean) { return ((Boolean) x).booleanValue() ? FLOAT_ONE : FLOAT_ZERO; } break; case java.sql.Types.FLOAT: case java.sql.Types.DOUBLE: if (x == null) { return DOUBLE_ZERO; } else if (x instanceof Double) { return x; } else if (x instanceof Byte) { return new Double(((Byte)x).byteValue() & 0xFF); } else if (x instanceof Number) { return new Double(((Number) x).doubleValue()); } else if (x instanceof String) { return new Double(((String) x).trim()); } else if (x instanceof Boolean) { return ((Boolean) x).booleanValue() ? DOUBLE_ONE : DOUBLE_ZERO; } break; case java.sql.Types.NUMERIC: case java.sql.Types.DECIMAL: if (x == null) { return null; } else if (x instanceof BigDecimal) { return x; } else if (x instanceof Number) { return new BigDecimal(((Number) x).doubleValue()); } else if (x instanceof String) { return new BigDecimal((String) x); } else if (x instanceof Boolean) { return ((Boolean) x).booleanValue() ? BIG_DECIMAL_ONE : BIG_DECIMAL_ZERO; } break; case java.sql.Types.VARCHAR: case java.sql.Types.CHAR: if (x == null) { return null; } else if (x instanceof String) { return x; } else if (x instanceof BigDecimal) { return bigDecimalToString((BigDecimal) x); } else if (x instanceof Number) { return x.toString(); } else if (x instanceof Boolean) { return((Boolean) x).booleanValue() ? "1" : "0"; } else if (x instanceof Clob) { Clob clob = (Clob) x; long length = clob.length(); if (length > Integer.MAX_VALUE) { throw new SQLException(Messages.get("error.normalize.lobtoobig"), "22000"); } return clob.getSubString(1, (int) length); } else if (x instanceof Blob) { Blob blob = (Blob) x; long length = blob.length(); if (length > Integer.MAX_VALUE) { throw new SQLException(Messages.get("error.normalize.lobtoobig"), "22000"); } x = blob.getBytes(1, (int) length); } if (x instanceof byte[]) { try { return new String((byte[]) x, charSet); } catch (UnsupportedEncodingException e) { return new String((byte[]) x); } } return x.toString(); // Last hope! case java.sql.Types.BIT: case JtdsStatement.BOOLEAN: if (x == null) { return Boolean.FALSE; } else if (x instanceof Boolean) { return x; } else if (x instanceof Number) { return(((Number) x).intValue() == 0) ? Boolean.FALSE : Boolean.TRUE; } else if (x instanceof String) { String tmp = ((String) x).trim(); return (tmp.equals("1") || tmp.equalsIgnoreCase("true")) ? Boolean.TRUE : Boolean.FALSE; } break; case java.sql.Types.VARBINARY: case java.sql.Types.BINARY: if (x == null) { return null; } else if (x instanceof byte[]) { return x; } else if (x instanceof Blob) { Blob blob = (Blob) x; return blob.getBytes(1, (int) blob.length()); } else if (x instanceof Clob) { Clob clob = (Clob) x; long length = clob.length(); if (length > Integer.MAX_VALUE) { throw new SQLException(Messages.get("error.normalize.lobtoobig"), "22000"); } x = clob.getSubString(1, (int) length); } if (x instanceof String) { if (charSet == null) { charSet = "ISO-8859-1"; } try { return ((String) x).getBytes(charSet); } catch (UnsupportedEncodingException e) { return ((String) x).getBytes(); } } else if (x instanceof UniqueIdentifier) { return ((UniqueIdentifier) x).getBytes(); } break; case java.sql.Types.TIMESTAMP: if (x == null) { return null; } else if (x instanceof java.sql.Timestamp) { return x; } else if (x instanceof java.sql.Date) { return new java.sql.Timestamp(((java.sql.Date) x).getTime()); } else if (x instanceof java.sql.Time) { return new java.sql.Timestamp(((java.sql.Time) x).getTime()); } else if (x instanceof java.lang.String) { return java.sql.Timestamp.valueOf(((String)x).trim()); } break; case java.sql.Types.DATE: if (x == null) { return null; } else if (x instanceof java.sql.Date) { return x; } else if (x instanceof java.sql.Time) { return DATE_ZERO; } else if (x instanceof java.sql.Timestamp) { synchronized (cal) { cal.setTime((java.util.Date) x); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0);// VM1.4+ only return new java.sql.Date(cal.getTimeInMillis()); return new java.sql.Date(cal.getTime().getTime()); } } else if (x instanceof java.lang.String) { return java.sql.Date.valueOf(((String) x).trim()); } break; case java.sql.Types.TIME: if (x == null) { return null; } else if (x instanceof java.sql.Time) { return x; } else if (x instanceof java.sql.Date) { return TIME_ZERO; } else if (x instanceof java.sql.Timestamp) { synchronized (cal) {// VM 1.4+ only cal.setTimeInMillis(((java.sql.Timestamp)x).getTime()); cal.setTime((java.util.Date)x); cal.set(Calendar.YEAR, 1970); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH,1);// VM 1.4+ only return new java.sql.Time(cal.getTimeInMillis());*/ return new java.sql.Time(cal.getTime().getTime()); } } else if (x instanceof java.lang.String) { return java.sql.Time.valueOf(((String) x).trim()); } break; case java.sql.Types.OTHER: return x; case java.sql.Types.JAVA_OBJECT: throw new SQLException( Messages.get("error.convert.badtypes", x.getClass().getName(), getJdbcTypeName(jdbcType)), "22005"); case java.sql.Types.LONGVARBINARY: case java.sql.Types.BLOB: if (x == null) { return null; } else if (x instanceof Blob) { return x; } else if (x instanceof byte[]) { return new BlobImpl(callerReference, (byte[]) x); } else if (x instanceof Clob) { Clob clob = (Clob) x; x = clob.getSubString(0, (int) clob.length()); // FIXME - Use reader to populate Blob } if (x instanceof String) { BlobImpl blob = new BlobImpl(callerReference); String data = (String) x; if (charSet == null) { charSet = "ISO-8859-1"; } try { blob.setBytes(1, data.getBytes(charSet)); } catch (UnsupportedEncodingException e) { blob.setBytes(1, data.getBytes()); } return blob; } break; case java.sql.Types.LONGVARCHAR: case java.sql.Types.CLOB: if (x == null) { return null; } else if (x instanceof Clob) { return x; } else if (x instanceof Blob) { Blob blob = (Blob) x; x = blob.getBytes(0, (int) blob.length()); // FIXME - Use input stream to populate Clob } else if (x instanceof BigDecimal) { x = bigDecimalToString((BigDecimal) x); } else if (x instanceof Boolean) { x = ((Boolean) x).booleanValue() ? "1" : "0"; } else if (!(x instanceof byte[])) { x = x.toString(); } if (x instanceof byte[]) { ClobImpl clob = new ClobImpl(callerReference); byte[] data = (byte[]) x; if (charSet == null) { charSet = "ISO-8859-1"; } try { clob.setString(1, new String(data, charSet)); } catch (UnsupportedEncodingException e) { clob.setString(1, new String(data)); } return clob; } else if (x instanceof String) { return new ClobImpl(callerReference, (String) x); } break; default: throw new SQLException( Messages.get("error.convert.badtypeconst", getJdbcTypeName(jdbcType)), "HY004"); } throw new SQLException( Messages.get("error.convert.badtypes", x.getClass().getName(), getJdbcTypeName(jdbcType)), "22005"); } catch (NumberFormatException nfe) { throw new SQLException( Messages.get("error.convert.badnumber", getJdbcTypeName(jdbcType)), "22000"); } } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/29784e7f9af7600411fed4b77b09ba3bf621e581/Support.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/Support.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
1765,
12,
921,
4894,
2404,
16,
1033,
619,
16,
509,
16579,
559,
16,
514,
1149,
694,
13,
5411,
1216,
6483,
288,
3639,
775,
288,
5411,
1620,
261,
24687,
559,
13,
288,
7734,
648,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
1765,
12,
921,
4894,
2404,
16,
1033,
619,
16,
509,
16579,
559,
16,
514,
1149,
694,
13,
5411,
1216,
6483,
288,
3639,
775,
288,
5411,
1620,
261,
24687,
559,
13,
288,
7734,
648,... |
return RubyArray.create(ruby, null, items); | return RubyArray.newArray(ruby, items); | public static RubyObject convertJavaToRuby(Ruby ruby, Object object) { if (object == null) { return ruby.getNil(); } Class javaClass = object.getClass(); if (javaClass.isPrimitive()) { String cName = javaClass.getName(); if (cName == "boolean") { return RubyBoolean.newBoolean(ruby, ((Boolean) object).booleanValue()); } else if (cName == "float" || cName == "double") { return RubyFloat.newFloat(ruby, ((Number) object).doubleValue()); } else if (cName == "char") { return RubyFixnum.newFixnum(ruby, ((Character) object).charValue()); } else { // else it's one of the integral types return RubyFixnum.newFixnum(ruby, ((Number) object).longValue()); } } else if (javaClass == Boolean.class) { return RubyBoolean.newBoolean(ruby, ((Boolean) object).booleanValue()); } else if (javaClass == Float.class || javaClass == Double.class) { return RubyFloat.newFloat(ruby, ((Number) object).doubleValue()); } else if (javaClass == Character.class) { return RubyFixnum.newFixnum(ruby, ((Character) object).charValue()); } else if (Number.class.isAssignableFrom(javaClass)) { return RubyFixnum.newFixnum(ruby, ((Number) object).longValue()); } else if (javaClass == String.class) { return RubyString.newString(ruby, object.toString()); } else if (javaClass.isArray()) { Class arrayClass = javaClass.getComponentType(); int len = Array.getLength(object); RubyObject[] items = new RubyObject[len]; for (int i = 0; i < len; i++) { items[i] = convertJavaToRuby(ruby, Array.get(object, i)); } return RubyArray.create(ruby, null, items); } else if (List.class.isAssignableFrom(javaClass)) { int len = ((List) object).size(); RubyObject[] items = new RubyObject[len]; for (int i = 0; i < len; i++) { items[i] = convertJavaToRuby(ruby, ((List) object).get(i)); } return RubyArray.create(ruby, null, items); } else if (Map.class.isAssignableFrom(javaClass)) { int len = ((Map) object).size(); RubyObject[] items = new RubyObject[len * 2]; Iterator iter = ((Map) object).entrySet().iterator(); for (int i = 0; i < len; i++) { Map.Entry entry = (Map.Entry) iter.next(); items[2 * i] = convertJavaToRuby(ruby, entry.getKey()); items[2 * i + 1] = convertJavaToRuby(ruby, entry.getValue()); } return RubyHash.create(ruby, null, items); } else { return new RubyJavaObject(ruby, (RubyClass)ruby.getJavaSupport().loadClass(javaClass, null), object); } } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/9a753ba8b7044ff0fda700232a1845d0df24f37b/JavaUtil.java/buggy/org/jruby/javasupport/JavaUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
921,
1765,
5852,
774,
54,
10340,
12,
54,
10340,
22155,
16,
1033,
733,
13,
288,
3639,
309,
261,
1612,
422,
446,
13,
288,
5411,
327,
22155,
18,
588,
12616,
5621,
3639,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
921,
1765,
5852,
774,
54,
10340,
12,
54,
10340,
22155,
16,
1033,
733,
13,
288,
3639,
309,
261,
1612,
422,
446,
13,
288,
5411,
327,
22155,
18,
588,
12616,
5621,
3639,
2... |
case Token.ELEMINC : { | case Icode_ELEMINC : { | static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { return execWithNewDomain(cx, scope, thisObj, args, argsDbl, argShift, argCount, fnOrScript, idata); } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Context.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!f.itsUseDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { scope = ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Context.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } String savedSourceFile = cx.interpreterSourceFile; cx.interpreterSourceFile = idata.itsSourceFile; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: for (;;) { try { switch (iCode[pc] & 0xff) { // Back indent to ease imlementation reading case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal withnexceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Context.codeBug(); int pcNew = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof WrappedException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pcNew >= 0) { // Has catch block doCatch = true; } } if (pcNew < 0) { pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pcNew < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Context.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } // make stack to contain single exception object stackTop = STACK_SHFT; if (doCatch) { stack[stackTop] = ScriptRuntime.getCatchObject(cx, scope, javaException); } else { // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; // Notify instruction observer if necessary // and point pc and pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = pcNew; continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; javaException = new JavaScriptException(value); exceptionPC = pc; if (instructionThreshold != 0) { instructionCount += pc + 1 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getJavaCatchPC(iCode); continue Loop; } case Token.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IFNE : { Object val = stack[stackTop]; boolean valBln; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue Loop; } pc += 2; break; } case Token.IFEQ : { boolean valBln; Object val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue Loop; } pc += 2; break; } case Token.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue Loop; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue Loop; case Icode_RETSUB : { int slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } int newPC; Object value = stack[LOCAL_SHFT + slot]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc; newPC = getJavaCatchPC(iCode); } else { // Normal return from GOSUB newPC = (int)sDbl[LOCAL_SHFT + slot]; } pcPrevBranch = pc = newPC; continue Loop; } case Token.POP : stack[stackTop] = null; stackTop--; break; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; break; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Icode_END: break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case Token.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case Token.BINDNAME : { String name = strings[getIndex(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case Token.GETBASE : { String name = strings[getIndex(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; } case Token.SETNAME : { String name = strings[getIndex(iCode, pc + 1)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; // what about class cast exception here for lhs? Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); break; } case Token.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case Token.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case Token.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case Token.PROPINC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; } case Token.PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; } case Token.ELEMINC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; } case Token.ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; } case Token.GETTHIS : { Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis(lhs); break; } case Token.NEWTEMP : { int slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; } case Token.USETEMP : { int slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; } case Icode_CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int callType = iCode[pc + 1] & 0xFF; boolean isNew = (iCode[pc + 2] != 0); int sourceLine = getShort(iCode, pc + 3); int count = getIndex(iCode, pc + 5); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); pc += 6; instructionCount = cx.instructionCount; break; } case Token.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; int count = getIndex(iCode, pc + 3); stackTop -= count; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc + 1)]; if (lhs == null) lhs = undefined; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), calleeScope); } pc += 4; instructionCount = cx.instructionCount; break; } case Token.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 3); stackTop -= count; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, count, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc + 1)]; if (lhs == null) lhs = undefined; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), scope); } pc += 4; instructionCount = cx.instructionCount; break; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case Token.TYPEOFNAME : { String name = strings[getIndex(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case Token.STRING : stack[++stackTop] = strings[getIndex(iCode, pc + 1)]; pc += 2; break; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getIndex(iCode, pc + 1)]; pc += 2; break; case Token.NAME : { String name = strings[getIndex(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case Token.NAMEINC : { String name = strings[getIndex(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postIncrement(scope, name); pc += 2; break; } case Token.NAMEDEC : { String name = strings[getIndex(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postDecrement(scope, name); pc += 2; break; } case Token.SETVAR : { int slot = (iCode[++pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } break; } case Token.GETVAR : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } break; } case Token.VARINC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) + 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case Token.VARDEC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) - 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case Token.NULL : stack[++stackTop] = null; break; case Token.THIS : stack[++stackTop] = thisObj; break; case Token.THISFN : stack[++stackTop] = fnOrScript; break; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; break; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; break; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; break; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; break; case Token.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case Token.ENUMINIT : { int slot = (iCode[++pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; } case Token.ENUMNEXT : { int slot = (iCode[++pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime.nextEnum(val); break; } case Icode_GETPROTO : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; } case Icode_GETPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; } case Icode_GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; } case Icode_SETPROTO : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; } case Icode_SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; } case Icode_SCOPE : stack[++stackTop] = scope; break; case Token.CLOSURE : { int i = getIndex(iCode, pc + 1); InterpreterData closureData = idata.itsNestedFunctions[i]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); pc += 2; break; } case Token.REGEXP : { int i = getIndex(iCode, pc + 1); stack[++stackTop] = idata.itsRegExpLiterals[i]; pc += 2; break; } case Icode_LINE : { int line = getShort(iCode, pc + 1); cx.interpreterLine = line; if (debuggerFrame != null) { debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException ("Unknown icode : "+(iCode[pc] & 0xff)+" @ pc : "+pc); } // end of interpreter switch } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } javaException = ex; exceptionPC = pc; pc = getJavaCatchPC(iCode); continue Loop; } } cx.interpreterSourceFile = savedSourceFile; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } if (javaException != null) { if (javaException instanceof JavaScriptException) { throw (JavaScriptException)javaException; } else if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/faf2a30c39fc508f2635416a94f9662c4ae41ad3/Interpreter.java/clean/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... |
settings.setProperty("log4j.rootLogger", "ALL, console"); settings.setProperty("log4j.appender.console", "org.apache.log4j.ConsoleAppender"); settings.setProperty("log4j.appender.console.layout", "org.apache.log4j.PatternLayout"); settings.setProperty("log4j.appender.console.layout.ConversionPattern", "%16x %6c{1} %-6p %m%n"); | settings.setProperty("log4j.rootLogger", "ALL, console"); settings.setProperty("log4j.appender.console", "org.apache.log4j.ConsoleAppender"); settings.setProperty("log4j.appender.console.layout", "org.apache.log4j.PatternLayout"); settings.setProperty("log4j.appender.console.layout.ConversionPattern", "%16x %6c{1} %-6p %m%n"); | private static final void configureLoggerFallback() { Properties settings = new Properties(); settings.setProperty("log4j.rootLogger", "ALL, console"); settings.setProperty("log4j.appender.console", "org.apache.log4j.ConsoleAppender"); settings.setProperty("log4j.appender.console.layout", "org.apache.log4j.PatternLayout"); settings.setProperty("log4j.appender.console.layout.ConversionPattern", "%16x %6c{1} %-6p %m%n"); PropertyConfigurator.configure(settings); } | 45757 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45757/cef2764871d42aa196c54b4fe167f857c2f49924/APIServlet.java/clean/src/java-server-framework/org/xins/server/APIServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
760,
727,
918,
5068,
3328,
12355,
1435,
288,
1377,
6183,
1947,
273,
394,
6183,
5621,
1377,
1947,
18,
542,
1396,
2932,
1330,
24,
78,
18,
3085,
3328,
3113,
27573,
315,
4685,
16,
2983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
760,
727,
918,
5068,
3328,
12355,
1435,
288,
1377,
6183,
1947,
273,
394,
6183,
5621,
1377,
1947,
18,
542,
1396,
2932,
1330,
24,
78,
18,
3085,
3328,
3113,
27573,
315,
4685,
16,
2983,... |
vstack.push(eContext); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.release(eContext); ref.release(eContext); vstack.pushItem(LongItem.createStack()); helper.writePOP(T0); helper.writePOP(S0); checkBounds(S0, T0); os.writeLEA(S0, S0, T0, 8, VmArray.DATA_OFFSET * 4); os.writeMOV(INTSIZE, T0, S0, 0); os.writeMOV(INTSIZE, T1, S0, 4); helper.writePUSH64(T0, T1); } | vstack.push(eContext); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.release(eContext); ref.release(eContext); vstack.pushItem(LongItem.createStack()); helper.writePOP(T0); helper.writePOP(S0); checkBounds(S0, T0); os.writeLEA(S0, S0, T0, 8, VmArray.DATA_OFFSET * 4); os.writeMOV(INTSIZE, T0, S0, 0); os.writeMOV(INTSIZE, T1, S0, 4); helper.writePUSH64(T0, T1); } | public final void visit_laload() { //TODO: port to orp-style vstack.push(eContext); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.release(eContext); ref.release(eContext); vstack.pushItem(LongItem.createStack()); helper.writePOP(T0); // Index helper.writePOP(S0); // Arrayref checkBounds(S0, T0); os.writeLEA(S0, S0, T0, 8, VmArray.DATA_OFFSET * 4); os.writeMOV(INTSIZE, T0, S0, 0); os.writeMOV(INTSIZE, T1, S0, 4); helper.writePUSH64(T0, T1); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d402ee1c5f9ab6d1c5b4f597b70658827f1f304d/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3757,
67,
80,
287,
6189,
1435,
288,
202,
202,
759,
6241,
30,
1756,
358,
578,
84,
17,
4060,
202,
202,
90,
3772,
18,
6206,
12,
73,
1042,
1769,
202,
202,
1702,
1180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3757,
67,
80,
287,
6189,
1435,
288,
202,
202,
759,
6241,
30,
1756,
358,
578,
84,
17,
4060,
202,
202,
90,
3772,
18,
6206,
12,
73,
1042,
1769,
202,
202,
1702,
1180,
... |
try { syslog = new BufferedWriter(new FileWriter("/home/vino/sephiabot/syslog.txt", false)); } catch (IOException ioe) { logerror("Couldn't open syslog file."); } | this.nextWho = 0; this.nextHi = 0; log("-----------------------------------------\nSephiaBot Started!"); parseConfig(config); | public SephiaBot(String config) { try { syslog = new BufferedWriter(new FileWriter("/home/vino/sephiabot/syslog.txt", false)); } catch (IOException ioe) { logerror("Couldn't open syslog file."); } log("SephiaBot created."); parseConfig("sephiabot.cfg"); log("Network: " + network + " " + port + " : " + name); try { logOut = new BufferedWriter[channels.length]; for (int i = 0; i < channels.length; i++) { logOut[i] = new BufferedWriter(new FileWriter("/home/vino/sephiabot/log-"+channels[i]+".txt", true)); } } catch (IOException ioe) { logerror("Couldn't open log file."); } } | 4867 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4867/13a5492f5df8208250f437a98b833f050ed86976/SephiaBot.java/clean/SephiaBot.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3265,
844,
1155,
6522,
12,
780,
642,
13,
288,
565,
775,
288,
1377,
16718,
273,
394,
22490,
12,
2704,
24639,
2932,
19,
8712,
19,
90,
15020,
19,
307,
9973,
378,
352,
19,
9499,
1330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3265,
844,
1155,
6522,
12,
780,
642,
13,
288,
565,
775,
288,
1377,
16718,
273,
394,
22490,
12,
2704,
24639,
2932,
19,
8712,
19,
90,
15020,
19,
307,
9973,
378,
352,
19,
9499,
1330,... |
public static void main(String[] args) throws Exception { javax.swing.JFrame frame = new javax.swing.JFrame("Foo bar"); PageModel model = new PageModel(); XMLPageBuilder builder = new XMLPageBuilder(args[0], args[1], model); URL url = builder.getClass().getResource("dialogs.xml"); builder.buildFrom(url.openStream()); JPanel panel = builder.getComponent(); JDialog dialog = new JDialog(); dialog.getContentPane().setLayout(new java.awt.GridBagLayout()); dialog.getContentPane().add(panel, null); dialog.setTitle(builder.getTitle()); dialog.pack(); dialog.setVisible(true); } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/3cd6e9d81112e3ab17a910eaef36b9e56b2a8b6a/XMLPageBuilder.java/buggy/grendel/sources/grendel/ui/XMLPageBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
565,
6863,
18,
5328,
310,
18,
46,
3219,
2623,
273,
394,
6863,
18,
5328,
310,
18,
46,
3219,
2932,
42,
5161,
4653,
8863,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
565,
6863,
18,
5328,
310,
18,
46,
3219,
2623,
273,
394,
6863,
18,
5328,
310,
18,
46,
3219,
2932,
42,
5161,
4653,
8863,
5... | ||
DetailAST cond = getMainAst().findFirstToken(TokenTypes.FOR_CONDITION); checkExpressionSubtree(cond, expected, false, false); | DetailAST cond = getMainAst().findFirstToken(TokenTypes.FOR_CONDITION); checkExpressionSubtree(cond, expected, false, false); | private void checkForParams() { IndentLevel expected = new IndentLevel(getLevel(), getBasicOffset()); DetailAST init = getMainAst().findFirstToken(TokenTypes.FOR_INIT); checkExpressionSubtree(init, expected, false, false); DetailAST cond = getMainAst().findFirstToken(TokenTypes.FOR_CONDITION); checkExpressionSubtree(cond, expected, false, false); DetailAST iter = getMainAst().findFirstToken(TokenTypes.FOR_ITERATOR); checkExpressionSubtree(iter, expected, false, false); } | 50482 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50482/ad60920419d0642c81a96e500f6e0da7c380d6eb/ForHandler.java/buggy/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/ForHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
13855,
1370,
1435,
565,
288,
3639,
28653,
2355,
2665,
273,
394,
28653,
2355,
12,
588,
2355,
9334,
31010,
2335,
10663,
3639,
27931,
9053,
1208,
273,
15011,
21385,
7675,
4720,
3759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13855,
1370,
1435,
565,
288,
3639,
28653,
2355,
2665,
273,
394,
28653,
2355,
12,
588,
2355,
9334,
31010,
2335,
10663,
3639,
27931,
9053,
1208,
273,
15011,
21385,
7675,
4720,
3759,
... |
throw org.postgresql.Driver.notImplemented(); | Field f[] = new Field[14]; f[0] = new Field(connection, "PKTABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "PKTABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "PKTABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "PKCOLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "FKTABLE_CAT", iVarcharOid, 32); f[5] = new Field(connection, "FKTABLE_SCHEM", iVarcharOid, 32); f[6] = new Field(connection, "FKTABLE_NAME", iVarcharOid, 32); f[7] = new Field(connection, "FKCOLUMN_NAME", iVarcharOid, 32); f[8] = new Field(connection, "KEY_SEQ", iInt2Oid, 2); f[9] = new Field(connection, "UPDATE_RULE", iInt2Oid, 2); f[10] = new Field(connection, "DELETE_RULE", iInt2Oid, 2); f[11] = new Field(connection, "FK_NAME", iVarcharOid, 32); f[12] = new Field(connection, "PK_NAME", iVarcharOid, 32); f[13] = new Field(connection, "DEFERRABILITY", iInt2Oid, 2); java.sql.ResultSet rs = connection.ExecSQL("SELECT a.tgargs," + "substring(a.proname from 9 for (char_length(a.proname)-12))," + "substring(b.proname from 9 for (char_length(b.proname)-12))," + "a.tgdeferrable," + "a.tginitdeferred " + "FROM " + "(SELECT t.tgargs, t.tgconstrname, p.proname," + "t.tgdeferrable, t.tginitdeferred " + "FROM pg_class as c, pg_proc as p, pg_trigger as t " + "WHERE c.relname like '"+table+"' AND c.relfilenode=t.tgrelid " + "AND t.tgfoid = p.oid AND p.proname LIKE 'RI_FKey_%_upd') as a, " + "(SELECT t.tgconstrname, p.proname " + "FROM pg_class as c, pg_proc as p, pg_trigger as t " + "WHERE c.relname like '"+table+"' AND c.relfilenode=t.tgrelid " + "AND t.tgfoid = p.oid AND p.proname LIKE 'RI_FKey_%_del') as b " + "WHERE a.tgconstrname=b.tgconstrname"); Vector tuples = new Vector(); while (rs.next()) { parseConstraint(rs,tuples); } return new ResultSet(connection, f, tuples, "OK", 1); | public java.sql.ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { throw org.postgresql.Driver.notImplemented(); } | 45534 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45534/0b1289e67d0c0be0f1089b298113652333eb6299/DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
26246,
1798,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
13,
1216,
6483,
202,
95,
202,
202,
12849,
2358,
18,
2767,
24330,
18,
4668,
18,
902,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
26246,
1798,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
13,
1216,
6483,
202,
95,
202,
202,
12849,
2358,
18,
2767,
24330,
18,
4668,
18,
902,
... |
int lastError = WGL.GetLastError(); | long lastError = WGL.GetLastError(); | protected void choosePixelFormat(boolean onscreen) { PIXELFORMATDESCRIPTOR pfd = null; int pixelFormat = 0; if (onscreen) { if (WGL.GetPixelFormat(hdc) != 0) { // The Java2D/OpenGL pipeline probably already set a pixel // format for this canvas. if (DEBUG) { System.err.println("NOTE: pixel format already chosen (by Java2D/OpenGL pipeline?) for window: " + WGL.GetPixelFormat(hdc)); } pixelFormatChosen = true; return; } GLCapabilities[] availableCaps = null; int numFormats = 0; pfd = newPixelFormatDescriptor(); // Produce a recommended pixel format selection for the GLCapabilitiesChooser. // Use wglChoosePixelFormatARB if user requested multisampling and if we have it available WindowsGLDrawable dummyDrawable = null; GLContextImpl dummyContext = null; WGLExt dummyWGLExt = null; if (capabilities.getSampleBuffers()) { dummyDrawable = new WindowsDummyGLDrawable(); dummyContext = (GLContextImpl) dummyDrawable.createContext(null); if (dummyContext != null) { dummyContext.makeCurrent(); dummyWGLExt = (WGLExt) dummyContext.getPlatformGLExtensions(); } } int recommendedPixelFormat = -1; boolean haveWGLChoosePixelFormatARB = false; boolean haveWGLARBMultisample = false; boolean gotAvailableCaps = false; if (dummyWGLExt != null) { try { int[] iattributes = new int [2 * MAX_ATTRIBS]; int[] iresults = new int [2 * MAX_ATTRIBS]; float[] fattributes = new float[1]; if (glCapabilities2iattributes(capabilities, iattributes, dummyWGLExt, false, null)) { int[] pformats = new int[MAX_PFORMATS]; int[] numFormatsTmp = new int[1]; if (dummyWGLExt.wglChoosePixelFormatARB(hdc, iattributes, 0, fattributes, 0, MAX_PFORMATS, pformats, 0, numFormatsTmp, 0)) { numFormats = numFormatsTmp[0]; if (numFormats > 0) { // Remove one-basing of pixel format (added on later) recommendedPixelFormat = pformats[0] - 1; if (DEBUG) { System.err.println(getThreadName() + ": Used wglChoosePixelFormatARB to recommend pixel format " + recommendedPixelFormat); } } } else { if (DEBUG) { System.err.println(getThreadName() + ": wglChoosePixelFormatARB failed: " + WGL.GetLastError() ); Thread.dumpStack(); } } if (DEBUG) { if (recommendedPixelFormat < 0) { System.err.print(getThreadName() + ": wglChoosePixelFormatARB didn't recommend a pixel format"); if (capabilities.getSampleBuffers()) { System.err.print(" for multisampled GLCapabilities"); } System.err.println(); } } // Produce a list of GLCapabilities to give to the // GLCapabilitiesChooser. // Use wglGetPixelFormatAttribivARB instead of // DescribePixelFormat to get higher-precision information // about the pixel format (should make the GLCapabilities // more precise as well...i.e., remove the // "HardwareAccelerated" bit, which is basically // meaningless, and put in whether it can render to a // window, to a pbuffer, or to a pixmap) int niattribs = 0; iattributes[0] = WGLExt.WGL_NUMBER_PIXEL_FORMATS_ARB; if (dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, iattributes, 0, iresults, 0)) { numFormats = iresults[0]; // Should we be filtering out the pixel formats which aren't // applicable, as we are doing here? // We don't have enough information in the GLCapabilities to // represent those that aren't... iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW_ARB; iattributes[niattribs++] = WGLExt.WGL_ACCELERATION_ARB; iattributes[niattribs++] = WGLExt.WGL_SUPPORT_OPENGL_ARB; iattributes[niattribs++] = WGLExt.WGL_DEPTH_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_STENCIL_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_DOUBLE_BUFFER_ARB; iattributes[niattribs++] = WGLExt.WGL_STEREO_ARB; iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB; iattributes[niattribs++] = WGLExt.WGL_RED_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_GREEN_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_BLUE_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_ALPHA_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_ACCUM_RED_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_ACCUM_GREEN_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_ACCUM_BLUE_BITS_ARB; iattributes[niattribs++] = WGLExt.WGL_ACCUM_ALPHA_BITS_ARB; if (haveWGLARBMultisample) { iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS_ARB; iattributes[niattribs++] = WGLExt.WGL_SAMPLES_ARB; } availableCaps = new GLCapabilities[numFormats]; for (int i = 0; i < numFormats; i++) { if (!dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, i+1, 0, niattribs, iattributes, 0, iresults, 0)) { throw new GLException("Error getting pixel format attributes for pixel format " + (i + 1) + " of device context"); } availableCaps[i] = iattributes2GLCapabilities(iattributes, iresults, true); } gotAvailableCaps = true; } else { int lastErr = WGL.GetLastError(); // Intel Extreme graphics fails with a zero error code if (lastErr != 0) { throw new GLException("Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB: error code " + WGL.GetLastError()); } } } } finally { dummyContext.release(); dummyContext.destroy(); dummyDrawable.destroy(); } } // Fallback path for older cards, in particular Intel Extreme motherboard graphics if (!gotAvailableCaps) { if (DEBUG) { if (!capabilities.getSampleBuffers()) { System.err.println(getThreadName() + ": Using ChoosePixelFormat because multisampling not requested"); } else { System.err.println(getThreadName() + ": Using ChoosePixelFormat because no wglChoosePixelFormatARB"); } } pfd = glCapabilities2PFD(capabilities, onscreen); // Remove one-basing of pixel format (added on later) recommendedPixelFormat = WGL.ChoosePixelFormat(hdc, pfd) - 1; numFormats = WGL.DescribePixelFormat(hdc, 1, 0, null); if (numFormats == 0) { throw new GLException("Unable to enumerate pixel formats of window for GLCapabilitiesChooser"); } availableCaps = new GLCapabilities[numFormats]; for (int i = 0; i < numFormats; i++) { if (WGL.DescribePixelFormat(hdc, 1 + i, pfd.size(), pfd) == 0) { throw new GLException("Error describing pixel format " + (1 + i) + " of device context"); } availableCaps[i] = pfd2GLCapabilities(pfd); } } // Supply information to chooser pixelFormat = chooser.chooseCapabilities(capabilities, availableCaps, recommendedPixelFormat); if ((pixelFormat < 0) || (pixelFormat >= numFormats)) { throw new GLException("Invalid result " + pixelFormat + " from GLCapabilitiesChooser (should be between 0 and " + (numFormats - 1) + ")"); } if (DEBUG) { System.err.println(getThreadName() + ": Chosen pixel format (" + pixelFormat + "):"); System.err.println(availableCaps[pixelFormat]); } pixelFormat += 1; // one-base the index if (WGL.DescribePixelFormat(hdc, pixelFormat, pfd.size(), pfd) == 0) { throw new GLException("Error re-describing the chosen pixel format: " + WGL.GetLastError()); } } else { // For now, use ChoosePixelFormat for offscreen surfaces until // we figure out how to properly choose an offscreen- // compatible pixel format pfd = glCapabilities2PFD(capabilities, onscreen); pixelFormat = WGL.ChoosePixelFormat(hdc, pfd); } if (!WGL.SetPixelFormat(hdc, pixelFormat, pfd)) { int lastError = WGL.GetLastError(); if (DEBUG) { System.err.println(getThreadName() + ": SetPixelFormat failed: current context = " + WGL.wglGetCurrentContext() + ", current DC = " + WGL.wglGetCurrentDC()); System.err.println(getThreadName() + ": GetPixelFormat(hdc " + toHexString(hdc) + ") returns " + WGL.GetPixelFormat(hdc)); } throw new GLException("Unable to set pixel format " + pixelFormat + " for device context " + toHexString(hdc) + ": error code " + lastError); } pixelFormatChosen = true; } | 48257 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48257/875a3de8f54704604d006badf0f0747347319025/WindowsGLDrawable.java/clean/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
9876,
9037,
1630,
12,
6494,
603,
9252,
13,
288,
565,
7024,
60,
2247,
7254,
1639,
27689,
293,
8313,
273,
446,
31,
565,
509,
4957,
1630,
273,
374,
31,
565,
309,
261,
265,
9252,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9876,
9037,
1630,
12,
6494,
603,
9252,
13,
288,
565,
7024,
60,
2247,
7254,
1639,
27689,
293,
8313,
273,
446,
31,
565,
509,
4957,
1630,
273,
374,
31,
565,
309,
261,
265,
9252,... |
fIgnoreCount = new BreakpointIntegerFieldEditor( CBreakpointPreferenceStore.IGNORE_COUNT, "&Ignore Count: ", parent ); | fIgnoreCount = new BreakpointIntegerFieldEditor( CBreakpointPreferenceStore.IGNORE_COUNT, CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Ignore_Count"), parent ); | protected void createIgnoreCountEditor( Composite parent ) { fIgnoreCount = new BreakpointIntegerFieldEditor( CBreakpointPreferenceStore.IGNORE_COUNT, "&Ignore Count: ", parent ); fIgnoreCount.setValidRange( 0, Integer.MAX_VALUE ); fIgnoreCountTextControl = fIgnoreCount.getTextControl( parent ); try { fIgnoreCountTextControl.setEnabled( getBreakpoint().getIgnoreCount() >= 0 ); } catch (CoreException ce) { CDebugUIPlugin.log( ce ); } addField( fIgnoreCount ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/7c50719ee75ad53d8a6bd367d0f569749c3680bc/CBreakpointPreferencePage.java/buggy/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
3777,
1380,
6946,
12,
14728,
982,
262,
202,
95,
202,
202,
74,
3777,
1380,
273,
394,
17030,
1153,
4522,
974,
6946,
12,
385,
20552,
9624,
2257,
18,
20118,
67,
7240,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
3777,
1380,
6946,
12,
14728,
982,
262,
202,
95,
202,
202,
74,
3777,
1380,
273,
394,
17030,
1153,
4522,
974,
6946,
12,
385,
20552,
9624,
2257,
18,
20118,
67,
7240,
1... |
e2.printStackTrace(); } project = PerlDebugPlugin.getWorkspace().getRoot().getProject(projectName); | e.printStackTrace(); } | boolean startTarget() { String htmlRootDir = null; String htmlRootFile = null; String cgiRootDir = null; String cgiFileExtension = null; String projectName = null; IProject project; if (mDebug) { mDebugPort = new RemotePort(); mDebugPort.startConnect(); if (mDebugPort == null) return false; } try { htmlRootDir = mLaunch.getLaunchConfiguration().getAttribute( PerlLaunchConfigurationConstants.ATTR_HTML_ROOT_DIR, (String) null); htmlRootFile = mLaunch.getLaunchConfiguration().getAttribute( PerlLaunchConfigurationConstants.ATTR_HTML_ROOT_FILE, (String) null); cgiRootDir = mLaunch.getLaunchConfiguration().getAttribute( PerlLaunchConfigurationConstants.ATTR_CGI_ROOT_DIR, (String) null); cgiEnv = (ArrayList) mLaunch.getLaunchConfiguration().getAttribute( PerlLaunchConfigurationConstants.ATTR_CGI_ENV, (List) null); cgiFileExtension = mLaunch.getLaunchConfiguration().getAttribute( PerlLaunchConfigurationConstants.ATTR_CGI_FILE_EXTENSION, (String) null); projectName = mLaunch.getLaunchConfiguration().getAttribute( PerlLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String) null); } catch (CoreException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } project = PerlDebugPlugin.getWorkspace().getRoot().getProject(projectName); Path htmlDirPath = new Path(htmlRootDir); htmlRootDir = htmlDirPath.toString(); Path htmlFilePath = new Path(htmlRootFile); htmlRootFile = htmlFilePath.toString(); Path cgiDirPath = new Path(cgiRootDir); cgiRootDir = cgiDirPath.toString(); mHtmlRootFileRel = htmlFilePath .setDevice(null) .removeFirstSegments(htmlDirPath.segments().length) .toString(); StringBuffer brazilProps = new StringBuffer(); mCGIProxy = new CGIProxy(mLaunch, "CGI-Process", brazilProps); int webServerPort = RemotePort.findFreePort(); /* start web-server */ /* create config file */ String perlPath = PerlExecutableUtilities.getPerlInterpreterPath(); if (perlPath == null) perlPath = ""; // TODO report an error? brazilProps.append( "\ncgi.Debug=" + mDebug + "\n" + "root=" + htmlRootDir + "\n" + "port=" + webServerPort + "\n" + "cgi.root=" + cgiRootDir + "\n"// + "file.default="// + htmlRootFileRel// + "\n" + "cgi.executable=" + perlPath + "\n" + "cgi.suffix="+cgiFileExtension +"\n" + "cgi.DebugInclude="+" -I"+PerlDebugPlugin.getPlugInDir()); List list = PerlExecutableUtilities.getPerlIncArgs(PerlCore.create(project)); Iterator i = list.iterator(); int x= 0; while(i.hasNext()) { brazilProps.append("\ncgi.RunInclude["+x+"]="+i.next()); ++x; } if (mDebug) { brazilProps.append( "\n" + "cgi.ENV_" + PerlDebugPlugin.getPerlDebugEnv(this)); } if (cgiEnv != null) for (Iterator iter = cgiEnv.iterator(); iter.hasNext();) { String element = (String) iter.next(); brazilProps.append("\n" + "cgi.ENV_" + element); } File templ = new File(PerlDebugPlugin.getPlugInDir() + File.separator + "brazil_cgi_templ.cfg"); File dest = new File( PerlDebugPlugin.getDefault().getStateLocation() + File.separator + "brazil.cfg"); try { copy(templ, dest, brazilProps.toString()); } catch (IOException e) { e.printStackTrace(); PerlDebugPlugin.getDefault().logError( "Could not create configuration file for WEB server", e); return false; } // Brazil command line parameters String javaExec = getJavaHome() + File.separator + "bin" + File.separator + "java"; File workingDir = PerlDebugPlugin.getDefault().getStateLocation().toFile(); String[] cmdParams = { javaExec, "-classpath", PerlDebugPlugin.getPlugInDir() + "brazil_mini.jar" + File.pathSeparator + PerlDebugPlugin.getPlugInDir() + "debug.jar" + File.pathSeparator + PerlDebugPlugin.getPlugInDir() + "bin", "sunlabs.brazil.server.Main", "-c", "brazil.cfg" }; try { // String params = " "; // for (int x = 0; x < cmdParams.length; ++x) // params = params + " " + cmdParams[x]; // // PerlDebugPlugin.getDefault().logError( // "CMDline:" + params + "\n" + workingDir); //Startup Brazil mBrazilProcess = Runtime.getRuntime().exec(cmdParams, null, workingDir); } catch (IOException e1) { // TODO Auto-generated catch block PerlDebugPlugin.getDefault().logError( "Could not start WEB server", e1); return false; } mProcess = DebugPlugin.newProcess(mLaunch, mBrazilProcess, "WEB-Server"); fireCreationEvent(mProcess); mCGIProxy.waitForConnect(); System.out.println(mCGIProxy.isConnected()); if (!mCGIProxy.isConnected()) { PerlDebugPlugin.getDefault().logError( "(CGI-Target)Could not connect to CGI-Proxy"); return (false); } mLaunch.addProcess(mCGIProxy); fireCreationEvent(mCGIProxy); mWeberverPort = webServerPort; DebugPlugin.getDefault().asyncExec(new Runnable() { public void run() { startBrowser(mWeberverPort, mHtmlRootFileRel); } }); /* start console-proxy */ return true; } | 48756 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48756/3835ac3d94a1f75188c0a4ad4097211acde8f353/CGITarget.java/clean/org.epic.debug/src/org/epic/debug/CGITarget.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6494,
787,
2326,
1435,
202,
95,
202,
202,
780,
1729,
27322,
273,
446,
31,
202,
202,
780,
1729,
2375,
812,
273,
446,
31,
202,
202,
780,
276,
10052,
27322,
273,
446,
31,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6494,
787,
2326,
1435,
202,
95,
202,
202,
780,
1729,
27322,
273,
446,
31,
202,
202,
780,
1729,
2375,
812,
273,
446,
31,
202,
202,
780,
276,
10052,
27322,
273,
446,
31,
202,
202,
... |
return clazz.getName().endsWith( DefaultGrailsTagLibClass.TAG_LIB ) && !Closure.class.isAssignableFrom(clazz); | return isTagLibClass(clazz.getName()) && !Closure.class.isAssignableFrom(clazz); | public static boolean isTagLibClass( Class clazz ) { return clazz.getName().endsWith( DefaultGrailsTagLibClass.TAG_LIB ) && !Closure.class.isAssignableFrom(clazz); } | 50831 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50831/9319b2487e82433202c4b7e86c557193a7ad2ae3/GrailsClassUtils.java/buggy/src/commons/org/codehaus/groovy/grails/commons/GrailsClassUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
1805,
5664,
797,
12,
1659,
4003,
262,
288,
3639,
327,
353,
1805,
5664,
797,
12,
830,
3638,
18,
17994,
10756,
225,
597,
401,
10573,
18,
1106,
18,
291,
7961,
1265,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
1805,
5664,
797,
12,
1659,
4003,
262,
288,
3639,
327,
353,
1805,
5664,
797,
12,
830,
3638,
18,
17994,
10756,
225,
597,
401,
10573,
18,
1106,
18,
291,
7961,
1265,
1... |
protected void generateGrammar(Grammar grammar) throws IOException { | protected void generateGrammar(Grammar grammar) throws IOException { | protected void generateGrammar(Grammar grammar) throws IOException { String language = (String)grammar.getOption("language"); if ( language!=null ) { CodeGenerator generator = new CodeGenerator(new MyTool(getOutputPath()), grammar, language); grammar.setCodeGenerator(generator); generator.setDebug(debug); if ( grammar.type == Grammar.LEXER ) { grammar.addArtificialMatchTokensRule(); } generator.genRecognizer(); GrammarReport report = new GrammarReport(grammar); GrammarReport.writeReport(GrammarReport.GRAMMAR_STATS_FILENAME, report.toNotifyString()); } } | 51505 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51505/f13d59e2934691783709edc81c3eb7cea20d0849/CodeGenerate.java/clean/src/org/antlr/works/editor/code/CodeGenerate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2103,
18576,
12,
18576,
6473,
13,
1216,
1860,
565,
288,
3639,
514,
2653,
273,
261,
780,
13,
31628,
18,
588,
1895,
2932,
4923,
8863,
3639,
309,
261,
2653,
5,
33,
2011,
262,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2103,
18576,
12,
18576,
6473,
13,
1216,
1860,
565,
288,
3639,
514,
2653,
273,
261,
780,
13,
31628,
18,
588,
1895,
2932,
4923,
8863,
3639,
309,
261,
2653,
5,
33,
2011,
262,
28... |
} } } } } | if (jj_3R_193()) return true; | final private boolean jj_3R_485() { Token xsp; xsp = jj_scanpos; if (jj_3_8()) { jj_scanpos = xsp; if (jj_3R_486()) { jj_scanpos = xsp; if (jj_3R_487()) { jj_scanpos = xsp; if (jj_3R_488()) { jj_scanpos = xsp; if (jj_3R_489()) { jj_scanpos = xsp; if (jj_3R_490()) { jj_scanpos = xsp; if (jj_scan_token(83)) return true; } } } } } } return false; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/9aa0c6bec51662a685ea4b86bc02a52c9e593d8a/Parser.java/clean/dynamicjava/src/koala/dynamicjava/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
24,
7140,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
67,
28,
10756,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
24,
7140,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
67,
28,
10756,
2... |
addByteCode(ByteCode.ACONST_NULL); | cfw.add(ByteCode.ACONST_NULL); | private void generateCodeFromNode(Node node, Node parent) { // System.out.println("gen code for " + node.toString()); int type = node.getType(); Node child = node.getFirstChild(); switch (type) { case Token.LOOP: case Token.WITH: case Token.LABEL: visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } break; case Token.CASE: case Token.DEFAULT: // XXX shouldn't these be StatementNodes? case Token.SCRIPT: case Token.BLOCK: case Token.EMPTY: case Token.NOP: // no-ops. visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } break; case Token.FUNCTION: if (inFunction || parent.getType() != Token.SCRIPT) { int fnIndex = node.getExistingIntProp(Node.FUNCTION_PROP); OptFunctionNode fn; fn = (OptFunctionNode)scriptOrFn.getFunctionNode(fnIndex); int t = fn.getFunctionType(); if (t != FunctionNode.FUNCTION_STATEMENT) { visitFunction(fn, t); } } break; case Token.NAME: visitName(node); break; case Token.NEW: case Token.CALL: visitCall(node, type, child); break; case Token.NUMBER: case Token.STRING: visitLiteral(node); break; case Token.THIS: aload(thisObjLocal); break; case Token.THISFN: classFile.add(ByteCode.ALOAD_0); break; case Token.NULL: addByteCode(ByteCode.ACONST_NULL); break; case Token.TRUE: classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); break; case Token.FALSE: classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); break; case Token.UNDEFINED: pushUndefined(); break; case Token.REGEXP: visitObject(node); break; case Token.TRY: visitTryCatchFinally(node, child); break; case Token.THROW: visitThrow(node, child); break; case Token.RETURN: visitReturn(node, child); break; case Token.SWITCH: visitSwitch(node, child); break; case Token.COMMA: { Node next = child.getNext(); while (next != null) { generateCodeFromNode(child, node); addByteCode(ByteCode.POP); child = next; next = next.getNext(); } generateCodeFromNode(child, node); break; } case Token.NEWSCOPE: addScriptRuntimeInvoke("newScope", "()Lorg/mozilla/javascript/Scriptable;"); break; case Token.ENTERWITH: visitEnterWith(node, child); break; case Token.LEAVEWITH: visitLeaveWith(node, child); break; case Token.ENUMINIT: visitEnumInit(node, child); break; case Token.ENUMNEXT: visitEnumNext(node, child); break; case Token.ENUMDONE: visitEnumDone(node, child); break; case Token.POP: visitStatement(node); if (child.getType() == Token.SETVAR) { /* special case this so as to avoid unnecessary load's & pop's */ visitSetVar(child, child.getFirstChild(), false); } else { while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) addByteCode(ByteCode.POP2); else addByteCode(ByteCode.POP); } break; case Token.POPV: visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } astore(scriptResultLocal); break; case Token.TARGET: visitTarget(node); break; case Token.JSR: case Token.GOTO: case Token.IFEQ: case Token.IFNE: visitGOTO(node, type, child); break; case Token.NOT: { int trueTarget = acquireLabel(); int falseTarget = acquireLabel(); int beyond = acquireLabel(); generateIfJump(child, node, trueTarget, falseTarget); markLabel(trueTarget); classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); addByteCode(ByteCode.GOTO, beyond); markLabel(falseTarget); classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); markLabel(beyond); classFile.adjustStackTop(-1); break; } case Token.BITNOT: addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addScriptRuntimeInvoke("toInt32", "(Ljava/lang/Object;)I"); push(-1); // implement ~a as (a ^ -1) addByteCode(ByteCode.IXOR); addByteCode(ByteCode.I2D); addDoubleConstructor(); break; case Token.VOID: generateCodeFromNode(child, node); addByteCode(ByteCode.POP); pushUndefined(); break; case Token.TYPEOF: generateCodeFromNode(child, node); addScriptRuntimeInvoke("typeof", "(Ljava/lang/Object;" +")Ljava/lang/String;"); break; case Token.TYPEOFNAME: visitTypeofname(node); break; case Token.INC: visitIncDec(node, true); break; case Token.DEC: visitIncDec(node, false); break; case Token.OR: case Token.AND: { generateCodeFromNode(child, node); addByteCode(ByteCode.DUP); addScriptRuntimeInvoke("toBoolean", "(Ljava/lang/Object;)Z"); int falseTarget = acquireLabel(); if (type == Token.AND) addByteCode(ByteCode.IFEQ, falseTarget); else addByteCode(ByteCode.IFNE, falseTarget); addByteCode(ByteCode.POP); generateCodeFromNode(child.getNext(), node); markLabel(falseTarget); } break; case Token.ADD: { generateCodeFromNode(child, node); generateCodeFromNode(child.getNext(), node); switch (node.getIntProp(Node.ISNUMBER_PROP, -1)) { case Node.BOTH: addByteCode(ByteCode.DADD); break; case Node.LEFT: addOptRuntimeInvoke("add", "(DLjava/lang/Object;)Ljava/lang/Object;"); break; case Node.RIGHT: addOptRuntimeInvoke("add", "(Ljava/lang/Object;D)Ljava/lang/Object;"); break; default: addScriptRuntimeInvoke("add", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +")Ljava/lang/Object;"); } } break; case Token.MUL: visitArithmetic(node, ByteCode.DMUL, child, parent); break; case Token.SUB: visitArithmetic(node, ByteCode.DSUB, child, parent); break; case Token.DIV: case Token.MOD: visitArithmetic(node, type == Token.DIV ? ByteCode.DDIV : ByteCode.DREM, child, parent); break; case Token.BITOR: case Token.BITXOR: case Token.BITAND: case Token.LSH: case Token.RSH: case Token.URSH: visitBitOp(node, type, child); break; case Token.POS: case Token.NEG: addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)D"); if (type == Token.NEG) { addByteCode(ByteCode.DNEG); } addDoubleConstructor(); break; case Optimizer.TO_DOUBLE: // cnvt to double (not Double) generateCodeFromNode(child, node); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)D"); break; case Optimizer.TO_OBJECT: { // convert from double int prop = -1; if (child.getType() == Token.NUMBER) { prop = child.getIntProp(Node.ISNUMBER_PROP, -1); } if (prop != -1) { child.removeProp(Node.ISNUMBER_PROP); generateCodeFromNode(child, node); child.putIntProp(Node.ISNUMBER_PROP, prop); } else { addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addDoubleConstructor(); } break; } case Token.IN: case Token.INSTANCEOF: case Token.LE: case Token.LT: case Token.GE: case Token.GT: // need a result Object visitRelOp(node, child); break; case Token.EQ: case Token.NE: case Token.SHEQ: case Token.SHNE: visitEqOp(node, child); break; case Token.GETPROP: visitGetProp(node, child); break; case Token.GETELEM: while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } aload(variableObjectLocal); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { addOptRuntimeInvoke( "getElem", "(Ljava/lang/Object;D" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } else { addScriptRuntimeInvoke( "getElem", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } break; case Token.GETVAR: { OptLocalVariable lVar = (OptLocalVariable)(node.getProp(Node.VARIABLE_PROP)); visitGetVar(lVar, node.getIntProp(Node.ISNUMBER_PROP, -1) != -1, node.getString()); } break; case Token.SETVAR: visitSetVar(node, child, true); break; case Token.SETNAME: visitSetName(node, child); break; case Token.SETPROP: visitSetProp(node, child); break; case Token.SETELEM: while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } aload(variableObjectLocal); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { addOptRuntimeInvoke( "setElem", "(Ljava/lang/Object;" +"D" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } else { addScriptRuntimeInvoke( "setElem", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } break; case Token.DELPROP: aload(contextLocal); aload(variableObjectLocal); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } addScriptRuntimeInvoke("delete", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Ljava/lang/Object;" +"Ljava/lang/Object;" +")Ljava/lang/Object;"); break; case Token.BINDNAME: case Token.GETBASE: visitBind(node, type, child); break; case Token.GETTHIS: generateCodeFromNode(child, node); addScriptRuntimeInvoke("getThis", "(Lorg/mozilla/javascript/Scriptable;" +")Lorg/mozilla/javascript/Scriptable;"); break; case Token.PARENT: generateCodeFromNode(child, node); addScriptRuntimeInvoke("getParent", "(Ljava/lang/Object;" +")Lorg/mozilla/javascript/Scriptable;"); break; case Token.NEWTEMP: visitNewTemp(node, child); break; case Token.USETEMP: visitUseTemp(node, child); break; case Token.NEWLOCAL: visitNewLocal(node, child); break; case Token.USELOCAL: visitUseLocal(node, child); break; default: throw new RuntimeException("Unexpected node type "+type); } } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/bd2594e6ebd6d8099b587934641c8f7650d87761/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
28570,
12,
907,
756,
16,
2029,
982,
13,
565,
288,
3639,
368,
2332,
18,
659,
18,
8222,
2932,
4507,
981,
364,
315,
397,
756,
18,
10492,
10663,
3639,
509,
618,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
28570,
12,
907,
756,
16,
2029,
982,
13,
565,
288,
3639,
368,
2332,
18,
659,
18,
8222,
2932,
4507,
981,
364,
315,
397,
756,
18,
10492,
10663,
3639,
509,
618,
273,
... |
protected void handleCell(CellDesign cell) { handleStyle(cell.getStyle()); for (int i = 0; i < cell.getContentCount(); i++) cell.getContent(i).accept(this); | protected void handleCell( CellDesign cell ) { handleStyle( cell.getStyle( ) ); for ( int i = 0; i < cell.getContentCount( ); i++ ) cell.getContent( i ).accept( this ); | protected void handleCell(CellDesign cell) { handleStyle(cell.getStyle()); for (int i = 0; i < cell.getContentCount(); i++) cell.getContent(i).accept(this); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/457851dcc056d96f2ec05106ceba68d3c8f9162c/ReportQueryBuilder.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/ReportQueryBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
918,
1640,
4020,
12,
4020,
15478,
2484,
13,
288,
1082,
202,
4110,
2885,
12,
3855,
18,
588,
2885,
10663,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
2484,
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,
3196,
202,
1117,
918,
1640,
4020,
12,
4020,
15478,
2484,
13,
288,
1082,
202,
4110,
2885,
12,
3855,
18,
588,
2885,
10663,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
2484,
18,
588... |
&& transactionResponse.getStatusCode() / 100 == 1) { | && transactionResponse.getStatusCode() / 100 == 1) { | public synchronized void processResponse( SIPResponse transactionResponse, MessageChannel sourceChannel) { // Log the incoming response in our log file. if (sipStack .serverLog .needsLogging(ServerLog.TRACE_MESSAGES)) this.logResponse(transactionResponse, //ifdef SIMULATION/* SimSystem.currentTimeMillis(),//else */ System.currentTimeMillis(), //endif // "normal processing"); // If the state has not yet been assigned then this is a // spurious response. if (getState() == null) return; // Ignore 1xx if (TransactionState.COMPLETED == this.getState() && transactionResponse.getStatusCode() / 100 == 1) { return; } else if (TransactionState.PROCEEDING == this.getState() && transactionResponse.getStatusCode() == 100 ) { // Ignore 100 if received after 180 // bug report from Peter Parnes. processPending(); } // Defer processing if a previous event has been placed in the processing queue. // bug shows up on fast dual processor machines where a subsequent response // arrives before a previous one completes processing. if (this.eventPending ) { if (LogWriter.needsLogging) { sipStack.logWriter.logMessage ("putting pending " + transactionResponse.getFirstLine()); } synchronized (this.pendingResponses) { if (this.pendingResponses.size() < MAX_PENDING_RESPONSES) { this.pendingResponses.add (new PendingResponse(transactionResponse,sourceChannel)); } } sipStack.putPending(this); return; } if (LogWriter.needsLogging) sipStack.logWriter.logMessage( "processing " + transactionResponse.getFirstLine() + "current state = " + getState()); this.lastResponse = transactionResponse; if (dialog != null) { // add the route before you process the response. // Bug noticed by Brad Templeton. dialog.addRoute(transactionResponse); } String method = transactionResponse.getCSeq().getMethod(); if (dialog != null) { boolean added = false; SIPTransactionStack sipStackImpl = (SIPTransactionStack) getSIPStack(); // A tag just got assigned or changed. To tag is mandatory for final response if (dialog.getRemoteTag() == null && transactionResponse.getTo().getTag() != null) { // Dont assign tag on provisional response if (transactionResponse.getStatusCode() != 100) { dialog.setRemoteTag(transactionResponse.getToTag()); } String dialogId = transactionResponse.getDialogId(false); dialog.setDialogId(dialogId); if (sipStackImpl.isDialogCreated(method) && transactionResponse.getStatusCode() != 100) { sipStackImpl.putDialog(dialog); added = true; } } else if ( dialog.getRemoteTag() != null && transactionResponse.getToTag() != null && !dialog.getRemoteTag().equals( transactionResponse.getToTag())) { String dialogId = transactionResponse.getDialogId(false); dialog.setRemoteTag(transactionResponse.getToTag()); dialog.setDialogId(dialogId); if (sipStackImpl.isDialogCreated(method)) { sipStackImpl.putDialog(dialog); added = true; } } // Adjust state of the Dialog state machine. if (sipStackImpl.isDialogCreated(method)) { // Make a final tag assignment. if ( dialog.getState() == null && transactionResponse.getStatusCode() / 100 == 1) { dialog.setState(SIPDialog.EARLY_STATE); } else if (transactionResponse.getToTag() != null && transactionResponse.getStatusCode() / 100 == 2) { // This is a dialog creating method (such as INVITE). // 2xx response -- set the state to the confirmed // state. To tag is MANDATORY for the response. dialog.setRemoteTag(transactionResponse.getToTag()); dialog.setState(SIPDialog.CONFIRMED_STATE); } else if ( transactionResponse.getStatusCode() >= 300 && transactionResponse.getStatusCode() <= 699 && (dialog.getState() == null || dialog.getState().getValue() == SIPDialog.EARLY_STATE)) { // This case handles 3xx, 4xx, 5xx and 6xx responses. // RFC 3261 Section 12.3 - dialog termination. // Independent of the method, if a request outside of a dialog generates // a non-2xx final response, any early dialogs created through // provisional responses to that request are terminated. dialog.setState(SIPDialog.TERMINATED_STATE); } } // Only terminate the dialog on 200 OK response to BYE if ( this.getMethod().equals(Request.BYE) && transactionResponse.getStatusCode() == 200 ) { dialog.setState(SIPDialog.TERMINATED_STATE); } } try { if (isInviteTransaction()) inviteClientTransaction(transactionResponse, sourceChannel); else nonInviteClientTransaction(transactionResponse, sourceChannel); } catch (IOException ex) { this.setState(TransactionState.TERMINATED); raiseErrorEvent(SIPTransactionErrorEvent.TRANSPORT_ERROR); } } | 3364 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3364/d231d2c6c5ca907b5c90d5737c6ae873878b219f/SIPClientTransaction.java/clean/src/gov/nist/javax/sip/stack/SIPClientTransaction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
1207,
1064,
12,
565,
348,
2579,
1064,
2492,
1064,
16,
565,
2350,
2909,
1084,
2909,
13,
288,
3639,
368,
1827,
326,
6935,
766,
316,
3134,
613,
585,
18,
3639,
309,
261,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
1207,
1064,
12,
565,
348,
2579,
1064,
2492,
1064,
16,
565,
2350,
2909,
1084,
2909,
13,
288,
3639,
368,
1827,
326,
6935,
766,
316,
3134,
613,
585,
18,
3639,
309,
261,
28... |
return configElement == null ? className : RegistryReader.getClassValue(configElement, IWorkbenchRegistryConstants.ATT_CLASS); } | return configElement == null ? className : RegistryReader .getClassValue(configElement, IWorkbenchRegistryConstants.ATT_CLASS); } | public String getClassName() { return configElement == null ? className : RegistryReader.getClassValue(configElement, IWorkbenchRegistryConstants.ATT_CLASS); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/78fbd411aa8150e2bef41f7938bc2fc29c4fe55d/PerspectiveDescriptor.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
11819,
1435,
288,
377,
202,
2463,
642,
1046,
422,
446,
692,
2658,
294,
5438,
2514,
18,
588,
797,
620,
12,
1425,
1046,
16,
467,
2421,
22144,
4243,
2918,
18,
789,
56,
67,
5237,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
11819,
1435,
288,
377,
202,
2463,
642,
1046,
422,
446,
692,
2658,
294,
5438,
2514,
18,
588,
797,
620,
12,
1425,
1046,
16,
467,
2421,
22144,
4243,
2918,
18,
789,
56,
67,
5237,... |
listener = new AnnotationBuilder(AnnotationType.ANY); | listener = new AnnotationBuilder(Formats.EMBL_TYPE); | public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader( new FileReader( new File(args[0]) ) ); LineSplitParser lsp = LineSplitParser.EMBL; TagValueListener listener = null; if(args.length > 1 && args[1].startsWith("val")) { listener = new AnnotationBuilder(AnnotationType.ANY); } else { listener = new Echo(); } TagDelegator td = new TagDelegator(listener); LineSplitParser ftParser = new LineSplitParser(); ftParser.setSplitOffset(15); ftParser.setTrimTag(true); ftParser.setTrimValue(true); ftParser.setContinueOnEmptyTag(true); ftParser.setMergeSameTag(false); TagValueListener ftListener = new FeatureTableListener(listener); td.setParserListener("FT", ftParser, ftListener); Parser parser = new Parser(); while(parser.read(reader, lsp, td)) { if(listener instanceof AnnotationBuilder) { System.out.println(((AnnotationBuilder) listener).getLast()); } } } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/83d2ba6a4cfb2d235799c698b4483ef461b0ac7f/ParseEmbl.java/buggy/demos/tagvalue/ParseEmbl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
225,
1216,
1185,
288,
565,
10633,
2949,
273,
394,
10633,
12,
1377,
394,
23010,
12,
3639,
394,
1387,
12,
1968,
63,
20,
5717,
1377,
262,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
225,
1216,
1185,
288,
565,
10633,
2949,
273,
394,
10633,
12,
1377,
394,
23010,
12,
3639,
394,
1387,
12,
1968,
63,
20,
5717,
1377,
262,
565,... |
public void visitBinaryExpression(@NotNull PsiBinaryExpression expression) { | public void visitBinaryExpression( @NotNull PsiBinaryExpression expression){ | public void visitBinaryExpression(@NotNull PsiBinaryExpression expression) { super.visitBinaryExpression(expression); if(!(expression.getROperand() != null)){ return; } final PsiJavaToken sign = expression.getOperationSign(); final IElementType tokenType = sign.getTokenType(); if(!arithmeticTokens.contains(tokenType)) { return; } if (TypeUtils.expressionHasType("java.lang.String", expression)) { return; } final PsiExpression rhs = expression.getROperand(); final PsiExpression lhs = expression.getLOperand(); final boolean isPointless; if (tokenType.equals(JavaTokenType.PLUS)) { isPointless = additionExpressionIsPointless(lhs, rhs); } else if (tokenType.equals(JavaTokenType.MINUS)) { isPointless = subtractionExpressionIsPointless(rhs); } else if (tokenType.equals(JavaTokenType.ASTERISK)) { isPointless = multiplyExpressionIsPointless(lhs, rhs); } else if (tokenType.equals(JavaTokenType.DIV)) { isPointless = divideExpressionIsPointless(rhs); } else { isPointless = false; } if (!isPointless) { return; } registerError(expression); } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/a4fb0a42d327368a9237b564d1227ae8c89ada7e/PointlessArithmeticExpressionInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/numeric/PointlessArithmeticExpressionInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
5905,
2300,
12,
632,
5962,
453,
7722,
5905,
2300,
2652,
15329,
5411,
2240,
18,
11658,
5905,
2300,
12,
8692,
1769,
5411,
309,
12,
5,
12,
8692,
18,
588,
1457,
457,
464,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
5905,
2300,
12,
632,
5962,
453,
7722,
5905,
2300,
2652,
15329,
5411,
2240,
18,
11658,
5905,
2300,
12,
8692,
1769,
5411,
309,
12,
5,
12,
8692,
18,
588,
1457,
457,
464,
1... |
super(runtime, runtime.getClasses().getClassClass(), superClass, parentModule, null); | super(runtime, runtime.getClass("Class"), superClass, parentModule, null); | public MetaClass(Ruby runtime, RubyClass superClass, RubyModule parentModule) { super(runtime, runtime.getClasses().getClassClass(), superClass, parentModule, null); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/ca6b16e996ea9af83ce593594b9c69b9364a9924/MetaClass.java/clean/src/org/jruby/MetaClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6565,
797,
12,
54,
10340,
3099,
16,
19817,
797,
18846,
16,
19817,
3120,
982,
3120,
13,
288,
3639,
2240,
12,
9448,
16,
3099,
18,
588,
797,
2932,
797,
6,
3631,
18846,
16,
982,
3120,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6565,
797,
12,
54,
10340,
3099,
16,
19817,
797,
18846,
16,
19817,
3120,
982,
3120,
13,
288,
3639,
2240,
12,
9448,
16,
3099,
18,
588,
797,
2932,
797,
6,
3631,
18846,
16,
982,
3120,... |
.addAttribute("name", "Normal direction of motion") | .addAttribute("item", "Normal direction of motion") | void setupDoc() { // create a JDOM tree with just some elements root = new Element("programmer-config"); doc = new Document(root); doc.setDocType(new DocType("programmer-config","programmer-config.dtd")); // add some elements root.addContent(new Element("programmer") .addContent(new Element("pane") .addAttribute("name","Basic") .addContent(new Element("column") .addContent(new Element("display") .addAttribute("name", "Address") ) .addContent(new Element("display") .addAttribute("name", "Start voltage") ) .addContent(new Element("display") .addAttribute("name", "Normal direction of motion") ) ) .addContent(new Element("column") .addContent(new Element("display") .addAttribute("name", "Address") ) .addContent(new Element("display") .addAttribute("name", "Normal direction of motion") ) .addContent(new Element("display") .addAttribute("name", "Normal direction of motion") .addAttribute("format","checkbox") ) .addContent(new Element("display") .addAttribute("name", "Normal direction of motion") .addAttribute("format","radiobuttons") ) ) ) .addContent(new Element("pane") .addAttribute("name", "CV") .addContent(new Element("column") .addContent(new Element("cvtable")) ) ) .addContent(new Element("pane") .addAttribute("name", "Other") .addContent(new Element("column") .addContent(new Element("display") .addAttribute("name", "Address") ) .addContent(new Element("display") .addAttribute("name", "Normal direction of motion") ) ) ) ) ; // end of adding contents return; } | 2652 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2652/501123ba97c6bc0ed235f4099a3ce77a13f3fcd3/PaneProgFrameTest.java/clean/tests/jmrit/symbolicprog/PaneProgFrameTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3875,
1759,
1435,
288,
202,
202,
759,
752,
279,
804,
8168,
2151,
598,
2537,
2690,
2186,
202,
202,
3085,
273,
394,
3010,
2932,
12890,
6592,
17,
1425,
8863,
202,
202,
2434,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3875,
1759,
1435,
288,
202,
202,
759,
752,
279,
804,
8168,
2151,
598,
2537,
2690,
2186,
202,
202,
3085,
273,
394,
3010,
2932,
12890,
6592,
17,
1425,
8863,
202,
202,
2434,
273,
... |
System.err.println ("UIDefaults.getUIError: " + msg); | protected void getUIError(String msg) { // Does nothing unless overridden. } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2703ae3b51c371a2a79d28271cd57b4046c647d0/UIDefaults.java/clean/core/src/classpath/javax/javax/swing/UIDefaults.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2332,
18,
370,
18,
8222,
7566,
3060,
73,
643,
87,
18,
588,
5370,
668,
30,
315,
397,
1234,
1769,
2332,
18,
370,
18,
8222,
7566,
3060,
73,
643,
87,
18,
588,
5370,
668,
30,
315,
397,
1234,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2332,
18,
370,
18,
8222,
7566,
3060,
73,
643,
87,
18,
588,
5370,
668,
30,
315,
397,
1234,
1769,
2332,
18,
370,
18,
8222,
7566,
3060,
73,
643,
87,
18,
588,
5370,
668,
30,
315,
397,
1234,
... | |
_band.setAttribute(ATTRIBUTE_IS_SPLIT_ALLOWED,Boolean.toString(value)); | _band.setAttribute(ATTRIBUTE_IS_SPLIT_ALLOWED,String.valueOf(value)); | public void setIsSplitAllowed(boolean value){ _band.setAttribute(ATTRIBUTE_IS_SPLIT_ALLOWED,Boolean.toString(value)); } | 57902 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57902/983234f89ea5006f1f714171ef3709ee5a221ef3/AbstractBandContainer.java/buggy/src/java/com/idega/block/datareport/business/jasperdesignxml/AbstractBandContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15269,
5521,
5042,
12,
6494,
460,
15329,
202,
202,
67,
12752,
18,
542,
1499,
12,
11616,
67,
5127,
67,
17482,
67,
16852,
16,
5507,
18,
10492,
12,
1132,
10019,
202,
97,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15269,
5521,
5042,
12,
6494,
460,
15329,
202,
202,
67,
12752,
18,
542,
1499,
12,
11616,
67,
5127,
67,
17482,
67,
16852,
16,
5507,
18,
10492,
12,
1132,
10019,
202,
97,
2,
... |
AST tmp1885_AST_in = (AST)_t; | AST tmp1887_AST_in = (AST)_t; | public final void copylobstate(AST _t) throws RecognitionException { AST copylobstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1795 = _t; AST tmp1878_AST_in = (AST)_t; match(_t,COPYLOB); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_t.getType()==FROM)) { AST tmp1879_AST_in = (AST)_t; match(_t,FROM); _t = _t.getNextSibling(); } else if ((_tokenSet_34.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } { if (_t==null) _t=ASTNULL; if ((_t.getType()==FILE)) { AST tmp1880_AST_in = (AST)_t; match(_t,FILE); _t = _t.getNextSibling(); expression(_t); _t = _retTree; } else if ((_tokenSet_35.member(_t.getType()))) { { if (_t==null) _t=ASTNULL; if ((_t.getType()==OBJECT)) { AST tmp1881_AST_in = (AST)_t; match(_t,OBJECT); _t = _t.getNextSibling(); } else if ((_tokenSet_3.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } expression(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STARTING: { AST __t1800 = _t; AST tmp1882_AST_in = (AST)_t; match(_t,STARTING); _t = _t.getFirstChild(); AST tmp1883_AST_in = (AST)_t; match(_t,AT); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t1800; _t = _t.getNextSibling(); break; } case FOR: case TO: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FOR: { AST __t1802 = _t; AST tmp1884_AST_in = (AST)_t; match(_t,FOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1802; _t = _t.getNextSibling(); break; } case TO: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1885_AST_in = (AST)_t; match(_t,TO); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; if ((_t.getType()==FILE)) { AST tmp1886_AST_in = (AST)_t; match(_t,FILE); _t = _t.getNextSibling(); expression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case APPEND: { AST tmp1887_AST_in = (AST)_t; match(_t,APPEND); _t = _t.getNextSibling(); break; } case 3: case CONVERT: case NOCONVERT: case NOERROR_KW: { break; } default: { throw new NoViableAltException(_t); } } } } else if ((_tokenSet_35.member(_t.getType()))) { { if (_t==null) _t=ASTNULL; if ((_t.getType()==OBJECT)) { AST tmp1888_AST_in = (AST)_t; match(_t,OBJECT); _t = _t.getNextSibling(); } else if ((_tokenSet_3.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } expression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OVERLAY: { AST tmp1889_AST_in = (AST)_t; match(_t,OVERLAY); _t = _t.getNextSibling(); AST tmp1890_AST_in = (AST)_t; match(_t,AT); _t = _t.getNextSibling(); expression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TRIM: { AST tmp1891_AST_in = (AST)_t; match(_t,TRIM); _t = _t.getNextSibling(); break; } case 3: case CONVERT: case NOCONVERT: case NOERROR_KW: { break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: case CONVERT: case NOCONVERT: case NOERROR_KW: { break; } default: { throw new NoViableAltException(_t); } } } } else { throw new NoViableAltException(_t); } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOCONVERT: { AST tmp1892_AST_in = (AST)_t; match(_t,NOCONVERT); _t = _t.getNextSibling(); break; } case CONVERT: { convertphrase(_t); _t = _retTree; break; } case 3: case NOERROR_KW: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOERROR_KW: { AST tmp1893_AST_in = (AST)_t; match(_t,NOERROR_KW); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1795; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1610,
1295,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1610,
1295,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1610,
1295,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1610,
1295,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... |
Message m = new Message(mspec, new Peer(packet.getAddress(), packet.getPort())); | Message m = new Message(mspec, peer); | public static Message decodeFromPacket(DatagramPacket packet) throws IOException { DataInputStream dis = new DataInputStream(new ByteArrayInputStream(packet.getData(), packet.getOffset(), packet.getLength())); MessageType mspec = MessageType.getSpec(new Integer(dis.readInt())); if (mspec == null) { return null; } if(mspec.isInternalOnly()) return null; // silently discard internal-only messages Message m = new Message(mspec, new Peer(packet.getAddress(), packet.getPort())); try { for (Iterator i = mspec.getOrderedFields().iterator(); i.hasNext();) { String name = (String) i.next(); Class type = (Class) mspec.getFields().get(name); if (type.equals(LinkedList.class)) { // Special handling for LinkedList to deal with element type m.set(name, Serializer.readListFromDataInputStream((Class) mspec.getLinkedListTypes().get(name), dis)); } else { m.set(name, Serializer.readFromDataInputStream(type, dis)); } } } catch (EOFException e) { Logger.normal(Message.class,"Message packet ends prematurely while deserialising "+mspec.getName()); } return m; } | 50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/03d1c3dfc05a19bebb9ca5ebd9b78a6299dcf977/Message.java/buggy/src/freenet/io/comm/Message.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2350,
2495,
1265,
6667,
12,
5139,
17049,
6667,
4414,
13,
1216,
1860,
288,
202,
202,
751,
4348,
1015,
1082,
565,
273,
394,
29382,
12,
2704,
16180,
12,
11482,
18,
588,
751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2350,
2495,
1265,
6667,
12,
5139,
17049,
6667,
4414,
13,
1216,
1860,
288,
202,
202,
751,
4348,
1015,
1082,
565,
273,
394,
29382,
12,
2704,
16180,
12,
11482,
18,
588,
751,
... |
bytesRead += 2; ci.sqlType = types[type].sqlType; | bytesRead += 2; ci.sqlType = types[type].sqlType; | static int readType(ResponseStream in, ColInfo ci) throws IOException, ProtocolException { boolean isTds8 = in.getTdsVersion() >= Driver.TDS80; int bytesRead = 1; // Get the TDS data type code int type = in.read(); if (types[type] == null) { throw new ProtocolException("Invalid TDS data type 0x" + Integer.toHexString(type)); } ci.tdsType = type; ci.jdbcType = types[type].jdbcType; ci.displaySize = -1; ci.tableName = ""; ci.bufferSize = types[type].size; // Now get the buffersize if required if (ci.bufferSize == -5) { // sql_variant ci.bufferSize = in.readInt(); bytesRead += 4; } else if (ci.bufferSize == -4) { // text or image ci.bufferSize = in.readInt(); if (isTds8) { bytesRead += getCollation(in, ci); } int lenName = in.readShort(); ci.tableName = in.readString(lenName); bytesRead += 6 + ((in.getTdsVersion() >= Driver.TDS70) ? lenName * 2 : lenName); } else if (ci.bufferSize == -2) { // longvarchar longvarbinary ci.bufferSize = in.readShort(); if (isTds8) { bytesRead += getCollation(in, ci); } bytesRead += 2; } else if (ci.bufferSize == -1) { // varchar varbinary decimal etc bytesRead += 1; ci.bufferSize = in.read(); } // Set scale for money and date types if (isCurrency(ci)) { ci.scale = 4; } else if (type == SYBDATETIME ||(type == SYBDATETIMN && ci.bufferSize == 8)) { ci.scale = 3; } // Set default displaySize and precision ci.displaySize = types[type].displaySize; ci.precision = types[type].precision; ci.sqlType = types[type].sqlType; // Now fine tune sizes for specific types if (type == SYBDATETIMN) { if (ci.bufferSize == 8) { ci.displaySize = types[SYBDATETIME].displaySize; ci.precision = types[SYBDATETIME].precision; } else { ci.displaySize = types[SYBDATETIME4].displaySize; ci.precision = types[SYBDATETIME4].precision; ci.sqlType = types[SYBDATETIME4].sqlType; } } else if (type == SYBFLTN) { if (ci.bufferSize == 8) { ci.displaySize = types[SYBFLT8].displaySize; ci.precision = types[SYBFLT8].precision; } else { ci.displaySize = types[SYBREAL].displaySize; ci.precision = types[SYBREAL].precision; ci.jdbcType = java.sql.Types.REAL; ci.sqlType = types[SYBREAL].sqlType; } } else if (type == SYBINTN) { if (ci.bufferSize == 8) { ci.displaySize = types[SYBINT8].displaySize; ci.precision = types[SYBINT8].precision; ci.jdbcType = java.sql.Types.BIGINT; ci.sqlType = types[SYBINT8].sqlType; } else if (ci.bufferSize == 4) { ci.displaySize = types[SYBINT4].displaySize; ci.precision = types[SYBINT4].precision; } else if (ci.bufferSize == 2) { ci.displaySize = types[SYBINT2].displaySize; ci.precision = types[SYBINT2].precision; ci.jdbcType = java.sql.Types.SMALLINT; ci.sqlType = types[SYBINT2].sqlType; } else { ci.displaySize = types[SYBINT1].displaySize; ci.precision = types[SYBINT1].precision; ci.jdbcType = java.sql.Types.TINYINT; ci.sqlType = types[SYBINT1].sqlType; } } else if (type == SYBMONEYN) { if (ci.bufferSize == 8) { ci.displaySize = types[SYBMONEY].displaySize; ci.precision = types[SYBMONEY].precision; } else { ci.displaySize = types[SYBMONEY4].displaySize; ci.precision = types[SYBMONEY4].precision; ci.sqlType = types[SYBMONEY4].sqlType; } } // Set sizes for character types if (ci.precision == -1) { ci.precision = ci.bufferSize; if (ci.displaySize == -2) { ci.displaySize = ci.bufferSize / 2; } else if (ci.displaySize == 2) { ci.displaySize = ci.precision * 2; } else { ci.displaySize = ci.precision; } } // Read in scale and precision for decimal types if (type == SYBDECIMAL || type == SYBNUMERIC) { ci.precision = in.read(); ci.scale = in.read(); ci.displaySize = ((ci.scale > 0) ? 2 : 1) + ci.precision; bytesRead += 2; ci.sqlType = types[type].sqlType; } // For numeric types add 'identity' for auto inc data type if (ci.isIdentity) { ci.sqlType += " identity"; } return bytesRead; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/31239e9062bef524a204bbd17ef75857ed26f1f9/TdsData.java/buggy/src/main/net/sourceforge/jtds/jdbc/TdsData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
509,
855,
559,
12,
1064,
1228,
316,
16,
1558,
966,
9039,
13,
565,
1216,
1860,
16,
4547,
503,
288,
3639,
1250,
353,
56,
2377,
28,
273,
316,
18,
588,
56,
2377,
1444,
1435,
1545,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
509,
855,
559,
12,
1064,
1228,
316,
16,
1558,
966,
9039,
13,
565,
1216,
1860,
16,
4547,
503,
288,
3639,
1250,
353,
56,
2377,
28,
273,
316,
18,
588,
56,
2377,
1444,
1435,
1545,
93... |
protected int find(Object arg1) | public int find(Object arg1) | protected int find(Object arg1) { if (oindex == objects.length) resizeObjects(); objects[oindex] = arg1; return oindex++; } | 37648 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37648/32d5f37aab6d2b259ce8a06c4de0c3c71be4fd93/ValueStack.java/buggy/gnu/mapping/ValueStack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
1104,
12,
921,
1501,
21,
13,
225,
288,
565,
309,
261,
885,
561,
422,
2184,
18,
2469,
13,
1377,
7041,
4710,
5621,
565,
2184,
63,
885,
561,
65,
273,
1501,
21,
31,
565,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
1104,
12,
921,
1501,
21,
13,
225,
288,
565,
309,
261,
885,
561,
422,
2184,
18,
2469,
13,
1377,
7041,
4710,
5621,
565,
2184,
63,
885,
561,
65,
273,
1501,
21,
31,
565,
327,
... |
asm.emitMOV_RegIdx_Reg_Byte(T1, S0, asm.BYTE, 0, T0); | asm.emitMOV_RegIdx_Reg_Byte(T1, S0, asm.BYTE, NO_SLOT, T0); | private final boolean genMagic (VM_MethodReference m) { VM_Atom methodName = m.getName(); if (m.getType() == VM_TypeReference.Address) { // Address magic VM_TypeReference[] types = m.getParameterTypes(); // Loads all take the form: // ..., Address, [Offset] -> ..., Value if (methodName == VM_MagicNames.loadAddress || methodName == VM_MagicNames.prepareAddress || methodName == VM_MagicNames.prepareObjectReference || methodName == VM_MagicNames.loadWord || methodName == VM_MagicNames.loadObjectReference || methodName == VM_MagicNames.prepareWord || methodName == VM_MagicNames.loadInt || methodName == VM_MagicNames.prepareInt || methodName == VM_MagicNames.loadFloat) { if (types.length == 0) { // No offset asm.emitPOP_Reg(T0); // address asm.emitPUSH_RegInd(T0); // pushes [T0+0] } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // object ref asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] } return true; } if (methodName == VM_MagicNames.loadByte) { if (types.length == 0) { // No offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegInd_Byte(T0, T0) ; asm.emitPUSH_Reg (T0); } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegIdx_Byte(T0, T0, S0, asm.BYTE, 0); // load and zero extend byte [T0+S0] asm.emitPUSH_Reg (T0); } return true; } if (methodName == VM_MagicNames.loadShort || methodName == VM_MagicNames.loadChar) { if (types.length == 0) { // No offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegInd_Word(T0, T0); asm.emitPUSH_Reg (T0); } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegIdx_Word(T0, T0, S0, asm.BYTE, 0); // load and zero extend word [T0+S0] asm.emitPUSH_Reg (T0); } return true; } if (methodName == VM_MagicNames.loadLong || methodName == VM_MagicNames.loadDouble) { if (types.length == 0) { // No offset throw new RuntimeException("Magic not implemented"); } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // base asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 4); // pushes [T0+S0+4] asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] } return true; } // Stores all take the form: // ..., Address, [Offset], Value -> ... if (methodName == VM_MagicNames.store) { // Always at least one parameter to a store. // First parameter is the type to be stored. VM_TypeReference storeType = types[0]; if (storeType == VM_TypeReference.Int || storeType == VM_TypeReference.Address || storeType == VM_TypeReference.ObjectReference || storeType == VM_TypeReference.Word || storeType == VM_TypeReference.Float) { if (types.length == 1) { // No offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // address asm.emitMOV_RegInd_Reg(S0,T0); // [S0+0] <- T0 } else { // Store at offset asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // address asm.emitMOV_RegIdx_Reg(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 } return true; } if (storeType == VM_TypeReference.Byte) { if (types.length == 1) { // No offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegInd_Reg_Byte(T1, T0); } else { // Store at offset asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegIdx_Reg_Byte(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (byte) T0 } return true; } if (storeType == VM_TypeReference.Short || storeType == VM_TypeReference.Char) { if (types.length == 1) { // No offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegInd_Reg_Word(T1, T0); } else { // Store at offset asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegIdx_Reg_Word(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (word) T0 } return true; } if (storeType == VM_TypeReference.Double || storeType == VM_TypeReference.Long) { if (types.length == 1) { // No offset throw new RuntimeException("Magic not implemented"); } else { // Store at offset asm.emitMOV_Reg_RegDisp(T0, SP, +4); // value high asm.emitMOV_Reg_RegInd (S0, SP); // offset asm.emitMOV_Reg_RegDisp(T1, SP, +12); // base asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 asm.emitMOV_Reg_RegDisp(T0, SP, +8); // value low asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 4, T0); // [T1+S0+4] <- T0 asm.emitADD_Reg_Imm (SP, WORDSIZE * 4); // pop stack locations } return true; } } else if (methodName == VM_MagicNames.attempt) { // All attempts are similar 32 bit values. if (types.length == 3) { // Offset passed asm.emitPOP_Reg (S0); // S0 = offset } asm.emitPOP_Reg (T1); // newVal asm.emitPOP_Reg (EAX); // oldVal (EAX is implicit arg to LCMPX if (types.length == 3) { asm.emitADD_Reg_RegInd(S0, SP); // S0 += base } else { // No offset asm.emitMOV_Reg_RegInd(S0, SP); // S0 = base } asm.emitLockNextInstruction(); asm.emitCMPXCHG_RegInd_Reg (S0, T1); // atomic compare-and-exchange asm.emitMOV_RegInd_Imm (SP, 0); // 'push' false (overwriting base) VM_ForwardReference fr = asm.forwardJcc(asm.NE); // skip if compare fails asm.emitMOV_RegInd_Imm (SP, 1); // 'push' true (overwriting base) fr.resolve(asm); return true; } } if (methodName == VM_MagicNames.attemptInt || methodName == VM_MagicNames.attemptObject || methodName == VM_MagicNames.attemptAddress || methodName == VM_MagicNames.attemptWord) { // attempt gets called with four arguments: base, offset, oldVal, newVal // returns ([base+offset] == oldVal) // if ([base+offset] == oldVal) [base+offset] := newVal // (operation on memory is atomic) asm.emitPOP_Reg (T1); // newVal asm.emitPOP_Reg (EAX); // oldVal (EAX is implicit arg to LCMPXCNG asm.emitPOP_Reg (S0); // S0 = offset asm.emitADD_Reg_RegInd(S0, SP); // S0 += base asm.emitLockNextInstruction(); asm.emitCMPXCHG_RegInd_Reg (S0, T1); // atomic compare-and-exchange asm.emitMOV_RegInd_Imm (SP, 0); // 'push' false (overwriting base) VM_ForwardReference fr = asm.forwardJcc(asm.NE); // skip if compare fails asm.emitMOV_RegInd_Imm (SP, 1); // 'push' true (overwriting base) fr.resolve(asm); return true; } if (methodName == VM_MagicNames.invokeMain) { // invokeMain gets "called" with two arguments: // String[] mainArgs // the arguments to the main method // INSTRUCTION[] mainCode // the code for the main method asm.emitPOP_Reg (S0); // genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_Reg(S0); // branches to mainCode with mainArgs on the stack return true; } if (methodName == VM_MagicNames.saveThreadState) { int offset = VM_Entrypoints.saveThreadStateInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.threadSwitch) { int offset = VM_Entrypoints.threadSwitchInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(2); // pass 2 parameter words asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.restoreHardwareExceptionState) { int offset = VM_Entrypoints.restoreHardwareExceptionStateInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.invokeClassInitializer) { asm.emitPOP_Reg (S0); asm.emitCALL_Reg(S0); // call address just popped return true; } if (m.getType() == VM_TypeReference.SysCall) { VM_TypeReference[] args = m.getParameterTypes(); VM_TypeReference rtype = m.getReturnType(); int offsetToJavaArg = 3*WORDSIZE; // the three regs saved in (2) int paramBytes = 0; // (1) save three RVM nonvolatile/special registers // we don't have to save EBP: the callee will // treat it as a framepointer and save/restore // it for us. asm.emitPUSH_Reg(EBX); asm.emitPUSH_Reg(ESI); asm.emitPUSH_Reg(EDI); // (2) Push args to target function (reversed) for (int i=args.length-1; i>=0; i--) { VM_TypeReference arg = args[i]; if (arg.isLongType() || arg.isDoubleType()) { asm.emitPUSH_RegDisp(SP, offsetToJavaArg + 4); asm.emitPUSH_RegDisp(SP, offsetToJavaArg + 4); offsetToJavaArg += 16; paramBytes += 8; } else { asm.emitPUSH_RegDisp(SP, offsetToJavaArg); offsetToJavaArg += 8; paramBytes += 4; } } // (3) invoke target function VM_Field ip = VM_Entrypoints.getSysCallField(m.getName().toString()); asm.emitMOV_Reg_RegDisp(S0, JTOC, VM_Entrypoints.the_boot_recordField.getOffsetAsInt()); asm.emitCALL_RegDisp(S0, ip.getOffsetAsInt()); // (4) pop space for arguments asm.emitADD_Reg_Imm(SP, paramBytes); // (5) restore RVM registers asm.emitPOP_Reg(EDI); asm.emitPOP_Reg(ESI); asm.emitPOP_Reg(EBX); // (6) pop expression stack asm.emitADD_Reg_Imm(SP, paramBytes); // (7) push return value if (rtype.isLongType()) { asm.emitPUSH_Reg(T1); asm.emitPUSH_Reg(T0); } else if (rtype.isDoubleType()) { asm.emitSUB_Reg_Imm(SP, 8); asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); } else if (rtype.isFloatType()) { asm.emitSUB_Reg_Imm(SP, 4); asm.emitFSTP_RegInd_Reg(SP, FP0); } else if (!rtype.isVoidType()) { asm.emitPUSH_Reg(T0); } return true; } if (methodName == VM_MagicNames.getFramePointer) { asm.emitLEA_Reg_RegDisp(S0, SP, fp2spOffset(0)); asm.emitPUSH_Reg (S0); return true; } if (methodName == VM_MagicNames.getCallerFramePointer) { asm.emitPOP_Reg(T0); // Callee FP asm.emitPUSH_RegDisp(T0, STACKFRAME_FRAME_POINTER_OFFSET); // Caller FP return true; } if (methodName == VM_MagicNames.setCallerFramePointer) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // fp asm.emitMOV_RegDisp_Reg(S0, STACKFRAME_FRAME_POINTER_OFFSET, T0); // [S0+SFPO] <- T0 return true; } if (methodName == VM_MagicNames.getCompiledMethodID) { asm.emitPOP_Reg(T0); // Callee FP asm.emitPUSH_RegDisp(T0, STACKFRAME_METHOD_ID_OFFSET); // Callee CMID return true; } if (methodName == VM_MagicNames.setCompiledMethodID) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // fp asm.emitMOV_RegDisp_Reg(S0, STACKFRAME_METHOD_ID_OFFSET, T0); // [S0+SMIO] <- T0 return true; } if (methodName == VM_MagicNames.getReturnAddressLocation) { asm.emitPOP_Reg(T0); // Callee FP asm.emitADD_Reg_Imm(T0, STACKFRAME_RETURN_ADDRESS_OFFSET); // location containing callee return address asm.emitPUSH_Reg(T0); // Callee return address return true; } if (methodName == VM_MagicNames.getTocPointer || methodName == VM_MagicNames.getJTOC ) { asm.emitPUSH_Reg(JTOC); return true; } // get the processor register (PR) if (methodName == VM_MagicNames.getProcessorRegister) { asm.emitPUSH_Reg(PR); return true; } // set the processor register (PR) if (methodName == VM_MagicNames.setProcessorRegister) { asm.emitPOP_Reg(PR); return true; } // Get the value in ESI if (methodName == VM_MagicNames.getESIAsProcessor) { asm.emitPUSH_Reg(ESI); return true; } // Set the value in ESI if (methodName == VM_MagicNames.setESIAsProcessor) { asm.emitPOP_Reg(ESI); return true; } if (methodName == VM_MagicNames.getIntAtOffset || methodName == VM_MagicNames.getWordAtOffset || methodName == VM_MagicNames.getObjectAtOffset || methodName == VM_MagicNames.getObjectArrayAtOffset || methodName == VM_MagicNames.prepareInt || methodName == VM_MagicNames.prepareObject || methodName == VM_MagicNames.prepareAddress || methodName == VM_MagicNames.prepareWord) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] return true; } if (methodName == VM_MagicNames.getByteAtOffset) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitMOVZX_Reg_RegIdx_Byte(T0, T0, S0, asm.BYTE, 0); // load and zero extend byte [T0+S0] asm.emitPUSH_Reg (T0); return true; } if (methodName == VM_MagicNames.getCharAtOffset) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitMOVZX_Reg_RegIdx_Word(T0, T0, S0, asm.BYTE, 0); // load and zero extend char [T0+S0] asm.emitPUSH_Reg (T0); return true; } if (methodName == VM_MagicNames.setIntAtOffset || methodName == VM_MagicNames.setWordAtOffset || methodName == VM_MagicNames.setObjectAtOffset ) { if (m.getParameterTypes().length == 4) { // discard locationMetadata parameter asm.emitPOP_Reg(T0); // locationMetadata, not needed by baseline compiler. } asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T1); // obj ref asm.emitMOV_RegIdx_Reg(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 return true; } if (methodName == VM_MagicNames.setByteAtOffset) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T1); // obj ref asm.emitMOV_RegIdx_Reg_Byte(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (byte) T0 return true; } if (methodName == VM_MagicNames.setCharAtOffset) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T1); // obj ref asm.emitMOV_RegIdx_Reg_Word(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (char) T0 return true; } if (methodName == VM_MagicNames.getLongAtOffset || methodName == VM_MagicNames.getDoubleAtOffset) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 4); // pushes [T0+S0+4] asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] return true; } if (methodName == VM_MagicNames.setLongAtOffset || methodName == VM_MagicNames.setDoubleAtOffset) { asm.emitMOV_Reg_RegInd (T0, SP); // value high asm.emitMOV_Reg_RegDisp(S0, SP, +8 ); // offset asm.emitMOV_Reg_RegDisp(T1, SP, +12); // obj ref asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 asm.emitMOV_Reg_RegDisp(T0, SP, +4 ); // value low asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 4, T0); // [T1+S0+4] <- T0 asm.emitADD_Reg_Imm (SP, WORDSIZE * 4); // pop stack locations return true; } if (methodName == VM_MagicNames.addressArrayCreate) { // no resolution problem possible. emit_resolved_newarray(m.getType().resolve().asArray()); return true; } if (methodName == VM_MagicNames.addressArrayLength) { emit_arraylength(); // argument order already correct return true; } if (methodName == VM_MagicNames.addressArrayGet) { if (m.getType() == VM_TypeReference.CodeArray) { emit_baload(); } else { if (VM.BuildFor32Addr) { emit_iaload(); } else if (VM.BuildFor64Addr) { emit_laload(); } else { VM._assert(NOT_REACHED); } } return true; } if (methodName == VM_MagicNames.addressArraySet) { if (m.getType() == VM_TypeReference.CodeArray) { emit_bastore(); } else { if (VM.BuildFor32Addr) { emit_iastore(); } else if (VM.BuildFor64Addr) { VM._assert(false); // not implemented } else { VM._assert(NOT_REACHED); } } return true; } if (methodName == VM_MagicNames.getMemoryInt || methodName == VM_MagicNames.getMemoryWord || methodName == VM_MagicNames.getMemoryAddress) { asm.emitPOP_Reg(T0); // address asm.emitPUSH_RegInd(T0); // pushes [T0+0] return true; } if (methodName == VM_MagicNames.setMemoryInt || methodName == VM_MagicNames.setMemoryWord || methodName == VM_MagicNames.setMemoryAddress) { if (m.getParameterTypes().length == 3) { // discard locationMetadata parameter asm.emitPOP_Reg(T0); // locationMetadata, not needed by baseline compiler. } asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // address asm.emitMOV_RegInd_Reg(S0,T0); // [S0+0] <- T0 return true; } if (methodName == VM_MagicNames.objectAsAddress || methodName == VM_MagicNames.addressAsByteArray || methodName == VM_MagicNames.addressAsIntArray || methodName == VM_MagicNames.addressAsObject || methodName == VM_MagicNames.addressAsObjectArray || methodName == VM_MagicNames.addressAsType || methodName == VM_MagicNames.objectAsType || methodName == VM_MagicNames.objectAsShortArray || methodName == VM_MagicNames.objectAsByteArray || methodName == VM_MagicNames.objectAsIntArray || methodName == VM_MagicNames.addressAsThread || methodName == VM_MagicNames.objectAsThread || methodName == VM_MagicNames.objectAsProcessor || methodName == VM_MagicNames.threadAsCollectorThread || methodName == VM_MagicNames.addressAsRegisters || methodName == VM_MagicNames.addressAsStack || methodName == VM_MagicNames.floatAsIntBits || methodName == VM_MagicNames.intBitsAsFloat || methodName == VM_MagicNames.doubleAsLongBits || methodName == VM_MagicNames.longBitsAsDouble) { // no-op (a type change, not a representation change) return true; } // code for VM_Type VM_Magic.getObjectType(Object object) if (methodName == VM_MagicNames.getObjectType) { asm.emitPOP_Reg (T0); // object ref VM_ObjectModel.baselineEmitLoadTIB(asm,S0,T0); asm.emitPUSH_RegDisp(S0, TIB_TYPE_INDEX<<LG_WORDSIZE); // push VM_Type slot of TIB return true; } if (methodName == VM_MagicNames.getArrayLength) { asm.emitPOP_Reg(T0); // object ref asm.emitPUSH_RegDisp(T0, VM_ObjectModel.getArrayLengthOffset().toInt()); return true; } if (methodName == VM_MagicNames.sync) { // nothing required on IA32 return true; } if (methodName == VM_MagicNames.isync) { // nothing required on IA32 return true; } // baseline compiled invocation only: all paramaters on the stack // hi mem // Code // GPRs // FPRs // Spills // low-mem if (methodName == VM_MagicNames.invokeMethodReturningVoid) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.invokeMethodReturningInt) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); return true; } if (methodName == VM_MagicNames.invokeMethodReturningLong) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); // high half asm.emitPUSH_Reg(T1); // low half return true; } if (methodName == VM_MagicNames.invokeMethodReturningFloat) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitSUB_Reg_Imm (SP, 4); asm.emitFSTP_RegInd_Reg(SP, FP0); return true; } if (methodName == VM_MagicNames.invokeMethodReturningDouble) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitSUB_Reg_Imm (SP, 8); asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); return true; } if (methodName == VM_MagicNames.invokeMethodReturningObject) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); return true; } // baseline invocation // one paramater, on the stack -- actual code if (methodName == VM_MagicNames.dynamicBridgeTo) { if (VM.VerifyAssertions) VM._assert(klass.isDynamicBridge()); // save the branch address for later asm.emitPOP_Reg (S0); // S0<-code address asm.emitADD_Reg_Imm(SP, fp2spOffset(0) - 4); // just popped 4 bytes above. // restore FPU state asm.emitFRSTOR_RegDisp(SP, FPU_SAVE_OFFSET); // restore GPRs asm.emitMOV_Reg_RegDisp (T0, SP, T0_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (T1, SP, T1_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (EBX, SP, EBX_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (JTOC, SP, JTOC_SAVE_OFFSET); // pop frame asm.emitPOP_RegDisp (PR, VM_Entrypoints.framePointerField.getOffsetAsInt()); // FP<-previous FP // branch asm.emitJMP_Reg (S0); return true; } if (methodName == VM_MagicNames.returnToNewStack) { // SP gets frame pointer for new stack asm.emitPOP_Reg (SP); // restore nonvolatile registers asm.emitMOV_Reg_RegDisp (JTOC, SP, JTOC_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (EBX, SP, EBX_SAVE_OFFSET); // discard current stack frame asm.emitPOP_RegDisp (PR, VM_Entrypoints.framePointerField.getOffsetAsInt()); // return to caller- pop parameters from stack asm.emitRET_Imm(parameterWords << LG_WORDSIZE); return true; } if (methodName == VM_MagicNames.roundToZero) { // Store the FPU Control Word to a JTOC slot asm.emitFNSTCW_RegDisp(JTOC, VM_Entrypoints.FPUControlWordField.getOffsetAsInt()); // Set the bits in the status word that control round to zero. // Note that we use a 32-bit OR, even though we only care about the // low-order 16 bits asm.emitOR_RegDisp_Imm(JTOC,VM_Entrypoints.FPUControlWordField.getOffsetAsInt(), 0x00000c00); // Now store the result back into the FPU Control Word asm.emitFLDCW_RegDisp(JTOC,VM_Entrypoints.FPUControlWordField.getOffsetAsInt()); return true; } if (methodName == VM_MagicNames.clearFloatingPointState) { // Clear the hardware floating-point state asm.emitFNINIT(); return true; } if (methodName == VM_MagicNames.getTimeBase) { asm.emitRDTSC(); // read timestamp counter instruction asm.emitPUSH_Reg(EDX); // upper 32 bits asm.emitPUSH_Reg(EAX); // lower 32 bits return true; } if (methodName == VM_MagicNames.wordFromInt || methodName == VM_MagicNames.wordFromObject || methodName == VM_MagicNames.wordFromIntZeroExtend || methodName == VM_MagicNames.wordFromIntSignExtend || methodName == VM_MagicNames.wordToInt || methodName == VM_MagicNames.wordToAddress || methodName == VM_MagicNames.wordToOffset || methodName == VM_MagicNames.wordToObject || methodName == VM_MagicNames.wordToObjectReference || methodName == VM_MagicNames.wordToExtent || methodName == VM_MagicNames.wordToWord) { if (VM.BuildFor32Addr) return true; // no-op for 32-bit if (VM.VerifyAssertions) VM._assert(false); } if (methodName == VM_MagicNames.wordToLong) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg(T0); asm.emitPUSH_Imm(0); // upper 32 bits asm.emitPUSH_Reg(T0); // lower 32 bits return true; } // else fill unused stackslot if (VM.VerifyAssertions) VM._assert(false); } if (methodName == VM_MagicNames.wordAnd) { asm.emitPOP_Reg(T0); asm.emitAND_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordOr) { asm.emitPOP_Reg(T0); asm.emitOR_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordXor) { asm.emitPOP_Reg(T0); asm.emitXOR_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordNot) { asm.emitNOT_RegInd (SP); return true; } if (methodName == VM_MagicNames.wordAdd) { asm.emitPOP_Reg(T0); asm.emitADD_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordSub || methodName == VM_MagicNames.wordDiff) { asm.emitPOP_Reg(T0); asm.emitSUB_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordZero || methodName == VM_MagicNames.wordNull) { asm.emitPUSH_Imm(0); return true; } if (methodName == VM_MagicNames.wordOne) { asm.emitPUSH_Imm(1); return true; } if (methodName == VM_MagicNames.wordMax) { asm.emitPUSH_Imm(-1); return true; } if (methodName == VM_MagicNames.wordLT) { generateAddrComparison(asm.LLT); return true; } if (methodName == VM_MagicNames.wordLE) { generateAddrComparison(asm.LLE); return true; } if (methodName == VM_MagicNames.wordGT) { generateAddrComparison(asm.LGT); return true; } if (methodName == VM_MagicNames.wordGE) { generateAddrComparison(asm.LGE); return true; } if (methodName == VM_MagicNames.wordsLT) { generateAddrComparison(asm.LT); return true; } if (methodName == VM_MagicNames.wordsLE) { generateAddrComparison(asm.LE); return true; } if (methodName == VM_MagicNames.wordsGT) { generateAddrComparison(asm.GT); return true; } if (methodName == VM_MagicNames.wordsGE) { generateAddrComparison(asm.GE); return true; } if (methodName == VM_MagicNames.wordEQ) { generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordNE) { generateAddrComparison(asm.NE); return true; } if (methodName == VM_MagicNames.wordIsZero) { asm.emitPUSH_Imm(0); generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordIsNull) { asm.emitPUSH_Imm(0); generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordIsMax) { asm.emitPUSH_Imm(-1); generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordLsh) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg(ECX); asm.emitSHL_RegInd_Reg(SP, ECX); } else VM._assert(false); return true; } if (methodName == VM_MagicNames.wordRshl) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg (ECX); asm.emitSHR_RegInd_Reg (SP, ECX); } else VM._assert(false); return true; } if (methodName == VM_MagicNames.wordRsha) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg (ECX); asm.emitSAR_RegInd_Reg (SP, ECX); } else VM._assert(false); return true; } return false; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/df5323a1679a545ad5b2e78b0bf88ba178e71da8/VM_Compiler.java/clean/rvm/src/vm/arch/intel/compilers/baseline/VM_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
1250,
3157,
19289,
261,
7397,
67,
1305,
2404,
312,
13,
288,
565,
8251,
67,
3641,
4918,
273,
312,
18,
17994,
5621,
565,
309,
261,
81,
18,
588,
559,
1435,
422,
8251,
67,
7534,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1250,
3157,
19289,
261,
7397,
67,
1305,
2404,
312,
13,
288,
565,
8251,
67,
3641,
4918,
273,
312,
18,
17994,
5621,
565,
309,
261,
81,
18,
588,
559,
1435,
422,
8251,
67,
7534,
... |
switch (owntype) { case UnboxedArrayType(Type elemtp): Tree apply = transform(templ.parents[0]); switch (apply) { | if (tree.type.symbol() == definitions.ARRAY_CLASS) { switch (templ.parents[0]) { | public Tree transform(Tree tree, boolean eraseFully) { assert tree.type != null : tree; Type owntype = eraseFully ? tree.type.fullErasure() : tree.type.erasure(); switch (tree) { case ClassDef(int mods, Name name, TypeDef[] tparams, ValDef[][] vparams, Tree tpe, Template impl): Symbol oldCurrentClass = currentClass; currentClass = tree.symbol(); Tree newTree = copy.ClassDef(tree, mods, name, new TypeDef[0], transform(vparams), tpe, transform(impl, tree.symbol())) .setType(owntype); currentClass = oldCurrentClass; return newTree; case DefDef(int mods, Name name, TypeDef[] tparams, ValDef[][] vparams, Tree tpe, Tree rhs): addBridges(tree.symbol()); Tree tpe1 = gen.mkType(tpe.pos, tpe.type.fullErasure()); Tree rhs1 = (rhs == Tree.Empty) ? rhs : transform(rhs, tpe1.type); return copy.DefDef( tree, mods, name, new TypeDef[0], transform(vparams), tpe1, rhs1) .setType(owntype); case ValDef(int mods, Name name, Tree tpe, Tree rhs): Tree tpe1 = transform(tpe); Tree rhs1 = (rhs == Tree.Empty) ? rhs : transform(rhs, tpe1.type); return copy.ValDef( tree, mods, name, tpe1, rhs1) .setType(owntype); case TypeDef(_, _, _): // eliminate return Tree.Empty; case Block(Tree[] stats): Tree[] newStats = new Tree[stats.length]; for (int i = 0; i < stats.length; ++i) newStats[i] = transform(stats[i], true); return copy.Block(tree, newStats).setType(owntype.fullErasure()); case Assign(Tree lhs, Tree rhs): Tree lhs1 = transformLhs(lhs); Tree rhs1 = transform(rhs, lhs1.type); return copy.Assign(tree, lhs1, rhs1).setType(owntype.fullErasure()); case If(Tree cond, Tree thenp, Tree elsep): Tree cond1 = transform(cond, Type.unboxedType(TypeTags.BOOLEAN)); Tree thenp1 = transform(thenp, owntype); Tree elsep1 = (elsep == Tree.Empty) ? elsep : transform(elsep, owntype); return copy.If(tree, cond1, thenp1, elsep1).setType(owntype); case New(Template templ): if (tree.type.symbol() == definitions.UNIT_CLASS) // !!! return Tree.Literal(UNIT, null).setType(owntype); throw Debug.abort("found unit literal"); switch (owntype) { case UnboxedArrayType(Type elemtp): Tree apply = transform(templ.parents[0]); switch (apply) { case Apply(_, Tree[] args): assert args.length == 1; switch (elemtp) { case UnboxedType(int kind): return genNewArray(tree.pos,args[0],kind); default: return genNewArray(tree.pos,args[0],elemtp); } default: throw Debug.abort("illegal case", apply); } } return super.transform(tree).setType(owntype); case Typed(Tree expr, Tree tpe): // coerce expr to tpe Tree tpe1 = gen.mkType(tpe.pos, tpe.type().erasure()); // !!! was transform(tpe); // !!! More generally, we should never transform a tree // that represents a type. We should always transform // types and then reconstruct the corresponding tree. Tree expr1 = transform(expr, tpe1.type); return noTyped ? expr1 : copy.Typed(tree, expr1, tpe1).setType(owntype); case TypeApply(Tree fun, Tree[] args): Symbol sym = fun.symbol(); if (sym == definitions.AS || sym == definitions.IS) { Type tp = args[0].type.erasure(); if (isUnboxed(tp)) { Tree qual1 = transform(getQualifier(currentClass, fun)); if (isUnboxed(qual1.type)) qual1 = box(qual1); Symbol primSym = (sym == definitions.AS) ? primitives.getUnboxValueSymbol(tp) : primitives.getInstanceTestSymbol(tp); return gen.Select(qual1, primSym); } else return copy.TypeApply(tree, transform(fun), transform(args)) .setType(owntype); } else return transform(fun); case Apply(Tree fun, Tree[] args): switch (fun) { case Select(Tree array, _): if (isUnboxedArray(array.type().erasure())) { switch (primitives.getPrimitive(fun.symbol())) { case APPLY: return transformApply(tree); case UPDATE: return transformUpdate(tree); } } } Tree fun1 = transform(fun); if (fun1.symbol() == definitions.NULL) return fun1.setType(owntype); if (global.debug) global.log("fn: " + fun1.symbol() + ":" + fun1.type);//debug switch (fun1.type) { case MethodType(Symbol[] params, Type restpe): Tree[] args1 = args; for (int i = 0; i < args.length; i++) { Tree arg = args[i]; Type pt1 = params[i].type().erasure(); Tree arg1 = cast(transform(arg, pt1), pt1); if (arg1 != arg && args1 == args) { args1 = new Tree[args.length]; System.arraycopy(args, 0, args1, 0, i); } args1[i] = arg1; } return coerce(copy.Apply(tree, fun1, args1).setType(restpe), owntype); default: global.debugPrinter.print(fun1); throw Debug.abort("bad method type: " + Debug.show(fun1.type) + " " + Debug.show(fun1.symbol())); } case Select(_, _): case Ident(_): Tree tree1 = transformLhs(tree); //global.log("id: " + tree1+": "+tree1.type+" -> "+owntype);//DEBUG return (tree1.type instanceof Type.MethodType) ? tree1 : coerce(tree1, owntype); case Empty: case PackageDef(_,_): case Template(_,_): case Tuple(_): // !!! ? case Super(_): case This(_): case Literal(_): case TypeTerm(): return super.transform(tree).setType(owntype); case Bad(): case ModuleDef(_,_,_,_): case PatDef(_,_,_): case Import(_,_): case CaseDef(_,_,_): case LabelDef(_,_): case Visitor(_): case Function(_,_): case SingletonType(_): case SelectFromType(_,_): case FunType(_,_): case CompoundType(_,_): case AppliedType(_, _): case CovariantType(_): throw Debug.abort("illegal case", tree); default: throw Debug.abort("unknown case", tree); } } | 1156 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1156/68e734d000dfbea805c752a20c473121039a8c97/Erasure.java/buggy/sources/scalac/transformer/Erasure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4902,
2510,
12,
2471,
2151,
16,
1250,
22038,
16999,
13,
288,
202,
11231,
2151,
18,
723,
480,
446,
294,
2151,
31,
202,
559,
2523,
496,
388,
273,
22038,
16999,
692,
2151,
18,
723,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4902,
2510,
12,
2471,
2151,
16,
1250,
22038,
16999,
13,
288,
202,
11231,
2151,
18,
723,
480,
446,
294,
2151,
31,
202,
559,
2523,
496,
388,
273,
22038,
16999,
692,
2151,
18,
723,
1... |
*/ | */ | public void callback( int dwDevice, int dwMessage, int dwInstance, int dwParam1, int dwParam2, int dwParam3) { try { switch (dwMessage) { case LINE_ADDRESSSTATE: break; case LINE_CALLINFO: try { String[] s = this.realProvider.XTGetCallInfo(dwDevice); if(null != s) { // We got caller id info // An array of two strings 1. Name 2. Number // Set the remote terminal name == name // Set the remote address name == number this.remoteName = s[0]; this.remoteNumber = s[1]; } } catch(Exception e) { System.out.println("Exception " + e.toString() + " in callback()"); } break; case LINE_CALLSTATE: lineCallState(dwDevice,dwInstance,dwParam1,dwParam2,dwParam3); break; case LINE_CLOSE: break; case LINE_DEVSPECIFIC: break; case LINE_DEVSPECIFICFEATURE: break; case LINE_GATHERDIGITS: break; case LINE_GENERATE: /* * We have been notified that we have generated digits. But we should already know this. */ break; case LINE_MONITORDIGITS:/* debugString(5,"dwDevice -> " + dwDevice + " dwInstance -> " + dwInstance + " dwParam1 -> " + dwParam1 + " dwParam2 -> " + dwParam2 + " dwParam3 -> " + dwParam3);*/ //System.out.println("Monitoring digits"); //System.out.println("dwDevice -> " + dwDevice + " dwInstance (line) -> " + dwInstance + //" dwParam1 -> " + dwParam1 + " dwParam2 -> " + dwParam2 + //" dwParam3 -> " + dwParam3); AddressInfo ai = (AddressInfo)this.lineToAddr.get(new Integer(dwInstance)); if (ai != null) { String terminal = ai.terminal; char[] detectedChars = { (char)dwParam1 }; Symbol[] syms = SymbolConvertor.convert(new String(detectedChars)); this.gjListener.mediaSignalDetectorDetected(terminal, syms); } break; case LINE_LINEDEVSTATE: lineDevState(dwDevice,dwInstance,dwParam1,dwParam2,dwParam3); break; case LINE_MONITORMEDIA: break; case LINE_MONITORTONE: break; case LINE_REPLY: //m_reply = dwParam2; //m_device = dwInstance; /* TODO: Check LINE_REPLY Data for success Switch on current state, maybe connecting or disconnecting. *//* evt = new XCallActiveEv(m_Call,CallActiveEv.ID, Ev.CAUSE_NEW_CALL,0,false); evlist[0] = evt; publishEvent(evlist); */ break; case LINE_REQUEST: break; case PHONE_BUTTON: break; case PHONE_CLOSE: break; case PHONE_DEVSPECIFIC: break; case PHONE_REPLY: break; case PHONE_STATE: break; case LINE_CREATE: break; case PHONE_CREATE: break; default: System.out.println("UNKNOWN TAPI EVENT: " + dwMessage); break; } }catch(Exception e){ System.out.println("Exception " + e.toString() + " in callback()"); } } | 49033 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49033/d726ca1bf323e7a97b897700ac14cd9678134878/XtapiProvider.java/clean/src/xtapiSpSrc/net/sourceforge/gjtapi/raw/xtapi/XtapiProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1348,
12,
202,
202,
474,
12394,
3654,
16,
202,
202,
474,
12394,
1079,
16,
202,
202,
474,
12394,
1442,
16,
202,
202,
474,
12394,
786,
21,
16,
202,
202,
474,
12394,
786,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1348,
12,
202,
202,
474,
12394,
3654,
16,
202,
202,
474,
12394,
1079,
16,
202,
202,
474,
12394,
1442,
16,
202,
202,
474,
12394,
786,
21,
16,
202,
202,
474,
12394,
786,
... |
AntGenericReference genRef = (AntGenericReference)ref; if (genRef.isCompletionOnlyReference()) continue; if (ref.resolve() == null) { | final AntGenericReference genRef = (AntGenericReference)ref; if (!genRef.shouldBeSkippedByAnnotator() && ref.resolve() == null) { | private static void checkReferences(AntElement element, @NonNls AnnotationHolder holder) { PsiReference[] refs = element.getReferences(); for (final PsiReference ref : refs) { if (ref instanceof AntGenericReference) { AntGenericReference genRef = (AntGenericReference)ref; if (genRef.isCompletionOnlyReference()) continue; if (ref.resolve() == null) { final TextRange absoluteRange = ref.getRangeInElement().shiftRight(ref.getElement().getTextRange().getStartOffset()); final Annotation annotation = holder.createErrorAnnotation(absoluteRange, genRef.getUnresolvedMessagePattern()); annotation.setHighlightType(ProblemHighlightType.LIKE_UNKNOWN_SYMBOL); final IntentionAction[] intentionActions = genRef.getFixes(); for (IntentionAction action : intentionActions) { annotation.registerFix(action); } } } } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/3ece867b583d194ae843295a9f02c74e078fa0f5/AntAnnotator.java/buggy/plugins/ant/src/com/intellij/lang/ant/validation/AntAnnotator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
866,
8221,
12,
14925,
1046,
930,
16,
632,
3989,
50,
3251,
6090,
6064,
10438,
13,
288,
565,
453,
7722,
2404,
8526,
9047,
273,
930,
18,
588,
8221,
5621,
565,
364,
261,
638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
866,
8221,
12,
14925,
1046,
930,
16,
632,
3989,
50,
3251,
6090,
6064,
10438,
13,
288,
565,
453,
7722,
2404,
8526,
9047,
273,
930,
18,
588,
8221,
5621,
565,
364,
261,
638... |
if(parentGroups != null) { Iterator pgIter = parentGroups.iterator(); while(pgIter.hasNext()) { Group g = (Group) pgIter.next(); String type = g.getGroupType(); if("iwme_club".equals(type)) { clubNameField = g.getName(); } } } if(clubNameField == null) { clubNameField = iwrb.getLocalizedString("ledgerwindow.no_club_text","No club"); } | protected void initializeFields() { IWContext iwc = IWContext.getInstance(); IWResourceBundle iwrb = getResourceBundle(iwc); String lIDString = iwc.getParameter(LEDGER); Integer lID = new Integer(lIDString); //The user logged in is set as the main coach for the ledger if(iwc.isLoggedOn()) { User user =iwc.getCurrentUser(); coachNameField = new Text(user.getName()); } int coachGroupID = getCalendarBusiness(iwc).getLedger(lID.intValue()).getCoachGroupID(); Group coaches = null; List trainers = null; try { coaches = getGroupBusiness(iwc).getGroupByGroupID(coachGroupID); trainers = (List) getGroupBusiness(iwc).getUsers(coaches); }catch(Exception e) { e.printStackTrace(); } if(trainers != null && trainers.size() != 0) { StringBuffer buff = new StringBuffer(); Iterator trainersIter = trainers.iterator(); while(trainersIter.hasNext()) { User trainer = (User) trainersIter.next(); buff.append(trainer.getName()); buff.append("<br>"); } otherCoachesNameField = buff.toString(); } else { otherCoachesNameField = ""; } // int groupID = getCalendarBusiness(iwc).getLedger(lID.intValue()).getGroupID(); try { groupNameField = getGroupBusiness(iwc).getGroupByGroupID(groupID).getName(); }catch (Exception e) { e.printStackTrace(); } Timestamp fromD = getCalendarBusiness(iwc).getLedger(lID.intValue()).getDate(); IWTimestamp iwFromD = new IWTimestamp(fromD); //fromDate is the start date of the ledger fromDateField = iwFromD.getDateString("dd. MMMMMMM yyyy"); //when save button is pushed the new ledger is created saveButton = new SubmitButton(iwrb.getLocalizedString("ledgerwindow.save","Save"),saveButtonParameterName,saveButtonParameterValue); //closes the window closeButton = new CloseButton(iwrb.getLocalizedString("ledgerwindow.close","Close")); printButton = new PrintButton(iwrb.getLocalizedString("ledgerwindow.print","Print")); } | 11359 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11359/c90d50016616a0fee0c3f819db7885cf1e81aa27/LedgerWindow.java/buggy/src/java/com/idega/block/cal/presentation/LedgerWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
430,
12,
2938,
3621,
480,
446,
13,
288,
4498,
7184,
2360,
273,
982,
3621,
18,
9838,
5621,
1323,
12,
8365,
2360,
18,
5332,
2134,
10756,
288,
3756,
314,
273,
261,
1114,
13,
718... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
430,
12,
2938,
3621,
480,
446,
13,
288,
4498,
7184,
2360,
273,
982,
3621,
18,
9838,
5621,
1323,
12,
8365,
2360,
18,
5332,
2134,
10756,
288,
3756,
314,
273,
261,
1114,
13,
718... | |
saver = (weka.core.converters.Saver) o; | saver = (weka.core.converters.Saver) o; | public Element writeSaver(Element parent, Object o, String name) throws Exception { Element node; weka.core.converters.Saver saver; File file; boolean known; // for debugging only if (DEBUG) trace(new Throwable(), name); m_CurrentNode = parent; saver = (weka.core.converters.Saver) o; node = addElement(parent, name, saver.getClass().getName(), false); known = true; file = null; // file if (saver instanceof weka.core.converters.ArffSaver) file = ((weka.core.converters.ArffSaver) saver).retrieveFile(); else if (saver instanceof weka.core.converters.C45Saver) file = ((weka.core.converters.C45Saver) saver).retrieveFile(); else if (saver instanceof weka.core.converters.CSVSaver) file = ((weka.core.converters.CSVSaver) saver).retrieveFile(); else if (saver instanceof weka.core.converters.SerializedInstancesSaver) file = ((weka.core.converters.SerializedInstancesSaver) saver).retrieveFile(); else known = false; if (!known) System.out.println("WARNING: unknown saver class '" + saver.getClass().getName() + "' - cannot retrieve file!"); // only save it, if it's a real file! if ( (file == null) || (file.isDirectory()) ) invokeWriteToXML(node, "", VAL_FILE); else invokeWriteToXML(node, file.getAbsolutePath(), VAL_FILE); return node; } | 48918 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48918/74c29fcd5223a83bab0fd8795d7c3121991f6c16/XMLBeans.java/buggy/weka/gui/beans/xml/XMLBeans.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3010,
1045,
55,
21851,
12,
1046,
982,
16,
1033,
320,
16,
514,
508,
13,
1377,
1216,
1185,
288,
3639,
3010,
5397,
756,
31,
565,
732,
7282,
18,
3644,
18,
15747,
87,
18,
55,
21851,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3010,
1045,
55,
21851,
12,
1046,
982,
16,
1033,
320,
16,
514,
508,
13,
1377,
1216,
1185,
288,
3639,
3010,
5397,
756,
31,
565,
732,
7282,
18,
3644,
18,
15747,
87,
18,
55,
21851,
... |
+ " It should have. I don't know why it doesn't.", uee); | + " It should have. I don't know why it doesn't.", uee); | private static byte[] toUTF8(final Object a) { try { if (a instanceof TreeEntry) { return ((TreeEntry) a).getNameUTF8(); } else if (a instanceof String) { return ((String) a).getBytes("UTF-8"); } else { throw new IllegalArgumentException("Not a TreeEntry" + " or String: " + a); } } catch (UnsupportedEncodingException uee) { throw new RuntimeException("JVM does not support UTF-8." + " It should have. I don't know why it doesn't.", uee); } } | 45532 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45532/95e2adba28c9a11f01009dd846fb7366bec613c5/TreeNameComparator.java/clean/org.spearce.jgit/src/org/spearce/jgit/lib/TreeNameComparator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1160,
8526,
358,
5159,
28,
12,
6385,
1033,
279,
13,
288,
3639,
775,
288,
5411,
309,
261,
69,
1276,
4902,
1622,
13,
288,
7734,
327,
14015,
2471,
1622,
13,
279,
2934,
17994,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1160,
8526,
358,
5159,
28,
12,
6385,
1033,
279,
13,
288,
3639,
775,
288,
5411,
309,
261,
69,
1276,
4902,
1622,
13,
288,
7734,
327,
14015,
2471,
1622,
13,
279,
2934,
17994,
51... |
if(proto != null) { | if (proto != null) { | protected Object[] getChildren() { if(children != null) return children; Context cx = Context.enter(); try { Object value = getObject(); if(value == null) return children = empty; if(value == ScriptableObject.NOT_FOUND || value == Undefined.instance) { return children = empty; } if(value instanceof Scriptable) { Scriptable scrip = (Scriptable)value; Scriptable proto = scrip.getPrototype(); Scriptable parent = scrip.getParentScope(); if(value instanceof NativeCall) { if(name != null && name.equals("this")) { // this is the local variables table root // don't show the __parent__ property parent = null; } else if(!(parent instanceof NativeCall)) { // don't bother showing [object Global] as // the __parent__ property which just creates // more noise parent = null; } } if(proto != null) { if(builtin == null) { builtin = new Scriptable[6]; builtin[0] = ScriptableObject.getObjectPrototype(scrip); builtin[1] = ScriptableObject.getFunctionPrototype(scrip); builtin[2] = ScriptableObject.getClassPrototype(scrip, "String"); builtin[3] = ScriptableObject.getClassPrototype(scrip, "Boolean"); builtin[4] = ScriptableObject.getClassPrototype(scrip, "Array"); builtin[5] = ScriptableObject.getClassPrototype(scrip, "Number"); } for(int i = 0; i < builtin.length; i++) { if(proto == builtin[i]) { proto = null; break; } } } if(scrip.has(0, scrip)) { int len = 0; try { Scriptable start = scrip; Scriptable obj = start; Object result = Undefined.instance; do { if(obj.has("length", start)) { result = obj.get("length", start); if (result != Scriptable.NOT_FOUND) break; } obj = obj.getPrototype(); } while (obj != null); if(result instanceof Number) { len = ((Number)result).intValue(); } } catch(Exception exc) { } if(parent != null) { len++; } if(proto != null) { len++; } children = new VariableNode[len]; int i = 0; int j = 0; if(proto != null) { children[i++] = new VariableNode(scrip, "__proto__"); j++; } if(parent != null) { children[i++] = new VariableNode(scrip, "__parent__"); j++; } for(; i < len; i++) { children[i] = new VariableNode(scrip, i-j); } } else { int len = 0; Hashtable t = new Hashtable(); Object[] ids = scrip.getIds(); if(proto != null) t.put("__proto__", "__proto__"); if(parent != null) t.put("__parent__", "__parent__"); if(ids.length > 0) { for(int j = 0; j < ids.length; j++) { t.put(ids[j], ids[j]); } } ids = new Object[t.size()]; Enumeration e = t.keys(); int j = 0; while(e.hasMoreElements()) { ids[j++] = e.nextElement().toString(); } if(ids != null && ids.length > 0) { java.util.Arrays.sort(ids, new java.util.Comparator() { public int compare(Object l, Object r) { return l.toString().compareToIgnoreCase(r.toString()); } }); len = ids.length; } children = new VariableNode[len]; for(int i = 0; i < len; i++) { Object id = ids[i]; children[i] = new VariableNode(scrip, id.toString()); } } } } catch (Exception exc) { exc.printStackTrace(); } finally { cx.exit(); } return children; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/b9766e81693411fa600b26b9a0763dcf621b2770/VariableModel.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/VariableModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
8526,
10268,
1435,
288,
3639,
309,
12,
5906,
480,
446,
13,
327,
2325,
31,
3639,
1772,
9494,
273,
1772,
18,
2328,
5621,
3639,
775,
288,
5411,
1033,
460,
273,
6455,
5621,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
8526,
10268,
1435,
288,
3639,
309,
12,
5906,
480,
446,
13,
327,
2325,
31,
3639,
1772,
9494,
273,
1772,
18,
2328,
5621,
3639,
775,
288,
5411,
1033,
460,
273,
6455,
5621,
5411,
... |
return encode(cx, str, methodId == Id_encodeURI); | return encode(str, methodId == Id_encodeURI); | public Object execMethod(IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { if (f.hasTag(FTAG)) { int methodId = f.methodId(); switch (methodId) { case Id_decodeURI: case Id_decodeURIComponent: { String str = ScriptRuntime.toString(args, 0); return decode(cx, str, methodId == Id_decodeURI); } case Id_encodeURI: case Id_encodeURIComponent: { String str = ScriptRuntime.toString(args, 0); return encode(cx, str, methodId == Id_encodeURI); } case Id_escape: return js_escape(cx, args); case Id_eval: return js_eval(cx, scope, args); case Id_isFinite: { if (args.length < 1) return Boolean.FALSE; double d = ScriptRuntime.toNumber(args[0]); return (d != d || d == Double.POSITIVE_INFINITY || d == Double.NEGATIVE_INFINITY) ? Boolean.FALSE : Boolean.TRUE; } case Id_isNaN: { // The global method isNaN, as per ECMA-262 15.1.2.6. if (args.length < 1) return Boolean.TRUE; double d = ScriptRuntime.toNumber(args[0]); return (d != d) ? Boolean.TRUE : Boolean.FALSE; } case Id_parseFloat: return js_parseFloat(cx, args); case Id_parseInt: return js_parseInt(cx, args); case Id_unescape: return js_unescape(cx, args); case Id_uneval: { Object value = (args.length != 0) ? args[0] : Undefined.instance; return ScriptRuntime.uneval(cx, scope, value); } case Id_new_CommonError: // The implementation of all the ECMA error constructors // (SyntaxError, TypeError, etc.) return NativeError.make(cx, scope, f, args); } } throw f.unknown(); } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/4ad826a35e76cb27011d7ce32f9515c2d80a93c0/NativeGlobal.java/clean/js/rhino/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
12,
548,
2083,
284,
16,
1772,
9494,
16,
22780,
2146,
16,
11794,
22780,
15261,
16,
1033,
8526,
833,
13,
565,
288,
3639,
309,
261,
74,
18,
5332,
1805,
12,
4464,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
12,
548,
2083,
284,
16,
1772,
9494,
16,
22780,
2146,
16,
11794,
22780,
15261,
16,
1033,
8526,
833,
13,
565,
288,
3639,
309,
261,
74,
18,
5332,
1805,
12,
4464,
17... |
f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "GRANTOR", iVarcharOid, 32); f[5] = new Field(connection, "GRANTEE", iVarcharOid, 32); f[6] = new Field(connection, "PRIVILEGE", iVarcharOid, 32); f[7] = new Field(connection, "IS_GRANTABLE", iVarcharOid, 32); | f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, NAME_SIZE); f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, NAME_SIZE); f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, NAME_SIZE); f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, NAME_SIZE); f[4] = new Field(connection, "GRANTOR", iVarcharOid, NAME_SIZE); f[5] = new Field(connection, "GRANTEE", iVarcharOid, NAME_SIZE); f[6] = new Field(connection, "PRIVILEGE", iVarcharOid, NAME_SIZE); f[7] = new Field(connection, "IS_GRANTABLE", iVarcharOid, NAME_SIZE); | public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException { Field f[] = new Field[8]; Vector v = new Vector(); if (table == null) table = "%"; if (columnNamePattern == null) columnNamePattern = "%"; else columnNamePattern = columnNamePattern.toLowerCase(); f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "GRANTOR", iVarcharOid, 32); f[5] = new Field(connection, "GRANTEE", iVarcharOid, 32); f[6] = new Field(connection, "PRIVILEGE", iVarcharOid, 32); f[7] = new Field(connection, "IS_GRANTABLE", iVarcharOid, 32); // This is taken direct from the psql source java.sql.ResultSet r = connection.ExecSQL("SELECT relname, relacl FROM pg_class, pg_user WHERE ( relkind = 'r' OR relkind = 'i') and relname !~ '^pg_' and relname !~ '^xin[vx][0-9]+' and usesysid = relowner and relname like '" + table.toLowerCase() + "' ORDER BY relname"); while (r.next()) { byte[][] tuple = new byte[8][0]; tuple[0] = tuple[1] = "".getBytes(); if (Driver.logDebug) Driver.debug("relname=\"" + r.getString(1) + "\" relacl=\"" + r.getString(2) + "\""); // For now, don't add to the result as relacl needs to be processed. //v.addElement(tuple); } return connection.getResultSet(null, f, v, "OK", 1); } | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/62da2fa0e1cb3cf1df8d633f785e391c35477f7e/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
6716,
27692,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,
273,
394,
2286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
6716,
27692,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,
273,
394,
2286,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.