rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
return true; | return REMOVE; | public boolean processRequest(Request request) { if (selectorRequestFilter.acceptRequest(request)) { if (! hasServed) { body.serve(request); hasServed = true; } return true; } else { return false; } } | 14315 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14315/2666230e00db643175e81dac0b52f3f8ba384784/Service.java/buggy/src/org/objectweb/proactive/Service.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1207,
691,
12,
691,
590,
13,
288,
1377,
309,
261,
9663,
691,
1586,
18,
9436,
691,
12,
2293,
3719,
288,
3639,
309,
16051,
711,
827,
2155,
13,
288,
1850,
1417,
18,
30104,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1207,
691,
12,
691,
590,
13,
288,
1377,
309,
261,
9663,
691,
1586,
18,
9436,
691,
12,
2293,
3719,
288,
3639,
309,
16051,
711,
827,
2155,
13,
288,
1850,
1417,
18,
30104,
12,
... |
PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); | PiccoloActionFactory.getSemanticEnterAction(browserModel, this,semanticLayer); | private void initActions(BrowserModel targetModel) { // theoretically shouldn't happen if(targetModel == null) { return; } defaultTDownActions = new MouseDownActions(); defaultTOverActions = new MouseOverActions(); selectThumbnailAction = PiccoloActionFactory.getSelectThumbnailAction(targetModel); popupMenuAction = PiccoloActionFactory.getPopupMenuAction(targetModel); defaultTDownActions.setMouseClickAction(PiccoloModifiers.NORMAL, selectThumbnailAction); defaultTDownActions.setMouseDoubleClickAction(PiccoloModifiers.NORMAL, PiccoloActions.OPEN_IMAGE_ACTION); defaultTDownActions.setMouseClickAction(PiccoloModifiers.POPUP, popupMenuAction); semanticLayer = new HoverManager(this); semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); semanticExitThumbnailAction = PiccoloActionFactory.getOverlayExitAction(this,semanticLayer); hoverThumbnailAction = PiccoloActionFactory.getImageEnterAction(this); exitThumbnailAction = PiccoloActionFactory.getImageExitAction(this); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
6100,
12,
9132,
1488,
1018,
1488,
13,
565,
288,
3639,
368,
326,
479,
88,
6478,
12044,
1404,
5865,
3639,
309,
12,
3299,
1488,
422,
446,
13,
3639,
288,
5411,
327,
31,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
6100,
12,
9132,
1488,
1018,
1488,
13,
565,
288,
3639,
368,
326,
479,
88,
6478,
12044,
1404,
5865,
3639,
309,
12,
3299,
1488,
422,
446,
13,
3639,
288,
5411,
327,
31,
363... |
assertEquals("wrong name", "UNNAMED", packageBinding.getName()); | assertEquals("wrong name", "", packageBinding.getName()); | public void test0170() throws JavaModelException { ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0170.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ ASTNode result = runConversion(AST.JLS3, sourceUnit, true); assertNotNull("Expression should not be null", result); //$NON-NLS-1$ assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; List types = compilationUnit.types(); assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$ TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0); ITypeBinding typeBinding = typeDeclaration.resolveBinding(); assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$ IPackageBinding packageBinding = typeBinding.getPackage(); assertNotNull("No package binding", packageBinding); //$NON-NLS-1$ assertEquals("wrong name", "UNNAMED", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$ String[] components = packageBinding.getNameComponents(); assertNotNull("no components", components); //$NON-NLS-1$ assertTrue("components size != 0", components.length == 0); //$NON-NLS-1$ assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$ assertTrue("Not an unnamed package", packageBinding.isUnnamed()); //$NON-NLS-1$ assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$ } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/ee40537854237283a456f6bc439c9279dccce2c3/ASTConverterAST3Test.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1611,
7301,
1435,
1216,
5110,
1488,
503,
288,
202,
202,
45,
19184,
2802,
1084,
2802,
273,
336,
19184,
2802,
2932,
5072,
6,
269,
315,
4816,
3113,
23453,
315,
4709,
161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1611,
7301,
1435,
1216,
5110,
1488,
503,
288,
202,
202,
45,
19184,
2802,
1084,
2802,
273,
336,
19184,
2802,
2932,
5072,
6,
269,
315,
4816,
3113,
23453,
315,
4709,
161... |
ODMGXAWrapper txw = new ODMGXAWrapper(); | log.debug( "Creating instance " + imgFile.getAbsolutePath() ); ODMGXAWrapper txw = new ODMGXAWrapper(); | public static ImageInstance create ( VolumeBase vol, File imgFile ) { ODMGXAWrapper txw = new ODMGXAWrapper(); ImageInstance i = new ImageInstance(); i.volume = vol; i.volumeId = vol.getName(); i.imageFile = imgFile; i.fileSize = imgFile.length(); i.mtime = imgFile.lastModified(); i.fname = vol.mapFileToVolumeRelativeName( imgFile ); txw.lock( i, Transaction.WRITE ); // Read the rest of fields from the image file try { i.readImageFile(); } catch (IOException e ) { txw.abort(); log.warn( "Error opening image file: " + e.getMessage() ); // The image does not exist, so it cannot be read!!! return null; } i.calcHash(); i.checkTime = new java.util.Date(); txw.commit(); return i; } | 50360 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50360/bf99fea69434ff6e873f4855eec4e613e18b2684/ImageInstance.java/buggy/src/main/java/org/photovault/imginfo/ImageInstance.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
3421,
1442,
752,
261,
7404,
2171,
6626,
16,
1387,
3774,
812,
262,
288,
202,
1330,
18,
4148,
12,
315,
11092,
791,
315,
397,
3774,
812,
18,
588,
10368,
743,
1435,
11272,
531,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3421,
1442,
752,
261,
7404,
2171,
6626,
16,
1387,
3774,
812,
262,
288,
202,
1330,
18,
4148,
12,
315,
11092,
791,
315,
397,
3774,
812,
18,
588,
10368,
743,
1435,
11272,
531,
1... |
}}); | } } | public void run() { try { if (dispatchZoom) updateManager.dispatchSVGZoomEvent(); if (dispatchScroll) updateManager.dispatchSVGScrollEvent(); } catch (InterruptedException ie) { } }}); | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/5728ecbac215d2044bcc32eefb14dd07696795ab/JSVGComponent.java/clean/sources/org/apache/batik/swing/svg/JSVGComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7682,
1071,
918,
1086,
1435,
288,
18701,
775,
288,
27573,
309,
261,
10739,
11497,
13,
19694,
1089,
1318,
18,
10739,
26531,
11497,
1133,
5621,
27573,
309,
261,
10739,
6806,
13,
4766,
565,
1089,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7682,
1071,
918,
1086,
1435,
288,
18701,
775,
288,
27573,
309,
261,
10739,
11497,
13,
19694,
1089,
1318,
18,
10739,
26531,
11497,
1133,
5621,
27573,
309,
261,
10739,
6806,
13,
4766,
565,
1089,
1... |
OptLocalVariable lVar = (OptLocalVariable) vars.get(i); | OptLocalVariable lVar = (OptLocalVariable) vars.getVariable(i); | private void generatePrologue(Context cx, Node tree, boolean inFunction, int directParameterCount) { funObjLocal = reserveWordLocal(0); contextLocal = reserveWordLocal(1); variableObjectLocal = reserveWordLocal(2); thisObjLocal = reserveWordLocal(3); if (inFunction && !cx.hasCompileFunctionsWithDynamicScope() && directParameterCount == -1) { // Unless we're either using dynamic scope or we're in a // direct call, use the enclosing scope of the function as our // variable object. aload(funObjLocal); classFile.add(ByteCode.INVOKEINTERFACE, "org/mozilla/javascript/Scriptable", "getParentScope", "()", "Lorg/mozilla/javascript/Scriptable;"); astore(variableObjectLocal); } if (directParameterCount > 0) { for (int i = 0; i < (3 * directParameterCount); i++) reserveWordLocal(i + 4); // reserve 'args' } // reserve 'args[]' argsLocal = reserveWordLocal(directParameterCount <= 0 ? 4 : (3 * directParameterCount) + 4); // These locals are to be pre-allocated since they need function scope. // They are primarily used by the exception handling mechanism Integer localCount = (Integer)(tree.getProp(Node.LOCALCOUNT_PROP)); if (localCount != null) { itsLocalAllocationBase = (short)(argsLocal + 1); for (int i = 0; i < localCount.intValue(); i++) { reserveWordLocal(itsLocalAllocationBase + i); } } hasVarsInRegs = inFunction && !((OptFunctionNode)tree).requiresActivation(); if (hasVarsInRegs) { // No need to create activation. Pad arguments if need be. int parmCount = vars.getParameterCount(); if (inFunction && parmCount > 0 && directParameterCount < 0) { // Set up args array // check length of arguments, pad if need be aload(argsLocal); addByteCode(ByteCode.ARRAYLENGTH); push(parmCount); int label = acquireLabel(); addByteCode(ByteCode.IF_ICMPGE, label); aload(argsLocal); push(parmCount); addScriptRuntimeInvoke("padArguments", "([Ljava/lang/Object;I)", "[Ljava/lang/Object;"); astore(argsLocal); markLabel(label); } // REMIND - only need to initialize the vars that don't get a value // before the next call and are used in the function short firstUndefVar = -1; for (int i = 0; i < vars.size(); i++) { OptLocalVariable lVar = (OptLocalVariable) vars.get(i); if (lVar.isNumber()) { lVar.assignJRegister(getNewWordPairLocal()); push(0.0); dstore(lVar.getJRegister()); } else if (lVar.isParameter()) { if (directParameterCount < 0) { lVar.assignJRegister(getNewWordLocal()); aload(argsLocal); push(i); addByteCode(ByteCode.AALOAD); astore(lVar.getJRegister()); } } else { lVar.assignJRegister(getNewWordLocal()); if (firstUndefVar == -1) { pushUndefined(); firstUndefVar = lVar.getJRegister(); } else { aload(firstUndefVar); } astore(lVar.getJRegister()); } lVar.setStartPC(classFile.getCurrentCodeOffset()); } // Indicate that we should generate debug information for // the variable table. (If we're generating debug info at // all.) debugVars = vars; // Skip creating activation object. return; } if (directParameterCount > 0) { // We're going to create an activation object, so we // need to get an args array with all the arguments in it. aload(argsLocal); push(directParameterCount); addOptRuntimeInvoke("padStart", "([Ljava/lang/Object;I)", "[Ljava/lang/Object;"); astore(argsLocal); for (int i=0; i < directParameterCount; i++) { aload(argsLocal); push(i); // "3" is 1 for Object parm and 2 for double parm, and // "4" is to account for the context, etc. parms aload((short) (3*i+4)); addByteCode(ByteCode.AASTORE); } } String debugVariableName; if (inFunction) { aload(contextLocal); aload(variableObjectLocal); aload(funObjLocal); aload(thisObjLocal); aload(argsLocal); addScriptRuntimeInvoke("initVarObj", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/NativeFunction;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)", "Lorg/mozilla/javascript/Scriptable;"); debugVariableName = "activation"; } else { aload(contextLocal); aload(variableObjectLocal); aload(funObjLocal); aload(thisObjLocal); push(0); addScriptRuntimeInvoke("initScript", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/NativeFunction;" + "Lorg/mozilla/javascript/Scriptable;Z)", "Lorg/mozilla/javascript/Scriptable;"); debugVariableName = "global"; } astore(variableObjectLocal); Vector fns = (Vector) tree.getProp(Node.FUNCTION_PROP); if (inFunction && fns != null) { for (int i=0; i < fns.size(); i++) { FunctionNode fn = (FunctionNode) fns.elementAt(i); if (fn.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { visitFunction(fn, true); } } } if (cx.isGeneratingDebug()) { debugVars = new OptVariableTable(); debugVars.addLocal(debugVariableName); OptLocalVariable lv = (OptLocalVariable) debugVars.get(debugVariableName); lv.assignJRegister(variableObjectLocal); lv.setStartPC(classFile.getCurrentCodeOffset()); } if (!inFunction) { // OPT: use dataflow to prove that this assignment is dead scriptResultLocal = getNewWordLocal(); pushUndefined(); astore(scriptResultLocal); } if (inFunction && ((OptFunctionNode)tree).containsCalls(-1)) { if (((OptFunctionNode)tree).containsCalls(0)) { itsZeroArgArray = getNewWordLocal(); classFile.add(ByteCode.GETSTATIC, "org/mozilla/javascript/ScriptRuntime", "emptyArgs", "[Ljava/lang/Object;"); astore(itsZeroArgArray); } if (((OptFunctionNode)tree).containsCalls(1)) { itsOneArgArray = getNewWordLocal(); push(1); addByteCode(ByteCode.ANEWARRAY, "java/lang/Object"); astore(itsOneArgArray); } } } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/0470e048abb345f567d5fda1e9564715a9f4d5d7/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
626,
1330,
344,
12,
1042,
9494,
16,
2029,
2151,
16,
1250,
316,
2083,
16,
21394,
509,
2657,
1662,
1380,
13,
565,
288,
3639,
9831,
2675,
2042,
273,
20501,
3944,
2042,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
626,
1330,
344,
12,
1042,
9494,
16,
2029,
2151,
16,
1250,
316,
2083,
16,
21394,
509,
2657,
1662,
1380,
13,
565,
288,
3639,
9831,
2675,
2042,
273,
20501,
3944,
2042,
12,
... |
if (c2dm.getDrawMode() == c2dm.LASSO) | if (c2dm.getDrawMode() == Controller2DModel.LASSO) | public void mouseReleased(MouseEvent event) { isUndoableChange = false; logger.debug("MouseReleased Event Props: mode=", c2dm.getDrawModeString()); if (logger.isDebugEnabled()) { logger.debug(" trigger=" + event.isPopupTrigger(), ", Click count: " + event.getClickCount()); } if ((event.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { int[] screenCoords = {event.getX(), event.getY()}; int[] mouseCoords = getWorldCoordinates(screenCoords); int mouseX = mouseCoords[0]; int mouseY = mouseCoords[1]; if (c2dm.getDrawMode() == c2dm.SYMBOL) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { if (currentCommonElement.get(atomInRange) == null) { currentCommonElement.put(atomInRange, new Integer(1)); } int oldCommonElement = ((Integer) currentCommonElement.get(atomInRange)).intValue(); String symbol = (String) commonElements.elementAt(oldCommonElement); if (!(atomInRange.getSymbol().equals(symbol))) { // only change symbol if needed atomInRange.setSymbol(symbol); // configure the atom, so that the atomic number matches the symbol try { IsotopeFactory.getInstance().configure(atomInRange); } catch (Exception exception) { logger.error("Error while configuring atom"); logger.debug(exception); } // update atom AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } oldCommonElement++; if (oldCommonElement == commonElements.size()) { oldCommonElement = 0; } currentCommonElement.put(atomInRange, new Integer(oldCommonElement)); } } if (c2dm.getDrawMode() == c2dm.ELEMENT) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { String symbol = c2dm.getDrawElement(); if (!(atomInRange.getSymbol().equals(symbol))) { // only change symbol if needed atomInRange.setSymbol(symbol); // configure the atom, so that the atomic number matches the symbol try { IsotopeFactory.getInstance().configure(atomInRange); } catch (Exception exception) { logger.error("Error while configuring atom"); logger.debug(exception); } // update atom AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } } } if (c2dm.getDrawMode() == c2dm.INCCHARGE) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { atomInRange.setFormalCharge(atomInRange.getFormalCharge() + 1); // update atom AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom charge */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } } if (c2dm.getDrawMode() == c2dm.DECCHARGE) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { atomInRange.setFormalCharge(atomInRange.getFormalCharge() - 1); // update atom AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } } if (c2dm.getDrawMode() == c2dm.MAPATOMATOM) { logger.debug("Should make new mapping..."); if (wasDragged) { int endX = r2dm.getPointerVectorEnd().x; int endY = r2dm.getPointerVectorEnd().y; Atom mappedToAtom = getAtomInRange(endX, endY); if (mappedToAtom != null) { int startX = r2dm.getPointerVectorStart().x; int startY = r2dm.getPointerVectorStart().y; Atom mappedFromAtom = getAtomInRange(startX, startY); if (mappedFromAtom != null) { Mapping mapping = new Mapping(mappedFromAtom, mappedToAtom); logger.debug("Created mapping: ", mapping); logger.debug(" between ", mappedFromAtom); logger.debug(" and ", mappedToAtom); // ok, now figure out if they are in one reaction Reaction reaction1 = ChemModelManipulator.getRelevantReaction(chemModel, mappedFromAtom); Reaction reaction2 = ChemModelManipulator.getRelevantReaction(chemModel, mappedToAtom); if (reaction1 != null && reaction2 != null && reaction1 == reaction2) { logger.debug("Adding mapping to reaction: ", reaction1.getID()); reaction1.addMapping(mapping); } else { logger.warn("Reactions do not match, or one or both are reactions are null"); } } else { logger.debug("Dragging did not start in atom..."); } } else { logger.debug("Dragging did not end in atom..."); } } else { logger.debug("Not dragged in mapping mode"); } } if (c2dm.getDrawMode() == c2dm.DRAWBOND || c2dm.getDrawMode() == c2dm.DOWN_BOND || c2dm.getDrawMode() == c2dm.UP_BOND) { logger.debug("mouseReleased->drawbond"); Atom atomInRange; Atom newAtom1 = null; Atom newAtom2 = null; Bond newBond; int startX = r2dm.getPointerVectorStart().x; int startY = r2dm.getPointerVectorStart().y; Bond bondInRange = r2dm.getHighlightedBond(); //atomInRange = r2dm.getHighlightedAtom(); //Bond bondInRange = getBondInRange(mouseX, mouseY); /* * IMPORTANT: I don't use getHighlighteAtom() * here because of the special case of * only one atom on the screen. * In this case, this atom will not detected * if the mouse hasn't moved after it's creation */ atomInRange = getAtomInRange(mouseX, mouseY); if (bondInRange != null) { if (c2dm.getDrawMode() == c2dm.DRAWBOND){ // increase Bond order double order = bondInRange.getOrder(); if (order >= CDKConstants.BONDORDER_TRIPLE) { bondInRange.setOrder(CDKConstants.BONDORDER_SINGLE); } else { bondInRange.setOrder(order + 1.0); // this is tricky as it depends on the fact that the // constants are unidistant, i.e. {1.0, 2.0, 3.0}. } ; // update atoms Atom[] atoms = bondInRange.getAtoms(); AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(container, atoms); }else if(c2dm.getDrawMode() == c2dm.DOWN_BOND){ // toggle bond stereo double stereo = bondInRange.getStereo(); if (stereo == CDKConstants.STEREO_BOND_DOWN) { bondInRange.setStereo(CDKConstants.STEREO_BOND_DOWN_INV); } else if (stereo == CDKConstants.STEREO_BOND_DOWN_INV) { bondInRange.setStereo(CDKConstants.STEREO_BOND_NONE); } else { bondInRange.setStereo(CDKConstants.STEREO_BOND_DOWN); } }else{ // toggle bond stereo double stereo = bondInRange.getStereo(); if (stereo == CDKConstants.STEREO_BOND_UP) { bondInRange.setStereo(CDKConstants.STEREO_BOND_UP_INV); } else if (stereo == CDKConstants.STEREO_BOND_UP_INV) { bondInRange.setStereo(CDKConstants.STEREO_BOND_NONE); } else { bondInRange.setStereo(CDKConstants.STEREO_BOND_UP); } } /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else { if (atomInRange != null) { logger.debug("We had an atom in range"); newAtom1 = atomInRange; } else if (!wasDragged) { // create a new molecule logger.debug("We make a new molecule"); newAtom1 = new Atom(c2dm.getDrawElement(), new Point2d(startX, startY)); AtomContainer atomCon = ChemModelManipulator.createNewMolecule(chemModel); atomCon.addAtom(newAtom1); // update atoms updateAtom(atomCon, newAtom1); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } if (wasDragged) { if (dragMode == DRAG_DRAWING_PROPOSED_BOND) { int endX = r2dm.getPointerVectorEnd().x; int endY = r2dm.getPointerVectorEnd().y; atomInRange = getAtomInRange(endX, endY); AtomContainer atomCon = ChemModelManipulator.getAllInOneContainer(chemModel); if (atomInRange != null) { logger.debug("*** atom in range"); newAtom2 = atomInRange; logger.debug("atomCon.getAtomCount() " + atomCon.getAtomCount()); } else { logger.debug("*** new atom"); newAtom2 = new Atom(c2dm.getDrawElement(), new Point2d(endX, endY)); atomCon.addAtom(newAtom2); } newAtom1 = lastAtomInRange; if (newAtom1 == null) { newAtom1 = new Atom(c2dm.getDrawElement(), new Point2d(r2dm.getPointerVectorStart().x, r2dm.getPointerVectorStart().y)); } if (newAtom1 != newAtom2) { newBond = new Bond(newAtom1, newAtom2, 1); if(c2dm.getDrawMode() == c2dm.UP_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_UP); if(c2dm.getDrawMode() == c2dm.DOWN_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_DOWN); logger.debug(newAtom1 + " - " + newAtom2); atomCon.addBond(newBond); } try { SetOfMolecules setOfMolecules = ConnectivityChecker.partitionIntoMolecules(atomCon); chemModel.setSetOfMolecules(setOfMolecules); logger.debug("We have " + setOfMolecules.getAtomContainerCount() + " molecules on screen"); } catch (Exception exception) { logger.warn("Could not partition molecule: ", exception.getMessage()); logger.debug(exception); return; } // update atoms updateAtom(atomCon, newAtom2); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } } else if (atomInRange != null) { // add a new atom to the current atom in some random // direction AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, atomInRange); newAtom2 = new Atom(c2dm.getDrawElement(), atomInRange.getPoint2d()); // now create 2D coords for new atom double bondLength = r2dm.getBondLength(); Atom[] connectedAtoms = atomCon.getConnectedAtoms(atomInRange); logger.debug("connectedAtoms.length: " + connectedAtoms.length); AtomContainer placedAtoms = new AtomContainer(); //placedAtoms.addAtom(atomInRange); for (int i = 0; i < connectedAtoms.length; i++) { placedAtoms.addAtom(connectedAtoms[i]); } AtomContainer unplacedAtoms = new AtomContainer(); unplacedAtoms.addAtom(newAtom2); AtomPlacer atomPlacer = new AtomPlacer(); atomPlacer.setMolecule(new Molecule(atomCon)); Point2d center2D = GeometryTools.get2DCenter(placedAtoms); logger.debug("placedAtoms.getAtomCount(): " + placedAtoms.getAtomCount()); logger.debug("unplacedAtoms.getAtomCount(): " + unplacedAtoms.getAtomCount()); if (placedAtoms.getAtomCount() == 1) { Vector2d bondVector = atomPlacer.getNextBondVector(atomInRange, placedAtoms.getAtomAt(0), GeometryTools.get2DCenter(new Molecule(atomCon))); Point2d atomPoint = new Point2d(atomInRange.getPoint2d()); bondVector.normalize(); bondVector.scale(bondLength); atomPoint.add(bondVector); newAtom2.setPoint2d(atomPoint); } else { atomPlacer.distributePartners(atomInRange, placedAtoms, center2D, unplacedAtoms, bondLength); } // now add the new atom atomCon.addAtom(newAtom2); newBond=new Bond(atomInRange, newAtom2, 1.0); atomCon.addBond(newBond); if(c2dm.getDrawMode() == c2dm.UP_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_UP); if(c2dm.getDrawMode() == c2dm.DOWN_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_DOWN); // update atoms updateAtom(atomCon, atomInRange); updateAtom(atomCon, newAtom2); } } r2dm.fireChange(); fireChange(); centerAtom(newAtom1); centerAtom(newAtom2); } if (c2dm.getDrawMode() == c2dm.SELECT && wasDragged) { logger.info("User asks to selected atoms"); AtomContainer selectedPart = new AtomContainer(); r2dm.setSelectedPart(selectedPart); r2dm.setSelectedPart(getContainedAtoms(r2dm.getSelectRect())); r2dm.setSelectRect(null); logger.debug("selected stuff ", selectedPart); } if (c2dm.getDrawMode() == c2dm.ERASER) { Atom highlightedAtom = r2dm.getHighlightedAtom(); Bond highlightedBond = r2dm.getHighlightedBond(); if (highlightedAtom != null) { logger.info("User asks to delete an Atom"); AtomContainer container = ChemModelManipulator.getAllInOneContainer(chemModel); logger.debug("Atoms before delete: ", container.getAtomCount()); ChemModelManipulator.removeAtomAndConnectedElectronContainers(chemModel, highlightedAtom); container = ChemModelManipulator.getAllInOneContainer(chemModel); logger.debug("Atoms before delete: ", container.getAtomCount()); // update atoms Atom[] atoms = container.getConnectedAtoms(highlightedAtom); if (atoms.length > 0) { AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(atomCon, atoms); } } else if (highlightedBond != null) { logger.info("User asks to delete a Bond"); ChemModelManipulator.removeElectronContainer(chemModel, highlightedBond); // update atoms Atom[] atoms = highlightedBond.getAtoms(); AtomContainer container = ChemModelManipulator.getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(container, atoms); } else { logger.warn("Cannot deleted if nothing is highlighted"); return; } /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == c2dm.RING || c2dm.getDrawMode() == c2dm.BENZENERING) { Ring newRing = null; Point2d sharedAtomsCenter; Vector2d ringCenterVector; double bondLength; int pointerMarkX; int pointerMarkY; double ringRadius; double angle; double xDiff; double yDiff; double distance1 = 0; double distance2 = 0; Atom firstAtom; Atom secondAtom; Atom spiroAtom; Point2d conAtomsCenter = null; Point2d newPoint1; Point2d newPoint2; RingPlacer ringPlacer = new RingPlacer(); int ringSize = c2dm.getRingSize(); String symbol = c2dm.getDrawElement(); AtomContainer sharedAtoms = getHighlighted(); if (sharedAtoms.getAtomCount() == 0) { sharedAtoms = new AtomContainer(); newRing = new Ring(ringSize, symbol); if (c2dm.getDrawMode() == c2dm.BENZENERING) { // make newRing a benzene ring Bond[] bonds = newRing.getBonds(); bonds[0].setOrder(2.0); bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); makeRingAromatic(newRing); } bondLength = r2dm.getBondLength(); ringRadius = (bondLength / 2) / Math.sin(Math.PI / c2dm.getRingSize()); sharedAtomsCenter = new Point2d(mouseX, mouseY - ringRadius); firstAtom = newRing.getAtomAt(0); firstAtom.setPoint2d(sharedAtomsCenter); sharedAtoms.addAtom(firstAtom); ringCenterVector = new Vector2d(new Point2d(mouseX, mouseY)); ringCenterVector.sub(sharedAtomsCenter); ringPlacer.placeSpiroRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); AtomContainer atomCon = ChemModelManipulator.createNewMolecule(chemModel); atomCon.add(newRing); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else if (sharedAtoms.getAtomCount() == 1) { spiroAtom = sharedAtoms.getAtomAt(0); sharedAtomsCenter = GeometryTools.get2DCenter(sharedAtoms); newRing = createAttachRing(sharedAtoms, ringSize, symbol); if (c2dm.getDrawMode() == c2dm.BENZENERING) { // make newRing a benzene ring Bond[] bonds = newRing.getBonds(); bonds[0].setOrder(2.0); bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); makeRingAromatic(newRing); } bondLength = r2dm.getBondLength(); conAtomsCenter = getConnectedAtomsCenter(sharedAtoms); if (conAtomsCenter.equals(spiroAtom.getPoint2d())) { ringCenterVector = new Vector2d(0, 1); } else { ringCenterVector = new Vector2d(sharedAtomsCenter); ringCenterVector.sub(conAtomsCenter); } ringPlacer.placeSpiroRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); // removes the highlighed atom from the ring to add only the new placed // atoms to the AtomContainer. try { newRing.removeAtom(spiroAtom); } catch (Exception exc) { logger.error("Could not remove atom from ring"); logger.debug(exc); } AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, spiroAtom); atomCon.add(newRing); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } else if (sharedAtoms.getAtomCount() == 2) { sharedAtomsCenter = GeometryTools.get2DCenter(sharedAtoms); // calculate two points that are perpendicular to the highlighted bond // and have a certain distance from the bondcenter firstAtom = sharedAtoms.getAtomAt(0); secondAtom = sharedAtoms.getAtomAt(1); xDiff = secondAtom.getX2d() - firstAtom.getX2d(); yDiff = secondAtom.getY2d() - firstAtom.getY2d(); bondLength = Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)); angle = GeometryTools.getAngle(xDiff, yDiff); newPoint1 = new Point2d((Math.cos(angle + (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.x, (Math.sin(angle + (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.y); newPoint2 = new Point2d((Math.cos(angle - (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.x, (Math.sin(angle - (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.y); if (wasDragged) { // check which one of the two points is nearest to the endpoint of the pointer // vector that was dragged to make the ringCenterVector point into the right direction. pointerMarkX = r2dm.getPointerVectorEnd().x; pointerMarkY = r2dm.getPointerVectorEnd().y; distance1 = -1 * (Math.sqrt(Math.pow(newPoint1.x - pointerMarkX, 2) + Math.pow(newPoint1.y - pointerMarkY, 2))); distance2 = -1 * (Math.sqrt(Math.pow(newPoint2.x - pointerMarkX, 2) + Math.pow(newPoint2.y - pointerMarkY, 2))); r2dm.setPointerVectorStart(null); r2dm.setPointerVectorEnd(null); } else { // check which one of the two points is nearest to the center of the // connected atoms to make the ringCenterVector point into the right direction. conAtomsCenter = getConnectedAtomsCenter(sharedAtoms); distance1 = Math.sqrt(Math.pow(newPoint1.x - conAtomsCenter.x, 2) + Math.pow(newPoint1.y - conAtomsCenter.y, 2)); distance2 = Math.sqrt(Math.pow(newPoint2.x - conAtomsCenter.x, 2) + Math.pow(newPoint2.y - conAtomsCenter.y, 2)); } ringCenterVector = new Vector2d(sharedAtomsCenter); // no ring is attached if the two ditances are equal if (distance1 == distance2) { logger.warn("don't know where to draw the new Ring"); } else { if (distance1 < distance2) { ringCenterVector.sub(newPoint1); } else if (distance2 < distance1) { ringCenterVector.sub(newPoint2); } AtomContainer atomCon = ChemModelManipulator.getRelevantAtomContainer(chemModel, firstAtom); // construct a new Ring that contains the highlighted bond an its two atoms newRing = createAttachRing(sharedAtoms, ringSize, symbol); if (c2dm.getDrawMode() == c2dm.BENZENERING) { // make newRing a benzene ring Bond existingBond = atomCon.getBond(firstAtom, secondAtom); Bond[] bonds = newRing.getBonds(); if (existingBond.getOrder() == 1.0) { if (existingBond.getFlag(CDKConstants.ISAROMATIC)) { bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); } else { bonds[1].setOrder(2.0); bonds[3].setOrder(2.0); bonds[5].setOrder(2.0); } } else { bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); } makeRingAromatic(newRing); } // place the new atoms of the new ring to the right position ringPlacer.placeFusedRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); // removes the highlighed bond and its atoms from the ring to add only // the new placed atoms to the AtomContainer. try { newRing.remove(sharedAtoms); } catch (Exception exc) { logger.error("Could not remove atom from ring"); logger.debug(exc); } atomCon.add(newRing); } /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } for (int i = 0; i < newRing.getAtomCount(); i++) { centerAtom(newRing.getAtomAt(i)); } r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == c2dm.LASSO) { // first deselect all atoms r2dm.setSelectedPart(new AtomContainer()); // now select new atoms if (wasDragged) { Vector lassoPoints = r2dm.getLassoPoints(); r2dm.addLassoPoint(new Point((Point) lassoPoints.elementAt(0))); int number = lassoPoints.size(); logger.debug("# lasso points: ", number); int[] screenLassoCoords = new int[number * 2]; Point currentPoint; for (int i = 0; i < number; i++) { currentPoint = (Point) lassoPoints.elementAt(i); screenLassoCoords[i * 2] = currentPoint.x; screenLassoCoords[i * 2 + 1] = currentPoint.y; logger.debug("ScreenLasso.x = ", screenLassoCoords[i * 2]); logger.debug("ScreenLasso.y = ", screenLassoCoords[i * 2 + 1]); } /* * Convert points to world coordinates as they are * in screen coordinates in the vector */ int[] worldCoords = getWorldCoordinates(screenLassoCoords); logger.debug("Returned coords: ", worldCoords.length); logger.debug(" # points: ", number); int[] xPoints = new int[number]; int[] yPoints = new int[number]; for (int i = 0; i < number; i++) { xPoints[i] = worldCoords[i * 2]; yPoints[i] = worldCoords[i * 2 + 1]; logger.debug("WorldCoords.x = ", worldCoords[i * 2]); logger.debug("WorldCoords.y = ", worldCoords[i * 2 + 1]); logger.debug("Polygon.x = ", xPoints[i]); logger.debug("Polygon.y = ", yPoints[i]); } Polygon polygon = new Polygon(xPoints, yPoints, number); r2dm.setSelectedPart(getContainedAtoms(polygon)); r2dm.getLassoPoints().removeAllElements(); r2dm.fireChange(); } else { // one atom clicked or one bond clicked ChemObject chemObj = getChemObjectInRange(mouseX, mouseY); AtomContainer container = new AtomContainer(); if (chemObj instanceof Atom) { container.addAtom((Atom) chemObj); logger.debug("selected one atom in lasso mode"); r2dm.setSelectedPart(container); } else if (chemObj instanceof Bond) { Bond bond = (Bond) chemObj; container.addBond(bond); logger.debug("selected one bond in lasso mode"); Atom[] atoms = bond.getAtoms(); for (int i = 0; i < atoms.length; i++) { container.addAtom(atoms[i]); } r2dm.setSelectedPart(container); } } fireChange(); } if (c2dm.getDrawMode() == c2dm.MOVE) { if (draggingSelected == false) { // then it was dragging nearest Bond or Atom r2dm.setSelectedPart(new AtomContainer()); } } if (wasDragged) { prevDragCoordX = 0; prevDragCoordY = 0; wasDragged = false; } dragMode = DRAG_UNSET; r2dm.setPointerVectorStart(null); r2dm.setPointerVectorEnd(null); } if (shiftX != 0 || shiftY != 0) { for (int i = 0; i < chemModel.getSetOfMolecules().getMoleculeCount(); i++) { Molecule mol = chemModel.getSetOfMolecules().getMolecules()[i]; for (int k = 0; k < mol.getAtomCount(); k++) { mol.getAtomAt(k).setX2d(mol.getAtomAt(k).getX2d() - shiftX); mol.getAtomAt(k).setY2d(mol.getAtomAt(k).getY2d() - shiftY); } } r2dm.fireChange(); fireChange(); } shiftX = 0; shiftY = 0; } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/b26a7336f19d2669cc404aabf392e4fc14a8d7ad/Controller2D.java/buggy/src/org/openscience/cdk/controller/Controller2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
26363,
12,
9186,
1133,
871,
13,
202,
95,
202,
202,
291,
31224,
429,
3043,
273,
629,
31,
202,
202,
4901,
18,
4148,
2932,
9186,
26363,
2587,
1186,
1121,
30,
1965,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7644,
26363,
12,
9186,
1133,
871,
13,
202,
95,
202,
202,
291,
31224,
429,
3043,
273,
629,
31,
202,
202,
4901,
18,
4148,
2932,
9186,
26363,
2587,
1186,
1121,
30,
1965,
154... |
if (sorter == null) | if (sorter == null) { | private int insertionPosition(Item[] items, ViewerSorter sorter, int lastInsertion, Object element, TreePath parentPath) { int size = items.length; if (sorter == null) return size; int min = lastInsertion, max = size - 1; while (min <= max) { int mid = (min + max) / 2; Object data = items[mid].getData(); int compare = internalCompare(sorter, parentPath, data, element); if (compare == 0) { return mid;//Return if we already match } if (compare < 0) min = mid + 1; else max = mid - 1; } return min; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/391f2606b4ea2c1fb5052d938ca90877ee7631f6/AbstractTreeViewer.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
12626,
2555,
12,
1180,
8526,
1516,
16,
225,
4441,
264,
24952,
19867,
16,
509,
1142,
29739,
16,
1033,
930,
16,
4902,
743,
17743,
13,
288,
9506,
202,
474,
963,
273,
1516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
12626,
2555,
12,
1180,
8526,
1516,
16,
225,
4441,
264,
24952,
19867,
16,
509,
1142,
29739,
16,
1033,
930,
16,
4902,
743,
17743,
13,
288,
9506,
202,
474,
963,
273,
1516,
... |
assertTrue("the next line no should be 3", st.lineno() == 3); | assertEquals("the next line no should be 3", 3, st.lineno()); | public void test_lineno() { setTest("d\n 8\n"); try { assertTrue("the lineno should be 1", st.lineno() == 1); st.nextToken(); st.nextToken(); assertTrue("the lineno should be 2", st.lineno() == 2); st.nextToken(); assertTrue("the next line no should be 3", st.lineno() == 3); } catch (IOException e) { fail( "IOException occured while trying to read an input stream - constructor"); } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/181e940cd92dfff67639d98e991206d375a987ea/StreamTokenizerTest.java/clean/modules/luni/src/test/java/tests/api/java/io/StreamTokenizerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
17782,
1435,
288,
202,
202,
542,
4709,
2932,
72,
64,
82,
1725,
64,
82,
8863,
202,
202,
698,
288,
1082,
202,
11231,
5510,
2932,
5787,
7586,
1410,
506,
404,
3113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
17782,
1435,
288,
202,
202,
542,
4709,
2932,
72,
64,
82,
1725,
64,
82,
8863,
202,
202,
698,
288,
1082,
202,
11231,
5510,
2932,
5787,
7586,
1410,
506,
404,
3113,... |
slashIndex = idString.lastIndexOf('/'); if (slashIndex != -1) { sequence = idString.substring(slashIndex + 1); handle = idString.substring(0, slashIndex); } | protected void doDSGet(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { Bitstream bitstream = null; // Get the ID from the URL String idString = request.getPathInfo(); String handle = ""; String sequence = ""; if (idString != null) { // Remove leading slash if (idString.startsWith("/")) { idString = idString.substring(1); } // Remove last slash and filename after it int slashIndex = idString.lastIndexOf('/'); if (slashIndex != -1) { idString = idString.substring(0, slashIndex); } // Get bitstream sequence ID slashIndex = idString.lastIndexOf('/'); if (slashIndex != -1) { sequence = idString.substring(slashIndex + 1); handle = idString.substring(0, slashIndex); } // Find the corresponding bitstream try { Item item = (Item) HandleManager.resolveToObject(context, handle); if (item == null) { log.info(LogManager.getHeader(context, "invalid_id", "path=" + handle)); JSPManager .showInvalidIDError(request, response, handle, -1); return; } int sid = Integer.parseInt(sequence); boolean found = false; Bundle[] bundles = item.getBundles(); for (int i = 0; (i < bundles.length) && !found; i++) { Bitstream[] bitstreams = bundles[i].getBitstreams(); for (int k = 0; (k < bitstreams.length) && !found; k++) { if (sid == bitstreams[k].getSequenceID()) { bitstream = bitstreams[k]; found = true; } } } } catch (NumberFormatException nfe) { // Invalid ID - this will be dealt with below } } // Did we get a bitstream? if (bitstream != null) { log.info(LogManager.getHeader(context, "view_bitstream", "bitstream_id=" + bitstream.getID())); // Set the response MIME type response.setContentType(bitstream.getFormat().getMIMEType()); // Response length response.setHeader("Content-Length", String.valueOf(bitstream .getSize())); // Pipe the bits InputStream is = bitstream.retrieve(); Utils.bufferedCopy(is, response.getOutputStream()); is.close(); response.getOutputStream().flush(); } else { // No bitstream - we got an invalid ID log.info(LogManager.getHeader(context, "view_bitstream", "invalid_bitstream_id=" + idString)); JSPManager.showInvalidIDError(request, response, idString, Constants.BITSTREAM); } } | 47214 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47214/257dfe454961dd081224cf1e4f1878b5d2cb8cf3/BitstreamServlet.java/buggy/dspace/src/org/dspace/app/webui/servlet/BitstreamServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
3948,
967,
12,
1042,
819,
16,
9984,
590,
16,
5411,
12446,
766,
13,
1216,
16517,
16,
1860,
16,
5411,
6483,
16,
23859,
503,
565,
288,
3639,
6539,
3256,
28640,
273,
446,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
3948,
967,
12,
1042,
819,
16,
9984,
590,
16,
5411,
12446,
766,
13,
1216,
16517,
16,
1860,
16,
5411,
6483,
16,
23859,
503,
565,
288,
3639,
6539,
3256,
28640,
273,
446,
31... | |
protected MessageExtraWrapper(Message mess) { m = mess; | protected MessageExtraWrapper(Message mess) { m=mess; | protected MessageExtraWrapper(Message mess) { m = mess; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/0cc63cb388a13f01532486f9d178811914e6d71b/MessageExtraWrapper.java/clean/grendel/sources/grendel/storage/MessageExtraWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
2350,
7800,
3611,
12,
1079,
12755,
13,
288,
565,
312,
273,
12755,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
2350,
7800,
3611,
12,
1079,
12755,
13,
288,
565,
312,
273,
12755,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
String messageBody = this.getAcceptMessageBody(theCase, login, password); | String messageBody = this.getAcceptMessageBody(theCase, login, password); | protected void createLoginAndSendMessage(AccountApplication theCase, boolean createUserMessage, boolean createPasswordMessage, boolean sendEmail) throws RemoteException, CreateException, LoginCreateException { boolean sendLetter = false; LoginTable lt; String login; User citizen; citizen = theCase.getOwner(); lt = getUserBusiness().generateUserLogin(citizen); login = lt.getUserLogin(); try { String password = lt.getUnencryptedUserPassword(); String messageBody = this.getAcceptMessageBody(theCase, login, password); String messageSubject = this.getAcceptMessageSubject(); if (createUserMessage){ this.getMessageBusiness().createUserMessage(citizen, messageSubject, messageBody,sendLetter); } if(createPasswordMessage){ this.getMessageBusiness().createPasswordMessage(citizen,login,password); } createUserMessage = sendEmail; } catch (PasswordNotKnown e) { //e.printStackTrace(); throw new IDOCreateException(e); } catch (RemoteException e) { e.printStackTrace(); } } | 58552 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58552/9217fef2c26a00ef57f3ccd9efbdf0e2b25ea0c5/WSCitizenAccountBusinessBean.java/clean/src/java/is/idega/idegaweb/egov/citizen/business/WSCitizenAccountBusinessBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
5358,
1876,
3826,
1079,
12,
3032,
3208,
326,
2449,
16,
1250,
22992,
1079,
16,
1250,
752,
3913,
1079,
16,
1250,
1366,
4134,
13,
1216,
18361,
16,
1788,
503,
16,
11744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5358,
1876,
3826,
1079,
12,
3032,
3208,
326,
2449,
16,
1250,
22992,
1079,
16,
1250,
752,
3913,
1079,
16,
1250,
1366,
4134,
13,
1216,
18361,
16,
1788,
503,
16,
11744,
... |
if (ruby.rubyScope.getLocalVars() == null) { throw new RuntimeException("BUG: unexpected block argument"); } if (isBlockGiven()) { result = getRuby().getNil(); ruby.rubyScope.setLocalVars(node.nd_cnt(), result); return result; } else { | public RubyObject eval(RubyObject self, NODE n) { NODE node = n; RubyBoolean cond = null; RubyObject[] args = null; RubyObject result = null; // int state; // RubyOriginalMethods rom = getRuby().getOriginalMethods(); while (true) { if (node == null) { return getRuby().getNil(); } switch (node.nd_type()) { case NODE_BLOCK: while (node.nd_next() != null) { eval(self, node.nd_head()); node = node.nd_next(); } node = node.nd_head(); break; case NODE_POSTEXE: // rb_f_END(); node.nd_set_type(NODE_NIL); /* exec just once */ return getRuby().getNil(); /* begin .. end without clauses */ case NODE_BEGIN: node = node.nd_body(); break; /* nodes for speed-up(default match) */ case NODE_MATCH: //return rom.rb_reg_match2(node.nd_head().nd_lit()); return getRuby().getNil(); /* nodes for speed-up(literal match) */ case NODE_MATCH2: //return rom.rb_reg_match(eval(node.nd_recv()), eval(node.nd_value())); return getRuby().getNil(); /* nodes for speed-up(literal match) */ case NODE_MATCH3: //VALUE r = eval(node.nd_recv()); //VALUE l = eval(node.nd_value()); //if (r instanceof RubyString) { // return rom.rb_reg_match(l, r); //} else { // return rom.rb_funcall(r, match, 1, l); //} return getRuby().getNil(); /* node for speed-up(top-level loop for -n/-p) */ case NODE_OPT_N:/* PUSH_TAG(PROT_NONE); switch (state = EXEC_TAG()) { case 0: opt_n_next: while (!NIL_P(rb_gets())) { opt_n_redo: rb_eval(self, node->nd_body); } break; case TAG_REDO: state = 0; goto opt_n_redo; case TAG_NEXT: state = 0; goto opt_n_next; case TAG_BREAK: state = 0; default: break; } POP_TAG(); if (state) JUMP_TAG(state); RETURN(Qnil);*/ return getRuby().getNil(); case NODE_SELF: return self; case NODE_NIL: return getRuby().getNil(); case NODE_TRUE: return getRuby().getTrue(); case NODE_FALSE: return getRuby().getFalse(); case NODE_IF: // ruby_sourceline = node.nd_line(); cond = (RubyBoolean)eval(self, node.nd_cond()); if (cond.isTrue()) { node = node.nd_body(); } else { node = node.nd_else(); } break; case NODE_WHEN: while (node != null) { NODE tag; if (node.nd_type() != NODE_WHEN) { break; } tag = node.nd_head(); while (tag != null) {/* if (trace_func) { call_trace_func("line", tag->nd_file, nd_line(tag), self, ruby_frame->last_func, ruby_frame->last_class); }*/ // ruby_sourcefile = tag.nd_file; // ruby_sourceline = tag.nd_line(); if (tag.nd_head().nd_type() == NODE_WHEN) { RubyObject obj = eval(self, tag.nd_head().nd_head()); if (!(obj instanceof RubyArray)) { obj = RubyArray.m_newArray(getRuby(), obj); } for (int i = 0; i < ((RubyArray)obj).length(); i++) { if (((RubyBoolean)((RubyArray)obj).entry(i)).isTrue()) { node = node.nd_body(); break; } } tag = tag.nd_next(); continue; } if (((RubyBoolean)eval(self, tag.nd_head())).isTrue()) { node = node.nd_body(); break; } tag = tag.nd_next(); } node = node.nd_next(); } return getRuby().getNil(); case NODE_CASE: RubyObject obj = eval(self, node.nd_head()); node = node.nd_body(); while (node != null) { NODE tag; if (node.nd_type() != NODE_WHEN) { break; } tag = node.nd_head(); while (tag != null) {/* if (trace_func) { call_trace_func("line", tag->nd_file, nd_line(tag), self, ruby_frame->last_func, ruby_frame->last_class); } ruby_sourcefile = tag->nd_file; ruby_sourceline = nd_line(tag);*/ if (tag.nd_head().nd_type() == NODE_WHEN) { RubyObject obj2 = eval(self, tag.nd_head().nd_head()); if (!(obj2 instanceof RubyArray)) { obj2 = RubyArray.m_newArray(getRuby(), obj2); } for (int i = 0; i < ((RubyArray)obj).length(); i++) { RubyBoolean eqq = (RubyBoolean)((RubyArray)obj2).entry(i).funcall(getRuby().intern("==="), obj); if (eqq.isTrue()) { node = node.nd_body(); break; } } tag = tag.nd_next(); continue; } if (((RubyBoolean)eval(self, tag.nd_head()).funcall(getRuby().intern("==="), obj)).isTrue()) { node = node.nd_body(); break; } tag = tag.nd_next(); } node = node.nd_next(); } return getRuby().getNil(); case NODE_WHILE: while (eval(self, node.nd_cond()).isTrue()) { while (true) { try { eval(self, node.nd_body()); break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { break; } catch (BreakException bExcptn) { return getRuby().getNil(); } } } return getRuby().getNil(); case NODE_UNTIL: while (eval(self, node.nd_cond()).isFalse()) { while (true) { try { eval(self, node.nd_body()); break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { break; } catch (BreakException bExcptn) { return getRuby().getNil(); } } } return getRuby().getNil(); case NODE_BLOCK_PASS: //return block_pass(node); return null; case NODE_ITER: case NODE_FOR:/* { iter_retry: PUSH_TAG(PROT_FUNC); PUSH_BLOCK(node->nd_var, node->nd_body); state = EXEC_TAG(); if (state == 0) { PUSH_ITER(ITER_PRE); if (nd_type(node) == NODE_ITER) { result = rb_eval(self, node->nd_iter); } else { VALUE recv; char *file = ruby_sourcefile; int line = ruby_sourceline; _block.flags &= ~BLOCK_D_SCOPE; BEGIN_CALLARGS; recv = rb_eval(self, node->nd_iter); END_CALLARGS; ruby_sourcefile = file; ruby_sourceline = line; result = rb_call(CLASS_OF(recv),recv,each,0,0,0); } POP_ITER(); } else if (_block.tag->dst == state) { state &= TAG_MASK; if (state == TAG_RETURN) { result = prot_tag->retval; } } POP_BLOCK(); POP_TAG(); switch (state) { case 0: break; case TAG_RETRY: goto iter_retry; case TAG_BREAK: result = Qnil; break; case TAG_RETURN: return_value(result); */ /* fall through *//* default: JUMP_TAG(state); } }*/ break; case NODE_BREAK: throw new BreakException(); case NODE_NEXT: throw new NextException(); case NODE_REDO: throw new RedoException(); case NODE_RETRY: throw new RetryException(); case NODE_RESTARGS: result = eval(self, node.nd_head()); if (!(result instanceof RubyArray)) { result = obj = RubyArray.m_newArray(getRuby(), result); } return result; case NODE_YIELD:/* if (node.nd_stts) { result = rb_eval(self, node->nd_stts); if (nd_type(node->nd_stts) == NODE_RESTARGS && RARRAY(result)->len == 1) { result = RARRAY(result)->ptr[0]; } } else { result = Qnil; } result = rb_yield_0(result, 0, 0, 0); break;*/ case NODE_RESCUE:/* retry_entry: { volatile VALUE e_info = ruby_errinfo; PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { result = rb_eval(self, node->nd_head); } POP_TAG(); if (state == TAG_RAISE) { NODE * volatile resq = node->nd_resq; ruby_sourceline = nd_line(node); while (resq) { if (handle_rescue(self, resq)) { state = 0; PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { result = rb_eval(self, resq->nd_body); } POP_TAG(); if (state == TAG_RETRY) { state = 0; ruby_errinfo = Qnil; goto retry_entry; } if (state != TAG_RAISE) { ruby_errinfo = e_info; } break; } resq = resq->nd_head; /* next rescue */ /** } * } * else if (node->nd_else) { /* else clause given *//* if (!state) { /* no exception raised *//* result = rb_eval(self, node->nd_else); } } if (state) JUMP_TAG(state); } break;*/ case NODE_ENSURE:/* PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { result = eval(node.nd_head()); } POP_TAG(); if (node.nd_ensr()) { VALUE retval = prot_tag->retval; /* save retval *//* VALUE errinfo = ruby_errinfo; rb_eval(self, node->nd_ensr); return_value(retval); ruby_errinfo = errinfo; } if (state) JUMP_TAG(state); break;*/ case NODE_AND: cond = (RubyBoolean)eval(self, node.nd_1st()); if (cond.isFalse()) { return cond; } node = node.nd_2nd(); break; case NODE_OR: cond = (RubyBoolean)eval(self, node.nd_1st()); if (cond.isTrue()) { return cond; } node = node.nd_2nd(); break; case NODE_NOT: return RubyBoolean.m_newBoolean(getRuby(), eval(self, node.nd_1st()).isFalse()); case NODE_DOT2: case NODE_DOT3: result = RubyRange.m_newRange(getRuby(), eval(self, node.nd_beg()), eval(self, node.nd_end()), node.nd_type() == NODE_DOT3); if (node.nd_state() != 0) { return result; } if (node.nd_beg().nd_type() == NODE_LIT && (node.nd_beg().nd_lit() instanceof RubyFixnum) && node.nd_end().nd_type() == NODE_LIT && (node.nd_end().nd_lit() instanceof RubyFixnum)) { node.nd_set_type(NODE_LIT); node.nd_lit(result); } else { node.nd_state(1L); } return result; case NODE_FLIP2: /* like AWK */ //RubyBoolean result;/* if (ruby_scope->local_vars == 0) { rb_bug("unexpected local variable"); } if (!RTEST(ruby_scope->local_vars[node->nd_cnt])) { if (RTEST(rb_eval(self, node->nd_beg))) { ruby_scope->local_vars[node->nd_cnt] = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue; result = Qtrue; } else { result = Qfalse; } } else { if (RTEST(rb_eval(self, node->nd_end))) { ruby_scope->local_vars[node->nd_cnt] = Qfalse; } result = Qtrue; }*/ return result; case NODE_FLIP3: /* like SED */ //RubyBoolean result;/* if (ruby_scope->local_vars == 0) { rb_bug("unexpected local variable"); } if (!RTEST(ruby_scope->local_vars[node->nd_cnt])) { result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse; ruby_scope->local_vars[node->nd_cnt] = result; } else { if (RTEST(rb_eval(self, node->nd_end))) { ruby_scope->local_vars[node->nd_cnt] = Qfalse; } result = Qtrue; }*/ return result; case NODE_RETURN: if (node.nd_stts() != null) { result = eval(self, node.nd_stts()); } else { result = ruby.getNil(); } throw new ReturnException(result); case NODE_ARGSCAT: return ((RubyArray)eval(self, node.nd_head())).m_concat(eval(self, node.nd_body())); case NODE_ARGSPUSH: return ((RubyArray)eval(self, node.nd_head()).m_dup()).push(eval(self, node.nd_body())); case NODE_CALL: // TMP_PROTECT; BLOCK tmpBlock = BEGIN_CALLARGS(); RubyObject recv = eval(self, node.nd_recv()); args = setupArgs(self, node.nd_args()); END_CALLARGS(tmpBlock); return recv.getRubyClass().call(recv, (RubyId)node.nd_mid(), args, 0); case NODE_FCALL: // TMP_PROTECT; tmpBlock = BEGIN_CALLARGS(); args = setupArgs(self, node.nd_args()); END_CALLARGS(tmpBlock); return self.getRubyClass().call(self, (RubyId)node.nd_mid(), args, 1); case NODE_VCALL: return self.getRubyClass().call(self, (RubyId)node.nd_mid(), null, 2); case NODE_SUPER: case NODE_ZSUPER: // TMP_PROTECT; if (rubyFrame.getLastClass() == null) { throw new RubyNameException("superclass method '" + rubyFrame.getLastFunc().toName() + "' disabled"); } if (node.nd_type() == NODE_ZSUPER) { List argsList = rubyFrame.getArgs(); args = (RubyObject[])argsList.toArray(new RubyObject[argsList.size()]); } else { tmpBlock = BEGIN_CALLARGS(); args = setupArgs(self, node.nd_args()); END_CALLARGS(tmpBlock); } PUSH_ITER(ruby_iter.iter != 0 ? ITER_PRE : ITER_NOT); result = rubyFrame.getLastClass().getSuperClass().call(rubyFrame.getSelf(), rubyFrame.getLastFunc(), args, 3); POP_ITER(); return result; case NODE_SCOPE: /*NODE saved_cref = null; FRAME frame = ruby_frame; frame.tmp = ruby_frame; ruby_frame = frame; PUSH_SCOPE(); PUSH_TAG(PROT_NONE); if (node->nd_rval) { saved_cref = ruby_cref; ruby_cref = (NODE*)node->nd_rval; ruby_frame->cbase = node->nd_rval; }*/ if (node.nd_tbl() != null) { List tmp = Collections.nCopies(node.nd_tbl()[0].intValue() + 1, ruby.getNil()); ShiftableList vars = new ShiftableList(new ArrayList(tmp)); vars.set(0, (VALUE)node); vars.shift(1); getRuby().rubyScope.setLocalVars(vars); getRuby().rubyScope.setLocalTbl(node.nd_tbl()); } else { getRuby().rubyScope.setLocalVars(null); getRuby().rubyScope.setLocalTbl(null); }/* if ((state = EXEC_TAG()) == 0) { result = rb_eval(self, node->nd_next); } POP_TAG(); POP_SCOPE(); ruby_frame = frame.tmp; if (saved_cref) ruby_cref = saved_cref; if (state) JUMP_TAG(state); } break; */ case NODE_OP_ASGN1: // TMP_PROTECT; recv = eval(self, node.nd_recv()); NODE rval = node.nd_args().nd_head(); args = setupArgs(self, node.nd_args().nd_next()); ArrayList argsList = new ArrayList(Arrays.asList(args)); argsList.remove(args.length - 1); RubyBoolean val = (RubyBoolean)recv.funcall(getRuby().intern("[]"), (RubyObject[])argsList.toArray(new RubyObject[argsList.size()])); switch (node.nd_mid().intValue()) { case 0: /* OR */ if (val.isTrue()) { return val; } val = (RubyBoolean)eval(self, rval); break; case 1: /* AND */ if (val.isFalse()) { return val; } val = (RubyBoolean)eval(self, rval); break; default: val = (RubyBoolean)val.funcall((RubyId)node.nd_mid(), eval(self, rval)); } args[args.length - 1] = val; return recv.funcall(getRuby().intern("[]="), args); case NODE_OP_ASGN2: ID id = node.nd_next().nd_vid(); recv = eval(self, node.nd_recv()); val = (RubyBoolean)recv.funcall((RubyId)id, (RubyObject[])null); switch (node.nd_next().nd_mid().intValue()) { case 0: /* OR */ if (val.isTrue()) { return val; } val = (RubyBoolean)eval(self, node.nd_value()); break; case 1: /* AND */ if (val.isFalse()) { return val; } val = (RubyBoolean)eval(self, node.nd_value()); break; default: val = (RubyBoolean)val.funcall((RubyId)node.nd_mid(), eval(self, node.nd_value())); } // rom.rb_funcall2(recv, node.nd_next().nd_aid(), 1, &val); return val; case NODE_OP_ASGN_AND: cond = (RubyBoolean)eval(self, node.nd_head()); if (cond.isFalse()) { return cond; } node = node.nd_value(); break; case NODE_OP_ASGN_OR: cond = (RubyBoolean)eval(self, node.nd_head()); if ((node.nd_aid() != null && !self.isIvarDefined((RubyId)node.nd_aid())) || cond.isFalse()) { node = node.nd_value(); break; } return cond; case NODE_MASGN: return massign(self, node, eval(self, node.nd_value()), false); case NODE_LASGN: // if (ruby.ruby_scope.local_vars == null) { // rb_bug("unexpected local variable assignment"); // } result = eval(self, node.nd_value()); getRuby().rubyScope.setLocalVars(node.nd_cnt(), result); return result; case NODE_DASGN: result = eval(self, node.nd_value()); RubyVarmap.assign(ruby, (RubyId)node.nd_vid(), result); return result; case NODE_DASGN_CURR: result = eval(self, node.nd_value()); RubyVarmap.assignCurrent(ruby, (RubyId)node.nd_vid(), result); return result; case NODE_GASGN: result = eval(self, node.nd_value()); ((RubyGlobalEntry)node.nd_entry()).set(result); return result; case NODE_IASGN: result = eval(self, node.nd_value()); self.setIvar((RubyId)node.nd_vid(), result); return result; case NODE_CDECL: if (ruby_class == null) { throw new RubyTypeException("no class/module to define constant"); } result = eval(self, node.nd_value()); ruby_class.setConstant((RubyId)node.nd_vid(), result); return result; case NODE_CVDECL: if (ruby_cbase == null) { throw new RubyTypeException("no class/module to define class variable"); } result = eval(self, node.nd_value()); if (ruby_cbase.isSingleton()) { ruby_cbase.getIv("__attached__").getCvarSingleton().declareCvar((RubyId)node.nd_vid(), result); return result; } ruby_cbase.declareCvar((RubyId)node.nd_vid(), result); return result; case NODE_CVASGN: result = eval(self, node.nd_value()); self.getCvarSingleton().setCvar((RubyId)node.nd_vid(), result); return result; case NODE_LVAR: //if (getRuby().ruby_scope.local_vars == null) { // rb_bug("unexpected local variable"); // } return (RubyObject)getRuby().rubyScope.getLocalVars(node.nd_cnt()); case NODE_DVAR: return getDynamicVars().getRef((RubyId)node.nd_vid()); case NODE_GVAR: return ((RubyGlobalEntry)node.nd_entry()).get(); case NODE_IVAR: return self.getIvar((RubyId)node.nd_vid()); case NODE_CONST: return getConstant((NODE)rubyFrame.getCbase(), (RubyId)node.nd_vid(), self); case NODE_CVAR: /* normal method */ if (ruby_cbase == null) { return self.getRubyClass().getCvar((RubyId)node.nd_vid()); } if (!ruby_cbase.isSingleton()) { return ruby_cbase.getCvar((RubyId)node.nd_vid()); } return ruby_cbase.getIv("__attached__").getCvarSingleton().getCvar((RubyId)node.nd_vid()); case NODE_CVAR2: /* singleton method */ return self.getCvarSingleton().getCvar((RubyId)node.nd_vid()); case NODE_BLOCK_ARG: // if (ruby_scope.local_vars() == null) { // rom.rb_bug("unexpected block argument"); // } // if (rom.rb_block_given_p()) { // result = rom.rb_f_lambda(); // ruby_scope.local_vars()[node.nd_cnt()] = result; // } else { return getRuby().getNil(); // } case NODE_COLON2: RubyModule rubyClass = (RubyModule)eval(self, node.nd_head());/* switch (TYPE(klass)) { case T_CLASS: case T_MODULE: break; default: return rom.rb_funcall(klass, node.nd_mid(), 0, 0); }*/ return rubyClass.getConstant((RubyId)node.nd_mid()); case NODE_COLON3: return getRuby().getObjectClass().getConstant((RubyId)node.nd_mid()); case NODE_NTH_REF: // return rom.rb_reg_nth_match(node.nd_nth(), MATCH_DATA); return null; case NODE_BACK_REF: /*switch ((char)node.nd_nth()) { case '&': return rom.rb_reg_last_match(MATCH_DATA); case '`': return rom.rb_reg_match_pre(MATCH_DATA); case '\'': return rom.rb_reg_match_post(MATCH_DATA); case '+': return rom.rb_reg_match_last(MATCH_DATA); default: rom.rb_bug("unexpected back-ref"); }*/ case NODE_HASH:/* RubyHash hash = RubyHash.m_newHash(); RubyObject key, val; NODE list = node.nd_head(); while (list != null) { key = eval(self, list.nd_head()); list = list.nd_next(); if (list == null) { rom.rb_bug("odd number list for Hash"); } val = eval(self, list.nd_head()); list = list.nd_next(); hash.aset(key, val); } return hash;*/ case NODE_ZARRAY: /* zero length list */ return RubyArray.m_newArray(getRuby()); case NODE_ARRAY: RubyArray ary = (RubyArray)RubyArray.m_newArray(getRuby(), node.nd_alen()); for (int i = 0; node != null ; node = node.nd_next()) { ary.getArray().set(i++, eval(self, node.nd_head())); } return ary; case NODE_STR: return ((RubyObject)node.nd_lit()).m_to_s(); case NODE_DSTR: case NODE_DXSTR: case NODE_DREGX: case NODE_DREGX_ONCE:/* NODE list = node.nd_next(); RubyString str = RubyString.m_newString(getRuby(), (RubyObject)node.nd_lit()); RubyString str2; while (list != null) { if (list.nd_head() != null) { switch (list.nd_head().nd_type()) { case NODE_STR: str2 = (RubyString)list.nd_head().nd_lit(); break; case NODE_EVSTR: result = ruby_errinfo; ruby_errinfo = Qnil; ruby_sourceline = nd_line(node); ruby_in_eval++; list.nd_head(compile(list.nd_head().nd_lit(), ruby_sourcefile,ruby_sourceline)); ruby_eval_tree = 0; ruby_in_eval--; if (ruby_nerrs > 0) { compile_error("string expansion"); } if (!NIL_P(result)) ruby_errinfo = result; /* fall through *//* default: str2 = (RubyString)rom.rb_obj_as_string(eval(list.nd_head())); break; } str.append(str2); str.infectObject(str2); } list = list.nd_next(); } switch (node.nd_type()) { case NODE_DREGX: return rom.rb_reg_new(str.getString(), str.getString().length(), node.nd_cflag()); case NODE_DREGX_ONCE: /* regexp expand once *//* VALUE result = rom.rb_reg_new(str.getString(), str.getString().length(), node.nd_cflag()); node.nd_set_type(NODE_LIT); node.nd_lit(result); return result; case NODE_DXSTR: return rom.rb_funcall(this, '`', 1, str); default: return str; }*/ return null; case NODE_XSTR: return self.funcall(getRuby().intern("`"), (RubyObject)node.nd_lit()); case NODE_LIT: return (RubyObject)node.nd_lit(); case NODE_ATTRSET:/* if (ruby_frame.argc() != 1) { throw new RubyArgumentException("wrong # of arguments(" + ruby_frame.argc() + "for 1)"); } return self.setIvar((RubyId)node.nd_vid(), ruby_frame.argv()[0]); */ return null; case NODE_DEFN: if (node.nd_defn() != null) { int noex; if (ruby_class == null) { throw new RubyTypeException("no class to add method"); } //if (ruby_class == getRuby().getObjectClass() && node.nd_mid() == init) { // rom.rb_warn("redefining Object#initialize may cause infinite loop"); //} //if (node.nd_mid() == __id__ || node.nd_mid() == __send__) { // rom.rb_warn("redefining `%s' may cause serious problem", ((RubyId)node.nd_mid()).toName()); //} // ruby_class.setFrozen(true); NODE body = ruby_class.searchMethod((RubyId)node.nd_mid()); RubyObject origin = ruby_class.getMethodOrigin((RubyId)node.nd_mid()); if (body != null){ // if (ruby_verbose.isTrue() && ruby_class == origin && body.nd_cnt() == 0) { // rom.rb_warning("discarding old %s", ((RubyId)node.nd_mid()).toName()); // } // if (node.nd_noex() != 0) { /* toplevel */ /* should upgrade to rb_warn() if no super was called inside? */ // rom.rb_warning("overriding global function `%s'", ((RubyId)node.nd_mid()).toName()); // } } if (isScope(SCOPE_PRIVATE) || node.nd_mid().equals(ruby.intern("initialize"))) { noex = NOEX_PRIVATE; } else if (isScope(SCOPE_PROTECTED)) { noex = NOEX_PROTECTED; } else if (ruby_class == getRuby().getObjectClass()) { noex = node.nd_noex(); } else { noex = NOEX_PUBLIC; } if (body != null && origin == ruby_class && (body.nd_noex() & NOEX_UNDEF) != 0) { noex |= NOEX_UNDEF; } NODE defn = node.nd_defn().copyNodeScope(ruby_cref); ruby_class.addMethod((RubyId)node.nd_mid(), defn, noex); // rb_clear_cache_by_id(node.nd_mid()); if (scope_vmode == SCOPE_MODFUNC) { ruby_class.getSingletonClass().addMethod((RubyId)node.nd_mid(), defn, NOEX_PUBLIC); ruby_class.funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } if (ruby_class.isSingleton()) { ruby_class.getIv("__attached__").funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } else { // ruby_class.funcall(getRuby().intern("method_added"), ((RubyId)node.nd_mid()).toSymbol()); } } return getRuby().getNil(); case NODE_DEFS: if (node.nd_defn() != null) { recv = eval(self, node.nd_recv()); if (getRuby().getSecurityLevel() >= 4 && !recv.isTaint()) { throw new RubySecurityException("Insecure; can't define singleton method"); } /*if (FIXNUM_P(recv) || SYMBOL_P(recv)) { rb_raise(rb_eTypeError, "can't define singleton method \"%s\" for %s", rb_id2name(node.nd_mid()), rb_class2name(CLASS_OF(recv))); }*/ // not needed in jruby if (recv.isFrozen()) { throw new RubyFrozenException("object"); } rubyClass = recv.getSingletonClass(); NODE body = (NODE)rubyClass.getMethods().get((RubyId)node.nd_mid()); if (body != null) { if (getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException("redefining method prohibited"); } /*if (RTEST(ruby_verbose)) { rb_warning("redefine %s", rb_id2name(node.nd_mid())); }*/ } NODE defn = node.nd_defn().copyNodeScope(ruby_cref); defn.nd_rval(ruby_cref); rubyClass.addMethod((RubyId)node.nd_mid(), defn, NOEX_PUBLIC | (body != null ? body.nd_noex() & NOEX_UNDEF : 0)); // rb_clear_cache_by_id(node.nd_mid()); recv.funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } return getRuby().getNil(); case NODE_UNDEF: if (ruby_class == null) { throw new RubyTypeException("no class to undef method"); } ruby_class.undef((RubyId)node.nd_mid()); return getRuby().getNil(); case NODE_ALIAS: if (ruby_class == null) { throw new RubyTypeException("no class to make alias"); } ruby_class.aliasMethod((RubyId)node.nd_new(), (RubyId)node.nd_old()); ruby_class.funcall(getRuby().intern("method_added"), ((RubyId)node.nd_mid()).toSymbol()); return getRuby().getNil(); case NODE_VALIAS: //rb_alias_variable(node.nd_new(), node.nd_old()); return getRuby().getNil(); case NODE_CLASS: RubyModule superClass; if (ruby_class == null) { throw new RubyTypeException("no outer class/module"); } if (node.nd_super() != null) { superClass = getSuperClass(self, node.nd_super()); } else { superClass = null; } rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (ruby_class.isConstantDefined((RubyId)node.nd_cname())) { rubyClass = (RubyClass)ruby_class.getConstant((RubyId)node.nd_cname()); } if (rubyClass != null) { if (!rubyClass.isClass()) { throw new RubyTypeException(((RubyId)node.nd_cname()).toName() + " is not a class"); } if (superClass != null) { RubyModule tmp = rubyClass.getSuperClass(); if (tmp.isSingleton()) { tmp = tmp.getSuperClass(); } while (tmp.isIncluded()) { tmp = tmp.getSuperClass(); } if (tmp != superClass) { superClass = tmp; //goto override_class; } } if (getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException("extending class prohibited"); } // rb_clear_cache(); } else { //override_class: if (superClass == null) { superClass = getRuby().getObjectClass(); } rubyClass = getRuby().defineClassId((RubyId)node.nd_cname(), (RubyClass)superClass); ruby_class.setConstant((RubyId)node.nd_cname(), rubyClass); rubyClass.setClassPath((RubyClass)ruby_class, ((RubyId)node.nd_cname()).toName()); } if (ruby_wrapper != null) { rubyClass.getSingletonClass().includeModule(ruby_wrapper); rubyClass.includeModule(ruby_wrapper); } return setupModule(rubyClass, node.nd_body()); case NODE_MODULE: if (ruby_class == null) { throw new RubyTypeException("no outer class/module"); } RubyModule module = null; if ((ruby_class == getRuby().getObjectClass()) && getRuby().isAutoloadDefined((RubyId)node.nd_cname())) { // getRuby().rb_autoload_load(node.nd_cname()); } if (ruby_class.isConstantDefined((RubyId)node.nd_cname())) { module = (RubyModule)ruby_class.getConstant((RubyId)node.nd_cname()); } if (module != null) { if (!(module instanceof RubyModule)) { throw new RubyTypeException(((RubyId)node.nd_cname()).toName() + " is not a module"); } if (getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException("extending module prohibited"); } } else { module = getRuby().defineModuleId((RubyId)node.nd_cname()); ruby_class.setConstant((RubyId)node.nd_cname(), module); module.setClassPath(ruby_class, ((RubyId)node.nd_cname()).toName()); } if (ruby_wrapper != null) { module.getSingletonClass().includeModule(ruby_wrapper); module.includeModule(ruby_wrapper); } return setupModule(module, node.nd_body()); case NODE_SCLASS: rubyClass = (RubyClass)eval(self, node.nd_recv()); if (rubyClass.isSpecialConst()) { throw new RubyTypeException("no virtual class for " + rubyClass.getRubyClass().toName()); } if (getRuby().getSecurityLevel() >= 4 && !rubyClass.isTaint()) { throw new RubySecurityException("Insecure: can't extend object"); } if (rubyClass.getRubyClass().isSingleton()) { // rb_clear_cache(); } rubyClass = rubyClass.getSingletonClass(); if (ruby_wrapper != null) { rubyClass.getSingletonClass().includeModule(ruby_wrapper); rubyClass.includeModule(ruby_wrapper); } return setupModule(rubyClass, node.nd_body()); case NODE_DEFINED: // String buf; // String desc = is_defined(self, node.nd_head(), buf); // // if (desc) { // result = rb_str_new2(desc); // } else { // result = Qnil; // } case NODE_NEWLINE: // ruby_sourcefile = node.nd_file; // ruby_sourceline = node.nd_nth(); // if (trace_func) { // call_trace_func("line", ruby_sourcefile, ruby_sourceline, self, // ruby_frame.last_func(), // ruby_frame.last_class()); // } node = node.nd_next(); break; default: // rom.rb_bug("unknown node type %d", nd_type(node)); } } } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/f1e2c45b99e6f9a2be3f15f5fd7ad91c7e086a2c/RubyInterpreter.java/buggy/org/jruby/interpreter/RubyInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
5302,
12,
54,
10340,
921,
365,
16,
11922,
290,
13,
288,
430,
261,
27768,
18,
27768,
3876,
18,
588,
2042,
5555,
1435,
422,
446,
13,
288,
604,
394,
3235,
2932,
4827,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
5302,
12,
54,
10340,
921,
365,
16,
11922,
290,
13,
288,
430,
261,
27768,
18,
27768,
3876,
18,
588,
2042,
5555,
1435,
422,
446,
13,
288,
604,
394,
3235,
2932,
4827,
30,... | |
getParser().parse(source, createDocumentHandler(this)); | SAXParserWrapper parser = new SAXParserWrapper(); parser.parse(source, createDocumentHandler(this)); | public void load(InputStream source, boolean outOfSync) { try { fLoaded = true; getParser().parse(source, createDocumentHandler(this)); } catch (SAXException e) { fLoaded = false; } catch (IOException e) { } } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/11373448adb006eee481c1123433ad3ff363f678/XMLEditingModel.java/buggy/ui/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/XMLEditingModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1262,
12,
4348,
1084,
16,
1250,
596,
951,
4047,
13,
288,
202,
202,
698,
288,
1082,
202,
74,
8835,
273,
638,
31,
1082,
202,
588,
2678,
7675,
2670,
12,
3168,
16,
27569,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
12,
4348,
1084,
16,
1250,
596,
951,
4047,
13,
288,
202,
202,
698,
288,
1082,
202,
74,
8835,
273,
638,
31,
1082,
202,
588,
2678,
7675,
2670,
12,
3168,
16,
27569,
1... |
public boolean nullsAreSortedHigh() throws SQLException { // XXX Need to check for Sybase return false; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/0a7ebc6de64e4f3e83cd11c83fd69cd327106d66/JtdsDatabaseMetaData.java/buggy/src/main/net/sourceforge/jtds/jdbc/JtdsDatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6494,
2011,
87,
4704,
11739,
8573,
1435,
15069,
23116,
95,
759,
15639,
14112,
869,
1893,
1884,
10876,
9157,
264,
851,
5743,
31,
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,
0,
0,
0,
0,
0,
0,
0,
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,
1071,
6494,
2011,
87,
4704,
11739,
8573,
1435,
15069,
23116,
95,
759,
15639,
14112,
869,
1893,
1884,
10876,
9157,
264,
851,
5743,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | ||
assertEquals( LineStyle.SOLID, 0 ); assertEquals( LineStyle.DASHED, 1 ); assertEquals( LineStyle.DOTTED, 2 ); assertEquals( LineStyle.DASH_DOTTED, 3 ); | assertEquals( LineStyle.SOLID, LineStyle.SOLID_LITERAL.getValue() ); assertEquals( LineStyle.DASHED, LineStyle.DASHED_LITERAL.getValue() ); assertEquals( LineStyle.DOTTED, LineStyle.DOTTED_LITERAL.getValue() ); assertEquals( LineStyle.DASH_DOTTED, LineStyle.DASH_DOTTED_LITERAL.getValue() ); | public void testConstant() { assertEquals( LineStyle.SOLID, 0 ); assertEquals( LineStyle.DASHED, 1 ); assertEquals( LineStyle.DOTTED, 2 ); assertEquals( LineStyle.DASH_DOTTED, 3 ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e757044daa53d502ecf969354d3f5ec94aa76fd1/LineStyleTest.java/clean/chart/org.eclipse.birt.chart.tests/src/org/eclipse/birt/chart/tests/engine/model/attribute/LineStyleTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
6902,
1435,
225,
202,
95,
9506,
202,
11231,
8867,
12,
5377,
2885,
18,
19815,
734,
16,
374,
11272,
202,
202,
11231,
8867,
12,
5377,
2885,
18,
9793,
2664,
2056,
16,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
6902,
1435,
225,
202,
95,
9506,
202,
11231,
8867,
12,
5377,
2885,
18,
19815,
734,
16,
374,
11272,
202,
202,
11231,
8867,
12,
5377,
2885,
18,
9793,
2664,
2056,
16,
4... |
public Object getMessageID() { String[] list = null; | public Object getMessageID() { String[] list=null; | public Object getMessageID() { String[] list = null; try { list = m.getHeader("Message-ID"); } catch (MessagingException e) { } if (list == null || list.length < 1) return null; return list[0]; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/0cc63cb388a13f01532486f9d178811914e6d71b/MessageExtraWrapper.java/buggy/grendel/sources/grendel/storage/MessageExtraWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
2381,
734,
1435,
288,
565,
514,
8526,
666,
273,
446,
31,
565,
775,
288,
1377,
666,
273,
312,
18,
588,
1864,
2932,
1079,
17,
734,
8863,
565,
289,
1044,
261,
23389,
503,
425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
2381,
734,
1435,
288,
565,
514,
8526,
666,
273,
446,
31,
565,
775,
288,
1377,
666,
273,
312,
18,
588,
1864,
2932,
1079,
17,
734,
8863,
565,
289,
1044,
261,
23389,
503,
425,
... |
this.cursor = cursor; | this.cursor = cursor; | public void setCursorName(String cursor) throws SQLException { this.cursor = cursor; } | 52628 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52628/839b9bc0117946afd62ee385a4c8a36c01b3053b/Connection.java/buggy/src/interfaces/jdbc/org/postgresql/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6688,
461,
12,
780,
3347,
13,
1216,
6483,
565,
288,
202,
2211,
18,
9216,
273,
3347,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6688,
461,
12,
780,
3347,
13,
1216,
6483,
565,
288,
202,
2211,
18,
9216,
273,
3347,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
} | } | public void changedUpdate(DocumentEvent e) { } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/TablePanel.java/buggy/src_new/org/argouml/ui/TablePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3550,
1891,
12,
2519,
1133,
425,
13,
288,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3550,
1891,
12,
2519,
1133,
425,
13,
288,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
public void visitName(Name x) { | public void visitName(/*@ non_null */ Name x) { | public void visitName(Name x) { visitASTNode(x); } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/95ace042c64a5f2e296b44bf47b1d9b53b361217/LShiftVisitor.java/buggy/src/escjava/trunk/ESCTools/Javafe/java/javafe/ast/LShiftVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3757,
461,
12,
20308,
36,
1661,
67,
2011,
1195,
1770,
619,
13,
288,
565,
3757,
9053,
907,
12,
92,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3757,
461,
12,
20308,
36,
1661,
67,
2011,
1195,
1770,
619,
13,
288,
565,
3757,
9053,
907,
12,
92,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
JPanel displayPanel = new JPanel(); | JPanel displayPanel = new JPanel(); | public void createFrame() { JPanel displayPanel = new JPanel(); JButton closeButton = new JButton("Close"); JButton saveToFile = new JButton("save"); buttonPanel.add(closeButton); buttonPanel.add(saveToFile); displayPanel.setLayout(new BorderLayout()); displayPanel.add(mainPanel, BorderLayout.CENTER); displayPanel.add(buttonPanel, BorderLayout.SOUTH); java.awt.Dimension dimension = new java.awt.Dimension(800, 400); displayPanel.setPreferredSize(dimension); displayPanel.setMinimumSize(dimension); closeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { displayFrame.dispose(); } }); saveToFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ex) { JFileChooser fileChooser = new JFileChooser(); int rtnVal = fileChooser.showSaveDialog(null); if(rtnVal == JFileChooser.APPROVE_OPTION) { try { FileWriter fw = new FileWriter(fileChooser.getSelectedFile().getAbsolutePath()); BufferedWriter bw = new BufferedWriter(fw); String str = getSystemInformation(); bw.write(str, 0, str.length()); str = getStackTrace(exception); bw.write(str, 0, str.length()); // fw.close(); bw.close(); fw.close(); } catch(Exception e) {} } } }); displayFrame.getContentPane().add(displayPanel); displayFrame.setSize(dimension); displayFrame.pack(); displayFrame.show(); } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/c0bb520283a2c4cf358115b1da1e4cc8a0d39527/ExceptionHandlerGUI.java/clean/src/edu/sc/seis/fissuresUtil/exceptionHandlerGUI/ExceptionHandlerGUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
3219,
1435,
288,
202,
202,
46,
5537,
2562,
5537,
273,
394,
24048,
5621,
202,
46,
3616,
1746,
3616,
273,
394,
28804,
2932,
4605,
8863,
202,
46,
3616,
1923,
15450,
273,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
3219,
1435,
288,
202,
202,
46,
5537,
2562,
5537,
273,
394,
24048,
5621,
202,
46,
3616,
1746,
3616,
273,
394,
28804,
2932,
4605,
8863,
202,
46,
3616,
1923,
15450,
273,
394,... |
optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword }); | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { //String ks = uri.toString(); String ks = uri.getPath(); HTTPRequest httprequest = new HTTPRequest(uri); if (ks.equals("/")) { if (httprequest.isParameterSet("key")) { MultiValueTable headers = new MultiValueTable(); String k = httprequest.getParam("key"); FreenetURI newURI; try { newURI = new FreenetURI(k); } catch (MalformedURLException e) { sendErrorPage(ctx, 404, "Not found", "Invalid key"); return; } headers.put("Location", "/"+newURI); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; } RedirectException re = new RedirectException(); try { String querystring = uri.getQuery(); if (querystring == null) { re.newuri = welcome; } else { // TODP possibly a proper URLEncode method querystring = querystring.replace(' ', '+'); re.newuri = new URI("/welcome/?"+querystring); } } catch (URISyntaxException e) { // HUH!?! } throw re; }else if(ks.equals("/favicon.ico")){ byte[] buf = new byte[1024]; int len; InputStream strm = getClass().getResourceAsStream("staticfiles/favicon.ico"); if (strm == null) { this.sendErrorPage(ctx, 404, "Path not found", "The specified path does not exist."); return; } ctx.sendReplyHeaders(200, "OK", null, "image/x-icon", strm.available()); while ( (len = strm.read(buf)) > 0) { ctx.writeData(buf, 0, len); } return; } if(ks.startsWith("/")) ks = ks.substring(1); long maxSize = httprequest.getLongParam("max-size", MAX_LENGTH); FreenetURI key; try { key = new FreenetURI(ks); } catch (MalformedURLException e) { HTMLNode pageNode = ctx.getPageMaker().getPageNode("Invalid key"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode errorInfobox = contentNode.addChild("div", "class", "infobox infobox-error"); errorInfobox.addChild("div", "class", "infobox-header", "Invalid key"); HTMLNode errorContent = errorInfobox.addChild("div", "class", "infobox-content"); errorContent.addChild("#", "Expected a freenet key, but got "); errorContent.addChild("code", ks); errorContent.addChild("br"); errorContent.addChild(ctx.getPageMaker().createBackLink(ctx)); errorContent.addChild("br"); errorContent.addChild("a", new String[] { "href", "title" }, new String[] { "/", "Node homepage" }, "Homepage"); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 400, "text/html", "Invalid key", pageBuffer.toString()); return; } String requestedMimeType = httprequest.getParam("type", null); String override = (requestedMimeType == null) ? "" : "?type="+URLEncoder.encode(requestedMimeType); try { if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "FProxy fetching "+key+" ("+maxSize+ ')'); FetchResult result = fetch(key, maxSize); // Now, is it safe? Bucket data = result.asBucket(); String mimeType = result.getMimeType(); String referer = sanitizeReferer(ctx); handleDownload(ctx, data, ctx.getBucketFactory(), mimeType, requestedMimeType, httprequest.getParam("force", null), httprequest.isParameterSet("forcedownload"), "/", key, maxSize != MAX_LENGTH ? "&max-size="+maxSize : "", referer); } catch (FetchException e) { String msg = e.getMessage(); String extra = ""; if(e.mode == FetchException.NOT_ENOUGH_PATH_COMPONENTS) { this.writePermanentRedirect(ctx, "Not enough meta-strings", '/' + key.toString(false) + '/' + override); } else if(e.newURI != null) { this.writePermanentRedirect(ctx, msg, '/' +e.newURI.toString() + override); } else if(e.mode == FetchException.TOO_BIG) { HTMLNode pageNode = ctx.getPageMaker().getPageNode("File information"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-information"); infobox.addChild("div", "class", "infobox-header", "Large file"); HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content"); HTMLNode fileInformationList = infoboxContent.addChild("ul"); HTMLNode option = fileInformationList.addChild("li"); option.addChild("#", "Filename: "); option.addChild("a", "href", '/' + key.toString(false), getFilename(e, key, e.getExpectedMimeType())); boolean finalized = e.finalizedSize(); if(e.expectedSize > 0) { if (finalized) { fileInformationList.addChild("li", "Size: " + SizeUtil.formatSize(e.expectedSize)); } else { fileInformationList.addChild("li", "Size: " + SizeUtil.formatSize(e.expectedSize) + " (may change)"); } } else { fileInformationList.addChild("li", "Size: unknown"); } String mime = e.getExpectedMimeType(); if(mime != null) { if (finalized) { fileInformationList.addChild("li", "MIME type: " + mime); } else { fileInformationList.addChild("li", "Expected MIME type: " + mime); } } else { fileInformationList.addChild("li", "MIME type: unknown"); } infobox = contentNode.addChild("div", "class", "infobox infobox-information"); infobox.addChild("div", "class", "infobox-header", "Explanation"); infoboxContent = infobox.addChild("div", "class", "infobox-content"); infoboxContent.addChild("#", "The Freenet key you requested refers to a large file. Files of this size cannot generally be sent directly to your browser since they take too long for your Freenet node to retrieve. The following options are available:"); HTMLNode optionList = infoboxContent.addChild("ul"); option = optionList.addChild("li"); HTMLNode optionForm = option.addChild("form", new String[] { "action", "method" }, new String[] {'/' + key.toString(false), "get" }); optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "max-size", String.valueOf(e.expectedSize == -1 ? Long.MAX_VALUE : e.expectedSize*2) }); optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "fetch", "Fetch anyway and display file in browser" }); option = optionList.addChild("li"); optionForm = option.addChild("form", new String[] { "action", "method" }, new String[] { "/queue/", "post" }); optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "key", key.toString(false) }); optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "return-type", "disk" }); optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "persistence", "forever" }); optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword }); if (mime != null) { optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "type", mime }); } optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "download", "Download in background and store in downloads directory" }); optionList.addChild("li").addChild("a", new String[] { "href", "title" }, new String[] { "/", "FProxy home page" }, "Abort and return to the FProxy home page"); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); writeReply(ctx, 200, "text/html", "OK", pageBuffer.toString()); } else { if(e.errorCodes != null) extra = "<pre>"+e.errorCodes.toVerboseString()+"</pre>"; HTMLNode pageNode = ctx.getPageMaker().getPageNode(FetchException.getShortMessage(e.mode)); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-error"); infobox.addChild("div", "class", "infobox-header", FetchException.getShortMessage(e.mode)); HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content"); infoboxContent.addChild("#", "Error: " + msg + extra); infoboxContent.addChild("br"); infoboxContent.addChild(ctx.getPageMaker().createBackLink(ctx)); infoboxContent.addChild("br"); infoboxContent.addChild("a", new String[] { "href", "title" }, new String[] { "/", "Node homepage" }, "Homepage"); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 500 /* close enough - FIXME probably should depend on status code */, "text/html", FetchException.getShortMessage(e.mode), pageBuffer.toString()); } } catch (SocketException e) { // Probably irrelevant if(e.getMessage().equals("Broken pipe")) { if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "Caught "+e+" while handling GET", e); } else { Logger.normal(this, "Caught "+e); } throw e; } catch (Throwable t) { Logger.error(this, "Caught "+t, t); String msg = "<html><head><title>Internal Error</title></head><body><h1>Internal Error: please report</h1><pre>"; StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); pw.flush(); msg = msg + HTMLEncoder.encode(sw.toString()) + "</pre></body></html>"; this.writeReply(ctx, 500, "text/html", "Internal Error", msg); } } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/7b992ac7b46f4eaaf97e9e0e1b7e5c18e1c89deb/FProxyToadlet.java/clean/src/freenet/clients/http/FProxyToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1875,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
759,
780,
1165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1875,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
759,
780,
1165... | |
decls = tu.getDeclarations(name_AP2.resolveBinding()); | decls = tu.getDeclarationsInAST(name_AP2.resolveBinding()); | public void testCompositeTypes() throws Exception { StringBuffer buffer = new StringBuffer(); buffer.append("struct A {} a1; \n"); //$NON-NLS-1$ buffer.append("typedef struct A * AP; \n"); //$NON-NLS-1$ buffer.append("struct A * const a2; \n"); //$NON-NLS-1$ buffer.append("AP a3; \n"); //$NON-NLS-1$ IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C); IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu .getDeclarations()[0]; IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl .getDeclSpecifier(); ICompositeType A = (ICompositeType) compSpec.getName().resolveBinding(); IASTName name_a1 = decl.getDeclarators()[0].getName(); IVariable a1 = (IVariable) decl.getDeclarators()[0].getName() .resolveBinding(); decl = (IASTSimpleDeclaration) tu.getDeclarations()[1]; IASTName name_A2 = ((IASTElaboratedTypeSpecifier) decl .getDeclSpecifier()).getName(); IASTName name_AP = decl.getDeclarators()[0].getName(); ITypedef AP = (ITypedef) decl.getDeclarators()[0].getName() .resolveBinding(); decl = (IASTSimpleDeclaration) tu.getDeclarations()[2]; IASTName name_A3 = ((IASTElaboratedTypeSpecifier) decl .getDeclSpecifier()).getName(); IVariable a2 = (IVariable) decl.getDeclarators()[0].getName() .resolveBinding(); IASTName name_a2 = decl.getDeclarators()[0].getName(); decl = (IASTSimpleDeclaration) tu.getDeclarations()[3]; IVariable a3 = (IVariable) decl.getDeclarators()[0].getName() .resolveBinding(); IASTName name_a3 = decl.getDeclarators()[0].getName(); IASTName name_AP2 = ((IASTNamedTypeSpecifier) decl.getDeclSpecifier()) .getName(); IType t_a1 = a1.getType(); assertSame(t_a1, A); IType t_a2 = a2.getType(); assertTrue(t_a2 instanceof IPointerType); assertTrue(((IPointerType) t_a2).isConst()); assertSame(((IPointerType) t_a2).getType(), A); IType t_a3 = a3.getType(); assertSame(t_a3, AP); IType t_AP = AP.getType(); assertTrue(t_AP instanceof IPointerType); assertSame(((IPointerType) t_AP).getType(), A); // test tu.getDeclarations(IBinding) IASTName[] decls = tu.getDeclarations(compSpec.getName() .resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], compSpec.getName()); decls = tu.getDeclarations(name_a1.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_a1); decls = tu.getDeclarations(name_A2.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], compSpec.getName()); decls = tu.getDeclarations(name_AP.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_AP); decls = tu.getDeclarations(name_A3.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], compSpec.getName()); decls = tu.getDeclarations(name_a2.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_a2); decls = tu.getDeclarations(name_AP2.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_AP); decls = tu.getDeclarations(name_a3.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_a3); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/75cbff035e927043ff1116bbd1e33e89ab93b9cb/AST2Tests.java/clean/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
9400,
2016,
1435,
1216,
1185,
288,
3639,
6674,
1613,
273,
394,
6674,
5621,
3639,
1613,
18,
6923,
2932,
1697,
432,
2618,
279,
21,
31,
2868,
521,
82,
8863,
4329,
3993,
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,
9400,
2016,
1435,
1216,
1185,
288,
3639,
6674,
1613,
273,
394,
6674,
5621,
3639,
1613,
18,
6923,
2932,
1697,
432,
2618,
279,
21,
31,
2868,
521,
82,
8863,
4329,
3993,
17,
... |
public boolean isSet(org.quickfix.field.OrderID field) | public boolean isSet(quickfix.field.OrderID field) | public boolean isSet(org.quickfix.field.OrderID field) { return isSetField(field); } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/ExecutionReport.java/buggy/src/java/src/quickfix/fix42/ExecutionReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
2448,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
2448,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
GenericValue issue = issueManager.getIssue(issueKey); if (issue == null || !permissionManager.hasPermission(Permissions.BROWSE, issue, user)) throw new Exception("This issue does not exist or you don't have permission to view it."); return issue; | try { GenericValue issue = issueManager.getIssue(issueKey); if (issue == null || !permissionManager.hasPermission(Permissions.BROWSE, issue, user)) throw new RemotePermissionException("This issue does not exist or you don't have permission to view it."); return issue; } catch (GenericEntityException e) { throw new RemoteException("Error retrieving issue: " + issueKey, e); } | private GenericValue retrieveIssue(String issueKey, User user) throws Exception { GenericValue issue = issueManager.getIssue(issueKey); if (issue == null || !permissionManager.hasPermission(Permissions.BROWSE, issue, user)) throw new Exception("This issue does not exist or you don't have permission to view it."); return issue; } | 21772 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/21772/132d9627f1f8497f4da3caa15423dd40959882ff/IssueServiceImpl.java/clean/src/java/com/atlassian/jira/rpc/soap/IssueServiceImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
7928,
620,
4614,
12956,
12,
780,
5672,
653,
16,
2177,
729,
13,
5411,
1216,
1185,
565,
288,
3639,
7928,
620,
5672,
273,
5672,
1318,
18,
588,
12956,
12,
13882,
653,
1769,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7928,
620,
4614,
12956,
12,
780,
5672,
653,
16,
2177,
729,
13,
5411,
1216,
1185,
565,
288,
3639,
7928,
620,
5672,
273,
5672,
1318,
18,
588,
12956,
12,
13882,
653,
1769,
3639,
309,
... |
if(Trace.trace) Trace.warn("NAKACK.rebroadcastMsgs()", "rebroadcasting " + final_v.size() + " messages"); | if(Trace.trace) Trace.warn("NAKACK.rebroadcastMsgs()", "rebroadcasting " + final_v.size() + " messages"); | void rebroadcastMsgs(Vector v) { Vector final_v=new Vector(); Message m1, m2; NakAckHeader h1, h2; if(v == null) return; // weed out duplicates /** @todo Check!!!!! */ for(int i=0; i < v.size(); i++) { boolean present = false; m1=(Message)v.elementAt(i); if(m1 == null) { // +++ remove Trace.error("NAKACK.rebroadcastMsgs()", "message is null"); continue; } h1=(NakAckHeader)m1.getHeader(getName()); for(int j=0; j < final_v.size(); j++) { m2=(Message)final_v.elementAt(j); h2=(NakAckHeader)m2.getHeader(getName()); if(h1.seqno == h2.seqno && m1.getSrc().equals(m2.getSrc())) { present = true; } } if (!present) final_v.addElement(m1); } if(Trace.trace) Trace.warn("NAKACK.rebroadcastMsgs()", "rebroadcasting " + final_v.size() + " messages"); /* Now re-broadcast messages using original NakAckHeader (same seqnos, same sender !) */ for(int i=0; i < final_v.size(); i++) { m1=(Message)final_v.elementAt(i); naker.resend(m1); } // Wait until all members have acked reception of outstanding msgs. This will empty our // retransmission table (AckMcastSenderWindow) naker.waitUntilAllAcksReceived(rebroadcast_timeout); passUp(new Event(Event.REBROADCAST_MSGS_OK)); } | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/75359f4186603c5a949e15ffab51fb811f04ed8e/NAKACK.java/clean/src/org/jgroups/protocols/NAKACK.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
918,
283,
19805,
17949,
12,
5018,
331,
13,
288,
202,
565,
5589,
3639,
727,
67,
90,
33,
2704,
5589,
5621,
202,
565,
2350,
4202,
312,
21,
16,
312,
22,
31,
202,
565,
423,
581,
11931,
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,
1377,
918,
283,
19805,
17949,
12,
5018,
331,
13,
288,
202,
565,
5589,
3639,
727,
67,
90,
33,
2704,
5589,
5621,
202,
565,
2350,
4202,
312,
21,
16,
312,
22,
31,
202,
565,
423,
581,
11931,
18... |
if(undos.size() > limit) | for(int i = undoCount - 1; i >= undoPos; i--) | private void addEdit(Edit edit) { undos.add(undoPos++,edit); if(undos.size() > limit) { undos.remove(0); undoPos--; } undoCount = undoPos; } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/0a3b00201b258b25f7ebf6dac66da20a8c2516f6/UndoManager.java/buggy/org/gjt/sp/jedit/buffer/UndoManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
4666,
12,
4666,
3874,
13,
202,
95,
202,
202,
1074,
538,
18,
1289,
12,
31226,
1616,
9904,
16,
4619,
1769,
202,
202,
430,
12,
1074,
538,
18,
1467,
1435,
405,
1800,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
4666,
12,
4666,
3874,
13,
202,
95,
202,
202,
1074,
538,
18,
1289,
12,
31226,
1616,
9904,
16,
4619,
1769,
202,
202,
430,
12,
1074,
538,
18,
1467,
1435,
405,
1800,
... |
if (VM.VerifyAssertions) VM.assert(s.operator() == BBEND); | if (VM.VerifyAssertions) VM._assert(s.operator() == BBEND); | private final OPT_BasicBlock getNotTakenBlock(OPT_Instruction s) { s = s.getNext(); if (Goto.conforms(s)) return s.getBranchTarget(); if (VM.VerifyAssertions) VM.assert(s.operator() == BBEND); return s.getBasicBlock().nextBasicBlockInCodeOrder(); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/a5a05b105574ec4e1a0bacfcc731385b09418803/OPT_RedundantBranchElimination.java/clean/rvm/src/vm/compilers/optimizing/optimizations/global/ssa/redundantBranchElimination/OPT_RedundantBranchElimination.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
16456,
67,
8252,
1768,
336,
1248,
27486,
1768,
12,
15620,
67,
11983,
272,
13,
288,
1377,
272,
273,
272,
18,
588,
2134,
5621,
1377,
309,
261,
43,
6302,
18,
591,
9741,
12,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
16456,
67,
8252,
1768,
336,
1248,
27486,
1768,
12,
15620,
67,
11983,
272,
13,
288,
1377,
272,
273,
272,
18,
588,
2134,
5621,
1377,
309,
261,
43,
6302,
18,
591,
9741,
12,
87,
... |
entries = workspaceRoot.getProject(pathEclipse.lastSegment()).getFolder(new Path(SVNProviderPlugin.getPlugin().getAdminDirectoryName())); | changedResources.add(entries); | public void onNotify(File path, SVNNodeKind kind) { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceRoot workspaceRoot = workspace.getRoot(); IPath pathEclipse = new Path(path.getAbsolutePath()); if (kind == SVNNodeKind.UNKNOWN) { // delete, revert IPath pathEntries = pathEclipse.removeLastSegments(1).append( SVNProviderPlugin.getPlugin().getAdminDirectoryName()); IResource entries = workspaceRoot.getContainerForLocation(pathEntries); if (entries == null) //probably the pathEclipse was project itself { entries = workspaceRoot.getProject(pathEclipse.lastSegment()).getFolder(new Path(SVNProviderPlugin.getPlugin().getAdminDirectoryName())); } changedResources.add(entries); } else { IResource resource = null; IResource svnDir = null; if (kind == SVNNodeKind.DIR) { // when the resource is a directory, two .svn directories can // potentially // be modified resource = workspaceRoot.getContainerForLocation(pathEclipse); if (resource != null && resource.getType() != IResource.ROOT) { if (resource.getProject() != resource) { // if resource is a project. We can't refresh ../.svn svnDir = resource.getParent().getFolder( new Path(SVNProviderPlugin.getPlugin().getAdminDirectoryName())); changedResources.add(svnDir); } svnDir = ((IContainer) resource).getFolder(new Path( SVNProviderPlugin.getPlugin().getAdminDirectoryName())); changedResources.add(svnDir); } } else if (kind == SVNNodeKind.FILE) { resource = workspaceRoot.getFileForLocation(pathEclipse); if (resource != null) { svnDir = resource.getParent().getFolder( new Path(SVNProviderPlugin.getPlugin().getAdminDirectoryName())); changedResources.add(svnDir); } } } if (operationNotifyListener != null) { operationNotifyListener.onNotify(path, kind); if ((operationNotifyListener.getMonitor() != null) && (operationNotifyListener.getMonitor().isCanceled())) { try { svnClient.cancelOperation(); } catch (SVNClientException e) { SVNProviderPlugin.log(SVNException.wrapException(e)); } } } } | 6016 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6016/1ba03d30075942066941ad4b864b069e0253cd64/OperationManager.java/clean/subclipse/core/src/org/tigris/subversion/subclipse/core/client/OperationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
603,
9168,
12,
812,
589,
16,
29537,
50,
907,
5677,
3846,
13,
288,
202,
202,
45,
8241,
6003,
273,
8128,
3773,
18,
588,
8241,
5621,
202,
202,
45,
8241,
2375,
6003,
2375,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
9168,
12,
812,
589,
16,
29537,
50,
907,
5677,
3846,
13,
288,
202,
202,
45,
8241,
6003,
273,
8128,
3773,
18,
588,
8241,
5621,
202,
202,
45,
8241,
2375,
6003,
2375,
... |
public RubyObject get(String id, RubyObject value, RubyGlobalEntry entry) { return RubyFixnum.newFixnum(entry.getRuby(), entry.getRuby().getSafeLevel()); | public RubyObject get(Ruby ruby, RubyGlobalEntry entry) { return RubyFixnum.newFixnum(ruby, ruby.getSafeLevel()); | public RubyObject get(String id, RubyObject value, RubyGlobalEntry entry) { return RubyFixnum.newFixnum(entry.getRuby(), entry.getRuby().getSafeLevel()); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/4e4bb40b2eb2d38881d15ca8ef7cda4c34323793/RubyGlobal.java/buggy/org/jruby/RubyGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
19817,
921,
336,
12,
780,
612,
16,
19817,
921,
460,
16,
19817,
5160,
1622,
1241,
13,
288,
5411,
327,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
4099,
18,
588,
54,
10340,
9334,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
19817,
921,
336,
12,
780,
612,
16,
19817,
921,
460,
16,
19817,
5160,
1622,
1241,
13,
288,
5411,
327,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
4099,
18,
588,
54,
10340,
9334,
1... |
SpringConfig springConfig = new SpringConfig(application); context = new XmlApplicationContextDriver().getApplicationContext( springConfig.getBeanReferences(), parent ); | GrailsRuntimeConfigurator config = new GrailsRuntimeConfigurator(application,parent); context = config.configure(super.getServletContext()); | private void reloadApplicationContext() { WebApplicationContext parent = (WebApplicationContext)getServletContext().getAttribute(GrailsApplicationAttributes.PARENT_APPLICATION_CONTEXT); // construct the SpringConfig for the container managed application if(this.application == null) this.application = (GrailsApplication) parent.getBean(GrailsApplication.APPLICATION_ID, GrailsApplication.class); SpringConfig springConfig = new SpringConfig(application); // return a context that obeys grails' settings context = new XmlApplicationContextDriver().getApplicationContext( springConfig.getBeanReferences(), parent ); getServletContext().setAttribute(GrailsApplicationAttributes.APPLICATION_CONTEXT, context ); getServletContext().setAttribute(GrailsApplication.APPLICATION_ID, context.getBean(GrailsApplication.APPLICATION_ID) ); // re-configure scaffolders GrailsConfigUtils.configureScaffolders(application,context); } | 46315 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46315/95e95e802e403bf6057ecb8726c1cf6a257b290e/GrailsReloadServletFilter.java/clean/grails/src/web/org/codehaus/groovy/grails/web/servlet/filter/GrailsReloadServletFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7749,
28278,
1435,
288,
3639,
25555,
1042,
982,
273,
261,
4079,
28278,
13,
588,
4745,
1042,
7675,
588,
1499,
12,
14571,
14573,
3208,
2498,
18,
14943,
67,
25039,
67,
13181,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7749,
28278,
1435,
288,
3639,
25555,
1042,
982,
273,
261,
4079,
28278,
13,
588,
4745,
1042,
7675,
588,
1499,
12,
14571,
14573,
3208,
2498,
18,
14943,
67,
25039,
67,
13181,
1769,
... |
public ColumnHandleAdapter getColumnHandleAdapter( Object obj ) | public ColumnHandleAdapter getColumnHandleAdapter( Object obj, IModelAdapterHelper mark ) | public ColumnHandleAdapter getColumnHandleAdapter( Object obj ) { return getColumnHandleAdapter( obj, null ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/04c0fff3428d48e39b79934e3718691f7e83ec98/HandleAdapterFactory.java/buggy/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/schematic/HandleAdapterFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4753,
3259,
4216,
6716,
3259,
4216,
12,
1033,
1081,
262,
202,
95,
202,
202,
2463,
6716,
3259,
4216,
12,
1081,
16,
446,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4753,
3259,
4216,
6716,
3259,
4216,
12,
1033,
1081,
262,
202,
95,
202,
202,
2463,
6716,
3259,
4216,
12,
1081,
16,
446,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return mavenProjectBuilder.buildFromRepository( artifact, project.getRepositories(), artifact .getRepository() ); | return mavenProjectBuilder.buildFromRepository( artifact, project.getRepositories(), localRepository ); | private MavenProject getMavenProjectFromRepository( Artifact artifact ) throws ProjectBuildingException { return mavenProjectBuilder.buildFromRepository( artifact, project.getRepositories(), artifact .getRepository() ); } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/813a3b804011bcfd2838b04a40e57243ae2a16c7/DependenciesReport.java/clean/maven-plugins/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
17176,
4109,
2108,
7638,
4109,
1265,
3305,
12,
14022,
6462,
262,
5411,
1216,
5420,
16713,
503,
3639,
288,
5411,
327,
20499,
4109,
1263,
18,
3510,
1265,
3305,
12,
6462,
16,
1984,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
17176,
4109,
2108,
7638,
4109,
1265,
3305,
12,
14022,
6462,
262,
5411,
1216,
5420,
16713,
503,
3639,
288,
5411,
327,
20499,
4109,
1263,
18,
3510,
1265,
3305,
12,
6462,
16,
1984,
18,
... |
if( temp.isFullyCached() && !data.prefixLookup ){ | if( ASTInternal.isFullyCached(temp) && !data.prefixLookup ){ | static private Object[] lookupInNominated( CPPSemantics.LookupData data, ICPPScope scope, Object[] transitives ) throws DOMException{ if( data.usingDirectives.isEmpty() ) return transitives; ICPPScope temp = null; IScope [] directives = (IScope[]) data.usingDirectives.remove( scope ); if( directives == null || directives.length == 0 ) { return transitives; } for( int i = 0; i < directives.length && directives[i] != null; i++ ){ temp = (ICPPScope) directives[i]; if( !data.visited.containsKey( temp ) ){ if( data.visited == ObjectSet.EMPTY_SET ) { data.visited = new ObjectSet(2); } data.visited.put( temp ); ArrayWrapper usings = new ArrayWrapper(); boolean found = false; if( temp.isFullyCached() && !data.prefixLookup ){ IBinding binding = temp.getBinding( data.astName, true ); if( binding != null && ( CPPSemantics.declaredBefore( binding, data.astName ) || (scope instanceof ICPPClassScope && data.checkWholeClassScope) ) ) { mergeResults( data, binding, true ); found = true; } } else { IASTName [] f = lookupInScope( data, temp, null ); if( f != null ) { mergeResults( data, f, true ); found = true; } } if( !found && temp instanceof ICPPNamespaceScope ){ usings.array = ((ICPPNamespaceScope) temp).getUsingDirectives(); } //only consider the transitive using directives if we are an unqualified //lookup, or we didn't find the name in decl if( usings.array != null && usings.array.length > 0 && (!data.qualified() || !found ) ){ transitives = ArrayUtil.addAll( Object.class, transitives, usings.array ); } } } return transitives; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/f5a4ba1d7638b16bde80c2f1086c78aa03af1f90/CPPSemantics.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSemantics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
3238,
1033,
8526,
3689,
382,
26685,
7458,
12,
5181,
5857,
351,
11119,
18,
6609,
751,
501,
16,
467,
4258,
52,
3876,
2146,
16,
1033,
8526,
22755,
3606,
262,
1216,
4703,
503,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
3238,
1033,
8526,
3689,
382,
26685,
7458,
12,
5181,
5857,
351,
11119,
18,
6609,
751,
501,
16,
467,
4258,
52,
3876,
2146,
16,
1033,
8526,
22755,
3606,
262,
1216,
4703,
503,
95,
... |
assert("bit shift must be between 0 and 7", shift >=0 && shift<8); | assertTrue("bit shift must be between 0 and 7", shift >=0 && shift<8); | public void testWriteW16LSB(short pattern, int shift) throws Exception { assert("bit shift must be between 0 and 7", shift >=0 && shift<8); stream.writeBits(0, shift); for (int i=0; i<WRITE_REPEAT; i++) { stream.writeW16LSB(pattern); } stream.writeBits(0, 8-shift); long expected = 0; for (int j=0; j<2; j++) { expected = (expected << 8) | (pattern & 0xFF); pattern = (short)(pattern >>> 8); } for (int i=0; i<WRITE_REPEAT; i++) { assertEquals("at bit position " + (i*16+shift), expected, readBits(i*16+shift, 16)); } } | 11735 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11735/764f4699450f0ac0dc7582bccd3c4a768515600e/BitOutputStreamTest.java/clean/spark/tests/de/tivano/flash/swf/common/BitOutputStreamTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3067,
59,
2313,
3045,
38,
12,
6620,
1936,
16,
509,
4654,
13,
1216,
1185,
288,
202,
11231,
2932,
3682,
4654,
1297,
506,
3086,
374,
471,
2371,
3113,
4654,
1545,
20,
597,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3067,
59,
2313,
3045,
38,
12,
6620,
1936,
16,
509,
4654,
13,
1216,
1185,
288,
202,
11231,
2932,
3682,
4654,
1297,
506,
3086,
374,
471,
2371,
3113,
4654,
1545,
20,
597,
... |
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[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); | public java.sql.ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { Vector v = new Vector(); // The new ResultSet tuple stuff Field f[] = new Field[18]; // The field descriptors for the new ResultSet 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, "DATA_TYPE", iInt2Oid, 2); f[5] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); f[6] = new Field(connection, "COLUMN_SIZE", iInt4Oid, 4); f[7] = new Field(connection, "BUFFER_LENGTH", iVarcharOid, 32); f[8] = new Field(connection, "DECIMAL_DIGITS", iInt4Oid, 4); f[9] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); f[10] = new Field(connection, "NULLABLE", iInt4Oid, 4); f[11] = new Field(connection, "REMARKS", iVarcharOid, 32); f[12] = new Field(connection, "COLUMN_DEF", iVarcharOid, 32); f[13] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); f[14] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); f[15] = new Field(connection, "CHAR_OCTET_LENGTH", iVarcharOid, 32); f[16] = new Field(connection, "ORDINAL_POSITION", iInt4Oid, 4); f[17] = new Field(connection, "IS_NULLABLE", iVarcharOid, 32); StringBuffer sql = new StringBuffer(512); /* Build a >= 7.1 SQL statement to list all columns */ sql.append("select " + (connection.haveMinimumServerVersion("7.2") ? "a.attrelid, " : "a.oid, ") + " c.relname, " + " a.attname, " + " a.atttypid, " + " a.attnum, " + " a.attnotnull, " + " a.attlen, " + " a.atttypmod, " + " d.adsrc, " + " t.typname, " + /* Use the new col_description in 7.2 or an additional outer join in 7.1 */ (connection.haveMinimumServerVersion("7.2") ? "col_description(a.attrelid, a.attnum) " : "e.description ") + "from" + " (" + " (pg_class c inner join pg_attribute a on" + " (" + " a.attrelid=c.oid"); if ((tableNamePattern != null) && ! tableNamePattern.equals("%")) { sql.append(" and c.relname like \'" + tableNamePattern.toLowerCase() + "\'"); } if ((columnNamePattern != null) && ! columnNamePattern.equals("%")) { sql.append(" and a.attname like \'" + columnNamePattern.toLowerCase() + "\'"); } sql.append( " and a.attnum > 0" + " )" + " ) inner join pg_type t on" + " (" + " t.oid = a.atttypid" + " )" + " )" + " left outer join pg_attrdef d on" + " (" + " c.oid = d.adrelid" + " and a.attnum = d.adnum" + " ) "); if (!connection.haveMinimumServerVersion("7.2")) { /* Only for 7.1 */ sql.append( " left outer join pg_description e on" + " (" + " e.objoid = a.oid" + " ) "); } sql.append("order by" + " c.relname, a.attnum"); java.sql.ResultSet r = connection.ExecSQL(sql.toString()); while (r.next()) { byte[][] tuple = new byte[18][0]; String nullFlag = r.getString(6); String typname = r.getString(10); tuple[0] = null; // Catalog name, not supported tuple[1] = null; // Schema name, not supported tuple[2] = r.getBytes(2); // Table name tuple[3] = r.getBytes(3); // Column name tuple[4] = Integer.toString(connection.getSQLType(typname)).getBytes(); // Data type tuple[5] = typname.getBytes(); // Type name // Column size // Looking at the psql source, // I think the length of a varchar as specified when the table was created // should be extracted from atttypmod which contains this length + sizeof(int32) if (typname.equals("bpchar") || typname.equals("varchar")) { int atttypmod = r.getInt(8); tuple[6] = Integer.toString(atttypmod != -1 ? atttypmod - VARHDRSZ : 0).getBytes(); } else { tuple[6] = r.getBytes(7); } tuple[7] = null; // Buffer length // Decimal digits = scale // From the source (see e.g. backend/utils/adt/format_type.c, // function numeric()) the scale and precision can be calculated // from the typmod value. if (typname.equals("numeric") || typname.equals("decimal")) { int attypmod = r.getInt(8) - VARHDRSZ; tuple[8] = Integer.toString(attypmod & 0xffff).getBytes(); tuple[9] = Integer.toString( ( attypmod >> 16 ) & 0xffff ).getBytes(); } else { tuple[8] = "0".getBytes(); tuple[9] = "10".getBytes(); // Num Prec Radix - assume decimal } tuple[10] = Integer.toString(nullFlag.equals("f") ? java.sql.DatabaseMetaData.columnNullable : java.sql.DatabaseMetaData.columnNoNulls).getBytes(); // Nullable tuple[11] = r.getBytes(11); // Description (if any) tuple[12] = r.getBytes(9); // Column default tuple[13] = null; // sql data type (unused) tuple[14] = null; // sql datetime sub (unused) tuple[15] = tuple[6]; // char octet length tuple[16] = r.getBytes(5); // ordinal position tuple[17] = (nullFlag.equals("f") ? "YES" : "NO").getBytes(); // Is nullable v.addElement(tuple); } r.close(); return connection.getResultSet(null, f, v, "OK", 1); } | 49868 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49868/1109900a6005730595d9db53263cc42e13efced4/AbstractJdbc1DatabaseMetaData.java/buggy/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
14226,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
5018,
331,
273,
394,
5589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14226,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
5018,
331,
273,
394,
5589,
... |
ChartPreviewPainter.ignoreNotifications( false ); | ChartAdapter.ignoreNotifications( false ); | private void placeComponents( ) { ChartPreviewPainter.ignoreNotifications( true ); try { createHeadArea( );// place two rows new Label( cmpTask, SWT.NONE ); createDataSetArea( cmpTask ); new Label( cmpTask, SWT.NONE ); new Label( cmpTask, SWT.NONE ); createDataPreviewTableArea( cmpTask ); createDataPreviewButtonArea( cmpTask ); new Label( cmpTask, SWT.NONE ); Label description = new Label( cmpTask, SWT.NONE ); { GridData gd = new GridData( ); description.setLayoutData( gd ); description.setText( Messages.getString( "TaskSelectData.Label.ToBindADataColumn" ) ); //$NON-NLS-1$ } new Label( cmpTask, SWT.NONE ); } finally { // THIS IS IN A FINALLY BLOCK TO ENSURE THAT NOTIFICATIONS ARE // ENABLED EVEN IF ERRORS OCCUR DURING UI INITIALIZATION ChartPreviewPainter.ignoreNotifications( false ); } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/2b4fd42b55fc2112abc1ef2cf1fb7c20d97e4a96/TaskSelectData.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/TaskSelectData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3166,
7171,
12,
262,
202,
95,
202,
202,
7984,
11124,
15775,
18,
6185,
14111,
12,
638,
11272,
202,
202,
698,
202,
202,
95,
1082,
202,
2640,
1414,
5484,
12,
11272,
759,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3166,
7171,
12,
262,
202,
95,
202,
202,
7984,
11124,
15775,
18,
6185,
14111,
12,
638,
11272,
202,
202,
698,
202,
202,
95,
1082,
202,
2640,
1414,
5484,
12,
11272,
759,
31... |
ui.update(g, this); | { Graphics g2 = g; if (!(g instanceof Graphics2D)) g2 = g.create(); ui.update(getComponentGraphics(g2), this); if (!(g instanceof Graphics2D)) g2.dispose(); } | protected void paintComponent(Graphics g) { if (ui != null) ui.update(g, this); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/363fe84fd732aa8ca3562fb0734fe48ee20c2c65/JComponent.java/buggy/libraries/javalib/javax/swing/JComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
12574,
1841,
12,
17558,
314,
13,
225,
288,
565,
309,
261,
4881,
480,
446,
13,
1377,
288,
16830,
314,
22,
273,
314,
31,
309,
16051,
12,
75,
1276,
16830,
22,
40,
3719,
314,
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,
4750,
918,
12574,
1841,
12,
17558,
314,
13,
225,
288,
565,
309,
261,
4881,
480,
446,
13,
1377,
288,
16830,
314,
22,
273,
314,
31,
309,
16051,
12,
75,
1276,
16830,
22,
40,
3719,
314,
2... |
CapsdConfig cFactory = CapsdConfigFactory.getInstance(); | private void updateInterfaceInfo(Connection dbc, Date now, DbNodeEntry node, DbIpInterfaceEntry dbIpIfEntry, IfSnmpCollector snmpc, boolean isNewIpEntry, boolean isReparented, boolean doesSnmp) throws SQLException { Category log = ThreadCategory.getInstance(getClass()); CapsdConfig cFactory = CapsdConfigFactory.getInstance(); PollerConfig pollerCfgFactory = PollerConfigFactory.getInstance(); DbIpInterfaceEntry currIpIfEntry; InetAddress ifaddr = dbIpIfEntry.getIfAddress(); int ifIndex = -1; /* * Clone the existing database entry so we have access to the values * of the database fields associated with the interface in the event * that something has changed. */ DbIpInterfaceEntry originalIpIfEntry = DbIpInterfaceEntry.clone(dbIpIfEntry); /* * Create IP interface entry representing latest information * retrieved for the interface via the collector */ if (doesSnmp) { if (snmpc.hasIpAddrTable()) { ifIndex = snmpc.getIfIndex(ifaddr); } if (ifIndex == -1) { if (log.isDebugEnabled()) { log.debug("updateInterfaceInfo: interface " + ifaddr.getHostAddress() + " has no valid ifIndex. Assume this is a lame SNMP host with no ipAddrTable"); } ifIndex = CapsdConfigFactory.LAME_SNMP_HOST_IFINDEX; } currIpIfEntry = DbIpInterfaceEntry.create(node.getNodeId(), ifaddr, ifIndex); } else { currIpIfEntry = DbIpInterfaceEntry.create(node.getNodeId(), ifaddr); } // Hostname currIpIfEntry.setHostname(ifaddr.getHostName()); /* * Managed state * NOTE: (reference internal bug# 201) * If the ip is 'managed', it might still be 'not polled' based * on the poller configuration. * * Try to avoid re-evaluating the ip against filters for * each service, try to get the first package here and use * that for service evaluation * * At this point IF the ip is already in the database, package filter * evaluation should go through OK. New interfaces will be dealt with * later */ org.opennms.netmgt.config.poller.Package ipPkg = null; if (cFactory.isAddressUnmanaged(ifaddr)) { currIpIfEntry.setManagedState(DbIpInterfaceEntry.STATE_UNMANAGED); } else { boolean ipToBePolled = false; ipPkg = pollerCfgFactory.getFirstPackageMatch(ifaddr.getHostAddress()); if (ipPkg != null) { ipToBePolled = true; } if (ipToBePolled) { currIpIfEntry.setManagedState(DbIpInterfaceEntry.STATE_MANAGED); } else { currIpIfEntry.setManagedState(DbIpInterfaceEntry.STATE_NOT_POLLED); } if (log.isDebugEnabled()) { log.debug("updateInterfaceInfo: interface " + ifaddr.getHostAddress() + " to be polled = " + ipToBePolled); } } /* * If SNMP data collection is available set SNMP Primary state * as well as ifIndex and ifStatus. * * For all interfaces simply set 'isSnmpPrimary' field to * not eligible for now. Following the interface updates * the primary and secondary SNMP interfaces will be * determined and the value of the 'isSnmpPrimary' field * set accordingly for each interface. The old primary * interface should have already been saved for future * reference. */ if (doesSnmp && snmpc != null && snmpc.hasIpAddrTable()) { if (ifIndex != -1) { if (snmpc.hasIfTable()) { int status = snmpc.getAdminStatus(ifIndex); currIpIfEntry.setStatus(status); } } else { // No ifIndex found log.debug("updateInterfaceInfo: No ifIndex found for " + ifaddr.getHostAddress() + ". Not eligible for primary SNMP interface"); } currIpIfEntry.setPrimaryState(DbIpInterfaceEntry.SNMP_NOT_ELIGIBLE); } else if (doesSnmp) { currIpIfEntry.setPrimaryState(DbIpInterfaceEntry.SNMP_NOT_ELIGIBLE); } // Update any fields which have changed dbIpIfEntry.setLastPoll(now); dbIpIfEntry.updateHostname(currIpIfEntry.getHostname()); dbIpIfEntry.updateManagedState(currIpIfEntry.getManagedState()); dbIpIfEntry.updateStatus(currIpIfEntry.getStatus()); dbIpIfEntry.updatePrimaryState(currIpIfEntry.getPrimaryState()); dbIpIfEntry.updateIfIndex(currIpIfEntry.getIfIndex()); /* * Set event flags * NOTE: Must set these flags prior to call to * DbIpInterfaceEntry.store() * method which will cause the change map to be cleared. */ boolean ifIndexChangedFlag = false; boolean ipHostnameChangedFlag = false; if (dbIpIfEntry.hasIfIndexChanged()) { ifIndexChangedFlag = true; } if (dbIpIfEntry.hasHostnameChanged()) { ipHostnameChangedFlag = true; } // Update the database dbIpIfEntry.store(dbc); /* * If the interface was not already in the database under * the node being rescanned or some other node send a * nodeGainedInterface event. */ if (isNewIpEntry && !isReparented) { createNodeGainedInterfaceEvent(dbIpIfEntry); } // InterfaceIndexChanged event if (log.isDebugEnabled()) { log.debug("updateInterfaceInfo: ifIndex changed: " + ifIndexChangedFlag); } if (ifIndexChangedFlag) { createInterfaceIndexChangedEvent(dbIpIfEntry, originalIpIfEntry); m_ifIndexOnNodeChangedFlag = true; } // IPHostNameChanged event if (log.isDebugEnabled()) { log.debug("updateInterfaceInfo: hostname changed: " + ipHostnameChangedFlag); } if (ipHostnameChangedFlag) { createIpHostNameChangedEvent(dbIpIfEntry, originalIpIfEntry); } if (isNewIpEntry) { /* * If it's new, the packageIpListMap needs to be rebuilt, * polling status rechecked, and ismanaged updated if necessary */ boolean ipToBePolled = false; log.debug("updateInterfaceInfo: rebuilding PackageIpListMap for new interface " + ifaddr.getHostAddress()); PollerConfigFactory.getInstance().rebuildPackageIpListMap(); ipPkg = pollerCfgFactory.getFirstPackageMatch(ifaddr.getHostAddress()); if (ipPkg != null) { ipToBePolled = true; } log.debug("updateInterfaceInfo: interface " + ifaddr.getHostAddress() + " to be polled: " + ipToBePolled); if (ipToBePolled) { PreparedStatement stmt = dbc.prepareStatement(SQL_DB_UPDATE_ISMANAGED); stmt.setString(1, new String(new char[] { DbIpInterfaceEntry.STATE_MANAGED })); stmt.setInt(2, dbIpIfEntry.getNodeId()); stmt.setString(3, ifaddr.getHostAddress()); try { stmt.executeUpdate(); log.debug("updateInterfaceInfo: updated managed state for new interface " + ifaddr.getHostAddress() + " on node " + dbIpIfEntry.getNodeId() + " to managed"); } catch (SQLException sqlE) { throw sqlE; } finally { try { stmt.close(); } catch (Exception e) { // Ignore } } } } } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/8a6576d66e6ad3849723ebfbdc7af8419591da4a/RescanProcessor.java/clean/opennms-services/src/main/java/org/opennms/netmgt/capsd/RescanProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
1358,
966,
12,
1952,
9881,
16,
2167,
2037,
16,
8408,
907,
1622,
756,
16,
8408,
5273,
1358,
1622,
1319,
5273,
2047,
1622,
16,
971,
10461,
1291,
7134,
15366,
71,
16,
1250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
1358,
966,
12,
1952,
9881,
16,
2167,
2037,
16,
8408,
907,
1622,
756,
16,
8408,
5273,
1358,
1622,
1319,
5273,
2047,
1622,
16,
971,
10461,
1291,
7134,
15366,
71,
16,
1250,
... | |
if (!smoothing || ((x >= truelx) && (x <= truerx))) { | if (!smooth || ((x >= truelx) && (x <= truerx))) { | private void scanline(int y, float l[], float r[]) { //System.out.println("scanline " + y); for (int i = 0; i < vertexCount; i++) { // should be moved later sp[i] = 0; sdp[i] = 0; } // this rounding doesn't seem to be relevant with smoothing int lx = (int) (l[X] + 0.49999f); // ceil(l[X]-.5); if (lx < 0) lx = 0; int rx = (int) (r[X] - 0.5f); if (rx > width1) rx = width1; if (lx > rx) return; if (smoothing) { int mody = MODYRES(y); aaleft[mody] = lx; aaright[mody] = rx; if (firstModY == -1) { firstModY = mody; aaleftmin = lx; aaleftmax = lx; aarightmin = rx; aarightmax = rx; } else { if (aaleftmin > aaleft[mody]) aaleftmin = aaleft[mody]; if (aaleftmax < aaleft[mody]) aaleftmax = aaleft[mody]; if (aarightmin > aaright[mody]) aarightmin = aaright[mody]; if (aarightmax < aaright[mody]) aarightmax = aaright[mody]; } lastModY = mody; // moved up here (before the return) 031001 // not the eighth (or lastY) line, so not scanning this time if ((mody != SUBYRES1) && (y != lastY)) return; //lastModY = mody; // eeK! this was missing //return; //if (y == lastY) { //System.out.println("y is lasty"); //} //lastModY = mody; aaleftfull = aaleftmax/SUBXRES + 1; aarightfull = aarightmin/SUBXRES - 1; } // this is the setup, based on lx incrementalize_x(l, r, sp, sdp, lx); // scan in x, generating pixels // using parent.width to get actual pixel index // rather than scaled by smoothing factor int offset = smoothing ? parent.width * (y / SUBYRES) : parent.width*y; int truelx = 0, truerx = 0; if (smoothing) { truelx = lx / SUBXRES; truerx = (rx + SUBXRES1) / SUBXRES; lx = aaleftmin / SUBXRES; rx = (aarightmax + SUBXRES1) / SUBXRES; if (lx < 0) lx = 0; if (rx > parent.width1) rx = parent.width1; } interpX = false; int tr, tg, tb, ta; for (int x = lx; x <= rx; x++) { // added == because things on same plane weren't replacing each other // makes for strangeness in 3D, but totally necessary for 2D //if (noDepthTest || (sp[Z] <= zbuffer[offset+x])) { if (true) { // map texture based on U, V coords in sp[U] and sp[V] if (interpUV) { int tu = (int)sp[U]; int tv = (int)sp[V]; if (tu > twidth1) tu = twidth1; if (tv > theight1) tv = theight1; if (tu < 0) tu = 0; if (tv < 0) tv = 0; int txy = tv*twidth + tu; if (smoothing || texture_smooth) { //if (FRY) System.out.println("sp u v = " + sp[U] + " " + sp[V]); //System.out.println("sp u v = " + sp[U] + " " + sp[V]); // tuf1/tvf1 is the amount of coverage for the adjacent // pixel, which is the decimal percentage. int tuf1 = (int) (255f * (sp[U] - (float)tu)); int tvf1 = (int) (255f * (sp[V] - (float)tv)); // the closer sp[U or V] is to the decimal being zero // the more coverage it should get of the original pixel int tuf = 255 - tuf1; int tvf = 255 - tvf1; // this code sucks! filled with bugs and slow as hell! int pixel00 = tpixels[txy]; int pixel01 = (tv < theight1) ? tpixels[txy + twidth] : tpixels[txy]; int pixel10 = (tu < twidth1) ? tpixels[txy + 1] : tpixels[txy]; int pixel11 = ((tv < theight1) && (tu < twidth1)) ? tpixels[txy + twidth + 1] : tpixels[txy]; int p00, p01, p10, p11; int px0, px1, pxy; if (tformat == ALPHA) { px0 = (pixel00*tuf + pixel10*tuf1) >> 8; px1 = (pixel01*tuf + pixel11*tuf1) >> 8; ta = (((px0*tvf + px1*tvf1) >> 8) * (interpARGB ? ((int) (sp[A]*255)) : a2orig)) >> 8; } else if (tformat == ARGB) { p00 = (pixel00 >> 24) & 0xff; p01 = (pixel01 >> 24) & 0xff; p10 = (pixel10 >> 24) & 0xff; p11 = (pixel11 >> 24) & 0xff; px0 = (p00*tuf + p10*tuf1) >> 8; px1 = (p01*tuf + p11*tuf1) >> 8; ta = (((px0*tvf + px1*tvf1) >> 8) * (interpARGB ? ((int) (sp[A]*255)) : a2orig)) >> 8; } else { // RGB image, no alpha ta = interpARGB ? ((int) (sp[A]*255)) : a2orig; } if ((tformat == RGB) || (tformat == ARGB)) { p00 = (pixel00 >> 16) & 0xff; // red p01 = (pixel01 >> 16) & 0xff; p10 = (pixel10 >> 16) & 0xff; p11 = (pixel11 >> 16) & 0xff; px0 = (p00*tuf + p10*tuf1) >> 8; px1 = (p01*tuf + p11*tuf1) >> 8; tr = (((px0*tvf + px1*tvf1) >> 8) * (interpARGB ? ((int) sp[R]*255) : r2)) >> 8; p00 = (pixel00 >> 8) & 0xff; // green p01 = (pixel01 >> 8) & 0xff; p10 = (pixel10 >> 8) & 0xff; p11 = (pixel11 >> 8) & 0xff; px0 = (p00*tuf + p10*tuf1) >> 8; px1 = (p01*tuf + p11*tuf1) >> 8; tg = (((px0*tvf + px1*tvf1) >> 8) * (interpARGB ? ((int) sp[G]*255) : g2)) >> 8; p00 = pixel00 & 0xff; // blue p01 = pixel01 & 0xff; p10 = pixel10 & 0xff; p11 = pixel11 & 0xff; px0 = (p00*tuf + p10*tuf1) >> 8; px1 = (p01*tuf + p11*tuf1) >> 8; tb = (((px0*tvf + px1*tvf1) >> 8) * (interpARGB ? ((int) sp[B]*255) : b2)) >> 8; } else { // alpha image, only use current fill color if (interpARGB) { tr = (int) (sp[R] * 255); tg = (int) (sp[G] * 255); tb = (int) (sp[B] * 255); } else { tr = r2; tg = g2; tb = b2; } } // get coverage for pixel if smoothing // checks smoothing again here because of // hints[SMOOTH_IMAGES] used up above int weight = smoothing ? coverage(x) : 255; if (weight != 255) ta = ta*weight >> 8; } else { // no smoothing, just get the pixels int tpixel = tpixels[txy]; // TODO i doubt splitting these guys really gets us // all that much speed.. is it worth it? if (tformat == ALPHA) { ta = tpixel; if (interpARGB) { tr = (int) sp[R]*255; tg = (int) sp[G]*255; tb = (int) sp[B]*255; if (sp[A] != 1) { ta = (((int) sp[A]*255) * ta) >> 8; } } else { tr = r2; tg = g2; tb = b2; ta = (a2orig * ta) >> 8; } } else { // RGB or ARGB ta = (tformat == RGB) ? 255 : (tpixel >> 24) & 0xff; if (interpARGB) { tr = (((int) sp[R]*255) * ((tpixel >> 16) & 0xff)) >> 8; tg = (((int) sp[G]*255) * ((tpixel >> 8) & 0xff)) >> 8; tb = (((int) sp[B]*255) * ((tpixel) & 0xff)) >> 8; ta = (((int) sp[A]*255) * ta) >> 8; } else { tr = (r2 * ((tpixel >> 16) & 0xff)) >> 8; tg = (g2 * ((tpixel >> 8) & 0xff)) >> 8; tb = (b2 * ((tpixel) & 0xff)) >> 8; ta = (a2orig * ta) >> 8; } } } if ((ta == 254) || (ta == 255)) { // if (ta & 0xf8) would be good // no need to blend pixels[offset+x] = 0xff000000 | (tr << 16) | (tg << 8) | tb; //zbuffer[offset+x] = sp[Z]; } else { // blend with pixel on screen int a1 = 255-ta; int r1 = (pixels[offset+x] >> 16) & 0xff; int g1 = (pixels[offset+x] >> 8) & 0xff; int b1 = (pixels[offset+x]) & 0xff; pixels[offset+x] = 0xff000000 | (((tr*ta + r1*a1) >> 8) << 16) | ((tg*ta + g1*a1) & 0xff00) | ((tb*ta + b1*a1) >> 8); //if (ta > ZBUFFER_MIN_COVERAGE) zbuffer[offset+x] = sp[Z]; } } else { // no image applied int weight = smoothing ? coverage(x) : 255; if (interpARGB) { r2 = (int) (sp[R] * 255); g2 = (int) (sp[G] * 255); b2 = (int) (sp[B] * 255); if (sp[A] != 1) weight = (weight * ((int) (sp[A] * 255))) >> 8; if (weight == 255) { rgba = 0xff000000 | (r2 << 16) | (g2 << 8) | b2; } } else { if (a2orig != 255) weight = (weight * a2orig) >> 8; } if (weight == 255) { // no blend, no aa, just the rgba pixels[offset+x] = rgba; //zbuffer[offset+x] = sp[Z]; } else { int r1 = (pixels[offset+x] >> 16) & 0xff; int g1 = (pixels[offset+x] >> 8) & 0xff; int b1 = (pixels[offset+x]) & 0xff; a2 = weight; int a1 = 255 - a2; pixels[offset+x] = (0xff000000 | ((r1*a1 + r2*a2) >> 8) << 16 | // use & instead of >> and << below ((g1*a1 + g2*a2) >> 8) << 8 | ((b1*a1 + b2*a2) >> 8)); //if (a2 > ZBUFFER_MIN_COVERAGE) zbuffer[offset+x] = sp[Z]; } } } // if smoothing enabled, don't increment values // for the pixel in the stretch out version // of the scanline used to get smooth edges. if (!smoothing || ((x >= truelx) && (x <= truerx))) { increment(sp, sdp); } } firstModY = -1; interpX = true; } | 8833 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8833/e8249f7e9cb9a2fa10e06b37f868ba78fbf9381c/PPolygon.java/buggy/core/PPolygon.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
4135,
1369,
12,
474,
677,
16,
1431,
328,
63,
6487,
1431,
436,
63,
5717,
288,
565,
368,
3163,
18,
659,
18,
8222,
2932,
9871,
1369,
315,
397,
677,
1769,
565,
364,
261,
474,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
4135,
1369,
12,
474,
677,
16,
1431,
328,
63,
6487,
1431,
436,
63,
5717,
288,
565,
368,
3163,
18,
659,
18,
8222,
2932,
9871,
1369,
315,
397,
677,
1769,
565,
364,
261,
474,
2... |
case 209: break; | case 212: break; | public Symbol next_token() throws java.io.IOException { int yyFlexInput; int yyFlexAction; int [] yyFlexTransL = YY_TRANS; int [] yyFlexRowMapL = YY_ROWMAP; int [] yyFlexAttrL = YY_ATTRIBUTE; int yyFlexPushbackPos_l = yyFlexPushbackPos = -1; boolean yy_was_pushback; while (true) { // cached fields: int yyFlexCurrentPosL; int yyFlexMarkedPosL = yyFlexMarkedPos; int yyFlexEndReadL = yyFlexEndRead; char [] yyFlexBufferL = yyFlexBuffer; char [] yyCMapL = YY_CMAP; boolean yyFlexR = false; for (yyFlexCurrentPosL = yyFlexStartRead; yyFlexCurrentPosL < yyFlexMarkedPosL; yyFlexCurrentPosL++) { switch (yyFlexBufferL[yyFlexCurrentPosL]) { case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyline++; yycolumn = 0; yyFlexR = false; break; case '\r': yyline++; yycolumn = 0; yyFlexR = true; break; case '\n': if (yyFlexR) yyFlexR = false; else { yyline++; yycolumn = 0; } break; default: yyFlexR = false; yycolumn++; } } if (yyFlexR) { // peek one character ahead if it is \n (if we have counted one line too much) boolean yyFlexPeek; if (yyFlexMarkedPosL < yyFlexEndReadL) yyFlexPeek = yyFlexBufferL[yyFlexMarkedPosL] == '\n'; else if (yyFlexAtEOF) yyFlexPeek = false; else { boolean eof = yyFlexRefill(); yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; if (eof) yyFlexPeek = false; else yyFlexPeek = yyFlexBufferL[yyFlexMarkedPosL] == '\n'; } if (yyFlexPeek) yyline--; } if (yyFlexMarkedPosL > yyFlexStartRead) { switch (yyFlexBufferL[yyFlexMarkedPosL-1]) { case '\n': case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyFlexAtBOL = true; break; case '\r': if (yyFlexMarkedPosL < yyFlexEndReadL) yyFlexAtBOL = yyFlexBufferL[yyFlexMarkedPosL] != '\n'; else if (yyFlexAtEOF) yyFlexAtBOL = false; else { boolean eof = yyFlexRefill(); yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; if (eof) yyFlexAtBOL = false; else yyFlexAtBOL = yyFlexBufferL[yyFlexMarkedPosL] != '\n'; } break; default: yyFlexAtBOL = false; } } yyFlexAction = -1; yyFlexCurrentPosL = yyFlexCurrentPos = yyFlexStartRead = yyFlexMarkedPosL; if (yyFlexAtBOL) yyFlexState = YY_LEXSTATE[yyFlexLexicalState+1]; else yyFlexState = YY_LEXSTATE[yyFlexLexicalState]; yy_was_pushback = false; yy_forAction: { while (true) { if (yyFlexCurrentPosL < yyFlexEndReadL) yyFlexInput = yyFlexBufferL[yyFlexCurrentPosL++]; else if (yyFlexAtEOF) { yyFlexInput = YYEOF; break yy_forAction; } else { // store back cached positions yyFlexCurrentPos = yyFlexCurrentPosL; yyFlexMarkedPos = yyFlexMarkedPosL; yyFlexPushbackPos = yyFlexPushbackPos_l; boolean eof = yyFlexRefill(); // get translated positions and possibly new buffer yyFlexCurrentPosL = yyFlexCurrentPos; yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; yyFlexEndReadL = yyFlexEndRead; yyFlexPushbackPos_l = yyFlexPushbackPos; if (eof) { yyFlexInput = YYEOF; break yy_forAction; } else { yyFlexInput = yyFlexBufferL[yyFlexCurrentPosL++]; } } int yyFlexNext = yyFlexTransL[ yyFlexRowMapL[yyFlexState] + yyCMapL[yyFlexInput] ]; if (yyFlexNext == -1) break yy_forAction; yyFlexState = yyFlexNext; int yyFlexAttributes = yyFlexAttrL[yyFlexState]; if ( (yyFlexAttributes & 2) == 2 ) yyFlexPushbackPos_l = yyFlexCurrentPosL; if ( (yyFlexAttributes & 1) == 1 ) { yy_was_pushback = (yyFlexAttributes & 4) == 4; yyFlexAction = yyFlexState; yyFlexMarkedPosL = yyFlexCurrentPosL; if ( (yyFlexAttributes & 8) == 8 ) break yy_forAction; } } } // store back cached position yyFlexMarkedPos = yyFlexMarkedPosL; if (yy_was_pushback) yyFlexMarkedPos = yyFlexPushbackPos_l; switch (yyFlexAction < 0 ? yyFlexAction : YY_ACTION[yyFlexAction]) { case 85: { return symbol(FULL); } case 141: break; case 92: { debugOption = true; } case 142: break; case 57: { return symbol(CHAR,new Character('\t')); } case 143: break; case 107: { throw new ScannerException(file,ErrorMessages.NO_BUFFER_SIZE, yyline); } case 144: break; case 91: { isYYEOF = true; } case 145: break; case 54: { return symbol(CHAR, new Character(yytext().charAt(1))); } case 146: break; case 11: { yybegin(REGEXP); } case 147: break; case 112: { isAbstract = true; } case 148: break; case 101: { initCode = conc(initCode,string); yybegin(MACROS); } case 149: break; case 45: { throw new ScannerException(file,ErrorMessages.UNEXPECTED_NL, yyline, yycolumn); } case 150: break; case 12: { return symbol_countUpdate(RBRACE, null); } case 151: break; case 74: { return symbol(REPEAT, new Integer(yytext().substring(1).trim())); } case 152: break; case 55: { return symbol(CHAR, new Character( (char) Integer.parseInt(yytext().substring(1,yytext().length()), 8))); } case 153: break; case 97: { columnCount = true; } case 154: break; case 122: { return symbol(LETTERCLASS); } case 155: break; case 15: { if (macroDefinition) { yybegin(MACROS); } return symbol(REGEXPEND); } case 156: break; case 77: { inclusive_states = true; yybegin(STATELIST); } case 157: break; case 56: { return symbol(CHAR,new Character('\n')); } case 158: break; case 81: { return symbol(MACROUSE, yytext().substring(1,yytext().length()-1)); } case 159: break; case 25: { return symbol(OPENBRACKET); } case 160: break; case 123: { throw new ScannerException(file,ErrorMessages.QUIL_INITTHROW, yyline); } case 161: break; case 126: { visibility = "private"; Skeleton.makePrivate(); } case 162: break; case 49: { commentbalance++; } case 163: break; case 9: { throw new ScannerException(file,ErrorMessages.UNKNOWN_OPTION, yyline, yycolumn); } case 164: break; case 68: { string.append('\n'); } case 165: break; case 33: { balance++; actionText.append('{'); } case 166: break; case 48: { if (commentbalance > 0) commentbalance--; else yybegin(nextState); } case 167: break; case 67: { string.append('\"'); } case 168: break; case 95: { tokenType = yytext().substring(6).trim(); } case 169: break; case 79: { return symbol_countUpdate(MACROUSE, makeMacroIdent()); } case 170: break; case 14: { return symbol(CHAR, new Character(yytext().charAt(0))); } case 171: break; case 32: { if (balance > 0) { balance--; actionText.append('}'); } else { yybegin(REGEXPSTART); Action a = new Action(actionText.toString(), action_line); actions.addElement(a); return symbol(ACTION, a); } } case 172: break; case 108: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol_countUpdate(EOFRULE, null); } case 173: break; case 120: { isExtending = yytext().substring(9).trim(); } case 174: break; case 113: { cupSymbol = yytext().substring(8).trim(); if (cupCompatible) Out.warning(ErrorMessages.CUPSYM_AFTER_CUP, yyline); } case 175: break; case 63: { yybegin(REPEATEXP); return symbol(REPEAT, new Integer(yytext().trim().substring(1).trim())); } case 176: break; case 88: { packed = true; useRowMap = true; } case 177: break; case 27: { return symbol(PLUS); } case 178: break; case 99: { isPublic = true; } case 179: break; case 70: { string.append('\r'); } case 180: break; case 76: { inclusive_states = false; yybegin(STATELIST); } case 181: break; case 3: { userCode.append(yytext()); } case 182: break; case 19: { lookAheadUsed = true; return symbol(LOOKAHEAD); } case 183: break; case 110: { lexThrow = concExc(lexThrow,yytext().substring(8).trim()); } case 184: break; case 26: { return symbol(CLOSEBRACKET); } case 185: break; case 80: { string.append( (char) Integer.parseInt(yytext().substring(2,yytext().length()), 16)); } case 186: break; case 37: { throw new ScannerException(file,ErrorMessages.UNTERMINATED_STR, yyline, yycolumn); } case 187: break; case 111: { eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 188: break; case 69: { string.append('\t'); } case 189: break; case 23: { return symbol(BANG); } case 190: break; case 17: { yybegin(CHARCLASS); return symbol(OPENCLASS); } case 191: break; case 114: { cupDebug = true; } case 192: break; case 87: { charCount = true; } case 193: break; case 58: { return symbol(CHAR,new Character('\r')); } case 194: break; case 66: { string.append( (char) Integer.parseInt(yytext().substring(1,yytext().length()), 8)); } case 195: break; case 134: { scanErrorException = yytext().substring(11).trim(); } case 196: break; case 60: { return symbol(CHAR,new Character('\b')); } case 197: break; case 35: { yybegin(REGEXP); return symbol(MORETHAN); } case 198: break; case 132: { isImplementing = concExc(isImplementing, yytext().substring(12).trim()); } case 199: break; case 78: { return symbol(CHAR, new Character( (char) Integer.parseInt(yytext().substring(2,yytext().length()), 16))); } case 200: break; case 90: { isFinal = true; } case 201: break; case 137: { return symbol(UPPERCLASS); } case 202: break; case 46: { yybegin(REGEXP); return symbol(RBRACE); } case 203: break; case 51: { Out.warning(ErrorMessages.NOT_AT_BOL, yyline); yypushback(1); } case 204: break; case 28: { return symbol(QUESTION); } case 205: break; case 36: { string.append(yytext()); } case 206: break; case 135: { initThrow = concExc(initThrow,string); yybegin(MACROS); } case 207: break; case 140: { return symbol(JLETTERDIGITCLASS); } case 208: break; case 53: { nextState = REGEXPSTART; yybegin(COMMENT); } case 209: break; case 130: { eofThrow = concExc(eofThrow,string); yybegin(MACROS); } case 210: break; case 61: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol(REGEXPEND); } case 211: break; case 138: { return symbol(LOWERCLASS); } case 212: break; case 38: { yybegin(nextState); return symbol(STRING, string.toString()); } case 213: break; case 82: { classCode = conc(classCode,string); yybegin(MACROS); } case 214: break; case 8: { return symbol(IDENT, yytext()); } case 215: break; case 43: { return symbol(HAT); } case 216: break; case 29: { lookAheadUsed = true; return symbol(DOLLAR); } case 217: break; case 124: { eofThrow = concExc(eofThrow,yytext().substring(10).trim()); } case 218: break; case 5: { states.insert(yytext(),inclusive_states); } case 219: break; case 84: { cupCompatible = true; isImplementing = concExc(isImplementing, "java_cup.runtime.Scanner"); if (functionName == null) functionName = "next_token"; if (tokenType == null) tokenType = "java_cup.runtime.Symbol"; if (eofVal == null) eofVal = "return new java_cup.runtime.Symbol("+cupSymbol+".EOF);"; eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 220: break; case 127: { standalone = true; isInteger = true; } case 221: break; case 4: { throw new ScannerException(file,ErrorMessages.UNEXPECTED_CHAR, yyline, yycolumn); } case 222: break; case 47: { t.start(); yybegin(MACROS); macroDefinition = true; return symbol(USERCODE,userCode); } case 223: break; case 59: { return symbol(CHAR,new Character('\f')); } case 224: break; case 94: { eofCode = conc(eofCode,string); yybegin(MACROS); } case 225: break; case 65: { string.append(yytext().charAt(1)); } case 226: break; case 115: { caseless = true; } case 227: break; case 39: { throw new ScannerException(file,ErrorMessages.EOL_IN_CHARCLASS,yyline,yycolumn); } case 228: break; case 117: { return symbol(DIGITCLASS); } case 229: break; case 64: { if (macroDefinition) { yybegin(EATWSPNL); return symbol(BAR); } else { yybegin(REGEXPSTART); return symbol(NOACTION); } } case 230: break; case 30: { bolUsed = true; return symbol(HAT); } case 231: break; case 105: { throw new ScannerException(file,ErrorMessages.QUIL_CUPSYM, yyline); } case 232: break; case 102: { isIntWrap = true; } case 233: break; case 41: { if (balance > 0) balance--; else yybegin(REGEXP); return symbol(CLOSECLASS); } case 234: break; case 116: { bufferSize = Integer.parseInt(yytext().substring(8).trim()); } case 235: break; case 31: { actionText.append(yytext()); } case 236: break; case 86: { lineCount = true; } case 237: break; case 128: { throw new ScannerException(file,ErrorMessages.QUIL_SCANERROR, yyline); } case 238: break; case 104: { throw new ScannerException(file,ErrorMessages.QUIL_THROW, yyline); } case 239: break; case 83: { isInteger = true; } case 240: break; case 129: { return symbol(JLETTERCLASS); } case 241: break; case 98: { isInteger = true; if (eofVal == null) eofVal = "return 0;"; eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 242: break; case 18: { return symbol(STAR); } case 243: break; case 121: { throw new ScannerException(file,ErrorMessages.QUIL_EOFTHROW, yyline); } case 244: break; case 44: { return symbol(DASH); } case 245: break; case 106: { className = yytext().substring(7).trim(); } case 246: break; case 62: { nextState = REGEXP; yybegin(COMMENT); } case 247: break; case 136: { lexThrow = concExc(lexThrow,yytext().substring(12).trim()); } case 248: break; case 22: { return symbol(BAR); } case 249: break; case 125: { functionName = yytext().substring(10).trim(); } case 250: break; case 13: { yybegin(STATES); return symbol_countUpdate(LESSTHAN, null); } case 251: break; case 119: { eofVal = string.toString(); yybegin(MACROS); } case 252: break; case 73: { yypushback(1); yycolumn--; return symbol(CHAR, new Character(yytext().charAt(0))); } case 253: break; case 24: { return symbol(TILDE); } case 254: break; case 139: { lexThrow = concExc(lexThrow,string); yybegin(MACROS); } case 255: break; case 103: { notUnix = true; } case 256: break; case 89: { packed = false; useRowMap = true; } case 257: break; case 20: { string.setLength(0); nextState = REGEXP; yybegin(STRING_CONTENT); } case 258: break; case 2: { /* ignore */ } case 259: break; case 93: { return symbol(UNICODE); } case 260: break; case 16: { return symbol(POINT); } case 261: break; case 72: { string.append('\b'); } case 262: break; case 21: { yybegin(REGEXPSTART); return symbol(LBRACE); } case 263: break; case 131: { initThrow = concExc(initThrow,yytext().substring(11).trim()); } case 264: break; case 96: { packed = false; useRowMap = false; } case 265: break; case 7: { yybegin(MACROS); } case 266: break; case 75: { string.setLength(0); yybegin(COPY); } case 267: break; case 42: { string.setLength(0); nextState = CHARCLASS; yybegin(STRING_CONTENT); } case 268: break; case 118: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol(EOFRULE); } case 269: break; case 52: { macroDefinition = false; yybegin(REGEXPSTART); return symbol(DELIMITER); } case 270: break; case 50: { nextState = MACROS; yybegin(COMMENT); } case 271: break; case 10: { yybegin(REGEXP); return symbol(EQUALS); } case 272: break; case 34: { return symbol(COMMA); } case 273: break; case 1: { return symbol(EOF); } case 274: break; case 100: { throw new ScannerException(file,ErrorMessages.EOF_WO_ACTION); } case 275: break; case 71: { string.append('\f'); } case 276: break; case 40: { balance++; return symbol(OPENCLASS); } case 277: break; case 133: { throw new ScannerException(file,ErrorMessages.QUIL_YYLEXTHROW, yyline); } case 278: break; case 109: { File f = new File(yytext().substring(9).trim()); if ( !f.canRead() ) throw new ScannerException(file,ErrorMessages.NOT_READABLE, yyline); // check for cycle if (files.search(f) > 0) throw new ScannerException(file,ErrorMessages.FILE_CYCLE, yyline); try { yypushStream( new FileReader(f) ); files.push(file); file = f; Out.println("Including \""+file+"\""); } catch (FileNotFoundException e) { throw new ScannerException(file,ErrorMessages.NOT_READABLE, yyline); } } case 279: break; case 6: { } case 280: break; default: if (yyFlexInput == YYEOF && yyFlexStartRead == yyFlexCurrentPos) { yyFlexAtEOF = true; yyFlexDoEOF(); switch (yyFlexLexicalState) { case STRING_CONTENT: { throw new ScannerException(file,ErrorMessages.EOF_IN_STRING); } case 745: break; case MACROS: { if ( yymoreStreams() ) { file = (File) files.pop(); yypopStream(); } else throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 746: break; case STATELIST: { throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 747: break; case CHARCLASS: { throw new ScannerException(file,ErrorMessages.EOF_IN_REGEXP); } case 748: break; case JAVA_CODE: { throw new ScannerException(file,ErrorMessages.EOF_IN_ACTION, action_line-1); } case 749: break; case REPEATEXP: { throw new ScannerException(file,ErrorMessages.EOF_IN_REGEXP); } case 750: break; case COMMENT: { throw new ScannerException(file,ErrorMessages.EOF_IN_COMMENT); } case 751: break; case STATES: { throw new ScannerException(file,ErrorMessages.EOF_IN_STATES); } case 752: break; case COPY: { throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 753: break; default: { if ( yymoreStreams() ) { file = (File) files.pop(); yypopStream(); } else return symbol(EOF); } } } else { yyFlexScanError(YY_NO_MATCH); } } } } | 6220 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6220/9b61944465740d14ca2a4b7d70253b3cd65d7570/LexScan.java/clean/jflex/src/JFlex/LexScan.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8565,
1024,
67,
2316,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
9016,
19667,
1210,
31,
565,
509,
9016,
19667,
1803,
31,
565,
509,
5378,
9016,
19667,
1429,
48,
273,
1624,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8565,
1024,
67,
2316,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
9016,
19667,
1210,
31,
565,
509,
9016,
19667,
1803,
31,
565,
509,
5378,
9016,
19667,
1429,
48,
273,
1624,... |
super(new SelectRepositoryPageForAddExistingTask().setSelection(selection), TITLE); | super(new SelectRepositoryPageForAddExistingTask(getTaskRepositories()).setSelection(selection), TITLE); | public AddExistingTaskWizard(IStructuredSelection selection) { super(new SelectRepositoryPageForAddExistingTask().setSelection(selection), TITLE); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/aaab93f0b6a9c3a162c557073c97c3a693a655bc/AddExistingTaskWizard.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AddExistingTaskWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1436,
9895,
2174,
27130,
12,
45,
30733,
6233,
4421,
13,
288,
202,
202,
9565,
12,
2704,
6766,
3305,
1964,
1290,
986,
9895,
2174,
7675,
542,
6233,
12,
10705,
3631,
29406,
1769,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1436,
9895,
2174,
27130,
12,
45,
30733,
6233,
4421,
13,
288,
202,
202,
9565,
12,
2704,
6766,
3305,
1964,
1290,
986,
9895,
2174,
7675,
542,
6233,
12,
10705,
3631,
29406,
1769,
20... |
pduBuilder.setMaxRepetitions(getMaxRepititions()); | pduBuilder.setMaxRepetitions(getMaxRepetitions()); | public ResponseProcessor buildNextPdu(PduBuilder pduBuilder) { if (pduBuilder.getMaxVarsPerPdu() < 1) throw new IllegalArgumentException("maxVarsPerPdu < 1"); pduBuilder.addOid(m_last); pduBuilder.setNonRepeaters(0); // TODO: fix spelling pduBuilder.setMaxRepetitions(getMaxRepititions()); ResponseProcessor rp = new ResponseProcessor() { public void processResponse(SnmpObjId responseObjId, SnmpValue val) { if (val.isEndOfMib()) receivedEndOfMib(); m_last = responseObjId; if (m_base.isPrefixOf(responseObjId) && !m_base.equals(responseObjId)) { SnmpInstId inst = responseObjId.getInstance(m_base); if (inst != null) storeResult(m_base, inst, val); } } public boolean processErrors(int errorStatus, int errorIndex) { if (errorStatus == NO_ERR) { return false; } else if (errorStatus == TOO_BIG_ERR) { throw new IllegalArgumentException("Unable to handle tooBigError for oid request "+m_last); } else if (errorStatus == GEN_ERR) { reportGenErr("Received genErr reqeusting oid "+m_last+". Marking column is finished."); errorOccurred(); return true; } else if (errorStatus == NO_SUCH_NAME_ERR) { reportNoSuchNameErr("Received noSuchName reqeusting oid "+m_last+". Marking column is finished."); errorOccurred(); return true; } else { throw new IllegalArgumentException("Unexpected error processing oid "+m_last+". Aborting!"); } } }; return rp; } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/bbfb17b2fcc9757ef8559130db028517f32780fb/ColumnTracker.java/buggy/opennms-snmp/opennms-snmp-api/src/main/java/org/opennms/netmgt/snmp/ColumnTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2306,
5164,
1361,
2134,
52,
2544,
12,
52,
2544,
1263,
21160,
1263,
13,
288,
3639,
309,
261,
84,
2544,
1263,
18,
588,
2747,
5555,
2173,
52,
2544,
1435,
411,
404,
13,
5411,
604,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2306,
5164,
1361,
2134,
52,
2544,
12,
52,
2544,
1263,
21160,
1263,
13,
288,
3639,
309,
261,
84,
2544,
1263,
18,
588,
2747,
5555,
2173,
52,
2544,
1435,
411,
404,
13,
5411,
604,
394... |
public void storePatch (IPatch p, int bankNum,int patchNum) | public void storePatch (Patch p, int bankNum,int patchNum) | public void storePatch (IPatch p, int bankNum,int patchNum) { if ( ( ((DX7FamilyDevice)(getDevice())).getSwOffMemProtFlag() & 0x01) == 1 ) { // switch off memory protection (internal+cartridge!) YamahaDX7IISysexHelpers.swOffMemProt(this, (byte)(getChannel()+0x10), (byte)0 ); } else { if( ( ((DX7FamilyDevice)(getDevice())).getTipsMsgFlag() & 0x01) == 1 ) // show Information YamahaDX7IIStrings.dxShowInformation(toString(), YamahaDX7IIStrings.MEMORY_PROTECTION_STRING); } // choose the desired MIDI Receive block (internal (1-32), internal (33-64)) YamahaDX7IISysexHelpers.chRcvBlock(this, (byte)(getChannel()+0x10), (byte)(bankNum)); sendPatchWorker(p); }; | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/8de9e9d107eb8c0487bbadf2f24d3a5cc9bc1add/YamahaDX7IIAdditionalVoiceBankDriver.java/clean/JSynthLib/synthdrivers/YamahaDX7II/YamahaDX7IIAdditionalVoiceBankDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1707,
7332,
261,
2579,
505,
293,
16,
509,
11218,
2578,
16,
474,
4729,
2578,
13,
202,
95,
202,
202,
430,
261,
261,
14015,
28826,
27,
9203,
3654,
21433,
588,
3654,
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,
225,
202,
482,
918,
1707,
7332,
261,
2579,
505,
293,
16,
509,
11218,
2578,
16,
474,
4729,
2578,
13,
202,
95,
202,
202,
430,
261,
261,
14015,
28826,
27,
9203,
3654,
21433,
588,
3654,
10756,
2... |
AST tmp61_AST_in = (AST)_t; | AST tmp60_AST_in = (AST)_t; | public final void field(AST _t) throws RecognitionException { AST field_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST ref = null; AST id = null; AST __t27 = _t; ref = _t==ASTNULL ? null :(AST)_t; match(_t,Field_ref); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case INPUT: { AST tmp60_AST_in = (AST)_t; match(_t,INPUT); _t = _t.getNextSibling(); break; } case BROWSE: case FRAME: case ID: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FRAME: { AST __t30 = _t; AST tmp61_AST_in = (AST)_t; match(_t,FRAME); _t = _t.getFirstChild(); AST tmp62_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); _t = __t30; _t = _t.getNextSibling(); break; } case BROWSE: { AST __t31 = _t; AST tmp63_AST_in = (AST)_t; match(_t,BROWSE); _t = _t.getFirstChild(); AST tmp64_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); _t = __t31; _t = _t.getNextSibling(); break; } case ID: { break; } default: { throw new NoViableAltException(_t); } } } id = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Array_subscript: { array_subscript(_t); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t27; _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { tpSupport.fieldRef(ref, id); } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
652,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
652,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
652,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
652,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88... |
pw.println("</tr>"); | pw.println("</table>"); | private void processResults(List testResults, File outputFile) throws BuildException { Iterator testResultsIter = testResults.iterator(); FileWriter fw; try { fw = new FileWriter(outputFile); } catch (IOException e) { throw new BuildException("failed to open outout file: " + outputFile, e); } PrintWriter pw = new PrintWriter(fw); pw.println("<html>"); pw.println("<head><title>Acceptance Test Results</title></head>"); pw.println("<body>"); while (testResultsIter.hasNext()) { AcceptanceTestResult atr = (AcceptanceTestResult) testResultsIter.next(); pw.println("<h2>Testing: " + atr.getTest().getSql() + "</h2>"); pw.println("<h3>test type: " + atr.getTest().getType() + "</h3>"); if (atr.getTest().getNote() != null) { pw.println("<h3>Description: " + atr.getTest().getNote() + "</h3>"); } if (atr.isSuccessful()) { pw.println("Result: <font color=\"green\">successful</font>"); } else { pw.println("Result: <font color=\"red\">FAILED</font>"); } if ((atr.getTest().getType().equals(AcceptanceTest.NO_RESULTS_TEST) || atr.getTest().getType().equals(AcceptanceTest.RESULTS_REPORT)) && atr.getResults().size() > 0) { pw.println("<table border=1>"); Iterator resultsIter = atr.getResults().iterator(); while (resultsIter.hasNext()) { List row = (List) resultsIter.next(); pw.println("<tr>"); Iterator rowIter = row.iterator(); while (rowIter.hasNext()) { pw.println("<td>"); Object o = rowIter.next(); if (o != null) { pw.println(o); } else { pw.println("<font color=\"grey\" size=\"-1\">null</font>"); } pw.println("</td>"); } pw.println("</tr>"); } pw.println("</table>"); } pw.println("<hr>"); } pw.println("</ul></body></html>"); pw.close(); try { fw.close(); } catch (IOException e) { throw new BuildException("couldn't close " + outputFile, e); } } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/8e1c85c188e237b63bfcbe2566e2567b19f84ff7/AcceptanceTestTask.java/buggy/intermine/objectstore/main/src/org/intermine/task/AcceptanceTestTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
3447,
12,
682,
1842,
3447,
16,
1387,
15047,
13,
1216,
18463,
288,
3639,
4498,
1842,
3447,
2360,
273,
1842,
3447,
18,
9838,
5621,
3639,
24639,
7600,
31,
3639,
775,
288,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
3447,
12,
682,
1842,
3447,
16,
1387,
15047,
13,
1216,
18463,
288,
3639,
4498,
1842,
3447,
2360,
273,
1842,
3447,
18,
9838,
5621,
3639,
24639,
7600,
31,
3639,
775,
288,
54... |
super(cspace, pixelBits, rmask, gmask, bmask, amask, isAlphaPremultiplied, ((amask == 0) ? Transparency.OPAQUE : Transparency.TRANSLUCENT), transferType); | this(ColorSpace.getInstance(ColorSpace.CS_sRGB), pixelBits, rmask, gmask, bmask, 0, false, Buffers.smallestAppropriateTransferType(pixelBits) ); | public DirectColorModel(ColorSpace cspace, int pixelBits, int rmask, int gmask, int bmask, int amask, boolean isAlphaPremultiplied, int transferType) { super(cspace, pixelBits, rmask, gmask, bmask, amask, isAlphaPremultiplied, ((amask == 0) ? Transparency.OPAQUE : Transparency.TRANSLUCENT), transferType); } | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/51a535c0ebf53d0804b5afd81cb0acf823872599/DirectColorModel.java/buggy/libjava/java/awt/image/DirectColorModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9908,
2957,
1488,
12,
2957,
3819,
2873,
909,
16,
509,
4957,
6495,
16,
9506,
225,
509,
436,
4455,
16,
509,
314,
4455,
16,
509,
324,
4455,
16,
509,
2125,
835,
16,
9506,
225,
1250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9908,
2957,
1488,
12,
2957,
3819,
2873,
909,
16,
509,
4957,
6495,
16,
9506,
225,
509,
436,
4455,
16,
509,
314,
4455,
16,
509,
324,
4455,
16,
509,
2125,
835,
16,
9506,
225,
1250,
... |
throw Context.reportRuntimeError( Context.getMessage("msg.incompat.call", errArgs)); | String msg = Context.getMessage("msg.incompat.call", errArgs); throw NativeGlobal.constructError(cx, "TypeError", msg, scope); | public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { if (parmsLength < 0) return callVarargs(cx, thisObj, args, false); if (!isStatic) { // OPT: cache "clazz"? Class clazz = method != null ? method.getDeclaringClass() : ctor.getDeclaringClass(); Scriptable p = thisObj; while (p != null && !clazz.isInstance(p)) { // Walk up the prototype chain to find an object to call the // method on p = p.getPrototype(); } if (p == null) { // Couldn't find an object to call this on. Object[] errArgs = { names[0] }; throw Context.reportRuntimeError( Context.getMessage("msg.incompat.call", errArgs)); } thisObj = p; } Object[] invokeArgs; int i; if (parmsLength == args.length) { invokeArgs = args; // avoid copy loop if no conversions needed i = (types == null) ? parmsLength : 0; } else { invokeArgs = new Object[parmsLength]; i = 0; } for (; i < parmsLength; i++) { Object arg = (i < args.length) ? args[i] : Undefined.instance; if (types != null) { arg = convertArg(this, arg, types[i]); } invokeArgs[i] = arg; } try { Object result = (method != null) ? method.invoke(thisObj, invokeArgs) : ctor.newInstance(invokeArgs); return hasVoidReturn ? Undefined.instance : result; } catch (InvocationTargetException e) { throw JavaScriptException.wrapException(scope, e); } catch (IllegalAccessException e) { throw WrappedException.wrapException(e); } catch (InstantiationException e) { throw WrappedException.wrapException(e); } } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/504a2557ce23fe6f381fdde0e1566eb0ce65ebc1/FunctionObject.java/clean/js/rhino/org/mozilla/javascript/FunctionObject.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,
29927,
1782,
411,
374,
13,
5411,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
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,
29927,
1782,
411,
374,
13,
5411,
327,... |
case 195: { CUP$result = new SymbolList(/*fixed_array_size_list*/97); | case 197: { CUP$result = new SymbolList(/*fixed_array_size_list*/95); | public final java_cup.runtime.symbol CUP$do_action( int CUP$act_num, java_cup.runtime.lr_parser CUP$parser, java.util.Stack CUP$stack, int CUP$top) throws java.lang.Exception { /* object for return from actions */ java_cup.runtime.symbol CUP$result; /* select the action based on the action number */ switch (CUP$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 226: // empty ::= { CUP$result = new java_cup.runtime.symbol(/*empty*/4); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 225: // param_type_spec ::= scopename { CUP$result = new TypeSpec(/*param_type_spec*/44); ((TypeSpec)CUP$result).type_spec = (/*s*/(ScopedName)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 224: // param_type_spec ::= string_type { CUP$result = new TypeSpec(/*param_type_spec*/44); ((TypeSpec)CUP$result).type_spec = (/*s*/(StringType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 223: // param_type_spec ::= base_type_spec { CUP$result = new TypeSpec(/*param_type_spec*/44); ((TypeSpec)CUP$result).type_spec = (/*s*/(BaseType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 222: // string_literal_list ::= string_literal COMMA string_literal_list { CUP$result = new java_cup.runtime.symbol(/*string_literal_list*/3); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 221: // string_literal_list ::= string_literal { CUP$result = new java_cup.runtime.symbol(/*string_literal_list*/3); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 220: // context_expr ::= empty { CUP$result = new java_cup.runtime.symbol(/*context_expr*/2); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 219: // context_expr ::= CONTEXT LPAREN string_literal_list RPAREN { CUP$result = new java_cup.runtime.symbol(/*context_expr*/2); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 218: // raises_expr ::= empty { CUP$result = new RaisesExpr(/*raises_expr*/84); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 217: // raises_expr ::= RAISES LPAREN scopename_list RPAREN { CUP$result = new RaisesExpr(/*raises_expr*/84); ((RaisesExpr)CUP$result).nameList = (Vector)(/*snl*/(SymbolList)CUP$stack.elementAt(CUP$top-1)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 216: // param_attribute ::= INOUT { CUP$result = new java_cup.runtime.int_token(/*param_attribute*/6); ((java_cup.runtime.int_token)CUP$result).int_val = ParamDecl.MODE_INOUT; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 215: // param_attribute ::= OUT { CUP$result = new java_cup.runtime.int_token(/*param_attribute*/6); ((java_cup.runtime.int_token)CUP$result).int_val = ParamDecl.MODE_OUT; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 214: // param_attribute ::= IN { CUP$result = new java_cup.runtime.int_token(/*param_attribute*/6); ((java_cup.runtime.int_token)CUP$result).int_val = ParamDecl.MODE_IN; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 213: // param_dcl ::= param_attribute param_type_spec simple_declarator { CUP$result = new ParamDecl(/*param_dcl*/83); ((ParamDecl)CUP$result).paramAttribute = (/*pa*/(java_cup.runtime.int_token)CUP$stack.elementAt(CUP$top-2)).int_val; ((ParamDecl)CUP$result).paramTypeSpec = (/*pts*/(TypeSpec)CUP$stack.elementAt(CUP$top-1)); ((ParamDecl)CUP$result).simple_declarator = (/*sd*/(SimpleDeclarator)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 212: // param_dcls ::= param_dcl { CUP$result = new SymbolList(/*param_dcls*/89); ((SymbolList)CUP$result).v.insertElementAt((/*pd*/(ParamDecl)CUP$stack.elementAt(CUP$top-0)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 211: // param_dcls ::= param_dcl COMMA param_dcls { CUP$result = new SymbolList(/*param_dcls*/89); ((SymbolList)CUP$result).v = (Vector)(/*pds*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.insertElementAt((/*pd*/(ParamDecl)CUP$stack.elementAt(CUP$top-2)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 210: // parameter_dcls ::= LPAREN RPAREN { CUP$result = new SymbolList(/*parameter_dcls*/91); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 209: // parameter_dcls ::= LPAREN param_dcls RPAREN { CUP$result = new SymbolList(/*parameter_dcls*/91); ((SymbolList)CUP$result).v = (Vector)(/*pds*/(SymbolList)CUP$stack.elementAt(CUP$top-1)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 208: // void_type_spec ::= VOID { CUP$result = new VoidTypeSpec(/*void_type_spec*/71); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 207: // op_type_spec ::= void_type_spec { CUP$result = new TypeSpec(/*op_type_spec*/43); ((TypeSpec)CUP$result).type_spec = (/*s*/(VoidTypeSpec)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 206: // op_type_spec ::= param_type_spec { CUP$result = new TypeSpec(/*op_type_spec*/43); ((TypeSpec)CUP$result).type_spec = (/*s*/(TypeSpec)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 205: // op_attribute ::= empty { CUP$result = new java_cup.runtime.int_token(/*op_attribute*/5); ((java_cup.runtime.int_token)CUP$result).int_val = OpDecl.NO_ATTRIBUTE; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 204: // op_attribute ::= ONEWAY { CUP$result = new java_cup.runtime.int_token(/*op_attribute*/5); ((java_cup.runtime.int_token)CUP$result).int_val = OpDecl.ONEWAY; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 203: // op_dcl ::= op_attribute op_type_spec ID parameter_dcls raises_expr context_expr { CUP$result = new OpDecl(/*op_dcl*/85); ((OpDecl)CUP$result).opAttribute = (/*oa*/(java_cup.runtime.int_token)CUP$stack.elementAt(CUP$top-5)).int_val; ((OpDecl)CUP$result).opTypeSpec = (/*ots*/(TypeSpec)CUP$stack.elementAt(CUP$top-4)); ((OpDecl)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-3))); ((OpDecl)CUP$result).paramDecls = (Vector)(/*pds*/(SymbolList)CUP$stack.elementAt(CUP$top-2)).v.clone(); ((OpDecl)CUP$result).raisesExpr = (/*re*/(RaisesExpr)CUP$stack.elementAt(CUP$top-1)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 202: // except_dcl ::= EXCEPTION ID LCBRACE member_list RCBRACE { CUP$result = new StructType(/*except_dcl*/52); ((StructType)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-3))); ((StructType)CUP$result).exc = true; ((StructType)CUP$result).set_memberlist( (/*ml*/(MemberList)CUP$stack.elementAt(CUP$top-1)) ); ((StructType)CUP$result).set_included( parser.include_state ); parser.closeScope( (Scope)((StructType)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 201: // except_dcl ::= EXCEPTION ID LCBRACE RCBRACE { CUP$result = new StructType(/*except_dcl*/52); ((StructType)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-2))); ((StructType)CUP$result).exc = true; ((StructType)CUP$result).set_included( parser.include_state ); parser.closeScope( (Scope)((StructType)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 200: // simple_declarator_list ::= simple_declarator COMMA simple_declarator_list { CUP$result = new SymbolList(/*simple_declarator_list*/93); ((SymbolList)CUP$result).v = (Vector)(/*sdl*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.insertElementAt((/*sd*/(SimpleDeclarator)CUP$stack.elementAt(CUP$top-2)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 199: // simple_declarator_list ::= simple_declarator { CUP$result = new SymbolList(/*simple_declarator_list*/93); ((SymbolList)CUP$result).v.insertElementAt((/*sd*/(SimpleDeclarator)CUP$stack.elementAt(CUP$top-0)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 198: // attr_dcl ::= ATTRIBUTE param_type_spec simple_declarator_list { CUP$result = new AttrDecl(/*attr_dcl*/86); ((AttrDecl)CUP$result).readOnly = false; ((AttrDecl)CUP$result).param_type_spec = (/*pts*/(TypeSpec)CUP$stack.elementAt(CUP$top-1)); ((AttrDecl)CUP$result).declarators = (/*sdl*/(SymbolList)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 197: // attr_dcl ::= READONLY ATTRIBUTE param_type_spec simple_declarator_list { CUP$result = new AttrDecl(/*attr_dcl*/86); ((AttrDecl)CUP$result).readOnly = true; ((AttrDecl)CUP$result).param_type_spec = (/*pts*/(TypeSpec)CUP$stack.elementAt(CUP$top-1)); ((AttrDecl)CUP$result).declarators = (/*sdl*/(SymbolList)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 196: // fixed_array_size ::= LSBRACE positive_int_const RSBRACE { CUP$result = new FixedArraySize(/*fixed_array_size*/82); ((FixedArraySize)CUP$result).pos_int_const = (/*pic*/(PosIntConst)CUP$stack.elementAt(CUP$top-1)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 195: // fixed_array_size_list ::= fixed_array_size fixed_array_size_list { CUP$result = new SymbolList(/*fixed_array_size_list*/97); ((SymbolList)CUP$result).v = (Vector)(/*fasl*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.insertElementAt((/*fas*/(FixedArraySize)CUP$stack.elementAt(CUP$top-1)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 194: // fixed_array_size_list ::= fixed_array_size { CUP$result = new SymbolList(/*fixed_array_size_list*/97); ((SymbolList)CUP$result).v.insertElementAt((/*fas*/(FixedArraySize)CUP$stack.elementAt(CUP$top-0)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 193: // array_declarator ::= ID fixed_array_size_list { CUP$result = new ArrayDeclarator(/*array_declarator*/81); ((ArrayDeclarator)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-1))); ((ArrayDeclarator)CUP$result).fixed_array_size_list = (/*fasl*/(SymbolList)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 192: // fixed_point_type ::= FIXED LESSTHAN positive_int_const COMMA positive_int_const GREATERTHAN { CUP$result = new FixedPointType(/*fixed_point_type*/74); ((FixedPointType)CUP$result).digit_expr = (/*digits*/(PosIntConst)CUP$stack.elementAt(CUP$top-3)).const_expr; ((FixedPointType)CUP$result).scale_expr = (/*scale*/(PosIntConst)CUP$stack.elementAt(CUP$top-1)).const_expr; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 191: // string_type ::= WSTRING { CUP$result = new StringType(/*string_type*/72); ((StringType)CUP$result).setWide(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 190: // string_type ::= STRING { CUP$result = new StringType(/*string_type*/72); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 189: // string_type ::= WSTRING LESSTHAN positive_int_const GREATERTHAN { CUP$result = new StringType(/*string_type*/72); ((StringType)CUP$result).max = (/*pic*/(PosIntConst)CUP$stack.elementAt(CUP$top-1)).const_expr; ((StringType)CUP$result).setWide(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 188: // string_type ::= STRING LESSTHAN positive_int_const GREATERTHAN { CUP$result = new StringType(/*string_type*/72); ((StringType)CUP$result).max = (/*pic*/(PosIntConst)CUP$stack.elementAt(CUP$top-1)).const_expr; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 187: // sequence_type ::= SEQUENCE LESSTHAN simple_type_spec GREATERTHAN { CUP$result = new SequenceType(/*sequence_type*/73); ((SequenceType)CUP$result).setTypeSpec( (/*sts*/(SimpleTypeSpec)CUP$stack.elementAt(CUP$top-1)) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 186: // sequence_type ::= SEQUENCE LESSTHAN simple_type_spec COMMA positive_int_const GREATERTHAN { CUP$result = new SequenceType(/*sequence_type*/73); ((SequenceType)CUP$result).max = (/*pic*/(PosIntConst)CUP$stack.elementAt(CUP$top-1)).const_expr; ((SequenceType)CUP$result).setTypeSpec( (/*sts*/(SimpleTypeSpec)CUP$stack.elementAt(CUP$top-3)) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 185: // native_type ::= NATIVE simple_declarator { CUP$result = new NativeType(/*native_type*/54); ((NativeType)CUP$result).declarator = (/*sd*/(SimpleDeclarator)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 184: // enumerator_list ::= ID COMMA enumerator_list { CUP$result = new SymbolList(/*enumerator_list*/96); ((SymbolList)CUP$result).v = (Vector)(/*el*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.insertElementAt((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-2)).str_val,0); ((SymbolList)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-2))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 183: // enumerator_list ::= ID { CUP$result = new SymbolList(/*enumerator_list*/96); ((SymbolList)CUP$result).v.insertElementAt((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0)).str_val,0); ((SymbolList)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 182: // enum_type ::= ENUM ID LCBRACE enumerator_list RCBRACE { CUP$result = new EnumType(/*enum_type*/50); ((EnumType)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-3))); ((EnumType)CUP$result).enumlist = (/*el*/(SymbolList)CUP$stack.elementAt(CUP$top-1)); ((EnumType)CUP$result).set_included( parser.include_state ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 181: // element_spec ::= type_spec declarator { CUP$result = new ElementSpec(/*element_spec*/57); ((ElementSpec)CUP$result).t.type_spec = (/*ts*/(TypeSpec)CUP$stack.elementAt(CUP$top-1)); ((ElementSpec)CUP$result).d = (/*dc*/(Declarator)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 180: // case_label_list ::= DEFAULT COLON case_label_list { CUP$result = new SymbolList(/*case_label_list*/88); ((SymbolList)CUP$result).v = (Vector)(/*cll*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.addElement(null); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 179: // case_label_list ::= CASE const_expr COLON case_label_list { CUP$result = new SymbolList(/*case_label_list*/88); ((SymbolList)CUP$result).v = (Vector)(/*cll*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.addElement((/*c*/(ConstExpr)CUP$stack.elementAt(CUP$top-2))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 178: // case_label_list ::= DEFAULT COLON { CUP$result = new SymbolList(/*case_label_list*/88); ((SymbolList)CUP$result).v.addElement( null ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 177: // case_label_list ::= CASE const_expr COLON { CUP$result = new SymbolList(/*case_label_list*/88); ((SymbolList)CUP$result).v.addElement((/*c*/(ConstExpr)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 176: // case ::= case_label_list element_spec SEMI { CUP$result = new Case(/*case*/56); ((Case)CUP$result).element_spec = (/*es*/(ElementSpec)CUP$stack.elementAt(CUP$top-1)); ((Case)CUP$result).case_label_list = (/*c*/(SymbolList)CUP$stack.elementAt(CUP$top-2)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 175: // switch_body ::= case switch_body { CUP$result = new SwitchBody(/*switch_body*/55); ((SwitchBody)CUP$result).caseListVector = (Vector)(/*sb*/(SwitchBody)CUP$stack.elementAt(CUP$top-0)).caseListVector.clone(); ((SwitchBody)CUP$result).caseListVector.addElement( (/*c*/(Case)CUP$stack.elementAt(CUP$top-1)) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 174: // switch_body ::= case { CUP$result = new SwitchBody(/*switch_body*/55); ((SwitchBody)CUP$result).caseListVector.addElement((/*c*/(Case)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 173: // switch_type_spec ::= scopename { CUP$result = new TypeSpec(/*switch_type_spec*/45); ((TypeSpec)CUP$result).type_spec = (/*s*/(ScopedName)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 172: // switch_type_spec ::= enum_type { CUP$result = new TypeSpec(/*switch_type_spec*/45); ((TypeSpec)CUP$result).set_constr((/*e*/(EnumType)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 171: // switch_type_spec ::= bool_type { CUP$result = new TypeSpec(/*switch_type_spec*/45); ((TypeSpec)CUP$result).type_spec = (/*b*/(BooleanType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 170: // switch_type_spec ::= char_type { CUP$result = new TypeSpec(/*switch_type_spec*/45); ((TypeSpec)CUP$result).type_spec = (/*c*/(CharType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 169: // switch_type_spec ::= int_type { CUP$result = new TypeSpec(/*switch_type_spec*/45); ((TypeSpec)CUP$result).type_spec = (/*i*/(IntType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 168: // union_type ::= UNION ID { CUP$result = new UnionType(/*union_type*/53); ((UnionType)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); parser.closeScope( (Scope)((UnionType)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 167: // union_type ::= UNION ID SWITCH LPAREN switch_type_spec RPAREN LCBRACE switch_body RCBRACE { CUP$result = new UnionType(/*union_type*/53); ((UnionType)CUP$result).setSwitchType( (/*s*/(TypeSpec)CUP$stack.elementAt(CUP$top-4)) ); ((UnionType)CUP$result).setSwitchBody( (/*sb*/(SwitchBody)CUP$stack.elementAt(CUP$top-1)) ); ((UnionType)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-7))); ((UnionType)CUP$result).set_included( parser.include_state ); parser.closeScope( (Scope)((UnionType)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 166: // member ::= type_spec declarators SEMI { CUP$result = new Member(/*member*/78); ((Member)CUP$result).type_spec = (/*ts*/(TypeSpec)CUP$stack.elementAt(CUP$top-2)); ((Member)CUP$result).declarators = (/*ds*/(SymbolList)CUP$stack.elementAt(CUP$top-1)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 165: // member_list ::= member member_list { CUP$result = new MemberList(/*member_list*/87); ((MemberList)CUP$result).v = (Vector)(/*ml*/(MemberList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((MemberList)CUP$result).v.insertElementAt((/*m*/(Member)CUP$stack.elementAt(CUP$top-1)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 164: // member_list ::= member { CUP$result = new MemberList(/*member_list*/87); ((MemberList)CUP$result).v.insertElementAt((/*m*/(Member)CUP$stack.elementAt(CUP$top-0)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 163: // struct_type ::= STRUCT ID { CUP$result = new StructType(/*struct_type*/51); ((StructType)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); parser.closeScope( (Scope)((StructType)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 162: // struct_type ::= STRUCT ID LCBRACE member_list RCBRACE { CUP$result = new StructType(/*struct_type*/51); ((StructType)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-3))); ((StructType)CUP$result).exc = false; ((StructType)CUP$result).set_memberlist( (/*ml*/(MemberList)CUP$stack.elementAt(CUP$top-1)) ); ((StructType)CUP$result).set_included( parser.include_state ); parser.closeScope( (Scope)((StructType)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 161: // any_type ::= ANY { CUP$result = new AnyType(/*any_type*/70); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 160: // octet_type ::= OCTET { CUP$result = new OctetType(/*octet_type*/69); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 159: // bool_type ::= BOOLEAN { CUP$result = new BooleanType(/*bool_type*/68); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 158: // char_type ::= WCHAR { CUP$result = new CharType(/*char_type*/67); ((CharType)CUP$result).setWide(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 157: // char_type ::= CHAR { CUP$result = new CharType(/*char_type*/67); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 156: // long_long_type ::= LONG LONG { CUP$result = new LongLongType(/*long_long_type*/66); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 155: // long_type ::= LONG { CUP$result = new LongType(/*long_type*/65); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 154: // short_type ::= SHORT { CUP$result = new ShortType(/*short_type*/64); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 153: // int_type ::= UNSIGNED short_type { CUP$result = new IntType(/*int_type*/59); ((IntType)CUP$result).type_spec = (/*s*/(ShortType)CUP$stack.elementAt(CUP$top-0)); ((IntType)CUP$result).setUnsigned(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 152: // int_type ::= short_type { CUP$result = new IntType(/*int_type*/59); ((IntType)CUP$result).type_spec = (/*s*/(ShortType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 151: // int_type ::= UNSIGNED long_long_type { CUP$result = new IntType(/*int_type*/59); ((IntType)CUP$result).type_spec = (/*l*/(LongLongType)CUP$stack.elementAt(CUP$top-0)); ((IntType)CUP$result).setUnsigned(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 150: // int_type ::= UNSIGNED long_type { CUP$result = new IntType(/*int_type*/59); ((IntType)CUP$result).type_spec = (/*l*/(LongType)CUP$stack.elementAt(CUP$top-0)); ((IntType)CUP$result).setUnsigned(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 149: // int_type ::= long_long_type { CUP$result = new IntType(/*int_type*/59); ((IntType)CUP$result).type_spec = (/*ll*/(LongLongType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 148: // int_type ::= long_type { CUP$result = new IntType(/*int_type*/59); ((IntType)CUP$result).type_spec = (/*l*/(LongType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 147: // double_type ::= DOUBLE { CUP$result = new DoubleType(/*double_type*/63); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 146: // fixed_pt_const_type ::= FIXED { CUP$result = new FixedPointConstType(/*fixed_pt_const_type*/62); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 145: // float_type ::= FLOAT { CUP$result = new FloatType(/*float_type*/61); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 144: // float_pt_type ::= double_type { CUP$result = new FloatPtType(/*float_pt_type*/60); ((FloatPtType)CUP$result).type_spec = (/*d*/(DoubleType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 143: // float_pt_type ::= float_type { CUP$result = new FloatPtType(/*float_pt_type*/60); ((FloatPtType)CUP$result).type_spec = (/*f*/(FloatType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 142: // simple_declarator ::= ID { CUP$result = new SimpleDeclarator(/*simple_declarator*/80); ((SimpleDeclarator)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 141: // declarator ::= array_declarator { CUP$result = new Declarator(/*declarator*/79); ((Declarator)CUP$result).d = (/*s*/(ArrayDeclarator)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 140: // declarator ::= simple_declarator { CUP$result = new Declarator(/*declarator*/79); ((Declarator)CUP$result).d = (/*s*/(SimpleDeclarator)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 139: // declarators ::= declarator { CUP$result = new SymbolList(/*declarators*/94); ((SymbolList)CUP$result).v.insertElementAt((/*d*/(Declarator)CUP$stack.elementAt(CUP$top-0)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 138: // declarators ::= declarator COMMA declarators { CUP$result = new SymbolList(/*declarators*/94); ((SymbolList)CUP$result).v = (Vector)(/*ds*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.insertElementAt((/*d*/(Declarator)CUP$stack.elementAt(CUP$top-2)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 137: // constr_type_spec ::= enum_type { CUP$result = new ConstrTypeSpec(/*constr_type_spec*/49); ((ConstrTypeSpec)CUP$result).c_type_spec = (/*e*/(EnumType)CUP$stack.elementAt(CUP$top-0)); ((ConstrTypeSpec)CUP$result).set_token((/*e*/(EnumType)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 136: // constr_type_spec ::= union_type { CUP$result = new ConstrTypeSpec(/*constr_type_spec*/49); ((ConstrTypeSpec)CUP$result).c_type_spec = (/*u*/(UnionType)CUP$stack.elementAt(CUP$top-0)); ((ConstrTypeSpec)CUP$result).set_token((/*u*/(UnionType)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 135: // constr_type_spec ::= struct_type { CUP$result = new ConstrTypeSpec(/*constr_type_spec*/49); ((ConstrTypeSpec)CUP$result).c_type_spec = (/*s*/(StructType)CUP$stack.elementAt(CUP$top-0)); ((ConstrTypeSpec)CUP$result).set_token((/*s*/(StructType)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 134: // template_type_spec ::= fixed_point_type { CUP$result = new TemplateTypeSpec(/*template_type_spec*/48); ((TemplateTypeSpec)CUP$result).type_spec = (/*f*/(FixedPointType)CUP$stack.elementAt(CUP$top-0)); ((TemplateTypeSpec)CUP$result).set_token((/*f*/(FixedPointType)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 133: // template_type_spec ::= string_type { CUP$result = new TemplateTypeSpec(/*template_type_spec*/48); ((TemplateTypeSpec)CUP$result).type_spec = (/*s*/(StringType)CUP$stack.elementAt(CUP$top-0)); ((TemplateTypeSpec)CUP$result).set_token((/*s*/(StringType)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 132: // template_type_spec ::= sequence_type { CUP$result = new TemplateTypeSpec(/*template_type_spec*/48); ((TemplateTypeSpec)CUP$result).type_spec = (/*s*/(SequenceType)CUP$stack.elementAt(CUP$top-0)); ((TemplateTypeSpec)CUP$result).set_token((/*s*/(SequenceType)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 131: // base_type_spec ::= VALUEBASE { CUP$result = new BaseType(/*base_type_spec*/58); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 130: // base_type_spec ::= any_type { CUP$result = new BaseType(/*base_type_spec*/58); ((BaseType)CUP$result).type_spec = (/*s*/(AnyType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 129: // base_type_spec ::= octet_type { CUP$result = new BaseType(/*base_type_spec*/58); ((BaseType)CUP$result).type_spec = (/*s*/(OctetType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 128: // base_type_spec ::= bool_type { CUP$result = new BaseType(/*base_type_spec*/58); ((BaseType)CUP$result).type_spec = (/*s*/(BooleanType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 127: // base_type_spec ::= char_type { CUP$result = new BaseType(/*base_type_spec*/58); ((BaseType)CUP$result).type_spec = (/*s*/(CharType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 126: // base_type_spec ::= int_type { CUP$result = new BaseType(/*base_type_spec*/58); ((BaseType)CUP$result).type_spec = (/*s*/(IntType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 125: // base_type_spec ::= float_pt_type { CUP$result = new BaseType(/*base_type_spec*/58); ((BaseType)CUP$result).type_spec = (/*s*/(FloatPtType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 124: // simple_type_spec ::= scopename { CUP$result = new SimpleTypeSpec(/*simple_type_spec*/47); ((SimpleTypeSpec)CUP$result).type_spec = (/*s*/(ScopedName)CUP$stack.elementAt(CUP$top-0)); ((SimpleTypeSpec)CUP$result).set_token((/*s*/(ScopedName)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 123: // simple_type_spec ::= template_type_spec { CUP$result = new SimpleTypeSpec(/*simple_type_spec*/47); ((SimpleTypeSpec)CUP$result).type_spec = (/*s*/(TemplateTypeSpec)CUP$stack.elementAt(CUP$top-0)); ((SimpleTypeSpec)CUP$result).set_token((/*s*/(TemplateTypeSpec)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 122: // simple_type_spec ::= base_type_spec { CUP$result = new SimpleTypeSpec(/*simple_type_spec*/47); ((SimpleTypeSpec)CUP$result).type_spec = (/*s*/(BaseType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 121: // type_spec ::= constr_type_spec { CUP$result = new TypeSpec(/*type_spec*/42); ((TypeSpec)CUP$result).type_spec = (/*s*/(ConstrTypeSpec)CUP$stack.elementAt(CUP$top-0)); ((TypeSpec)CUP$result).set_token((/*s*/(ConstrTypeSpec)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 120: // type_spec ::= simple_type_spec { CUP$result = new TypeSpec(/*type_spec*/42); ((TypeSpec)CUP$result).type_spec = (/*s*/(SimpleTypeSpec)CUP$stack.elementAt(CUP$top-0)); ((TypeSpec)CUP$result).set_token((/*s*/(SimpleTypeSpec)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 119: // type_declarator ::= type_spec declarators { CUP$result = new TypeDeclarator(/*type_declarator*/41); ((TypeDeclarator)CUP$result).type_spec = (/*ts*/(TypeSpec)CUP$stack.elementAt(CUP$top-1)); ((TypeDeclarator)CUP$result).declarators = (/*ds*/(SymbolList)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 118: // type_def ::= TYPEDEF type_declarator { CUP$result = new TypeDef(/*type_def*/46); ((TypeDef)CUP$result).type_declarator = (/*t*/(TypeDeclarator)CUP$stack.elementAt(CUP$top-0)); ((TypeDef)CUP$result).set_included( parser.include_state ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 117: // type_dcl ::= native_type { CUP$result = new TypeDeclaration(/*type_dcl*/40); ((TypeDeclaration)CUP$result).type_decl = (/*n*/(NativeType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 116: // type_dcl ::= enum_type { CUP$result = new TypeDeclaration(/*type_dcl*/40); ((TypeDeclaration)CUP$result).type_decl = (/*e*/(EnumType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 115: // type_dcl ::= union_type { CUP$result = new TypeDeclaration(/*type_dcl*/40); ((TypeDeclaration)CUP$result).type_decl = (/*u*/(UnionType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 114: // type_dcl ::= struct_type { CUP$result = new TypeDeclaration(/*type_dcl*/40); ((TypeDeclaration)CUP$result).type_decl = (/*s*/(StructType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 113: // type_dcl ::= type_def { CUP$result = new TypeDeclaration(/*type_dcl*/40); ((TypeDeclaration)CUP$result).type_decl = (/*t*/(TypeDef)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 112: // positive_int_const ::= const_expr { CUP$result = new PosIntConst(/*positive_int_const*/31); ((PosIntConst)CUP$result).const_expr = (/*c*/(ConstExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 111: // string_literal ::= LDBLQUOTE DBLQUOTE { CUP$result = new Literal(/*string_literal*/76); ((Literal)CUP$result).string = "\"\""; ((Literal)CUP$result).wide = true; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 110: // string_literal ::= LDBLQUOTE ID DBLQUOTE { CUP$result = new Literal(/*string_literal*/76); ((Literal)CUP$result).string = "\"" + (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-1)).str_val + "\""; ((Literal)CUP$result).wide = true; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 109: // string_literal ::= DBLQUOTE DBLQUOTE { CUP$result = new Literal(/*string_literal*/76); ((Literal)CUP$result).string = "\"\""; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 108: // string_literal ::= DBLQUOTE ID DBLQUOTE { CUP$result = new Literal(/*string_literal*/76); ((Literal)CUP$result).string = "\"" + (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-1)).str_val + "\""; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 107: // literal ::= FALSE { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = "false"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 106: // literal ::= TRUE { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = "true"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 105: // literal ::= FLOAT_NUMBER { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = "" + (/*n*/(java_cup.runtime.float_token)CUP$stack.elementAt(CUP$top-0)).float_val ; ((Literal)CUP$result).token = (/*n*/(java_cup.runtime.float_token)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 104: // literal ::= FIXED_NUMBER { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = "" + (/*f*/(fixed_token)CUP$stack.elementAt(CUP$top-0)).fixed_val; ((Literal)CUP$result).token = (/*f*/(fixed_token)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 103: // literal ::= string_literal { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = (/*s*/(Literal)CUP$stack.elementAt(CUP$top-0)).string; ((Literal)CUP$result).wide = (/*s*/(Literal)CUP$stack.elementAt(CUP$top-0)).wide; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 102: // literal ::= QUOTE CH QUOTE { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = "\'" + (/*c*/(java_cup.runtime.char_token)CUP$stack.elementAt(CUP$top-1)).char_val + "\'"; ((Literal)CUP$result).token = (/*c*/(java_cup.runtime.char_token)CUP$stack.elementAt(CUP$top-1)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 101: // literal ::= LONG_NUMBER { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = "" + (/*l*/(java_cup.runtime.long_token)CUP$stack.elementAt(CUP$top-0)).long_val; ((Literal)CUP$result).token = (/*l*/(java_cup.runtime.long_token)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 100: // literal ::= NUMBER { CUP$result = new Literal(/*literal*/75); ((Literal)CUP$result).string = "" + (/*n*/(java_cup.runtime.int_token)CUP$stack.elementAt(CUP$top-0)).int_val; ((Literal)CUP$result).token = (/*n*/(java_cup.runtime.int_token)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 99: // primary_expr ::= LPAREN const_expr RPAREN { CUP$result = new PrimaryExpr(/*primary_expr*/39); ((PrimaryExpr)CUP$result).symbol = (/*c*/(ConstExpr)CUP$stack.elementAt(CUP$top-1)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 98: // primary_expr ::= literal { CUP$result = new PrimaryExpr(/*primary_expr*/39); ((PrimaryExpr)CUP$result).symbol = (/*l*/(Literal)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 97: // primary_expr ::= scopename { CUP$result = new PrimaryExpr(/*primary_expr*/39); ((PrimaryExpr)CUP$result).symbol = (/*s*/(ScopedName)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 96: // unary_op ::= TILDE { CUP$result = new java_cup.runtime.str_token(/*unary_op*/7); ((java_cup.runtime.str_token)CUP$result).str_val = "~"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 95: // unary_op ::= PLUS { CUP$result = new java_cup.runtime.str_token(/*unary_op*/7); ((java_cup.runtime.str_token)CUP$result).str_val = "+"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 94: // unary_op ::= MINUS { CUP$result = new java_cup.runtime.str_token(/*unary_op*/7); ((java_cup.runtime.str_token)CUP$result).str_val = "-"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 93: // unary_expr ::= primary_expr { CUP$result = new UnaryExpr(/*unary_expr*/38); ((UnaryExpr)CUP$result).primary_expr = (/*p*/(PrimaryExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 92: // unary_expr ::= unary_op primary_expr { CUP$result = new UnaryExpr(/*unary_expr*/38); ((UnaryExpr)CUP$result).primary_expr = (/*p*/(PrimaryExpr)CUP$stack.elementAt(CUP$top-0)); ((UnaryExpr)CUP$result).unary_op = (/*u*/(java_cup.runtime.str_token)CUP$stack.elementAt(CUP$top-1)).str_val; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 91: // mult_expr ::= mult_expr PERCENT unary_expr { CUP$result = new MultExpr(/*mult_expr*/37); ((MultExpr)CUP$result).unary_expr = (/*u*/(UnaryExpr)CUP$stack.elementAt(CUP$top-0)); ((MultExpr)CUP$result).mult_expr = (/*m*/(MultExpr)CUP$stack.elementAt(CUP$top-2)); ((MultExpr)CUP$result).operator = "%"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 90: // mult_expr ::= mult_expr SLASH unary_expr { CUP$result = new MultExpr(/*mult_expr*/37); ((MultExpr)CUP$result).unary_expr = (/*u*/(UnaryExpr)CUP$stack.elementAt(CUP$top-0)); ((MultExpr)CUP$result).mult_expr = (/*m*/(MultExpr)CUP$stack.elementAt(CUP$top-2)); ((MultExpr)CUP$result).operator = "/"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 89: // mult_expr ::= mult_expr STAR unary_expr { CUP$result = new MultExpr(/*mult_expr*/37); ((MultExpr)CUP$result).unary_expr = (/*u*/(UnaryExpr)CUP$stack.elementAt(CUP$top-0)); ((MultExpr)CUP$result).mult_expr = (/*m*/(MultExpr)CUP$stack.elementAt(CUP$top-2)); ((MultExpr)CUP$result).operator = "*"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 88: // mult_expr ::= unary_expr { CUP$result = new MultExpr(/*mult_expr*/37); ((MultExpr)CUP$result).unary_expr = (/*u*/(UnaryExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 87: // add_expr ::= add_expr MINUS mult_expr { CUP$result = new AddExpr(/*add_expr*/36); ((AddExpr)CUP$result).add_expr = (/*a*/(AddExpr)CUP$stack.elementAt(CUP$top-2)); ((AddExpr)CUP$result).mult_expr = (/*m*/(MultExpr)CUP$stack.elementAt(CUP$top-0)); ((AddExpr)CUP$result).operator = "-"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 86: // add_expr ::= add_expr PLUS mult_expr { CUP$result = new AddExpr(/*add_expr*/36); ((AddExpr)CUP$result).add_expr = (/*a*/(AddExpr)CUP$stack.elementAt(CUP$top-2)); ((AddExpr)CUP$result).mult_expr = (/*m*/(MultExpr)CUP$stack.elementAt(CUP$top-0)); ((AddExpr)CUP$result).operator = "+"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 85: // add_expr ::= mult_expr { CUP$result = new AddExpr(/*add_expr*/36); ((AddExpr)CUP$result).mult_expr = (/*m*/(MultExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 84: // shift_expr ::= shift_expr RSHIFT add_expr { CUP$result = new ShiftExpr(/*shift_expr*/35); ((ShiftExpr)CUP$result).add_expr = (/*a*/(AddExpr)CUP$stack.elementAt(CUP$top-0)); ((ShiftExpr)CUP$result).shift_expr = (/*s*/(ShiftExpr)CUP$stack.elementAt(CUP$top-2)); ((ShiftExpr)CUP$result).operator = ">>"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 83: // shift_expr ::= shift_expr LSHIFT add_expr { CUP$result = new ShiftExpr(/*shift_expr*/35); ((ShiftExpr)CUP$result).add_expr = (/*a*/(AddExpr)CUP$stack.elementAt(CUP$top-0)); ((ShiftExpr)CUP$result).shift_expr = (/*s*/(ShiftExpr)CUP$stack.elementAt(CUP$top-2)); ((ShiftExpr)CUP$result).operator = "<<"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 82: // shift_expr ::= add_expr { CUP$result = new ShiftExpr(/*shift_expr*/35); ((ShiftExpr)CUP$result).add_expr = (/*a*/(AddExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 81: // and_expr ::= and_expr AMPERSAND shift_expr { CUP$result = new AndExpr(/*and_expr*/34); ((AndExpr)CUP$result).and_expr = (/*a*/(AndExpr)CUP$stack.elementAt(CUP$top-2)); ((AndExpr)CUP$result).shift_expr = (/*s*/(ShiftExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 80: // and_expr ::= shift_expr { CUP$result = new AndExpr(/*and_expr*/34); ((AndExpr)CUP$result).shift_expr = (/*s*/(ShiftExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 79: // xor_expr ::= xor_expr CIRCUM and_expr { CUP$result = new XorExpr(/*xor_expr*/33); ((XorExpr)CUP$result).and_expr = (/*a*/(AndExpr)CUP$stack.elementAt(CUP$top-0)); ((XorExpr)CUP$result).xor_expr = (/*x*/(XorExpr)CUP$stack.elementAt(CUP$top-2)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 78: // xor_expr ::= and_expr { CUP$result = new XorExpr(/*xor_expr*/33); ((XorExpr)CUP$result).and_expr = (/*a*/(AndExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 77: // or_expr ::= or_expr BAR xor_expr { CUP$result = new OrExpr(/*or_expr*/32); ((OrExpr)CUP$result).or_expr = (/*o*/(OrExpr)CUP$stack.elementAt(CUP$top-2)); ((OrExpr)CUP$result).xor_expr = (/*x*/(XorExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 76: // or_expr ::= xor_expr { CUP$result = new OrExpr(/*or_expr*/32); ((OrExpr)CUP$result).xor_expr = (/*x*/(XorExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 75: // const_expr ::= or_expr { CUP$result = new ConstExpr(/*const_expr*/30); ((ConstExpr)CUP$result).or_expr = (/*o*/(OrExpr)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 74: // const_type ::= scopename { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(ScopedName)CUP$stack.elementAt(CUP$top-0)); ((ConstType)CUP$result).set_token((/*s*/(ScopedName)CUP$stack.elementAt(CUP$top-0)).get_token()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 73: // const_type ::= octet_type { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(OctetType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 72: // const_type ::= string_type { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(StringType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 71: // const_type ::= fixed_pt_const_type { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(FixedPointConstType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 70: // const_type ::= float_pt_type { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(FloatPtType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 69: // const_type ::= bool_type { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(BooleanType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 68: // const_type ::= char_type { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(CharType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 67: // const_type ::= int_type { CUP$result = new ConstType(/*const_type*/29); ((ConstType)CUP$result).symbol = (/*s*/(IntType)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 66: // const_dcl ::= CONST const_type ID EQUALS const_expr { CUP$result = new ConstDecl(/*const_dcl*/28); ((ConstDecl)CUP$result).set_name((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-2)).str_val); ((ConstDecl)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-2))); ((ConstDecl)CUP$result).const_expr = (/*ce*/(ConstExpr)CUP$stack.elementAt(CUP$top-0)); ((ConstDecl)CUP$result).const_type = (ConstType)(/*ct*/(ConstType)CUP$stack.elementAt(CUP$top-3)); ((ConstDecl)CUP$result).set_included( parser.include_state ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // init_param_decl ::= IN param_type_spec simple_declarator { CUP$result = new InitParamDecl(/*init_param_decl*/27); ((InitParamDecl)CUP$result).paramTypeSpec = (/*ts*/(TypeSpec)CUP$stack.elementAt(CUP$top-1)); ((InitParamDecl)CUP$result).simple_declarator = (/*sd*/(SimpleDeclarator)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 64: // init_param_decls ::= init_param_decl COMMA init_param_decls { CUP$result = new SymbolList(/*init_param_decls*/90); ((SymbolList)CUP$result).v = (Vector)(/*ipdcls*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.insertElementAt( (/*ip*/(InitParamDecl)CUP$stack.elementAt(CUP$top-2)), 0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 63: // init_param_decls ::= init_param_decl { CUP$result = new SymbolList(/*init_param_decls*/90); ((SymbolList)CUP$result).v.insertElementAt( (/*ip*/(InitParamDecl)CUP$stack.elementAt(CUP$top-0)), 0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 62: // init_dcl ::= FACTORY ID LPAREN RPAREN SEMI { CUP$result = new InitDecl(/*init_dcl*/26); ((InitDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-3)).str_val; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 61: // init_dcl ::= FACTORY ID LPAREN init_param_decls RPAREN SEMI { CUP$result = new InitDecl(/*init_dcl*/26); ((InitDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val; ((InitDecl)CUP$result).paramDecls = (Vector)(/*ipd*/(SymbolList)CUP$stack.elementAt(CUP$top-2)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 60: // state_member ::= PRIVATE type_spec declarators SEMI { CUP$result = new StateMember(/*state_member*/25); ((StateMember)CUP$result).isPublic = false; ((StateMember)CUP$result).type_spec = (/*ts*/(TypeSpec)CUP$stack.elementAt(CUP$top-2)); ((StateMember)CUP$result).declarators = (/*ds*/(SymbolList)CUP$stack.elementAt(CUP$top-1)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 59: // state_member ::= PUBLIC type_spec declarators SEMI { CUP$result = new StateMember(/*state_member*/25); ((StateMember)CUP$result).isPublic = true; ((StateMember)CUP$result).type_spec = (/*ts*/(TypeSpec)CUP$stack.elementAt(CUP$top-2)); ((StateMember)CUP$result).declarators = (/*ds*/(SymbolList)CUP$stack.elementAt(CUP$top-1)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 58: // value_element ::= init_dcl { CUP$result = new Definition(/*value_element*/24); ((Definition)CUP$result).set_declaration ((/*id*/(InitDecl)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 57: // value_element ::= state_member { CUP$result = new Definition(/*value_element*/24); ((Definition)CUP$result).set_declaration ((/*sm*/(StateMember)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // value_element ::= export { CUP$result = new Definition(/*value_element*/24); ((Definition)CUP$result).set_declaration ((/*e*/(Definition)CUP$stack.elementAt(CUP$top-0)).get_declaration()); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // value_elements ::= empty { CUP$result = new Definitions(/*value_elements*/23); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // value_elements ::= value_element value_elements { CUP$result = new Definitions(/*value_elements*/23); ((Definitions)CUP$result).v = (Vector)(/*es*/(Definitions)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((Definitions)CUP$result).v.insertElementAt((/*e*/(Definition)CUP$stack.elementAt(CUP$top-1)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // truncatable ::= TRUNCATABLE { CUP$result = new Truncatable(/*truncatable*/16); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // value_inheritance_spec ::= empty { CUP$result = new ValueInheritanceSpec(/*value_inheritance_spec*/22); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // value_inheritance_spec ::= COLON scopename_list SUPPORTS scopename_list { CUP$result = new ValueInheritanceSpec(/*value_inheritance_spec*/22); ((ValueInheritanceSpec)CUP$result).v = (Vector)(/*vn*/(SymbolList)CUP$stack.elementAt(CUP$top-2)).v.clone(); ((ValueInheritanceSpec)CUP$result).supports = (Vector)(/*interface_names*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 50: // value_inheritance_spec ::= COLON truncatable scopename_list SUPPORTS scopename_list { CUP$result = new ValueInheritanceSpec(/*value_inheritance_spec*/22); ((ValueInheritanceSpec)CUP$result).truncatable = (/*t*/(Truncatable)CUP$stack.elementAt(CUP$top-3)); ((ValueInheritanceSpec)CUP$result).truncatable.scopedName = (ScopedName)(/*vn*/(SymbolList)CUP$stack.elementAt(CUP$top-2)).v.remove(0); ((ValueInheritanceSpec)CUP$result).v = (Vector)(/*vn*/(SymbolList)CUP$stack.elementAt(CUP$top-2)).v.clone(); ((ValueInheritanceSpec)CUP$result).supports = (Vector)(/*interface_names*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 49: // value_inheritance_spec ::= SUPPORTS scopename_list { CUP$result = new ValueInheritanceSpec(/*value_inheritance_spec*/22); ((ValueInheritanceSpec)CUP$result).supports = (Vector)(/*interface_names*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // value_inheritance_spec ::= COLON scopename_list { CUP$result = new ValueInheritanceSpec(/*value_inheritance_spec*/22); ((ValueInheritanceSpec)CUP$result).v = (Vector)(/*vn*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 47: // value_inheritance_spec ::= COLON truncatable scopename_list { CUP$result = new ValueInheritanceSpec(/*value_inheritance_spec*/22); ((ValueInheritanceSpec)CUP$result).truncatable = (/*t*/(Truncatable)CUP$stack.elementAt(CUP$top-1)); ((ValueInheritanceSpec)CUP$result).truncatable.scopedName = (ScopedName)(/*vn*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.remove(0); ((ValueInheritanceSpec)CUP$result).v = (Vector)(/*vn*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 46: // value_dcl ::= VALUETYPE ID value_inheritance_spec LCBRACE value_elements RCBRACE { CUP$result = new ValueDecl(/*value_dcl*/19); ((ValueDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val; ((ValueDecl)CUP$result).set_token ((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); ((ValueDecl)CUP$result).setInheritanceSpec ((/*is*/(ValueInheritanceSpec)CUP$stack.elementAt(CUP$top-3))); ((ValueDecl)CUP$result).setValueElements ((/*ve*/(Definitions)CUP$stack.elementAt(CUP$top-1))); ((ValueDecl)CUP$result).isCustomMarshalled (false); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 45: // value_dcl ::= VALUETYPE ID { CUP$result = new ValueDecl(/*value_dcl*/19); ((ValueDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0)).str_val; ((ValueDecl)CUP$result).set_token ((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); ((ValueDecl)CUP$result).isCustomMarshalled (false); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 44: // value_dcl ::= CUSTOM VALUETYPE ID value_inheritance_spec LCBRACE value_elements RCBRACE { CUP$result = new ValueDecl(/*value_dcl*/19); ((ValueDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val; ((ValueDecl)CUP$result).set_token ((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); ((ValueDecl)CUP$result).setInheritanceSpec ((/*is*/(ValueInheritanceSpec)CUP$stack.elementAt(CUP$top-3))); ((ValueDecl)CUP$result).setValueElements ((/*ve*/(Definitions)CUP$stack.elementAt(CUP$top-1))); ((ValueDecl)CUP$result).isCustomMarshalled (true); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 43: // value_body ::= empty { CUP$result = new ValueBody(/*value_body*/21); ((ValueBody)CUP$result).commit(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // value_body ::= export value_body { CUP$result = new ValueBody(/*value_body*/21); ((ValueBody)CUP$result).v = (Vector)(/*vb*/(ValueBody)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((ValueBody)CUP$result).v.insertElementAt((/*e*/(Definition)CUP$stack.elementAt(CUP$top-1)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // value_abs_dcl ::= ABSTRACT VALUETYPE ID { CUP$result = new ValueAbsDecl(/*value_abs_dcl*/20); ((ValueAbsDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0)).str_val; ((ValueAbsDecl)CUP$result).set_token ((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // value_abs_dcl ::= ABSTRACT VALUETYPE ID value_inheritance_spec LCBRACE value_body RCBRACE { CUP$result = new ValueAbsDecl(/*value_abs_dcl*/20); ((ValueAbsDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val; ((ValueAbsDecl)CUP$result).setInheritanceSpec( (/*is*/(ValueInheritanceSpec)CUP$stack.elementAt(CUP$top-3)) ); ((ValueAbsDecl)CUP$result).body = (/*b*/(ValueBody)CUP$stack.elementAt(CUP$top-1)); (/*b*/(ValueBody)CUP$stack.elementAt(CUP$top-1)).set_name((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val); (/*b*/(ValueBody)CUP$stack.elementAt(CUP$top-1)).myAbsValue = ((ValueAbsDecl)CUP$result); (/*b*/(ValueBody)CUP$stack.elementAt(CUP$top-1)).setEnclosingSymbol(((ValueAbsDecl)CUP$result)); ((ValueAbsDecl)CUP$result).set_token ((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // value_box_dcl ::= VALUETYPE ID type_spec { CUP$result = new ValueBoxDecl(/*value_box_dcl*/18); ((ValueBoxDecl)CUP$result).name = (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-1)).str_val; ((ValueBoxDecl)CUP$result).typeSpec = (/*ts*/(TypeSpec)CUP$stack.elementAt(CUP$top-0)); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // value ::= value_box_dcl { CUP$result = new Value(/*value*/17); ((Value)CUP$result).setValue ((/*vbx*/(ValueBoxDecl)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // value ::= value_abs_dcl { CUP$result = new Value(/*value*/17); ((Value)CUP$result).setValue ((/*vad*/(ValueAbsDecl)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // value ::= value_dcl { CUP$result = new Value(/*value*/17); ((Value)CUP$result).setValue ((/*vd*/(ValueDecl)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // scopename ::= OBJECT { CUP$result = new ScopedName(/*scopename*/15); ((ScopedName)CUP$result).typeName = "org.omg.CORBA.Object"; } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // scopename ::= scopename DBLCOLON ID { CUP$result = new ScopedName(/*scopename*/15); ((ScopedName)CUP$result).setId( (/*sn*/(ScopedName)CUP$stack.elementAt(CUP$top-2)).typeName+ "." + (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0)).str_val ); ((ScopedName)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // scopename ::= DBLCOLON ID { CUP$result = new ScopedName(/*scopename*/15); ((ScopedName)CUP$result).setId( "." + (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0)).str_val); ((ScopedName)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // scopename ::= ID { CUP$result = new ScopedName(/*scopename*/15); ((ScopedName)CUP$result).setId( (/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0)).str_val ); ((ScopedName)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // scopename_list ::= scopename { CUP$result = new SymbolList(/*scopename_list*/92); ((SymbolList)CUP$result).v.insertElementAt((/*sn*/(ScopedName)CUP$stack.elementAt(CUP$top-0)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // scopename_list ::= scopename COMMA scopename_list { CUP$result = new SymbolList(/*scopename_list*/92); ((SymbolList)CUP$result).v = (Vector)(/*snl*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((SymbolList)CUP$result).v.insertElementAt((/*sn*/(ScopedName)CUP$stack.elementAt(CUP$top-2)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // inheritance_spec ::= empty { CUP$result = new SymbolList(/*inheritance_spec*/95); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // inheritance_spec ::= COLON scopename_list { CUP$result = new SymbolList(/*inheritance_spec*/95); ((SymbolList)CUP$result).v = (Vector)(/*sl*/(SymbolList)CUP$stack.elementAt(CUP$top-0)).v.clone(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // export ::= op_dcl SEMI { CUP$result = new Definition(/*export*/14); ((Definition)CUP$result).set_declaration((/*o*/(OpDecl)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // export ::= attr_dcl SEMI { CUP$result = new Definition(/*export*/14); ((Definition)CUP$result).set_declaration((/*a*/(AttrDecl)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // export ::= except_dcl SEMI { CUP$result = new Definition(/*export*/14); ((Definition)CUP$result).set_declaration((/*e*/(StructType)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // export ::= const_dcl SEMI { CUP$result = new Definition(/*export*/14); ((Definition)CUP$result).set_declaration((/*c*/(ConstDecl)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // export ::= type_dcl SEMI { CUP$result = new Definition(/*export*/14); ((Definition)CUP$result).set_declaration((/*t*/(TypeDeclaration)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // interface_body ::= empty { CUP$result = new InterfaceBody(/*interface_body*/13); ((InterfaceBody)CUP$result).commit(); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // interface_body ::= export interface_body { CUP$result = new InterfaceBody(/*interface_body*/13); ((InterfaceBody)CUP$result).v = (Vector)(/*i*/(InterfaceBody)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((InterfaceBody)CUP$result).v.insertElementAt((/*e*/(Definition)CUP$stack.elementAt(CUP$top-1)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // interface ::= PSEUDO INTERFACE ID { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_pseudo(); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); // ((Interface)CUP$result).set_locality( parser.getLocalityContraint()); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // interface ::= LOCAL INTERFACE ID { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); ((Interface)CUP$result).set_abstract(); ((Interface)CUP$result).set_locality( true ); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // interface ::= ABSTRACT INTERFACE ID { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); ((Interface)CUP$result).set_abstract(); // ((Interface)CUP$result).set_locality( parser.getLocalityContraint()); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // interface ::= INTERFACE ID { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-0))); // ((Interface)CUP$result).set_locality( parser.getLocalityContraint()); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // interface ::= PSEUDO INTERFACE ID inheritance_spec LCBRACE interface_body RCBRACE { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_pseudo(); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); ((Interface)CUP$result).inheritanceSpec = (/*is*/(SymbolList)CUP$stack.elementAt(CUP$top-3)); ((Interface)CUP$result).body = (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).set_pseudo(); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).set_name((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val);// (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).my_interface = ((Interface)CUP$result); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).setEnclosingSymbol(((Interface)CUP$result)); ((Interface)CUP$result).set_included( parser.include_state ); // ((Interface)CUP$result).set_locality( parser.getLocalityContraint()); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // interface ::= LOCAL INTERFACE ID inheritance_spec LCBRACE interface_body RCBRACE { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); ((Interface)CUP$result).inheritanceSpec = (/*is*/(SymbolList)CUP$stack.elementAt(CUP$top-3)); ((Interface)CUP$result).body = (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)) ; (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).set_name((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).my_interface = ((Interface)CUP$result); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).setEnclosingSymbol(((Interface)CUP$result)); ((Interface)CUP$result).set_included( parser.include_state ); ((Interface)CUP$result).set_locality( true ); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // interface ::= ABSTRACT INTERFACE ID inheritance_spec LCBRACE interface_body RCBRACE { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); ((Interface)CUP$result).set_abstract(); ((Interface)CUP$result).inheritanceSpec = (/*is*/(SymbolList)CUP$stack.elementAt(CUP$top-3)); ((Interface)CUP$result).body = (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)) ; (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).set_name((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).my_interface = ((Interface)CUP$result); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).setEnclosingSymbol(((Interface)CUP$result)); ((Interface)CUP$result).set_included( parser.include_state ); // ((Interface)CUP$result).set_locality( parser.getLocalityContraint()); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // interface ::= INTERFACE ID inheritance_spec LCBRACE interface_body RCBRACE { CUP$result = new Interface(/*interface*/12); ((Interface)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4))); ((Interface)CUP$result).inheritanceSpec = (/*is*/(SymbolList)CUP$stack.elementAt(CUP$top-3)); ((Interface)CUP$result).body = (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)) ; (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).set_name((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-4)).str_val); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).my_interface = ((Interface)CUP$result); (/*b*/(InterfaceBody)CUP$stack.elementAt(CUP$top-1)).setEnclosingSymbol(((Interface)CUP$result)); ((Interface)CUP$result).set_included( parser.include_state ); // ((Interface)CUP$result).set_locality( parser.getLocalityContraint()); parser.closeScope( (Scope)((Interface)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // module ::= MODULE ID LCBRACE definitions RCBRACE { CUP$result = new Module(/*module*/11); ((Module)CUP$result).spec = (/*d*/(Definitions)CUP$stack.elementAt(CUP$top-1)); ((Module)CUP$result).set_token((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-3))); ((Module)CUP$result).setPackage((/*i*/(org.jacorb.idl.str_token)CUP$stack.elementAt(CUP$top-3)).str_val ); ((Module)CUP$result).set_included( parser.include_state ); (/*d*/(Definitions)CUP$stack.elementAt(CUP$top-1)).setEnclosingSymbol(((Module)CUP$result)); parser.closeScope( (Scope)((Module)CUP$result) ); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // definition ::= value SEMI { CUP$result = new Definition(/*definition*/9); ((Definition)CUP$result).set_declaration((/*m*/(Value)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // definition ::= module SEMI { CUP$result = new Definition(/*definition*/9); ((Definition)CUP$result).set_declaration((/*m*/(Module)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // definition ::= interface SEMI { CUP$result = new Definition(/*definition*/9); ((Definition)CUP$result).set_declaration((/*p*/(Interface)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // definition ::= except_dcl SEMI { CUP$result = new Definition(/*definition*/9); ((Definition)CUP$result).set_declaration((/*e*/(StructType)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // definition ::= const_dcl SEMI { CUP$result = new Definition(/*definition*/9); ((Definition)CUP$result).set_declaration((/*c*/(ConstDecl)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // definition ::= type_dcl SEMI { CUP$result = new Definition(/*definition*/9); ((Definition)CUP$result).set_declaration((/*t*/(TypeDeclaration)CUP$stack.elementAt(CUP$top-1))); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // definitions ::= definition { CUP$result = new Definitions(/*definitions*/10); ((Definitions)CUP$result).v.insertElementAt((/*d*/(Definition)CUP$stack.elementAt(CUP$top-0)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // definitions ::= definition definitions { CUP$result = new Definitions(/*definitions*/10); ((Definitions)CUP$result).v = (Vector)(/*ds*/(Definitions)CUP$stack.elementAt(CUP$top-0)).v.clone(); ((Definitions)CUP$result).v.insertElementAt((/*d*/(Definition)CUP$stack.elementAt(CUP$top-1)),0); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // specification ::= empty { CUP$result = new Spec(/*specification*/8); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // specification ::= NT$0 definitions { CUP$result = new Spec(/*specification*/8); /* parsing */ // open the global scope parser.openScope(); ((Spec)CUP$result).definitions = (Vector)(/*ds*/(Definitions)CUP$stack.elementAt(CUP$top-0)).v.clone(); if( ((org.jacorb.idl.parser)CUP$parser).package_prefix != null ) ((Spec)CUP$result).setPackage( ((org.jacorb.idl.parser)CUP$parser).package_prefix ); ((Spec)CUP$result).parse(); if ( lexer.error_count != 0 ) { System.err.println(lexer.error_count + " error(s)."); System.exit(1); } // if there are still interfaces to be parsed, wait until the // threads performing this have finished. The last one // will call notify() :) if( parser.pending_interfaces.size() > 0 ) { // give other threads a chance to start and signal // that they're active Thread.yield(); boolean runnableFound = false; // still no one seems to be active, but we'll call // round to be sure if( parser.activeParseThreads() == 0 ) { for( int t = 0; t < InterfaceBody.parseThreads.size() && !runnableFound; t++ ) { runnableFound = ((InterfaceBody.ParseThread)InterfaceBody.parseThreads.elementAt(t)).isRunnable(); } } // only block waiting if we know that there are active or // runnable threads and that there are still pending tasks if( ( parser.activeParseThreads() > 1 || runnableFound ) && parser.pending_interfaces.size() > 0 ) { synchronized( parser.pending_interfaces ) { parser.pending_interfaces.wait(); } } } if( parser.pending_interfaces.size() > 0 && !parser.sloppy ) { parser.fatal_error("Undefined interface: " + (String)(parser.pending_interfaces.keys().nextElement()), null ); } /* okay, parsing is done */ parser.done_parsing = true; /* code generation phase */ if (! ((org.jacorb.idl.parser)CUP$parser).parse_only ) { ((Spec)CUP$result).print( new java.io.PrintWriter( java.lang.System.out ) ); } } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // NT$0 ::= { CUP$result = new java_cup.runtime.token(/*NT$0*/98); } return CUP$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // $START ::= specification EOF { CUP$result = new java_cup.runtime.token(/*$START*/0); } /* ACCEPT */ CUP$parser.done_parsing(); return CUP$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/459917427e43784c811fea8081796b8a67dfaa54/parser.java/clean/src/org/jacorb/idl/parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
2252,
67,
71,
416,
18,
9448,
18,
7175,
385,
3079,
8,
2896,
67,
1128,
12,
565,
509,
13491,
385,
3079,
8,
621,
67,
2107,
16,
565,
2252,
67,
71,
416,
18,
9448,
18,
10826,
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,
282,
1071,
727,
2252,
67,
71,
416,
18,
9448,
18,
7175,
385,
3079,
8,
2896,
67,
1128,
12,
565,
509,
13491,
385,
3079,
8,
621,
67,
2107,
16,
565,
2252,
67,
71,
416,
18,
9448,
18,
10826,
67... |
protected void matched(String content, DatatypeValidator val, boolean isNil) { | protected void matched(String content, XSSimpleType val, boolean isNil) { | protected void matched(String content, DatatypeValidator val, boolean isNil) { super.matched(content, val, isNil); if(isNil) { fStore.reportNilError(fIdentityConstraint); } fStore.addValue(Field.this, new IDValue(content, val)); // once we've stored the value for this field, we set the mayMatch // member to false so that, in the same scope, we don't match any more // values (and throw an error instead). mayMatch = false; } // matched(String) | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/5b0cf65d1d2e090172d69189c96c522d6a30ac2c/Field.java/clean/src/org/apache/xerces/impl/xs/identity/Field.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
4847,
12,
780,
913,
16,
1139,
1260,
2052,
559,
1244,
16,
1250,
8197,
330,
13,
288,
5411,
2240,
18,
11073,
12,
1745,
16,
1244,
16,
8197,
330,
1769,
5411,
309,
12,
291,
12616,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
918,
4847,
12,
780,
913,
16,
1139,
1260,
2052,
559,
1244,
16,
1250,
8197,
330,
13,
288,
5411,
2240,
18,
11073,
12,
1745,
16,
1244,
16,
8197,
330,
1769,
5411,
309,
12,
291,
12616,
... |
box.y = (int)(measurements.getBaseline() - ascent - style.getFloatPropertyProportionalTo( CSSName.VERTICAL_ALIGN, style.getLineHeight(c), c)); | box.y = (int) (measurements.getBaseline() - ascent - style.getFloatPropertyProportionalTo(CSSName.VERTICAL_ALIGN, style.getLineHeight(c), c)); | private static void alignInlineContent(LayoutContext c, Box box, float ascent, float descent, VerticalAlignContext vaContext) { InlineBoxMeasurements measurements = vaContext.getParentMeasurements(); CalculatedStyle style = box.getStyle().getCalculatedStyle(); if (style.isLengthValue(CSSName.VERTICAL_ALIGN)) { box.y = (int)(measurements.getBaseline() - ascent - style.getFloatPropertyProportionalTo( CSSName.VERTICAL_ALIGN, style.getLineHeight(c), c)); } else { IdentValue vAlign = style.getIdent(CSSName.VERTICAL_ALIGN); if (vAlign == IdentValue.BASELINE) { box.y = (int)(measurements.getBaseline() - ascent); } else if (vAlign == IdentValue.TEXT_TOP) { box.y = measurements.getTextTop(); } else if (vAlign == IdentValue.TEXT_BOTTOM) { box.y = (int)(measurements.getTextBottom() - descent - ascent); } else if (vAlign == IdentValue.MIDDLE) { box.y = (int)((measurements.getTextTop() - measurements.getBaseline()) / 2 - ascent / 2); } else if (vAlign == IdentValue.SUPER) { box.y = (int)((measurements.getTextTop() - measurements.getBaseline()) / 2 - ascent); } else if (vAlign == IdentValue.SUB) { box.y = (int)(measurements.getBaseline() + ascent / 2); } else { // TODO implement vertical-align: top/bottom, for now just treat as baseline box.y = (int)(measurements.getBaseline() - ascent); } } } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/ceb21dee5f070c3ac63d70ae7b6eb22a7c0b4641/InlineBoxing.java/buggy/src/java/org/xhtmlrenderer/layout/InlineBoxing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
5689,
10870,
1350,
12,
3744,
1042,
276,
16,
8549,
3919,
16,
2398,
1431,
487,
2998,
16,
1431,
3044,
319,
16,
27394,
10044,
1042,
14162,
1042,
13,
288,
3639,
16355,
3514,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
5689,
10870,
1350,
12,
3744,
1042,
276,
16,
8549,
3919,
16,
2398,
1431,
487,
2998,
16,
1431,
3044,
319,
16,
27394,
10044,
1042,
14162,
1042,
13,
288,
3639,
16355,
3514,
71... |
return !(getter instanceof UndefMethods); | return getter != undefMethods && setter != undefMethods; | public boolean isDefined() { return !(getter instanceof UndefMethods); } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/4e4bb40b2eb2d38881d15ca8ef7cda4c34323793/RubyGlobalEntry.java/clean/org/jruby/runtime/RubyGlobalEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
25048,
1435,
288,
3639,
327,
7060,
480,
640,
536,
4712,
597,
7794,
480,
640,
536,
4712,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
25048,
1435,
288,
3639,
327,
7060,
480,
640,
536,
4712,
597,
7794,
480,
640,
536,
4712,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
createCancelButton(parent); } | createCancelButton(parent); } | protected void createButtonsForButtonBar(Composite parent) { // cancel button createCancelButton(parent); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/18d6e658dfbeda87524388388c4d4c049701f36f/ProgressMonitorDialog.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
3639,
368,
3755,
3568,
3639,
752,
6691,
3616,
12,
2938,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
3639,
368,
3755,
3568,
3639,
752,
6691,
3616,
12,
2938,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
} else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) { | } else if (visibility.isPublic() && containingClass == runtime.getObject()) { | public void visitDefnNode(DefnNode iVisited) { RubyModule containingClass = threadContext.getRubyClass(); if (containingClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (containingClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(containingClass, iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, threadContext.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); containingClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { containingClass.getSingletonClass().addMethod(name, new WrapperCallable(containingClass.getSingletonClass(), newMethod, Visibility.PUBLIC)); containingClass.callMethod("singleton_method_added", runtime.newSymbol(name)); } // 'class << self' and 'class << obj' uses defn as opposed to defs if (containingClass.isSingleton()) { ((MetaClass)containingClass).getAttachedObject().callMethod("singleton_method_added", runtime.newSymbol(iVisited.getName())); } else { containingClass.callMethod("method_added", runtime.newSymbol(name)); } } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/ca6b16e996ea9af83ce593594b9c69b9364a9924/EvaluateVisitor.java/clean/src/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
3262,
82,
907,
12,
3262,
82,
907,
277,
30019,
13,
288,
3639,
19817,
3120,
4191,
797,
273,
2650,
1042,
18,
588,
54,
10340,
797,
5621,
3639,
309,
261,
1213,
3280,
797,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
3262,
82,
907,
12,
3262,
82,
907,
277,
30019,
13,
288,
3639,
19817,
3120,
4191,
797,
273,
2650,
1042,
18,
588,
54,
10340,
797,
5621,
3639,
309,
261,
1213,
3280,
797,
42... |
throw new PainterException("wrong arguments"); | throw new PainterException("gt: wrong arguments"); | protected HashMap constructSystemDict() { HashMap systemDict = new HashMap(); // newpath systemDict.put("newpath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.newpath(); } }); // moveto systemDict.put("moveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.moveto(data[0], data[1]); } }); // rmoveto systemDict.put("rmoveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.rmoveto(data[0], data[1]); } }); // lineto systemDict.put("lineto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.lineto(data[0], data[1]); } }); // rlineto systemDict.put("rlineto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.rlineto(data[0], data[1]); } }); // arc systemDict.put("arc", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(5); context.pencil.arc(data[0], data[1], data[2], data[3], data[4]); } }); // arcn systemDict.put("arcn", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(5); context.pencil.arcn(data[0], data[1], data[2], data[3], data[4]); } }); // curveto systemDict.put("curveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(6); context.pencil.curveto(data[0], data[1], data[2], data[3], data[4], data[5]); } }); // rcurveto systemDict.put("rcurveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(6); context.pencil.rcurveto(data[0], data[1], data[2], data[3], data[4], data[5]); } }); // closepath systemDict.put("closepath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.closepath(); } }); // gsave systemDict.put("gsave", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.gsave(); } }); // grestore systemDict.put("grestore", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.grestore(); } }); // translate systemDict.put("translate", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(2); at.translate(data[0], data[1]); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } AffineTransform at = new AffineTransform(); at.translate( ( (Number) data[0]).doubleValue(), ( (Number) data[1]).doubleValue()); double[] entries = new double[6]; at.getMatrix(entries); for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // rotate systemDict.put("rotate", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(1); at.rotate(data[0] * Math.PI / 180.0d); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; AffineTransform at = new AffineTransform(); data = context.popOperands(2); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[1]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } at.rotate( ( (Number) data[0]).doubleValue()); double[] entries = new double[6]; at.getMatrix(entries); for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // scale systemDict.put("scale", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(2); at.scale(data[0], data[1]); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } entries[0] = ( (Number) data[0]).doubleValue(); entries[1] = 0.0d; entries[2] = 0.0d; entries[3] = ( (Number) data[1]).doubleValue(); entries[4] = 0.0d; entries[5] = 0.0d; for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // stroke systemDict.put("stroke", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.stroke(); } }); // fill systemDict.put("fill", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.fill(); } }); // eofill systemDict.put("eofill", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.eofill(); } }); // show systemDict.put("show", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } context.pencil.show( (String) data[0]); } }); // stringwidth systemDict.put("stringwidth", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; float[] result; Font font; data = context.popOperands(1); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } font = context.pencil.graphics.getFont(); Rectangle2D rect = font.getStringBounds( (String) data[0], context.pencil.graphics. getFontRenderContext()); context.operands.push(new Float(rect.getWidth())); context.operands.push(new Float(rect.getHeight())); } }); // showpage systemDict.put("showpage", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.showpage(); } }); // findfont systemDict.put("findfont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push(context.pencil.findFont( (String) patoken.value)); } }); // scalefont systemDict.put("scalefont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Font)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (Font) data[0]).deriveFont( ( (Number) data[1]). floatValue())); } }); // setfont systemDict.put("setfont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Font)) { throw new PainterException("wrong arguments"); } context.pencil.graphics.setFont( (Font) data[0]); } }); // def systemDict.put("def", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } try { ( (HashMap) context.dictionaries.peek()).put(patoken.value, data[1]); } catch (EmptyStackException e) { throw new PainterException(e.toString()); } } }); // bind systemDict.put("bind", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } context.engine.bindProcedure(patoken); context.operands.push(patoken); } }); // mul systemDict.put("mul", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] * data[1])); } }); // div systemDict.put("div", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] / data[1])); } }); // mod systemDict.put("mod", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); int a, b, m; a = (int) data[0]; b = (int) data[1]; m = a % b; context.operands.push(new Integer(m)); } }); // add systemDict.put("add", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] + data[1])); } }); // neg systemDict.put("neg", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double( -data[0])); } }); // sub systemDict.put("sub", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] - data[1])); } }); // atan systemDict.put("atan", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(Math.atan2(data[0], data[1]))); } }); // sin systemDict.put("sin", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.sin(data[0] * Math.PI / 180.0))); } }); // cos systemDict.put("cos", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.cos(data[0] * Math.PI / 180.0))); } }); // sqrt systemDict.put("sqrt", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.sqrt(data[0]))); } }); // exch systemDict.put("exch", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); context.operands.push(data[1]); context.operands.push(data[0]); } }); // dup systemDict.put("dup", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); context.operands.push(data[0]); context.operands.push(data[0]); } }); // roll systemDict.put("roll", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; Object rollData[]; data = context.popOperands(2); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } int numberOfElements, numberOfPositions, i; numberOfElements = ( (Number) data[0]).intValue(); numberOfPositions = ( (Number) data[1]).intValue(); if (numberOfPositions == 0 || numberOfElements <= 0) { return; } rollData = context.popOperands(numberOfElements); if (numberOfPositions < 0) { numberOfPositions = -numberOfPositions; numberOfPositions = numberOfPositions % numberOfElements; // downward roll for (i = numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfPositions; i++) { context.operands.push(rollData[i]); } } else { numberOfPositions = numberOfPositions % numberOfElements; // upward roll for (i = numberOfElements - numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfElements - numberOfPositions; i++) { context.operands.push(rollData[i]); } } } }); // pop systemDict.put("pop", new PACommand() { public void execute(PAContext context) throws PainterException { context.popOperands(1); } }); // index systemDict.put("index", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } int index = ( (Number) data[0]).intValue(); try { context.operands.push(context.operands.elementAt(index)); } catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString()); } } }); // mark systemDict.put("mark", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new PAToken(null, PAToken.MARK)); } }); // cleartomark systemDict.put("cleartomark", new PACommand() { public void execute(PAContext context) throws PainterException { Object data; boolean finished = false; while (!finished) { try { data = context.operands.pop(); if (data instanceof PAToken) { if ( ( (PAToken) data).type == PAToken.MARK) { finished = true; } } } catch (EmptyStackException e) { throw new PainterException(e.toString()); } } } }); // copy systemDict.put("copy", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); // decide if it's a simple copy or a composite object copy if ( (data[0] instanceof PAToken) && (data[1] instanceof PAToken)) { // composite object copy if ( ( (PAToken) data[0]).type == ( (PAToken) data[1]).type) { // our tokens are immutable so a copy is easy context.operands.push(data[0]); context.operands.push(data[0]); } else { throw new PainterException( "copy operation failed because composite objects on stack are not of same type"); } } else { // restore first arg, we're not interested in it in this simple case context.operands.push(data[0]); if (data[1] instanceof Number) { int index = ( (Number) data[1]).intValue(); int i, n; n = context.operands.size(); Object[] copyData = new Object[index]; for (i = n - index; i < n; i++) { try { copyData[i - n + index] = context.operands.elementAt(i); } catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString()); } } for (i = 0; i < index; i++) { context.operands.push(copyData[i]); } } else { throw new PainterException("I expect a number on stack, dude"); } } } }); // setgray systemDict.put("setgray", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.pencil.graphics.setPaint(new Color( (float) data[0], (float) data[0], (float) data[0])); } }); // setrgbcolor systemDict.put("setrgbcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(3); float[] fv = new float[3]; fv[0] = (float) Math.max(Math.min(data[0], 1.0d), 0.0d); fv[1] = (float) Math.max(Math.min(data[1], 1.0d), 0.0d); fv[2] = (float) Math.max(Math.min(data[2], 1.0d), 0.0d); context.pencil.graphics.setPaint(new Color(fv[0], fv[1], fv[2])); } }); // PENDING(uweh): color stuff still shaky // sethsbcolor systemDict.put("sethsbcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(3); float[] fv = new float[3]; fv[0] = (float) Math.max(Math.min(data[0], 1.0d), 0.0d); fv[1] = (float) Math.max(Math.min(data[1], 1.0d), 0.0d); fv[2] = (float) Math.max(Math.min(data[2], 1.0d), 0.0d); context.pencil.graphics.setPaint(new Color(fv[0], fv[1], fv[2])); } }); // PENDING(uweh): I have to convert these puppies myself to rgb ? // setcmykcolor systemDict.put("setcmykcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; int rd, gr, bl; data = context.popNumberOperands(4); float[] fv = new float[4]; fv[0] = (float) data[0]; fv[1] = (float) data[1]; fv[2] = (float) data[2]; fv[3] = (float) data[3]; rd = (int) (255 * Math.max(0, 1 - fv[0] - fv[3])); gr = (int) (255 * Math.max(0, 1 - fv[1] - fv[3])); bl = (int) (255 * Math.max(0, 1 - fv[2] - fv[3])); context.pencil.graphics.setPaint(new Color(rd, gr, bl)); } }); // setlinewidth systemDict.put("setlinewidth", new PACommand() { private double minLineWidth(double w, AffineTransform at) { double matrix[] = new double[4]; at.getMatrix(matrix); double scale = matrix[0] * matrix[3] - matrix[1] * matrix[2]; double minlw = .25 / Math.sqrt(Math.abs(scale)); if (w < minlw) { w = minlw; } return w; } public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); data[0] = this.minLineWidth(data[0], context.pencil.graphics.getTransform()); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( (float) data[0], ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke( (float) data[0], BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND); } context.pencil.graphics.setStroke(newStroke); } }); // setlinecap systemDict.put("setlinecap", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), (int) data[0], ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, (int) data[0], BasicStroke.JOIN_ROUND); } context.pencil.graphics.setStroke(newStroke); } }); // setmiterlimit systemDict.put("setmiterlimit", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), (float) data[0], ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, (float) data[0]); } context.pencil.graphics.setStroke(newStroke); } }); // setdash systemDict.put("setdash", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popOperands(2); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } ArrayList list = (ArrayList) data[0]; if (list.size() == 0) { return; } float[] dashpattern = new float[list.size()]; for (int i = 0; i < dashpattern.length; i++) { dashpattern[i] = ( (Number) list.get(i)).floatValue(); } float dashoffset = ( (Number) data[1]).floatValue(); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), dashpattern, dashoffset); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, dashpattern, dashoffset); } context.pencil.graphics.setStroke(newStroke); } }); // setlinejoin systemDict.put("setlinejoin", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), (int) data[0], ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, (int) data[0]); } context.pencil.graphics.setStroke(newStroke); } }); // dumpstack systemDict.put("dumpstack", new PACommand() { public void execute(PAContext context) throws PainterException { Enumeration enumx = context.operands.elements(); System.out.println("-------------Stack--------------"); while (enumx.hasMoreElements()) { System.out.println(enumx.nextElement()); } System.out.println("--------------------------------"); } }); // for systemDict.put("for", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(4); if (! (data[3] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof Number)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[3]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } int i0, i1, i2; i0 = ( (Number) data[0]).intValue(); i1 = ( (Number) data[1]).intValue(); i2 = ( (Number) data[2]).intValue(); if (i1 > 0) { for (int i = i0; i <= i2; i += i1) { context.operands.push(new Integer(i)); context.engine.process(patoken); } } else { for (int i = i0; i >= i2; i -= i1) { context.operands.push(new Integer(i)); context.engine.process(patoken); } } } }); // repeat systemDict.put("repeat", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } int n = ( (Number) data[0]).intValue(); for (int i = 0; i < n; i++) { context.engine.process(patoken); } } }); // true systemDict.put("true", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Boolean(true)); } }); // false systemDict.put("false", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Boolean(false)); } }); // lt systemDict.put("lt", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 < d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) < 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // gt systemDict.put("gt", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 > d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) > 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // ne systemDict.put("ne", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 != d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.equals(s1)) { context.operands.push(new Boolean(false)); } else { context.operands.push(new Boolean(true)); } } } }); // eq systemDict.put("eq", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 == d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) == 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // if systemDict.put("if", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof Boolean)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if ( ( (Boolean) data[0]).booleanValue()) { context.engine.process(patoken); } } }); // ifelse systemDict.put("ifelse", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken1, patoken2; data = context.popOperands(3); if (! (data[0] instanceof Boolean)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken1 = (PAToken) data[1]; patoken2 = (PAToken) data[2]; if (! (patoken1.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if (! (patoken2.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if ( ( (Boolean) data[0]).booleanValue()) { context.engine.process(patoken1); } else { context.engine.process(patoken2); } } }); // dict systemDict.put("dict", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new HashMap()); } }); // userdict systemDict.put("userdict", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new HashMap()); } }); // put systemDict.put("put", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(3); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } ( (HashMap) data[0]).put(patoken.value, data[2]); } }); // get systemDict.put("get", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof HashMap) && ! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof HashMap) { if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (HashMap) data[0]).get(patoken.value)); } else if (data[0] instanceof ArrayList) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (ArrayList) data[0]).get( ( (Number) data[1]). intValue())); } } }); // load systemDict.put("load", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push(context.findIdentifier(patoken.value)); } }); // length systemDict.put("length", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; int size = 0; data = context.popOperands(1); if (data[0] instanceof PAToken) { patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } size = ( (String) patoken.value).length(); } else if (data[0] instanceof HashMap) { size = ( (HashMap) data[0]).size(); } else if (data[0] instanceof ArrayList) { size = ( (ArrayList) data[0]).size(); } else if (data[0] instanceof String) { size = ( (String) data[0]).length(); } else { throw new PainterException("wrong arguments"); } context.operands.push(new Integer(size)); } }); // begin systemDict.put("begin", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } context.dictionaries.push(data[0]); } }); // end systemDict.put("end", new PACommand() { public void execute(PAContext context) throws PainterException { try { context.dictionaries.pop(); } catch (EmptyStackException e) { throw new PainterException("Dictionary stack is empty"); } } }); // undef systemDict.put("undef", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } // we don't do an actual undef because we don't care } }); // known systemDict.put("known", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[], foundObject; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } foundObject = context.findIdentifier(patoken.value); if (foundObject != null) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } }); // where systemDict.put("where", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[], foundObject; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } foundObject = context.findDictionary(patoken.value); if (foundObject != null) { context.operands.push(foundObject); context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } }); // aload systemDict.put("aload", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; ArrayList list; data = context.popOperands(1); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } list = (ArrayList) data[0]; Iterator iterator = list.iterator(); while (iterator.hasNext()) { context.operands.push(iterator.next()); } context.operands.push(data[0]); } }); // forall systemDict.put("forall", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; ArrayList list; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } list = (ArrayList) data[0]; Iterator iterator = list.iterator(); while (iterator.hasNext()) { context.operands.push(iterator.next()); context.engine.process(patoken); } } }); // currentflat PENDING(uweh):placeholder for now systemDict.put("currentflat", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Float(1.0f)); } }); // setflat PENDING(uweh):placeholder for now systemDict.put("setflat", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); } }); // round systemDict.put("round", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Long(Math.round(data[0]))); } }); // abs systemDict.put("abs", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.abs(data[0]))); } }); // transform systemDict.put("transform", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; double[] transformedData = new double[2]; data = context.popNumberOperands(2); AffineTransform at = context.pencil.graphics.getTransform(); at.transform(data, 0, transformedData, 0, 1); context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) array.get(i)).doubleValue(); } AffineTransform at = new AffineTransform(entries); double numberdata[] = new double[2]; numberdata[0] = ( (Number) data[0]).doubleValue(); numberdata[1] = ( (Number) data[0]).doubleValue(); double[] transformedData = new double[2]; at.transform(numberdata, 0, transformedData, 0, 1); context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } } }); // itransform systemDict.put("itransform", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; double[] transformedData = new double[2]; data = context.popNumberOperands(2); AffineTransform at = context.pencil.graphics.getTransform(); try { at.inverseTransform(data, 0, transformedData, 0, 1); } catch (NoninvertibleTransformException e) { throw new PainterException(e.toString()); } context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) array.get(i)).doubleValue(); } AffineTransform at = new AffineTransform(entries); double numberdata[] = new double[2]; numberdata[0] = ( (Number) data[0]).doubleValue(); numberdata[1] = ( (Number) data[0]).doubleValue(); double[] transformedData = new double[2]; try { at.inverseTransform(numberdata, 0, transformedData, 0, 1); } catch (NoninvertibleTransformException e) { throw new PainterException(e.toString()); } context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } } }); // currentpoint // PENDING(uweh): what about CTM, same thing when you construct path // this is different than ps, might not work in a few instances systemDict.put("currentpoint", new PACommand() { public void execute(PAContext context) throws PainterException { Point2D currentPoint = context.pencil.state.path.getCurrentPoint(); context.operands.push(new Double(currentPoint.getX())); context.operands.push(new Double(currentPoint.getY())); } }); // clippath systemDict.put("clippath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.clippath(); } }); // matrix systemDict.put("matrix", new PACommand() { public void execute(PAContext context) throws PainterException { ArrayList identityMatrix = new ArrayList(6); identityMatrix.add(new Double(1.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(1.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(0.0d)); context.operands.push(identityMatrix); } }); // concatmatrix systemDict.put("concatmatrix", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList arrayOne, arrayTwo, arrayThree; AffineTransform atOne, atTwo; arrayOne = (ArrayList) data[0]; arrayTwo = (ArrayList) data[1]; arrayThree = (ArrayList) data[2]; double[] entries = new double[6]; if (! (arrayOne.size() == 6)) { throw new PainterException("wrong arguments"); } if (! (arrayTwo.size() == 6)) { throw new PainterException("wrong arguments"); } if (! (arrayThree.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) arrayOne.get(i)).doubleValue(); } atOne = new AffineTransform(entries); for (int i = 0; i < 6; i++) { entries[i] = ( (Number) arrayTwo.get(i)).doubleValue(); } atTwo = new AffineTransform(entries); atOne.concatenate(atTwo); atOne.getMatrix(entries); for (int i = 0; i < 6; i++) { arrayThree.set(i, new Double(entries[i])); } context.operands.push(arrayThree); } }); // pathbbox systemDict.put("pathbbox", new PACommand() { public void execute(PAContext context) throws PainterException { Rectangle2D pathBounds = context.pencil.state.path.getBounds2D(); context.operands.push(new Double(pathBounds.getMinX())); context.operands.push(new Double(pathBounds.getMinY())); context.operands.push(new Double(pathBounds.getMaxX())); context.operands.push(new Double(pathBounds.getMaxY())); } }); // truncate systemDict.put("truncate", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; double truncated; data = context.popNumberOperands(1); if (data[0] < 0) { truncated = Math.ceil(data[0]); } else { truncated = Math.floor(data[0]); } context.operands.push(new Double(truncated)); } }); // rand systemDict.put("rand", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Integer(randomNumberGenerator.nextInt(231))); } }); // srand systemDict.put("srand", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); randomNumberGenerator = new Random(Math.round(data[0])); } }); // cvi systemDict.put("cvi", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { int d; d = ( (Number) data[0]).intValue(); context.operands.push(new Integer(d)); } else { String s; s = (String) data[0]; context.operands.push(new Integer(s)); } } }); // usertime systemDict.put("usertime", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Long(System.currentTimeMillis())); } });// save systemDict.put("save", new PACommand() { public void execute(PAContext context) throws PainterException { // context.operands.push(new Long(System.currentTimeMillis())); } });// restore systemDict.put("restore", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } });// clear systemDict.put("clear", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } });// cleardictstack systemDict.put("cleardictstack", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } }); // charpath systemDict.put("charpath", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Boolean)) { throw new PainterException("wrong arguments"); } context.pencil.charpath( (String) data[0], ( (Boolean) data[1]).booleanValue()); } }); // PENDING(uweh): we only support procedure right now and always push false on the stack // stopped systemDict.put("stopped", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } context.engine.process(patoken); context.operands.push(new Boolean(false)); } }); return systemDict; } | 4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/d2f614f1cabfa6f585b4e67b060a3e4e49a9f71e/PAContext.java/clean/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
4317,
4872,
3163,
5014,
1435,
288,
565,
4317,
2619,
5014,
273,
394,
4317,
5621,
565,
368,
25094,
565,
2619,
5014,
18,
458,
2932,
2704,
803,
3113,
394,
15662,
2189,
1435,
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,
4750,
4317,
4872,
3163,
5014,
1435,
288,
565,
4317,
2619,
5014,
273,
394,
4317,
5621,
565,
368,
25094,
565,
2619,
5014,
18,
458,
2932,
2704,
803,
3113,
394,
15662,
2189,
1435,
288,
1377,
... |
lastDelegateSet = new ParserRuleSet( delegateMode, delegateSetName); lastDelegateSet.setDefault(Token.INVALID); marker.addRuleSet(lastDelegateSet); | lastDelegateSet = delegateMarker .getRuleSet(delegateSetName); if(delegateMarker == marker && lastDelegateSet == null) { lastDelegateSet = new ParserRuleSet( delegateMode, delegateSetName); lastDelegateSet.setDefault(Token.INVALID); marker.addRuleSet(lastDelegateSet); } else if(lastDelegateSet == null) error("delegate-invalid",value); | public void attribute(String aname, String value, boolean isSpecified) { aname = (aname == null) ? null : aname.intern(); if (aname == "NAME") { propName = value; } else if (aname == "VALUE") { propValue = value; } else if (aname == "TYPE") { lastTokenID = Token.stringToToken(value); if(lastTokenID == -1) error("token-invalid",value); } else if (aname == "AT_LINE_START") { lastAtLineStart = (isSpecified) ? (value.equals("TRUE")) : false; } else if (aname == "AT_WHITESPACE_END") { lastAtWhitespaceEnd = (isSpecified) ? (value.equals("TRUE")) : false; } else if (aname == "AT_WORD_START") { lastAtWordStart = (isSpecified) ? (value.equals("TRUE")) : false; } else if (aname == "NO_LINE_BREAK") { lastNoLineBreak = (isSpecified) ? (value.equals("TRUE")) : false; } else if (aname == "NO_WORD_BREAK") { lastNoWordBreak = (isSpecified) ? (value.equals("TRUE")) : false; } else if (aname == "EXCLUDE_MATCH") { lastExcludeMatch = (isSpecified) ? (value.equals("TRUE")) : false; } else if (aname == "IGNORE_CASE") { lastIgnoreCase = (isSpecified) ? (value.equals("TRUE")) : true; } else if (aname == "HIGHLIGHT_DIGITS") { lastHighlightDigits = (isSpecified) ? (value.equals("TRUE")) : false; } else if (aname == "DIGIT_RE") { lastDigitRE = value; } else if (aname == "NO_WORD_SEP") { if(isSpecified) lastNoWordSep = value; } else if (aname == "AT_CHAR") { try { if (isSpecified) termChar = Integer.parseInt(value); } catch (NumberFormatException e) { error("termchar-invalid",value); termChar = -1; } } else if (aname == "ESCAPE") { lastEscape = value; } else if (aname == "SET") { lastSetName = value; } else if (aname == "DELEGATE") { String delegateMode, delegateSetName; if(value != null) { int index = value.indexOf("::"); if(index != -1) { delegateMode = value.substring(0,index); delegateSetName = value.substring(index + 2); } else { delegateMode = modeName; delegateSetName = value; } TokenMarker delegateMarker = getTokenMarker(delegateMode); lastDelegateSet = delegateMarker .getRuleSet(delegateSetName); if(delegateMarker == marker && lastDelegateSet == null) { // stupid hack to handle referencing // a rule set that is defined later! lastDelegateSet = new ParserRuleSet( delegateMode, delegateSetName); lastDelegateSet.setDefault(Token.INVALID); marker.addRuleSet(lastDelegateSet); } else if(lastDelegateSet == null) error("delegate-invalid",value); } } else if (aname == "DEFAULT") { lastDefaultID = Token.stringToToken(value); if(lastDefaultID == -1) { error("token-invalid",value); lastDefaultID = Token.NULL; } } else if (aname == "HASH_CHAR") { if(value.length() != 1) { error("hash-char-invalid",value); lastDefaultID = Token.NULL; } else lastHashChar = value.charAt(0); } } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/4b175ee58dd991b591cc03b2833e652988768a8d/XModeHandler.java/clean/org/gjt/sp/jedit/syntax/XModeHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1566,
12,
780,
392,
339,
16,
514,
460,
16,
1250,
353,
17068,
13,
202,
95,
202,
202,
304,
339,
273,
261,
304,
339,
422,
446,
13,
692,
446,
294,
392,
339,
18,
267,
798,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1566,
12,
780,
392,
339,
16,
514,
460,
16,
1250,
353,
17068,
13,
202,
95,
202,
202,
304,
339,
273,
261,
304,
339,
422,
446,
13,
692,
446,
294,
392,
339,
18,
267,
798,... |
if (to!=null && from.equals(to)) return s; String newString = s; int indexCounter = 0; int pos = s.indexOf(from); while (pos>=indexCounter) { if (to == null) { newString = newString.substring(0, pos)+newString.substring(pos+from.length(), newString.length()); indexCounter = pos; } else { newString = newString.substring(0, pos)+to+newString.substring(pos+from.length(), newString.length()); indexCounter = pos +to.length(); } pos = newString.indexOf(from); | else if (line.equals("")) return ""; else if (line.indexOf(old)<0) return line; else { StringBuffer sb = new StringBuffer(line); int len = sb.length(); for (int i=0; i<len; i++) if (sb.charAt(i)==old) sb.setCharAt(i, nnew); return sb.toString(); | public static String replace(String s,String from,String to) { if (s == null || from == null) return null; if (to!=null && from.equals(to)) return s; String newString = s; int indexCounter = 0; int pos = s.indexOf(from); while (pos>=indexCounter) { if (to == null) { newString = newString.substring(0, pos)+newString.substring(pos+from.length(), newString.length()); indexCounter = pos; } else { newString = newString.substring(0, pos)+to+newString.substring(pos+from.length(), newString.length()); indexCounter = pos +to.length(); } pos = newString.indexOf(from); } return newString; } | 57538 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57538/88e3c75ba71c7c3e23478b1c3ff126ef3c6fe3ab/StringUtil.java/buggy/branches/Mesquite1.x/Mesquite Project/Source/mesquite/lib/StringUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
1453,
12,
780,
272,
16,
780,
628,
16,
780,
358,
13,
202,
95,
202,
202,
430,
261,
87,
422,
446,
747,
628,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
1453,
12,
780,
272,
16,
780,
628,
16,
780,
358,
13,
202,
95,
202,
202,
430,
261,
87,
422,
446,
747,
628,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
430,
... |
heredoc_restore(); | int hereDocument() { HereDocNode here = (HereDocNode) lex_strterm; char c; String eos = here.getValue(); long len = eos.length(); int func = here.getFunc(); boolean indent = (func & STR_FUNC_INDENT) != 0; StringBuffer str = new StringBuffer(); if ((c = support.read()) == EOF) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } if (was_bol() && whole_match_p(eos, indent)) { heredoc_restore(); return Token.tSTRING_END; } if ((func & STR_FUNC_EXPAND) == 0) { if (c == '\n') { support.unread(); } int lastLineLength = here.getLastLineLength(); if (lastLineLength > 0) { // It looks like I needed to append last line as well... support.unreadMany(here.getLastLineLength()); str.append(support.readLine()); str.append("\n"); } do { str.append(support.readLine()); str.append("\n"); if (support.isEOF()) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } } while (!whole_match_p(eos, indent)); } else { newToken(); if (c == '#') { switch (c = support.read()) { case '$': case '@': support.unread(); return Token.tSTRING_DVAR; case '{': return Token.tSTRING_DBEG; } tokadd('#'); } support.unread(); do { if ((c = tokadd_string(new StrTermNode(support.getPosition(), func, '\n', 0))) == EOF) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } if (c != '\n') { yaccValue = tok(); return Token.tSTRING_CONTENT; } tokadd(support.read()); if ((c = support.read()) == EOF) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } // We need to pushback so when whole match looks it did not // lose a char during last EOF support.unread(); } while (!whole_match_p(eos, indent)); str = new StringBuffer(tok()); } //heredoc_restore(); lex_strterm = new StrTermNode(support.getPosition(), -1, 0, 0); yaccValue = str.toString(); return Token.tSTRING_CONTENT; } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/e3f1342402481ba0beeee24e139dfeaf1f0125a8/RubyYaccLexer.java/clean/src/org/jruby/lexer/yacc/RubyYaccLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
316,
1136,
329,
504,
67,
13991,
5621,
2674,
2519,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
316,
1136,
329,
504,
67,
13991,
5621,
2674,
2519,
1435,
... | |
filename = filename.substring(0,filename.length()-1) + "@http: filename.substring(filename.lastIndexOf(".")+1, filename.length()-1) + ".jar.url"; | filename = "*@http: filename.substring(filename.lastIndexOf(".")+1, filename.length()-1) + ".jar.url"; | private FredPlugin LoadPlugin(String filename) throws PluginNotFoundException { Class cls = null; if (filename.endsWith("*")) { filename = filename.substring(0,filename.length()-1) + "@http://downloads.freenetproject.org/alpha/plugins/" + filename.substring(filename.lastIndexOf(".")+1, filename.length()-1) + ".jar.url"; //System.out.println(filename); } if ((filename.indexOf("@") >= 0)) { // Open from external file for (int tries = 0 ; (tries <= 5) && (cls == null) ; tries++) try { String realURL = null; String realClass = null; // Load the jar-file String[] parts = filename.split("@"); if (parts.length != 2) { throw new PluginNotFoundException("Could not split at \"@\"."); } realClass = parts[0]; realURL = parts[1]; if (filename.endsWith(".url")) { // Load the txt-file BufferedReader in; URL url = new URL(parts[1]); URLConnection uc = url.openConnection(); in = new BufferedReader( new InputStreamReader(uc.getInputStream())); realURL = in.readLine().trim(); } // Load the class inside file URL[] serverURLs = new URL[]{new URL(realURL)}; ClassLoader cl = new URLClassLoader(serverURLs); // Handle automatic fetching of pluginclassname if (realClass.equals("*")) { if (realURL.startsWith("file:")) { URI liburi = URIPreEncoder.encodeURI(realURL); realURL = liburi.toString(); } URL url = new URL("jar:"+realURL+"!/"); JarURLConnection jarConnection = (JarURLConnection)url.openConnection(); JarFile jf = jarConnection.getJarFile(); //URLJarFile jf = new URLJarFile(new File(liburi)); //is = jf.getInputStream(jf.getJarEntry("META-INF/MANIFEST.MF")); //BufferedReader manifest = new BufferedReader(new InputStreamReader(cl.getResourceAsStream("/META-INF/MANIFEST.MF"))); //URL url = new URL(parts[1]); //URLConnection uc = cl.getResource("/META-INF/MANIFEST.MF").openConnection(); InputStream is = jf.getInputStream(jf.getJarEntry("META-INF/MANIFEST.MF")); BufferedReader in = new BufferedReader(new InputStreamReader(is)); String line; while ((line = in.readLine())!=null) { // System.err.println(line + "\t\t\t" + realClass); if (line.startsWith("Plugin-Main-Class: ")) { realClass = line.substring("Plugin-Main-Class: ".length()).trim(); } } //System.err.println("Real classname: " + realClass); } cls = cl.loadClass(realClass); } catch (Exception e) { if (tries >= 5) throw new PluginNotFoundException("Initialization error:" + filename, e); try { Thread.sleep(100); } catch (Exception ee) {} } } else { // Load class try { cls = Class.forName(filename); } catch (ClassNotFoundException e) { throw new PluginNotFoundException(filename); } } if(cls == null) throw new PluginNotFoundException("Unknown error"); // Class loaded... Objectize it! Object o = null; try { o = cls.newInstance(); } catch (Exception e) { throw new PluginNotFoundException("Could not re-create plugin:" + filename, e); } // See if we have the right type if (!(o instanceof FredPlugin)) { throw new PluginNotFoundException("Not a plugin: " + filename); } return (FredPlugin)o; } | 50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/873c2e8f2d5ed084a47385df5cfac5c68d431d7c/PluginManager.java/clean/src/freenet/pluginmanager/PluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
478,
1118,
3773,
4444,
3773,
12,
780,
1544,
13,
1216,
6258,
3990,
288,
3639,
1659,
2028,
273,
446,
31,
3639,
309,
261,
3459,
18,
5839,
1190,
2932,
7388,
3719,
288,
540,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
478,
1118,
3773,
4444,
3773,
12,
780,
1544,
13,
1216,
6258,
3990,
288,
3639,
1659,
2028,
273,
446,
31,
3639,
309,
261,
3459,
18,
5839,
1190,
2932,
7388,
3719,
288,
540,
202,
... |
AST __t379 = _t; | AST __t384 = _t; | public final Expression valueComp(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; AST valueComp_AST_in = (AST)_t; step= null; PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_eq: { AST __t374 = _t; AST tmp55_AST_in = (AST)_t; match(_t,LITERAL_eq); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new ValueComparison(context, left, right, Constants.EQ); path.add(step); _t = __t374; _t = _t.getNextSibling(); break; } case LITERAL_ne: { AST __t375 = _t; AST tmp56_AST_in = (AST)_t; match(_t,LITERAL_ne); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new ValueComparison(context, left, right, Constants.NEQ); path.add(step); _t = __t375; _t = _t.getNextSibling(); break; } case LITERAL_lt: { AST __t376 = _t; AST tmp57_AST_in = (AST)_t; match(_t,LITERAL_lt); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new ValueComparison(context, left, right, Constants.LT); path.add(step); _t = __t376; _t = _t.getNextSibling(); break; } case LITERAL_le: { AST __t377 = _t; AST tmp58_AST_in = (AST)_t; match(_t,LITERAL_le); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new ValueComparison(context, left, right, Constants.LTEQ); path.add(step); _t = __t377; _t = _t.getNextSibling(); break; } case LITERAL_gt: { AST __t378 = _t; AST tmp59_AST_in = (AST)_t; match(_t,LITERAL_gt); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new ValueComparison(context, left, right, Constants.GT); path.add(step); _t = __t378; _t = _t.getNextSibling(); break; } case LITERAL_ge: { AST __t379 = _t; AST tmp60_AST_in = (AST)_t; match(_t,LITERAL_ge); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new ValueComparison(context, left, right, Constants.GTEQ); path.add(step); _t = __t379; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/1d6298911c93c664b283d6052b53ef5b8e0b20cb/XPathTreeParser2.java/clean/src/org/exist/parser/XPathTreeParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
460,
2945,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
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,
225,
202,
482,
727,
5371,
225,
460,
2945,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
22... |
try { value.getValue(); fail("Error not thrown"); } catch (AssertionFailedError e) { assertEquals("The return value \"" + getName() + "\" has not been set.", e.getMessage()); } } | try { value.getValue(); fail("Error not thrown"); } catch (AssertionFailedError e) { assertEquals("The return value \"" + getName() + "\" has not been set.", e.getMessage()); } } | public void testValueNotSet() { try { value.getValue(); fail("Error not thrown"); } catch (AssertionFailedError e) { assertEquals("The return value \"" + getName() + "\" has not been set.", e.getMessage()); } } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/ReturnValueTest.java/clean/jmock/core/src/test/jmock/expectation/ReturnValueTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
620,
1248,
694,
1435,
288,
202,
202,
698,
288,
1082,
202,
1132,
18,
24805,
5621,
1082,
202,
6870,
2932,
668,
486,
6718,
8863,
202,
202,
97,
202,
202,
14683,
261,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
620,
1248,
694,
1435,
288,
202,
202,
698,
288,
1082,
202,
1132,
18,
24805,
5621,
1082,
202,
6870,
2932,
668,
486,
6718,
8863,
202,
202,
97,
202,
202,
14683,
261,
14... |
if (type == IResource.FILE) createLinkButton.setText(IDEWorkbenchMessages.WizardNewLinkPage_linkFileButton); else createLinkButton.setText(IDEWorkbenchMessages.WizardNewLinkPage_linkFolderButton); | if (type == IResource.FILE) { createLinkButton.setText(IDEWorkbenchMessages.WizardNewLinkPage_linkFileButton); } else { createLinkButton.setText(IDEWorkbenchMessages.WizardNewLinkPage_linkFolderButton); } | public void createControl(Composite parent) { Font font = parent.getFont(); initializeDialogUnits(parent); // top level group Composite topLevel = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; topLevel.setLayout(layout); topLevel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); topLevel.setFont(font); PlatformUI.getWorkbench().getHelpSystem().setHelp(topLevel, IIDEHelpContextIds.NEW_LINK_WIZARD_PAGE); final Button createLinkButton = new Button(topLevel, SWT.CHECK); if (type == IResource.FILE) createLinkButton.setText(IDEWorkbenchMessages.WizardNewLinkPage_linkFileButton); else createLinkButton.setText(IDEWorkbenchMessages.WizardNewLinkPage_linkFolderButton); createLinkButton.setSelection(createLink); GridData data = new GridData(); data.horizontalSpan = 3; createLinkButton.setLayoutData(data); createLinkButton.setFont(font); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { createLink = createLinkButton.getSelection(); browseButton.setEnabled(createLink); variablesButton.setEnabled(createLink); linkTargetField.setEnabled(createLink); setPageComplete(validatePage()); } }; createLinkButton.addSelectionListener(listener); createLinkLocationGroup(topLevel, createLink); validatePage(); setErrorMessage(null); setMessage(null); setControl(topLevel); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/WizardNewLinkPage.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewLinkPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
3367,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
4046,
6353,
7537,
12,
2938,
1769,
3639,
368,
1760,
1801,
1041,
3639,
14728,
21289,
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,
752,
3367,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
4046,
6353,
7537,
12,
2938,
1769,
3639,
368,
1760,
1801,
1041,
3639,
14728,
21289,
27... |
String parts[] = cp.split(":"); | String parts[] = cp.split(File.pathSeparator); | public static void main(String argv[], Class applicationClass) { _wasERXApplicationMainInvoked = true; String cp = System.getProperty("java.class.path"); String parts[] = cp.split(":"); String normalLibs = ""; String systemLibs = ""; allFrameworks = new HashSet(); for (int i = 0; i < parts.length; i++) { String jar = parts[i]; // all patched frameworks here if(jar.matches(".*?Library[/\\\\]Frameworks[/\\\\]Java(Foundation|EOControl|EOAccess|WebObjects).*")) { systemLibs += jar + ":"; } else { normalLibs += jar + ":"; } String bundle = jar.replaceAll(".*?[/\\\\](\\w+)\\.framework.*", "$1"); if (bundle.matches("^\\w+$") && !"JavaVM".equals(bundle)) { allFrameworks.add(bundle); } } if (systemLibs.length() > 1) { systemLibs = systemLibs.substring(0, systemLibs.length() - 1); } if (normalLibs.length() > 1) { normalLibs = normalLibs.substring(0, normalLibs.length() - 1); } cp = normalLibs + ":" + systemLibs; // AK: this is pretty experimental for now. The classpath reordering // should actually be done in a WOLips bootstrap because as this time all // the static inits of WO app have already happened (which include NSMutableArray and _NSThreadSaveSet) if (true) { System.setProperty("java.class.path", cp); ClassLoader loader = AppClassLoader.getAppClassLoader(); Thread.currentThread().setContextClassLoader(loader); } Class arrayClass = NSMutableArray.class; try { Field f = arrayClass.getField("ERX_MARKER"); } catch (NoSuchFieldException e) { System.err.println("No ERX_MARKER field in NSMutableArray found. \nThis means your class path is incorrect. Adjust it so that ERExtensions come before JavaFoundation."); System.exit(1); } catch (Exception e) { e.printStackTrace(); } NSNotificationCenter.defaultCenter().addObserver(ERXApplication.class, new NSSelector("bundleDidLoad", new Class[] { NSNotification.class }), "NSBundleDidLoadNotification", null); ERXConfigurationManager.defaultManager().setCommandLineArguments(argv); ERXFrameworkPrincipal.setUpFrameworkPrincipalClass(ERXExtensions.class); WOApplication.main(argv, applicationClass); } | 22541 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22541/43bafa9af636329a0b9a7c722052930979220b55/ERXApplication.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXApplication.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
5261,
63,
6487,
1659,
2521,
797,
13,
288,
377,
202,
67,
17416,
654,
60,
3208,
6376,
26215,
273,
638,
31,
377,
202,
780,
3283,
273,
2332,
18,
588,
1396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
5261,
63,
6487,
1659,
2521,
797,
13,
288,
377,
202,
67,
17416,
654,
60,
3208,
6376,
26215,
273,
638,
31,
377,
202,
780,
3283,
273,
2332,
18,
588,
1396,
... |
if (parent != null) { return parent.doCreateObservable(description, | if (parent instanceof DataBindingContext) { return ((DataBindingContext)parent).doCreateObservable(description, | private IObservable doCreateObservable(Object description, DataBindingContext thisDatabindingContext) { for (int i = factories.size() - 1; i >= 0; i--) { IObservableFactory factory = (IObservableFactory) factories.get(i); IObservable result = factory.createObservable(description); if (result != null) { return result; } } if (parent != null) { return parent.doCreateObservable(description, thisDatabindingContext); } throw new BindingException("could not find observable for " //$NON-NLS-1$ + description); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/4eef75f7c0300183de34da2b20e79e0087924da7/DataBindingContext.java/buggy/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/DataBindingContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1665,
3745,
741,
1684,
15279,
12,
921,
2477,
16,
1082,
202,
751,
5250,
1042,
333,
5139,
378,
728,
310,
1042,
13,
288,
202,
202,
1884,
261,
474,
277,
273,
17456,
18,
1467,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1665,
3745,
741,
1684,
15279,
12,
921,
2477,
16,
1082,
202,
751,
5250,
1042,
333,
5139,
378,
728,
310,
1042,
13,
288,
202,
202,
1884,
261,
474,
277,
273,
17456,
18,
1467,
143... |
fSpecified = true; | fSpecified = false; | public void reset() { fDeclaration = null; fTypeDecl = null; fNil = false; fSpecified = true; fNotation = null; fMemberType = null; fValidationAttempted = ElementPSVI.VALIDATION_NONE; fValidity = ElementPSVI.VALIDITY_UNKNOWN; fErrorCodes = null; fValidationContext = null; fNormalizedValue = null; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/666a9ddc196896bef002996fbbf5112b56ecdcf1/ElementPSVImpl.java/buggy/src/org/apache/xerces/impl/xs/ElementPSVImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2715,
1435,
288,
3639,
284,
6094,
273,
446,
31,
3639,
284,
559,
3456,
273,
446,
31,
3639,
284,
12616,
273,
629,
31,
3639,
284,
17068,
273,
629,
31,
3639,
284,
14818,
273,
446... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2715,
1435,
288,
3639,
284,
6094,
273,
446,
31,
3639,
284,
559,
3456,
273,
446,
31,
3639,
284,
12616,
273,
629,
31,
3639,
284,
17068,
273,
629,
31,
3639,
284,
14818,
273,
446... |
-1, 271, 58, 59, -1, -1, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, 41, 290, 291, 44, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, 125, -1, 319, | private static final short[] yyCheck2() { return new short[] { -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, -1, 261, 262, 263, 264, 265, 266, -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, -1, 280, -1, -1, 283, 284, 285, 286, 287, 288, 289, 290, 291, -1, 293, 294, 295, 296, 297, -1, 299, -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, -1, 311, 312, 313, 314, -1, -1, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 339, -1, -1, 342, 343, 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 257, 258, 259, -1, 261, 262, 263, 264, 265, 266, -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, -1, 280, -1, -1, 283, 284, 285, 286, 287, 288, 289, 290, 291, -1, 293, 294, 295, 296, 297, -1, 299, -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, -1, 311, 312, 313, 314, -1, -1, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 339, -1, -1, 342, 343, 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, -1, 261, 262, 263, 264, 265, 266, -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, -1, 280, -1, -1, 283, 284, 285, 286, 287, 288, 289, 290, 291, -1, 293, 294, 295, 296, 297, -1, 299, -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, -1, 311, 312, 313, 314, -1, -1, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 339, -1, -1, 342, 343, 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 257, 258, 259, -1, 261, 262, 263, 264, 265, 266, -1, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, -1, -1, -1, -1, 283, 284, 285, 286, 287, 288, 289, 290, 291, -1, 293, 294, 295, 296, 297, -1, 299, -1, -1, 302, 303, 304, 305, 306, 307, 308, 309, -1, 311, 312, 313, 314, -1, -1, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 339, -1, -1, 342, 343, 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 0, 363, 364, 365, 366, 367, 368, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, 41, -1, -1, 44, -1, -1, -1, 41, -1, -1, -1, -1, 0, -1, 61, -1, -1, -1, -1, -1, 61, -1, 10, -1, -1, 59, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, 91, -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, 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, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 257, 258, 259, -1, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, -1, -1, 281, -1, 283, 284, 285, 286, 287, 288, 289, 290, 291, -1, 293, 294, 295, 296, 297, -1, 299, 0, -1, 302, 303, 304, 305, 306, 307, 308, 309, 10, 311, 312, 313, 314, -1, -1, 317, 318, 319, -1, -1, -1, 262, 263, 264, -1, 279, 280, 268, 269, 331, 271, 279, -1, -1, -1, -1, 338, 339, -1, 41, 342, -1, 344, 345, 346, -1, 348, -1, 350, -1, 352, -1, -1, -1, -1, -1, 58, 59, 360, -1, -1, 363, 364, 365, 366, 367, 368, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 331, -1, -1, -1, -1, -1, 331, 338, 280, 281, 282, -1, 343, 338, 93, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, 359, 0, -1, 362, -1, -1, 359, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, 125, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 0, -1, 336, 337, 338, -1, -1, 341, 41, -1, 10, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, 59, 361, 362, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 41, -1, -1, 44, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, 125, 93, -1, -1, -1, -1, -1, 59, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, 125, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, 41, -1, -1, 44, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, 58, 59, -1, 61, -1, 63, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 347, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, 125, -1, -1, 262, 263, 264, -1, -1, -1, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 58, 59, -1, 61, -1, 63, -1, -1, 280, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, 262, 263, 264, 91, -1, 93, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 125, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 362, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, 0, -1, -1, -1, -1, 281, 282, -1, -1, -1, 10, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 58, 59, 336, 337, 338, -1, 340, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, 0, 353, 354, 355, 356, 357, 358, 359, -1, 361, 10, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, 41, 281, 282, 44, -1, -1, -1, -1, 125, -1, 290, 291, 41, 293, 294, 295, 296, 297, 59, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 59, -1, -1, -1, 10, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, -1, -1, -1, 41, -1, 347, 44, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 58, 59, 125, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, 125, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 41, -1, -1, 44, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, 58, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, 262, 263, 264, -1, -1, -1, 268, 269, -1, 271, -1, -1, 262, 263, 264, -1, -1, 0, 268, 269, -1, 271, -1, -1, -1, -1, -1, 10, 125, -1, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 58, 59, -1, -1, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 125, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, -1, -1, -1, 41, -1, 347, 44, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, 0, 361, 58, 59, -1, -1, -1, 63, -1, -1, 10, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, 93, -1, -1, -1, 41, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, 0, 59, -1, -1, -1, -1, -1, -1, -1, -1, 10, 125, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, -1, -1, -1, 41, -1, 347, 44, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 58, 59, -1, -1, -1, 63, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 58, 59, -1, -1, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, -1, 268, 269, -1, 271, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 125, -1, 341, -1, -1, -1, -1, -1, 347, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 58, 59, -1, -1, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 125, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, -1, -1, -1, 41, -1, 347, 44, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, 93, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 125, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, -1, -1, -1, 41, -1, 347, 44, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 58, 59, -1, -1, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 91, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 125, -1, 341, -1, -1, -1, -1, -1, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 58, 59, -1, -1, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, 125, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, 0, -1, -1, -1, -1, 281, 282, -1, -1, -1, 10, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 58, 59, 336, 337, 338, 63, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, -1, -1, -1, -1, -1, 125, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, -1, -1, -1, -1, -1, -1, 41, 349, 0, 351, -1, 353, 354, 355, 356, 357, 358, 359, 10, 361, -1, -1, -1, 58, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, 125, 271, -1, -1, -1, -1, -1, -1, -1, 91, -1, 281, -1, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 125, 10, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, -1, -1, -1, 41, -1, -1, 44, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, 0, -1, 262, 263, 264, -1, -1, 267, 268, 269, 10, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, 125, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, 41, -1, -1, 44, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, 58, 59, -1, -1, -1, 63, 281, -1, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, -1, 341, 125, -1, -1, -1, -1, -1, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, 0, -1, 262, 263, 264, -1, -1, 267, 268, 269, 10, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, 41, 290, 291, 44, 293, 294, 295, 296, 297, -1, -1, -1, 41, -1, -1, 44, -1, 58, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, -1, -1, 336, 337, -1, -1, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 125, -1, -1, -1, 0, -1, -1, -1, -1, 281, 282, -1, 125, -1, 10, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, 58, 59, 336, 337, -1, 63, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, 41, 271, -1, 44, 262, 263, 264, -1, -1, -1, 268, 269, -1, 271, -1, -1, -1, 58, 59, -1, -1, -1, 63, 293, 294, 295, 296, 297, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 341, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, 58, 59, -1, -1, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, -1, -1, 336, 337, -1, 125, -1, 341, 0, -1, -1, -1, -1, 347, -1, 349, -1, 351, 10, 353, 354, 355, 356, 357, 358, 359, -1, 361, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 281, 282, 41, -1, -1, 44, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, 58, 59, -1, -1, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, -1, 93, 336, 337, -1, -1, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, -1, -1, -1, 0, -1, -1, -1, -1, 281, 282, -1, -1, -1, 10, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, 58, 59, 336, 337, -1, 63, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, -1, -1, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, 125, -1, -1, -1, -1, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, 41, 290, 291, 44, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, 61, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, -1, -1, 336, 337, -1, 91, -1, 341, -1, -1, -1, -1, -1, 347, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, 44, -1, -1, -1, 262, 263, 264, -1, -1, 267, 268, 269, -1, 271, -1, 59, -1, 61, -1, 63, -1, -1, -1, 281, 282, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, -1, -1, 336, 337, -1, 125, 0, 341, -1, -1, -1, -1, -1, 347, -1, 349, 10, 351, -1, 353, 354, 355, 356, 357, 358, 359, -1, 361, 262, 263, 264, -1, -1, -1, 268, 269, -1, 271, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, -1, -1, 290, 291, -1, 293, 294, 295, 296, 297, 58, 59, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, -1, -1, 336, 337, 338, -1, 340, -1, 41, -1, -1, 44, -1, -1, -1, 349, -1, 351, -1, 353, 354, 355, 356, 357, 358, 359, 59, 361, 61, -1, 63, 125, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 262, 263, 264, -1, -1, -1, 268, 269, -1, 271, -1, }; } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/a404cb04ade8bbc527b55cf473199686102428e1/YyTables.java/buggy/src/org/jruby/parser/YyTables.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
760,
727,
3025,
8526,
9016,
1564,
22,
1435,
288,
1377,
327,
394,
3025,
8526,
288,
6647,
300,
21,
16,
282,
26936,
16,
282,
300,
21,
16,
282,
300,
21,
16,
282,
300,
21,
16,
282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
760,
727,
3025,
8526,
9016,
1564,
22,
1435,
288,
1377,
327,
394,
3025,
8526,
288,
6647,
300,
21,
16,
282,
26936,
16,
282,
300,
21,
16,
282,
300,
21,
16,
282,
300,
21,
16,
282,
... |
int tt = peekToken(0); | int tt = peekToken(); | private Node assignExpr(boolean inForInit) throws IOException, ParserException { Node pn = condExpr(inForInit); int tt = peekToken(0); if (Token.FIRST_ASSIGN <= tt && tt <= Token.LAST_ASSIGN) { consumeToken(); decompiler.addToken(tt); pn = nf.createAssignment(tt, pn, assignExpr(inForInit)); } return pn; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/eea0a0a79d27ae62fc3c9a3f98c2f0a02adaf2c4/Parser.java/clean/js/rhino/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2029,
2683,
4742,
12,
6494,
316,
1290,
2570,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
2029,
11059,
273,
6941,
4742,
12,
267,
1290,
2570,
1769,
3639,
509,
3574,
273,
8032,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2029,
2683,
4742,
12,
6494,
316,
1290,
2570,
13,
3639,
1216,
1860,
16,
27990,
565,
288,
3639,
2029,
11059,
273,
6941,
4742,
12,
267,
1290,
2570,
1769,
3639,
509,
3574,
273,
8032,
13... |
} | } | private static void reflectionAppend(Object object, Class clazz, ToStringBuilder builder, boolean useTransients) { Field[] fields = clazz.getDeclaredFields(); Field.setAccessible(fields, true); for (int i = 0; i < fields.length; i++) { Field f = fields[i]; if ((f.getName().indexOf('$') == -1) && (useTransients || !Modifier.isTransient(f.getModifiers())) && (!Modifier.isStatic(f.getModifiers()))) { try { builder.append(f.getName(), f.get(object)); } catch (IllegalAccessException ex) { //this can't happen. Would get a Security exception instead //throw a runtime exception in case the impossible happens. throw new InternalError("Unexpected IllegalAccessException"); } } } } | 7060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7060/4ecadc12ba1ef7a91b8621c967c362bab495c202/ToStringBuilder.java/clean/src/java/org/apache/commons/lang/builder/ToStringBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
5463,
5736,
12,
921,
733,
16,
1659,
4003,
16,
2974,
21253,
2089,
16,
1250,
999,
1429,
5828,
13,
288,
3639,
2286,
8526,
1466,
273,
4003,
18,
588,
18888,
2314,
5621,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
5463,
5736,
12,
921,
733,
16,
1659,
4003,
16,
2974,
21253,
2089,
16,
1250,
999,
1429,
5828,
13,
288,
3639,
2286,
8526,
1466,
273,
4003,
18,
588,
18888,
2314,
5621,
3639,
... |
public SeismogramShapeIterator(MicroSecondTimeRange time, UnitRangeImpl amp, Dimension size){ this.time = time; this.amp = amp; this.size = size; | public SeismogramShapeIterator(SeismogramShapeIterator brother){ this(brother.getTime(), brother.getAmp(), brother.getSize()); | public SeismogramShapeIterator(MicroSecondTimeRange time, UnitRangeImpl amp, Dimension size){ this.time = time; this.amp = amp; this.size = size; } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/02886a817959aecf3426c1487acbf995166578c1/SeismogramShapeIterator.java/buggy/src/edu/sc/seis/fissuresUtil/display/SeismogramShapeIterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3265,
6228,
5553,
8500,
3198,
12,
13617,
8211,
950,
2655,
813,
16,
8380,
2655,
2828,
16946,
16,
4766,
282,
13037,
963,
15329,
3639,
333,
18,
957,
273,
813,
31,
3639,
333,
18,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3265,
6228,
5553,
8500,
3198,
12,
13617,
8211,
950,
2655,
813,
16,
8380,
2655,
2828,
16946,
16,
4766,
282,
13037,
963,
15329,
3639,
333,
18,
957,
273,
813,
31,
3639,
333,
18,
931,
... |
unparseMember(connection, cube, parent, response, | unparseMember(connection, catalogName, cube, parent, response, | private void unparseMember(final Connection connection, Cube cube, Member member, XmlaResponse response, int treeOp) { if (member.getOrdinal() == -1) { RolapMember.setOrdinals(connection, member); } // Visit node itself. if (mask(treeOp, Enumeration.TreeOp.Self.ordinal)) { emitMember(member, connection, cube, response); } // Visit node's siblings (not including itself). if (mask(treeOp, Enumeration.TreeOp.Siblings.ordinal)) { final Member parent = connection.getSchemaReader().getMemberParent(member); final Member[] siblings; if (parent == null) { siblings = connection.getSchemaReader(). getHierarchyRootMembers(member.getHierarchy()); } else { siblings = connection.getSchemaReader(). getMemberChildren(parent); } for (int i = 0; i < siblings.length; i++) { Member sibling = siblings[i]; if (sibling == member) { continue; } unparseMember(connection, cube, sibling, response, Enumeration.TreeOp.Self.ordinal); } } // Visit node's descendants or its immediate children, but not both. if (mask(treeOp, Enumeration.TreeOp.Descendants.ordinal)) { final Member[] children = connection.getSchemaReader().getMemberChildren(member); for (int i = 0; i < children.length; i++) { Member child = children[i]; unparseMember(connection, cube, child, response, Enumeration.TreeOp.Self.ordinal | Enumeration.TreeOp.Descendants.ordinal); } } else if (mask(treeOp, Enumeration.TreeOp.Children.ordinal)) { final Member[] children = connection.getSchemaReader().getMemberChildren(member); for (int i = 0; i < children.length; i++) { Member child = children[i]; unparseMember(connection, cube, child, response, Enumeration.TreeOp.Self.ordinal); } } // Visit node's ancestors or its immediate parent, but not both. if (mask(treeOp, Enumeration.TreeOp.Ancestors.ordinal)) { final Member parent = connection.getSchemaReader().getMemberParent(member); if (parent != null) { unparseMember(connection, cube, parent, response, Enumeration.TreeOp.Self.ordinal | Enumeration.TreeOp.Ancestors.ordinal); } } else if (mask(treeOp, Enumeration.TreeOp.Parent.ordinal)) { final Member parent = connection.getSchemaReader().getMemberParent(member); if (parent != null) { unparseMember(connection, cube, parent, response, Enumeration.TreeOp.Self.ordinal); } } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/60c8ed092a156642741851ef0b37808396a86dcd/RowsetDefinition.java/clean/src/main/mondrian/xmla/RowsetDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
640,
2670,
4419,
12,
6385,
4050,
1459,
16,
385,
4895,
18324,
16,
7734,
8596,
3140,
16,
5714,
69,
1064,
766,
16,
7734,
509,
2151,
3817,
13,
288,
5411,
309,
261,
5990,
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,
540,
3238,
918,
640,
2670,
4419,
12,
6385,
4050,
1459,
16,
385,
4895,
18324,
16,
7734,
8596,
3140,
16,
5714,
69,
1064,
766,
16,
7734,
509,
2151,
3817,
13,
288,
5411,
309,
261,
5990,
18,
588,... |
stream.println(sq.toString()); | int fullLine = syms.length / 60; int partLine = syms.length % 60; | public void addSymbols(final Alphabet alpha, final Symbol[] syms, final int start, final int length) throws IllegalAlphabetException { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; for (int i = 0; i < syms.length; i++) { char c = syms[i].getToken(); switch (c) { case 'a': case 'A': aCount++; break; case 'c': case 'C': cCount++; break; case 'g': case 'G': gCount++; break; case 't': case 'T': tCount++; break; default: oCount++; } } StringBuffer sq = new StringBuffer("XX\nSQ Sequence "); sq.append(length + " BP; "); sq.append(aCount + " A; "); sq.append(cCount + " C; "); sq.append(gCount + " G; "); sq.append(tCount + " T; "); sq.append(oCount + " other;"); // Print sequence summary header stream.println(sq.toString()); int fullLine = syms.length / 60; int partLine = syms.length % 60; int lineCount = fullLine; if (partLine > 0) lineCount++; int lineLens [] = new int [lineCount]; // All lines are 60, except last (if present) Arrays.fill(lineLens, 60); lineLens[lineCount - 1] = partLine; for (int i = 0; i < lineLens.length; i++) { // How long is this chunk? int len = lineLens[i]; // Prepare line 80 characters wide StringBuffer sb = new StringBuffer(80); char [] emptyLine = new char [80]; Arrays.fill(emptyLine, ' '); sb.append(emptyLine); // Prepare a Symbol array same length as chunk Symbol [] sa = new Symbol [len]; // Get symbols and format into blocks of tokens System.arraycopy(syms, (i * 60), sa, 0, len); String blocks = (SeqFormatTools.formatTokenBlock(sa, 10)).toString(); sb.replace(5, blocks.length() + 5, blocks); // Calculate the running residue count and add to the line String count = Integer.toString((i * 60) + len); sb.replace((80 - count.length()), 80, count); // Print formatted sequence line stream.println(sb); } // Print end of entry stream.println("//"); } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/218d83aa16b9e2a6160946a8f7a3e419131ba6e9/EmblFileFormer.java/clean/src/org/biojava/bio/seq/io/EmblFileFormer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
14821,
12,
6385,
2262,
8907,
4190,
16,
9506,
282,
727,
8565,
8526,
24367,
16,
9506,
282,
727,
509,
1377,
787,
16,
9506,
282,
727,
509,
1377,
769,
13,
202,
15069,
2141,
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,
527,
14821,
12,
6385,
2262,
8907,
4190,
16,
9506,
282,
727,
8565,
8526,
24367,
16,
9506,
282,
727,
509,
1377,
787,
16,
9506,
282,
727,
509,
1377,
769,
13,
202,
15069,
2141,
2... |
try { lock.wait(); } catch (InterruptedException e) { InterruptedIOException io = new InterruptedIOException (e.getMessage()); io.bytesTransferred = count - toCopy; throw io; } } int len; if (in < out) len = pipeBuffer.length - out; else len = in - out; len = len > toCopy ? toCopy : len; System.arraycopy(pipeBuffer, out, buf, offset, len); out += len; if (out == pipeBuffer.length) out = 0; toCopy -= len; offset += len; if (in == out) in = -1; lock.notifyAll(); } } return count; } | return(read(buf, 0, buf.length)); } | public int read (char buf[], int offset, int count) throws IOException { if (closed) throw new IOException ("closed"); if (count < 0) throw new ArrayIndexOutOfBoundsException (); int toCopy = count; synchronized (lock) { while (toCopy > 0) { // Wait for data in the pipe. If the writer is closed and // no data has been copied into the output buffer, return // the magic EOF number. while (in == -1) { if (writer.isClosed()) { if (toCopy < count) return count - toCopy; return -1; } // Note that JCL doesn't say this is the right thing // to do. Still, it feels right, and we must deal // with an interrupt somehow. try { lock.wait(); } catch (InterruptedException e) { InterruptedIOException io = new InterruptedIOException (e.getMessage()); io.bytesTransferred = count - toCopy; throw io; } } // Now copy some data from pipe into user buffer. int len; if (in < out) len = pipeBuffer.length - out; else len = in - out; len = len > toCopy ? toCopy : len; System.arraycopy(pipeBuffer, out, buf, offset, len); out += len; if (out == pipeBuffer.length) out = 0; toCopy -= len; offset += len; // If we've read all the data, then reset so that we know // there is nothing left to be read. if (in == out) in = -1; // Tell anybody waiting for space in the buffer. lock.notifyAll(); } } return count; } | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/8d285042d388a7105e3b50a5f438a5cd5ecdb499/PipedReader.java/buggy/libjava/java/io/PipedReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
855,
261,
3001,
1681,
63,
6487,
509,
1384,
16,
509,
1056,
13,
1216,
1860,
225,
288,
565,
309,
261,
12204,
13,
1377,
604,
394,
1860,
7566,
12204,
8863,
565,
309,
261,
1883,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
855,
261,
3001,
1681,
63,
6487,
509,
1384,
16,
509,
1056,
13,
1216,
1860,
225,
288,
565,
309,
261,
12204,
13,
1377,
604,
394,
1860,
7566,
12204,
8863,
565,
309,
261,
1883,
41... |
InsertOperation insertOperation = m_operationFactory.createInsertOperation(foreignId, nodeLabel, building, city); | InsertOperation insertOperation = m_operationFactory.createInsertOperation(getForeignSource(), foreignId, nodeLabel, building, city); | private SaveOrUpdateOperation insertNode(String foreignId, String nodeLabel, String building, String city) { InsertOperation insertOperation = m_operationFactory.createInsertOperation(foreignId, nodeLabel, building, city); m_inserts.add(insertOperation); return insertOperation; } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/0400674033a43abf6e876bbc15a1e43b5891a369/ImportOperationsManager.java/clean/model-import/src/main/java/org/opennms/netmgt/importer/operations/ImportOperationsManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
7074,
10466,
2988,
2243,
907,
12,
780,
5523,
548,
16,
514,
756,
2224,
16,
514,
10504,
16,
514,
12797,
13,
288,
3639,
8040,
2988,
2243,
2988,
273,
312,
67,
7624,
1733,
18,
2640,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7074,
10466,
2988,
2243,
907,
12,
780,
5523,
548,
16,
514,
756,
2224,
16,
514,
10504,
16,
514,
12797,
13,
288,
3639,
8040,
2988,
2243,
2988,
273,
312,
67,
7624,
1733,
18,
2640,
46... |
EObject element, Map hintsMap) | PasteTarget element, Map hintsMap) | public PasteIntoParentOperation(PasteOperation pasteProcess, EObject element, Map hintsMap) throws Exception { super(pasteProcess); this.element = element; this.hintsMap = hintsMap; childPasteProcessMap = new HashMap(); //IMPORTANT: ALWAYS LOAD/RELOAD a fresh copy for every parent eLoadedResource = loadEObjects(); // Bug 112516: Ensure that we will not attempt to insert GUIDs that // already exist if (getHintsMap().containsKey(ClipboardUtil.IGNORE_RECYCLE_HINT_ID) == false) { Iterator childEObjectInfoIt = getOriginalChildObjectInfo().iterator(); while (childEObjectInfoIt.hasNext()) { ObjectInfo objectInfo = (ObjectInfo) childEObjectInfoIt.next(); if (objectInfo.hasHint(ClipboardUtil.RECYCLE_HINT_ID) && findDuplicateGUID(getLoadedEObject(objectInfo.objId))) { throwException( "PasteIntoParentOperation", //$NON-NLS-1$ new IllegalArgumentException( EMFClipboardCoreMessages.copypaste_duplicateId)); } } } getContentObject2ProxyMap(); } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/cb60a066555c87b8b2d9a7be051e36a1f05d154a/PasteIntoParentOperation.java/clean/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.emf.clipboard.core/src/org/eclipse/gmf/runtime/emf/clipboard/core/internal/PasteIntoParentOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
453,
14725,
5952,
3054,
2988,
12,
52,
14725,
2988,
19401,
2227,
16,
1082,
202,
8029,
930,
16,
1635,
13442,
863,
13,
202,
202,
15069,
1185,
288,
202,
202,
9565,
12,
29795,
2227,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
453,
14725,
5952,
3054,
2988,
12,
52,
14725,
2988,
19401,
2227,
16,
1082,
202,
8029,
930,
16,
1635,
13442,
863,
13,
202,
202,
15069,
1185,
288,
202,
202,
9565,
12,
29795,
2227,
... |
mdrp[i] = input.popInt(); | mdrp[i] = input.popShort(); | public void work() { for (int i = 0; i < mLARc.length; i++) { mLARc[i] = input.popInt(); //fix inputs!! } for (int i = 0; i < mdrp.length; i++) { mdrp[i] = input.popInt(); } //Decoding of the coded Log-Area ratios: for (int i = 0; i < 8; i++) { int temp1 = (mLARc[i] + MIC[i]) << 10; int temp2 = B[i] << 10; temp1 = temp1 - temp2; temp1 = INVA[i] * temp1; mLARpp[i] = temp1 + temp1; } //Computation of the quantized reflection coefficients //Interpolation of mLARpp to get mLARp: for (int k = 0; k < 13; k++) { for(int i = 0; i < 8; i++) { mLARp[i] = (mprevLARpp[i] >> 2) + (mLARpp[i] >> 2); mLARp[i] = mLARp[i] + (mprevLARpp[i] >> 1); } } for (int k = 13; k < 27; k++) { for (int i = 0; i < 8; i++) { mLARp[i] = (mprevLARpp[i] >> 1) + (mLARpp[i] >> 1); } } for (int k = 27; k < 39; k++) { for (int i = 0; i < 8; i++) { mLARp[i] = (mprevLARpp[i] >> 2) + (mLARpp[i] >> 2); mLARp[i] = mLARp[i] + (mLARpp[i] >> 1); } } for (int k = 40; k < 160; k++) { for (int i = 0; i < 8; i++) { mLARp[i] = mLARpp[i]; } } //set current LARpp to previous: for (int j = 0; j < mprevLARpp.length; j++) { mprevLARpp[j] = mLARpp[j]; } //Compute mrrp[0..7] from mLARp[0...7] for (int i = 0; i < 8; i++) { int temp = Math.abs(mLARp[i]); if (temp < 11059) { temp = temp << 1; } else { if (temp < 20070) { temp = temp + 11059; } else { temp = (temp >> 2) + 26112; } } mrrp[i] = temp; if (mLARp[i] < 0) { mrrp[i] = 0 - mrrp[i]; } } //Short term synthesis filtering: uses drp[0..39] and rrp[0...7] // to produce sr[0...159]. A temporary array wt[0..159] is used. for (int k = 0; k < 40; k++) { wt[k] = mdrp[k]; } for (int k = 0; k < 40; k++) { wt[40+k] = mdrp[k]; } for (int k = 0; k < 40; k++) { wt[80+k] = mdrp[k]; } for (int k = 0; k < 40; k++) { wt[120+k] = mdrp[k]; } //below is supposed to be from index_start to index_end...how is //this different from just 0 to 159? for (int k = 0; k < 160; k++) { int sri = wt[k]; for (int i = 1; i < 8; i++) { sri = sri - (mrrp[8-i] * v[8-i]); v[9-i] = v[8-i] + (mrrp[8-i] * sri); } sr[k] = sri; v[0] = sri; } for (int j = 0; j < sr.length; j++) { output.pushInt(sr[j]); } } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/06a756f0dbb6e3fab85d38ec55a388fd84ef7b0c/StGsmDecoder.java/clean/streams/apps/benchmarks/gsm/streamit/StGsmDecoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1440,
1435,
377,
288,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
312,
48,
985,
71,
18,
2469,
31,
277,
27245,
202,
95,
202,
565,
312,
48,
985,
71,
63,
77,
65,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1440,
1435,
377,
288,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
312,
48,
985,
71,
18,
2469,
31,
277,
27245,
202,
95,
202,
565,
312,
48,
985,
71,
63,
77,
65,
273,
... |
if ( !isUpdateable() ) { throw new PSQLException( "postgresql.updateable.notupdateable" ); } doingUpdates = !onInsertRow; updateValues.put( fields[columnIndex - 1].getName(), x ); | updateValue(columnIndex, x); | public synchronized void updateBigDecimal(int columnIndex, java.math.BigDecimal x ) throws SQLException { if ( !isUpdateable() ) { throw new PSQLException( "postgresql.updateable.notupdateable" ); } doingUpdates = !onInsertRow; updateValues.put( fields[columnIndex - 1].getName(), x ); } | 49868 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49868/289d9eea1298f2b85409b3e98857210fb69e8c9d/AbstractJdbc2ResultSet.java/buggy/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
1089,
29436,
12,
474,
14882,
16,
1082,
202,
6290,
18,
15949,
18,
29436,
619,
262,
202,
15069,
6483,
202,
95,
202,
202,
430,
261,
401,
291,
1891,
429,
1435,
262,
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,
3852,
918,
1089,
29436,
12,
474,
14882,
16,
1082,
202,
6290,
18,
15949,
18,
29436,
619,
262,
202,
15069,
6483,
202,
95,
202,
202,
430,
261,
401,
291,
1891,
429,
1435,
262,
202... |
addNavigationBar(indexPage); | addNavigationBar(INDEX_NAV_CONTEXT); | protected void createIndexPage(String title) { createPrinters(INDEX_PAGE_NAME, title); page.printHeader(ATTRS_META, getGenerator()); String windowTitle = title + " (" + doctitle.replaceAll("<.*>", " ") + ")"; page.printOpenBody(new XMLAttribute[]{ new XMLAttribute("onload", "setWindowTitle('" + windowTitle + "');") }); addNavigationBar(indexPage); page.printlnHLine(); page.printlnOTag("table", ATTRS_MEMBER).indent(); page.printlnOTag("tr").indent(); page.printlnOTag("td", ATTRS_MEMBER_TITLE).indent(); page.println("Index").undent(); page.printlnCTag("td").undent(); page.printlnCTag("tr").undent(); page.printlnCTag("table"); page.printlnSTag("br"); Pair index = ScalaSearch.index(tree); Character[] chars = (Character[]) index.fst; Map map = (Map) index.snd; for (int i = 0; i < chars.length; i++) page.printlnAhref("#" + i, ROOT_FRAME_NAME, HTMLPrinter.encode(chars[i])); page.printlnHLine(); for (int i = 0; i < chars.length; i++) { Character car = chars[i]; page.printlnAname(String.valueOf(i), ""); page.printlnOTag("h2"); page.printBold(HTMLPrinter.encode(car)); page.printlnCTag("h2"); page.printlnOTag("dl").indent(); Tree[] trees = (Tree[]) map.get(car); for (int j = 0; j < trees.length; j++) { page.printOTag("dt"); addIndexEntry(trees[j].symbol()); // page.printlnTag("em", Location.getURI(trees[j].symbol()).toString()); // for debugging page.printlnCTag("dt"); page.printlnTag("dd", firstSentence(getComment(trees[j].symbol()))); } page.undent().printlnCTag("dl"); } page.printlnHLine(); addNavigationBar(indexPage); if (validate) addValidationBar(); page.printFootpage(); closePrinters(); } | 10130 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10130/d498875b09190325828a3310e400a110336e38af/HTMLGenerator.java/buggy/sources/scala/tools/scaladoc/HTMLGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
25207,
1964,
12,
780,
2077,
13,
288,
202,
2640,
12149,
87,
12,
9199,
67,
11219,
67,
1985,
16,
2077,
1769,
3639,
1363,
18,
1188,
1864,
12,
12043,
55,
67,
19294,
16,
30862,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25207,
1964,
12,
780,
2077,
13,
288,
202,
2640,
12149,
87,
12,
9199,
67,
11219,
67,
1985,
16,
2077,
1769,
3639,
1363,
18,
1188,
1864,
12,
12043,
55,
67,
19294,
16,
30862,
106... |
private boolean processClass(String classname) throws Exception | private void processClass(String cls) throws IOException, RMICException | private boolean processClass(String classname) throws Exception { errorCount = 0; analyzeClass(classname); if (errorCount > 0) System.exit(1); generateStub(); if (need11Stubs) generateSkel(); if (compile) { compile(stubname.replace('.', File.separatorChar) + ".java"); if (need11Stubs) compile(skelname.replace('.', File.separatorChar) + ".java"); } if (! keep) { (new File(stubname.replace('.', File.separatorChar) + ".java")).delete(); if (need11Stubs) (new File(skelname.replace('.', File.separatorChar) + ".java")) .delete(); } return (true); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/5ccb2ddf8bff62a28c53c83e683b1275f9c0cddd/RMIC.java/clean/libraries/javalib/gnu/classpath/tools/rmi/rmic/RMIC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1207,
797,
12,
780,
2028,
13,
1216,
1860,
16,
534,
22972,
503,
225,
288,
565,
555,
1380,
273,
374,
31,
565,
12375,
797,
12,
18340,
1769,
565,
309,
261,
1636,
1380,
405,
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,
3238,
918,
1207,
797,
12,
780,
2028,
13,
1216,
1860,
16,
534,
22972,
503,
225,
288,
565,
555,
1380,
273,
374,
31,
565,
12375,
797,
12,
18340,
1769,
565,
309,
261,
1636,
1380,
405,
374,
... |
theFigure = new BottomTerminalFigure(DrawConstant.SOUTH, terminal.getId()); | theFigure = new BottomTerminalFigure(DrawConstant.SOUTH, terminal.getId(), new Dimension(getMapMode().DPtoLP(6), getMapMode().DPtoLP(7))); | public NodeFigure createOwnedTerminalFigure(Terminal terminal) { BorderItemFigure theFigure = null; if (terminal instanceof InputTerminal) { theFigure = new TopTerminalFigure(DrawConstant.NORTH, terminal.getId()); } else { theFigure = new BottomTerminalFigure(DrawConstant.SOUTH, terminal.getId()); } theFigure.setLocator(new TerminalFigure.FixedGateLocation(theFigure, getFigure(), LEDFigure.SIZE)); return theFigure; } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/adc1102179d667e4a670bfc5711892726a23a343/LEDEditPart.java/buggy/org.eclipse.gmf.runtime/examples/org.eclipse.gmf.examples.runtime.diagram.logic/src/org/eclipse/gmf/examples/runtime/diagram/logic/internal/editparts/LEDEditPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
42,
15906,
752,
5460,
329,
11336,
42,
15906,
12,
11336,
8651,
13,
288,
202,
202,
8107,
1180,
42,
15906,
326,
42,
15906,
273,
446,
31,
202,
202,
430,
261,
15979,
1276,
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,
225,
202,
482,
2029,
42,
15906,
752,
5460,
329,
11336,
42,
15906,
12,
11336,
8651,
13,
288,
202,
202,
8107,
1180,
42,
15906,
326,
42,
15906,
273,
446,
31,
202,
202,
430,
261,
15979,
1276,
27... |
public RubyClass newSubClass(String name, RubyModule parent) { RubyClass newClass = new RubyClass(runtime, runtime.getClass("Class"), this, parent, name); | public RubyClass newSubClass(String name, SinglyLinkedList parentCRef) { RubyClass newClass = new RubyClass(runtime, runtime.getClass("Class"), this, parentCRef, name); | public RubyClass newSubClass(String name, RubyModule parent) { RubyClass newClass = new RubyClass(runtime, runtime.getClass("Class"), this, parent, name); newClass.makeMetaClass(getMetaClass(), newClass); newClass.inheritedBy(this); parent.setConstant(name, newClass); return newClass; } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyClass.java/buggy/src/org/jruby/RubyClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
797,
394,
1676,
797,
12,
780,
508,
16,
19817,
3120,
982,
13,
288,
3639,
19817,
797,
394,
797,
273,
394,
19817,
797,
12,
9448,
16,
3099,
18,
588,
797,
2932,
797,
6,
3631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
797,
394,
1676,
797,
12,
780,
508,
16,
19817,
3120,
982,
13,
288,
3639,
19817,
797,
394,
797,
273,
394,
19817,
797,
12,
9448,
16,
3099,
18,
588,
797,
2932,
797,
6,
3631,
... |
int chars; for(chars = maximumChars - 2; chars > 1; chars --) { if(getMaximumChars(line.substring(0, chars), tooltip.getFontMetrics(tooltip.getFont()), rootSize.width) < maximumChars) break; | final StringBuilder tipBuilder = StringBuilderSpinAllocator.alloc(); try { final StringTokenizer tokenizer = new StringTokenizer(tipText, "\n"); final FontMetrics metrics = tooltip.getFontMetrics(tooltip.getFont()); while(tokenizer.hasMoreElements()) { String line = tokenizer.nextToken(); while (line.length() > 0) { if(getMaximumChars(line, metrics, rootSize.width) == line.length()) { tipBuilder.append(line).append('\n'); break; | private JComponent createTipContent(String tipText) { JToolTip tooltip = new JToolTip(); if(tipText == null) { tooltip.setTipText(tipText); } else { Dimension rootSize = getVisibleRect().getSize(); Insets borderInsets = tooltip.getBorder().getBorderInsets(tooltip); rootSize.width -= (borderInsets.left + borderInsets.right) * 2; rootSize.height -= (borderInsets.top + borderInsets.bottom) * 2; StringBuffer tipBuffer = new StringBuffer(tipText.length()); StringTokenizer tokenizer = new StringTokenizer(tipText, "\n"); while(tokenizer.hasMoreElements()) { String line = tokenizer.nextToken(); for (;;) { int maximumChars = getMaximumChars(line, tooltip.getFontMetrics(tooltip.getFont()), rootSize.width); if(maximumChars == line.length()) { tipBuffer.append(line.substring(0, maximumChars)); tipBuffer.append('\n'); break; } else { int chars; for(chars = maximumChars - 2; chars > 1; chars --) { if(getMaximumChars(line.substring(0, chars), tooltip.getFontMetrics(tooltip.getFont()), rootSize.width) < maximumChars) break; } tipBuffer.append(line.substring(0, chars)); tipBuffer.append('\\'); tipBuffer.append('\n'); line = line.substring(maximumChars - 2); } } } //noinspection HardCodedStringLiteral Element html = new Element("html"); String text = tipBuffer.toString(); //noinspection HardCodedStringLiteral Element p = new Element("pre"); html.addContent(p); p.setText(text); XMLOutputter outputter = JDOMUtil.createOutputter("\n"); Format format = outputter.getFormat().setTextMode(Format.TextMode.PRESERVE); outputter.setFormat(format); tooltip.setTipText(outputter.outputString(html)); } tooltip.setBorder(null); return tooltip; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/f84fc150c2881235d163385f1fcce8af09959ac2/DebuggerTreeBase.java/clean/debugger/impl/com/intellij/debugger/ui/impl/DebuggerTreeBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
29058,
752,
14189,
1350,
12,
780,
9529,
1528,
13,
288,
565,
804,
29250,
11915,
273,
394,
804,
29250,
5621,
565,
309,
12,
14587,
1528,
422,
446,
13,
288,
1377,
11915,
18,
542,
14189,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29058,
752,
14189,
1350,
12,
780,
9529,
1528,
13,
288,
565,
804,
29250,
11915,
273,
394,
804,
29250,
5621,
565,
309,
12,
14587,
1528,
422,
446,
13,
288,
1377,
11915,
18,
542,
14189,... |
public static ImageDescriptor getImageDescriptor(String name, boolean getBaseURL) { try { URL installURL = getDefault().getBundle().getEntry("/"); String imageString = getBaseURL ? "icons/" + name : name; URL imageURL = new URL(installURL, imageString); return ImageDescriptor.createFromURL(imageURL); } catch (MalformedURLException e) { return null; } | public static ImageDescriptor getImageDescriptor(String path) { return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.wst.xsd.ui", path); | public static ImageDescriptor getImageDescriptor(String name, boolean getBaseURL) { try { URL installURL = getDefault().getBundle().getEntry("/"); //$NON-NLS-1$ String imageString = getBaseURL ? "icons/" + name : name; URL imageURL = new URL(installURL, imageString); return ImageDescriptor.createFromURL(imageURL); } catch (MalformedURLException e) { return null; } } | 13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/618a19448e2301333a97badaa47bd90747a663db/XSDEditorPlugin.java/buggy/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3421,
3187,
10567,
3187,
12,
780,
508,
16,
1250,
8297,
1785,
13,
288,
202,
202,
698,
288,
1082,
202,
1785,
3799,
1785,
273,
4829,
7675,
588,
3405,
7675,
588,
1622,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3421,
3187,
10567,
3187,
12,
780,
508,
16,
1250,
8297,
1785,
13,
288,
202,
202,
698,
288,
1082,
202,
1785,
3799,
1785,
273,
4829,
7675,
588,
3405,
7675,
588,
1622,
2932,
... |
RubyId id = getRuby().intern(name); | RubyId id = getRuby().intern(name); | public void defineConstant(String name, RubyObject value) { RubyId id = getRuby().intern(name); if (this == getRuby().getClasses().getClassClass()) { getRuby().secure(4); } if (!id.isConstId()) { throw new RubyNameException(getRuby(), "bad constant name " + name); } setConstant(id, value); } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4426,
6902,
12,
780,
508,
16,
19817,
921,
460,
13,
288,
202,
202,
54,
10340,
548,
612,
273,
4170,
10340,
7675,
267,
798,
12,
529,
1769,
202,
202,
430,
261,
2211,
422,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4426,
6902,
12,
780,
508,
16,
19817,
921,
460,
13,
288,
202,
202,
54,
10340,
548,
612,
273,
4170,
10340,
7675,
267,
798,
12,
529,
1769,
202,
202,
430,
261,
2211,
422,
4... |
case 50: | case 44: | public final int axis_spec() throws RecognitionException, TokenStreamException { int axis; axis = -1; switch ( LA(1)) { case LITERAL_descendant: { match(LITERAL_descendant); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.DESCENDANT_AXIS; } break; } case 43: { match(43); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.DESCENDANT_SELF_AXIS; } break; } case LITERAL_child: { match(LITERAL_child); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.CHILD_AXIS; } break; } case LITERAL_parent: { match(LITERAL_parent); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.PARENT_AXIS; } break; } case LITERAL_self: { match(LITERAL_self); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.SELF_AXIS; } break; } case LITERAL_attribute: { match(LITERAL_attribute); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.ATTRIBUTE_AXIS; } break; } case LITERAL_ancestor: { match(LITERAL_ancestor); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.ANCESTOR_AXIS; } break; } case 49: { match(49); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.ANCESTOR_SELF_AXIS; } break; } case 50: { match(50); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.FOLLOWING_SIBLING_AXIS; } break; } case 51: { match(51); match(COLON); match(COLON); if ( inputState.guessing==0 ) { axis = Constants.PRECEDING_SIBLING_AXIS; } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } return axis; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/32e91f543a4cc859a507386b6fc4459018aeb3c6/XPathParser.java/buggy/src/org/exist/parser/XPathParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
509,
225,
2654,
67,
2793,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
202,
202,
474,
2654,
31,
6862,
1082,
202,
4890,
273,
300,
21,
31,
25083,
202,
9610,
261,
2928,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
509,
225,
2654,
67,
2793,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
202,
202,
474,
2654,
31,
6862,
1082,
202,
4890,
273,
300,
21,
31,
25083,
202,
9610,
261,
2928,
12,
... |
for (int g = 0; g < natoms.length; g++) { | for (int g = 0; g < bond.getAtomCount(); g++) { | public Object clone() throws CloneNotSupportedException { IElectronContainer electronContainer = null; IElectronContainer newEC = null; IAtom[] natoms; IAtom[] newAtoms; IAtomContainer clone = (IAtomContainer) super.clone(); // start from scratch clone.removeAllElements(); // clone all atoms for (int f = 0; f < getAtomCount(); f++) { clone.addAtom((Atom) getAtomAt(f).clone()); } // clone the electronContainer for (int f = 0; f < getElectronContainerCount(); f++) { electronContainer = this.getElectronContainerAt(f); newEC = getBuilder().newElectronContainer(); if (electronContainer instanceof IBond) { IBond bond = (IBond) electronContainer; newEC = (IElectronContainer)bond.clone(); natoms = bond.getAtoms(); newAtoms = new IAtom[natoms.length]; for (int g = 0; g < natoms.length; g++) { newAtoms[g] = clone.getAtomAt(getAtomNumber(natoms[g])); } ((IBond) newEC).setAtoms(newAtoms); } else if (electronContainer instanceof ILonePair) { IAtom atom = ((ILonePair) electronContainer).getAtom(); newEC = (ILonePair)electronContainer.clone(); ((ILonePair) newEC).setAtom(clone.getAtomAt(getAtomNumber(atom))); } else if (electronContainer instanceof ISingleElectron) { IAtom atom = ((ISingleElectron) electronContainer).getAtom(); newEC = (ISingleElectron)electronContainer.clone(); ((ISingleElectron) newEC).setAtom(clone.getAtomAt(getAtomNumber(atom))); } else { //System.out.println("Expecting EC, got: " + electronContainer.getClass().getName()); newEC = (IElectronContainer) electronContainer.clone(); } clone.addElectronContainer(newEC); } return clone; } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/425586ca33e30e688ef16db80a55f617f8ea966a/AtomContainer.java/clean/src/org/openscience/cdk/AtomContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
1216,
12758,
25482,
288,
202,
202,
8732,
1582,
1949,
2170,
27484,
2170,
273,
446,
31,
202,
202,
8732,
1582,
1949,
2170,
394,
7228,
273,
446,
31,
202,
202,
45,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
1216,
12758,
25482,
288,
202,
202,
8732,
1582,
1949,
2170,
27484,
2170,
273,
446,
31,
202,
202,
8732,
1582,
1949,
2170,
394,
7228,
273,
446,
31,
202,
202,
45,
... |
int x = DataTools.bytesToInt(bytes, pt, 2, little); | private void handlePixmap(int opcode) throws FormatException { if (DEBUG) System.out.println("PictReader.handlePixmap(" + opcode + ")"); int pixelSize; int compCount; // handle 9A variation if (opcode == PICT_9A) { // this is the only opcode that holds 16, 24, and 32 bit data // read the pixmap (9A) pt += 4; // skip fake length and fake EOF int version = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; // read the bounding box int tlY = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int tlX = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int brY = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int brX = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; pt += 2; // undocumented extra short in the data structure int packType = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int packSize = DataTools.bytesToInt(bytes, pt, 4, little); pt += 4; int hRes = DataTools.bytesToInt(bytes, pt, 4, little); pt += 4; int vRes = DataTools.bytesToInt(bytes, pt, 4, little); pt += 4; int pixelType = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; pixelSize = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; compCount = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int compSize = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int planeBytes = DataTools.bytesToInt(bytes, pt, 4, little); pt += 4; int pmTable = DataTools.bytesToInt(bytes, pt, 4, little); pt += 4; pt += 4; // reserved width = brX - tlX; height = brY - tlY; // rowBytes doesn't exist, so set it to its logical value switch (pixelSize) { case 32: rowBytes = width * compCount; break; case 16: rowBytes = width * 2; break; default: throw new FormatException("Sorry, vector data not supported."); } } else { rowBytes &= 0x3fff; // mask off flags int tlY = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int tlX = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int brY = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int brX = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; // unnecessary data pt += 18; pixelSize = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; compCount = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; // unnecessary data pt += 14; // read the lookup table pt += 2; int id = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int flags = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; int count = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; count++; lookup = new short[3][count]; for (int i=0; i<count; i++) { int index = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; if ((flags & 0x8000) != 0) index = i; lookup[0][index] = DataTools.bytesToShort(bytes, pt, 2, little); pt += 2; lookup[1][index] = DataTools.bytesToShort(bytes, pt, 2, little); pt += 2; lookup[2][index] = DataTools.bytesToShort(bytes, pt, 2, little); pt += 2; } width = brX - tlX; height = brY - tlY; } // skip over two rectangles pt += 16; int mode = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; if (opcode == PICT_BITSRGN || opcode == PICT_PACKBITSRGN) { int x = DataTools.bytesToInt(bytes, pt, 2, little); pt += 2; } handlePixmap(rowBytes, pixelSize, compCount); } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/e0a37d81984d3f8644766797667b83e48df719e3/PictReader.java/clean/loci/formats/in/PictReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1640,
21816,
1458,
12,
474,
11396,
13,
1216,
4077,
503,
288,
565,
309,
261,
9394,
13,
2332,
18,
659,
18,
8222,
2932,
52,
933,
2514,
18,
4110,
21816,
1458,
2932,
397,
11396,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1640,
21816,
1458,
12,
474,
11396,
13,
1216,
4077,
503,
288,
565,
309,
261,
9394,
13,
2332,
18,
659,
18,
8222,
2932,
52,
933,
2514,
18,
4110,
21816,
1458,
2932,
397,
11396,
3... | |
case IDX_ADD_FOLDER_FILE : | case IDX_ADD_FOLDER_FILE: | protected void ListCustomButtonPressed(TreeListDialogField field, int index) { switch (index) { case IDX_ADD_FOLDER_FILE : addNewPathResource(); break; case IDX_ADD_SYMBOL : addSymbol(); break; case IDX_ADD_EXT_INCLUDE : addInclude(); break; case IDX_ADD_WS_INCLUDE : addFromWorkspace(); break; case IDX_ADD_CONTRIBUTED : addContributed(); break; case IDX_EDIT : if (canEdit(field.getSelectedElements())) { editEntry(); } break; case IDX_REMOVE : if (canRemove(field.getSelectedElements())) { removeEntry(); } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/948279d05523860240b0b395f826ad17e53e390c/CPathIncludeSymbolEntryPage.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
987,
3802,
3616,
24624,
12,
2471,
682,
6353,
974,
652,
16,
509,
770,
13,
288,
202,
202,
9610,
261,
1615,
13,
288,
1082,
202,
3593,
1599,
60,
67,
8355,
67,
17357,
67,
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,
1117,
918,
987,
3802,
3616,
24624,
12,
2471,
682,
6353,
974,
652,
16,
509,
770,
13,
288,
202,
202,
9610,
261,
1615,
13,
288,
1082,
202,
3593,
1599,
60,
67,
8355,
67,
17357,
67,
3... |
dict.takeValueForKeyPath(o, key); | _dictionary.takeValueForKeyPath(o, key); | protected void addPageLevelValues() { for(Enumeration e = pageLevelKeys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKey(o, key); } String path = "components." + context.valueForKey("pageName") + ".editors"; NSArray keys = (NSArray)allKeys.valueForKeyPath(path); if(keys != null) { for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKeyPath(o, key); } } path = "components." + context.valueForKey("pageName") + ".supports"; keys = (NSArray)allKeys.valueForKeyPath(path); if(keys != null) { for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); Object o = context.valueForKey(key); if(o != null) dict.takeValueForKeyPath(o, key); } } } | 46145 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46145/f109dceeba488cabc6338185a4620d9373ece675/ERD2WContextDictionary.java/clean/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/ERD2WContextDictionary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
1964,
2355,
1972,
1435,
288,
3639,
364,
12,
21847,
425,
273,
1363,
2355,
2396,
18,
1612,
3572,
7385,
5621,
425,
18,
5332,
7417,
3471,
5621,
262,
288,
5411,
514,
498,
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,
4750,
918,
527,
1964,
2355,
1972,
1435,
288,
3639,
364,
12,
21847,
425,
273,
1363,
2355,
2396,
18,
1612,
3572,
7385,
5621,
425,
18,
5332,
7417,
3471,
5621,
262,
288,
5411,
514,
498,
273,
... |
_vtx_index_tbl[v].setDatum(new Datum("Betweenness", new Double(m_betweenness[v]))); | _vtx_index_tbl[v].setDatum(new Datum(DATUM_BETWEENNESS, new Double(m_betweenness[v]))); | private void calculate() { if (_vtx_index_tbl == null || _vtx_index_tbl.length < 1) { System.out.println("[SNA] Warning: no graph loaded or graph contains no vertices."); return; } int v; double m_grpDensity = grp_density(); double m_grpTransitivity = grp_transitivity(); double [] m_betweenness = compute_betweenness(); double m_grpBetweenness = grp_betweenness(m_betweenness); double [] m_closeness = compute_closeness(); double m_grpCloseness = grp_closeness(m_closeness); int [] m_degree = compute_totaldegree(); int [] m_indegree = compute_indegree(); int [] m_outdegree = compute_outdegree(); double m_grpDegree = grp_degree(m_degree); _graph.setDatum(new Datum("Group Density", new Double(m_grpDensity))); System.out.println(" Group Density = " + m_grpDensity); _graph.setDatum(new Datum("Group Transitivity", new Double(m_grpTransitivity))); System.out.println(" Group Transitivity = " + m_grpTransitivity); _graph.setDatum(new Datum("Group Betweenness", new Double(m_grpBetweenness))); System.out.println(" Group Betweenness= " + m_grpBetweenness); _graph.setDatum(new Datum("Group Closeness", new Double(m_grpCloseness))); System.out.println(" Group Closeness= " + m_grpCloseness); _graph.setDatum(new Datum("Group Degree", new Double(m_grpDegree))); System.out.println(" Group Degree = " + m_grpDegree); System.out.println(" Betweenness:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Betweenness", new Double(m_betweenness[v]))); System.out.println(" [" + v + "] " + m_betweenness[v]); } System.out.println(" Closeness:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Closeness", new Double(m_closeness[v]))); System.out.println(" [" + v + "] " + m_closeness[v]); } System.out.println(" Degree:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Total Degree", new Double(m_degree[v]))); System.out.println(" [" + v + "] " + m_degree[v]); } System.out.println(" In-Degree:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("In-Degree", new Double(m_indegree[v]))); System.out.println(" [" + v + "] " + m_indegree[v]); } System.out.println(" Out-Degree:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Out-Degree", new Double(m_outdegree[v]))); System.out.println(" [" + v + "] " + m_outdegree[v]); } } | 11096 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11096/1c8a644e00bc1a70d27b11b030299d7b90c1809d/SNA.java/clean/nv2d/trunk/src/nv2d/plugins/standard/SNA.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4604,
1435,
288,
202,
202,
430,
261,
67,
90,
978,
67,
1615,
67,
16187,
422,
446,
747,
389,
90,
978,
67,
1615,
67,
16187,
18,
2469,
411,
404,
13,
288,
1082,
202,
3163,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4604,
1435,
288,
202,
202,
430,
261,
67,
90,
978,
67,
1615,
67,
16187,
422,
446,
747,
389,
90,
978,
67,
1615,
67,
16187,
18,
2469,
411,
404,
13,
288,
1082,
202,
3163,
... |
public org.quickfix.field.BidSize getBidSize() throws FieldNotFound { org.quickfix.field.BidSize value = new org.quickfix.field.BidSize(); | public quickfix.field.BidSize getBidSize() throws FieldNotFound { quickfix.field.BidSize value = new quickfix.field.BidSize(); | public org.quickfix.field.BidSize getBidSize() throws FieldNotFound { org.quickfix.field.BidSize value = new org.quickfix.field.BidSize(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/Quote.java/clean/src/java/src/quickfix/fix43/Quote.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
1225,
2882,
350,
1225,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
1225,
460,
273,
394,
2358,
18,
19525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
1225,
2882,
350,
1225,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
1225,
460,
273,
394,
2358,
18,
19525,
... |
buf.append(i).append(". ").append(throwable.getMessage()).append(" ("); | ExceptionReader er = getExceptionReader(throwable); buf.append(i).append(". ").append(er.getMessage(throwable)).append(" ("); | public static String getExceptionStack(Throwable t) { StringBuffer buf = new StringBuffer(); // get exception stack List exceptions = new ArrayList(); Throwable cause = t; while (cause != null) { exceptions.add(0, cause); cause = cause.getCause(); } int i = 1; for (Iterator iterator = exceptions.iterator(); iterator.hasNext(); i++) { if (i > exceptionThreshold && exceptionThreshold > 0) { buf.append("(").append(exceptions.size() - i + 1).append(" more...)"); break; } Throwable throwable = (Throwable) iterator.next(); buf.append(i).append(". ").append(throwable.getMessage()).append(" ("); buf.append(throwable.getClass().getName()).append(")\n"); if (verbose && throwable.getStackTrace().length > 0) { StackTraceElement e = throwable.getStackTrace()[0]; buf.append(" ") .append(e.getClassName()) .append(":") .append(e.getLineNumber()) .append(" (") .append(getJavaDocUrl(throwable.getClass())) .append(")\n"); } } return buf.toString(); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/a786dc853ae4b3a64d08cfad2884587503d35d09/ExceptionHelper.java/clean/src/java/org/mule/config/ExceptionHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
17669,
2624,
12,
15155,
268,
13,
565,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
368,
336,
1520,
2110,
3639,
987,
4798,
273,
394,
2407,
5621,
3639,
4206,
4620,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
17669,
2624,
12,
15155,
268,
13,
565,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
368,
336,
1520,
2110,
3639,
987,
4798,
273,
394,
2407,
5621,
3639,
4206,
4620,
273... |
sBasic.append( ((Tank)mech).calculateBattleValue() ); | sBasic.append( ((Tank)mech).calculateBattleValue(true) ); | public MechView(Entity entity) { mech = entity; isMech = entity instanceof Mech; isInf = entity instanceof Infantry; isVehicle = entity instanceof Tank; hasEndoSteel = false; hasFerroFibrous = false; sLoadout.append( getWeapons() ) .append("\n") .append(getAmmo()) .append("\n") .append(getMisc()); //has to occur before basic is processed sBasic.append( mech.getShortName() ); sBasic.append("\n"); if ( !isInf ) { sBasic.append( Math.round(mech.getWeight()) ) .append(" tons " ); } if (mech.isClan()) { sBasic.append( "Clan" ); } else { sBasic.append( "Inner Sphere" ); } sBasic.append("\n"); if ( mech.hasC3M() || mech.hasC3S() || mech.hasC3i()) { sBasic.append( "Linked c3 BV: "); if ( isMech ) { sBasic.append( ((Mech)mech).calculateBattleValue(true) ); } else {// TODO: Have C3 affect BV of tanks.// sBasic.append( ((Tank)mech).calculateBattleValue(true) ); sBasic.append( ((Tank)mech).calculateBattleValue() ); } } sBasic.append("\n"); sBasic.append( "Movement: " ) .append( mech.getWalkMP() ) .append( "/" ) .append( mech.getRunMP() ); if (hasMASC) { sBasic.append( "(") .append( mech.getWalkMP() * 2) .append( ")"); } sBasic.append( "/" ) .append( mech.getJumpMP() ); if (isVehicle) { sBasic.append(" (") .append(entity.getMovementTypeAsString()) .append(")"); } sBasic.append( "\n" ); if ( isMech ) { Mech aMech = (Mech) mech; sBasic.append( "Engine: " ) .append( aMech.engineRating() ); if (aMech.hasXL()) { sBasic.append( " XL" ); } if (aMech.hasLightEngine()) { sBasic.append( " Light" ); } sBasic.append("\n"); sBasic.append( "Heat Sinks: " ) .append( aMech.heatSinks() ); if (aMech.getHeatCapacity() > aMech.heatSinks()) { sBasic.append( " [" ) .append( aMech.getHeatCapacity() ) .append( "]" ); } sBasic.append("\n"); } sBasic.append("\n") .append( getInternalAndArmor() ); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/b5e35f0173e8bcedda61e9674f4af17509efdae5/MechView.java/buggy/megamek/src/megamek/client/ui/AWT/MechView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7499,
343,
1767,
12,
1943,
1522,
13,
288,
3639,
1791,
343,
273,
1522,
31,
3639,
353,
4667,
343,
273,
1522,
1276,
7499,
343,
31,
3639,
8048,
74,
273,
1522,
1276,
13648,
304,
698,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7499,
343,
1767,
12,
1943,
1522,
13,
288,
3639,
1791,
343,
273,
1522,
31,
3639,
353,
4667,
343,
273,
1522,
1276,
7499,
343,
31,
3639,
8048,
74,
273,
1522,
1276,
13648,
304,
698,
3... |
_t = __t752; | _t = __t756; | public final void columnformat(AST _t) throws RecognitionException { AST columnformat_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t747 = _t; AST tmp2126_AST_in = (AST)_t; match(_t,Format_phrase); _t = _t.getFirstChild(); { int _cnt764=0; _loop764: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FORMAT: { AST __t749 = _t; AST tmp2127_AST_in = (AST)_t; match(_t,FORMAT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t749; _t = _t.getNextSibling(); break; } case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case NOLABELS: { AST tmp2128_AST_in = (AST)_t; match(_t,NOLABELS); _t = _t.getNextSibling(); break; } case COLUMNFONT: { AST __t750 = _t; AST tmp2129_AST_in = (AST)_t; match(_t,COLUMNFONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t750; _t = _t.getNextSibling(); break; } case COLUMNDCOLOR: { AST __t751 = _t; AST tmp2130_AST_in = (AST)_t; match(_t,COLUMNDCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t751; _t = _t.getNextSibling(); break; } case COLUMNBGCOLOR: { AST __t752 = _t; AST tmp2131_AST_in = (AST)_t; match(_t,COLUMNBGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t752; _t = _t.getNextSibling(); break; } case COLUMNFGCOLOR: { AST __t753 = _t; AST tmp2132_AST_in = (AST)_t; match(_t,COLUMNFGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t753; _t = _t.getNextSibling(); break; } case COLUMNPFCOLOR: { AST __t754 = _t; AST tmp2133_AST_in = (AST)_t; match(_t,COLUMNPFCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t754; _t = _t.getNextSibling(); break; } case LABELFONT: { AST __t755 = _t; AST tmp2134_AST_in = (AST)_t; match(_t,LABELFONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t755; _t = _t.getNextSibling(); break; } case LABELDCOLOR: { AST __t756 = _t; AST tmp2135_AST_in = (AST)_t; match(_t,LABELDCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t756; _t = _t.getNextSibling(); break; } case LABELBGCOLOR: { AST __t757 = _t; AST tmp2136_AST_in = (AST)_t; match(_t,LABELBGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t757; _t = _t.getNextSibling(); break; } case LABELFGCOLOR: { AST __t758 = _t; AST tmp2137_AST_in = (AST)_t; match(_t,LABELFGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t758; _t = _t.getNextSibling(); break; } case LEXAT: { AST __t759 = _t; AST tmp2138_AST_in = (AST)_t; match(_t,LEXAT); _t = _t.getFirstChild(); field(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Format_phrase: { columnformat(_t); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t759; _t = _t.getNextSibling(); break; } case WIDTH: { AST __t761 = _t; AST tmp2139_AST_in = (AST)_t; match(_t,WIDTH); _t = _t.getFirstChild(); AST tmp2140_AST_in = (AST)_t; match(_t,NUMBER); _t = _t.getNextSibling(); _t = __t761; _t = _t.getNextSibling(); break; } case WIDTHPIXELS: { AST __t762 = _t; AST tmp2141_AST_in = (AST)_t; match(_t,WIDTHPIXELS); _t = _t.getFirstChild(); AST tmp2142_AST_in = (AST)_t; match(_t,NUMBER); _t = _t.getNextSibling(); _t = __t762; _t = _t.getNextSibling(); break; } case WIDTHCHARS: { AST __t763 = _t; AST tmp2143_AST_in = (AST)_t; match(_t,WIDTHCHARS); _t = _t.getFirstChild(); AST tmp2144_AST_in = (AST)_t; match(_t,NUMBER); _t = _t.getNextSibling(); _t = __t763; _t = _t.getNextSibling(); break; } default: { if ( _cnt764>=1 ) { break _loop764; } else {throw new NoViableAltException(_t);} } } _cnt764++; } while (true); } _t = __t747; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1057,
2139,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1057,
2139,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1057,
2139,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1057,
2139,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
try { page.init(new PageSite(getViewSite())); } catch (PartInitException e) { WorkbenchPlugin.log(getClass(), "initPage", e); } } | try { page.init(new PageSite(getViewSite())); } catch (PartInitException e) { WorkbenchPlugin.log(getClass(), "initPage", e); } } | protected void initPage(IPageBookViewPage page) { try { page.init(new PageSite(getViewSite())); } catch (PartInitException e) { WorkbenchPlugin.log(getClass(), "initPage", e); //$NON-NLS-1$ } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/9ff1117bd4d0d76888bfb35def7ce85f6378a2d3/PageBookView.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
1964,
12,
45,
1964,
9084,
1767,
1964,
1363,
13,
288,
3639,
775,
288,
5411,
1363,
18,
2738,
12,
2704,
3460,
4956,
12,
588,
1767,
4956,
1435,
10019,
3639,
289,
1044,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
1964,
12,
45,
1964,
9084,
1767,
1964,
1363,
13,
288,
3639,
775,
288,
5411,
1363,
18,
2738,
12,
2704,
3460,
4956,
12,
588,
1767,
4956,
1435,
10019,
3639,
289,
1044,
261,
... |
public void conversationClosed(Conversation c) | public void conversationClosed(Conversation conv) | public void conversationClosed(Conversation c) {} | 43455 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/43455/36986c6b1978fe31d1618f2a193daf09f672bc02/OperationSetBasicInstantMessagingIcqImpl.java/clean/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
10039,
7395,
12,
15717,
6292,
13,
3639,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
10039,
7395,
12,
15717,
6292,
13,
3639,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
else { | else { | private void waitForDataOrTimeout(SQLWarningChain wChain, int timeout) throws java.io.IOException, TdsException { // SAfe No synchronization needed, this is only used internally so it's // already synched. if( timeout == 0 || wChain == null ) comm.peek(); else { // start the timeout thread TimeoutHandler t = new TimeoutHandler(this, wChain, timeout); t.start(); // wait until there is at least one byte of data comm.peek(); // kill the timeout thread t.interrupt(); t = null; } } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/36d7d34eb620f32e386322a293eaf58cf253a3a6/Tds.java/buggy/src/main/net/sourceforge/jtds/jdbc/Tds.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10712,
751,
1162,
2694,
12,
3997,
6210,
3893,
341,
3893,
16,
509,
2021,
13,
1216,
2252,
18,
1594,
18,
14106,
16,
399,
2377,
503,
565,
288,
3639,
368,
17127,
3030,
2631,
24488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10712,
751,
1162,
2694,
12,
3997,
6210,
3893,
341,
3893,
16,
509,
2021,
13,
1216,
2252,
18,
1594,
18,
14106,
16,
399,
2377,
503,
565,
288,
3639,
368,
17127,
3030,
2631,
24488,
... |
m_pool.putPreparedStatement(m_cq.C_USERS_DELETE_KEY, statement); | m_pool.putPreparedStatement(m_cq.C_USERS_DELETEBYID_KEY, statement); | public void deleteUser(String name) throws CmsException { PreparedStatement statement = null; try { statement = m_pool.getPreparedStatement(m_cq.C_USERS_DELETE_KEY); statement.setString(1,name); statement.executeUpdate(); } catch (SQLException e){ throw new CmsException("["+this.getClass().getName()+"]"+e.getMessage(),CmsException.C_SQL_ERROR, e); } finally { if( statement != null) { m_pool.putPreparedStatement(m_cq.C_USERS_DELETE_KEY, statement); } } } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/142347a2a551d52971f8e5e2e084c9c08fd422d1/CmsDbAccess.java/buggy/src/com/opencms/file/genericSql/CmsDbAccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1430,
1299,
12,
780,
508,
13,
3196,
202,
15069,
11228,
288,
202,
202,
29325,
3021,
273,
446,
31,
9506,
202,
698,
202,
95,
1082,
202,
11516,
273,
312,
67,
6011,
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,
225,
202,
482,
918,
1430,
1299,
12,
780,
508,
13,
3196,
202,
15069,
11228,
288,
202,
202,
29325,
3021,
273,
446,
31,
9506,
202,
698,
202,
95,
1082,
202,
11516,
273,
312,
67,
6011,
18,
588,
... |
IsNullValueFrame prevIsNullValueFrame = getFactAtLocation(atIf); | int prevNumSlots = prevIsNullValueFrame.getNumSlots(); assert prevNumSlots == prevVnaFrame.getNumSlots(); | public void meetInto(IsNullValueFrame fact, Edge edge, IsNullValueFrame result) throws DataflowAnalysisException { if (fact.isValid()) { final int numSlots = fact.getNumSlots(); if (SPLIT_DOWNGRADE_NSP) { // Downgrade NSP to DNR on non-exception control splits if (!edge.isExceptionEdge() && numNonExceptionSuccessorMap[edge.getSource().getId()] > 0) { IsNullValueFrame tmpFact = createFact(); tmpFact.copyFrom(fact); for (int i = 0; i < numSlots; ++i) { IsNullValue value = tmpFact.getValue(i); if (value.equals(IsNullValue.nullOnSomePathValue())) tmpFact.setValue(i, IsNullValue.doNotReportValue()); } fact = tmpFact; } } final BasicBlock destBlock = edge.getDest(); if (destBlock.isExceptionHandler()) { // Exception handler - clear stack and push a non-null value // to represent the exception. IsNullValueFrame tmpFrame = createFact(); tmpFrame.copyFrom(fact); tmpFrame.clearStack(); tmpFrame.pushValue(IsNullValue.nonNullValue()); fact = tmpFrame; } else { // Determine if the edge conveys any information about the // null/non-null status of operands in the incoming frame. int nullInfo = getNullInfoFromEdge(edge); if (nullInfo != NO_INFO) { // Value numbers in this frame ValueNumberFrame vnaFrame = vnaDataflow.getStartFact(destBlock); if (vnaFrame == null) throw new IllegalStateException("no vna frame at block entry?"); if (vnaFrame != null) { switch (nullInfo) { case TOS_NULL: case TOS_NON_NULL: { // What we know here is that the value that was // just popped off the stack is either null or non-null. // We can use this info to increase the precision of // any stack slots containing the same value. BasicBlock sourceBlock = edge.getSource(); Location atIf = new Location(sourceBlock.getLastInstruction(), sourceBlock); ValueNumberFrame prevVnaFrame = vnaDataflow.getFactAtLocation(atIf); IsNullValueFrame prevIsNullValueFrame = getFactAtLocation(atIf); if (prevVnaFrame != null && prevIsNullValueFrame != null) { ValueNumber replaceMe = prevVnaFrame.getTopValue(); IsNullValue origIsNullValue = prevIsNullValueFrame.getTopValue(); fact = replaceValues(fact, replaceMe, vnaFrame, nullInfo == TOS_NULL ? IsNullValue.flowSensitiveNullValue(origIsNullValue) : IsNullValue.flowSensitiveNonNullValue(origIsNullValue)); } else throw new IllegalStateException("No value number frame?"); } break; case REF_OPERAND_NON_NULL: { // For all of the instructions which have a null-checked // reference operand, it is pushed onto the stack before // all of the other operands to the instruction. Instruction firstInDest = edge.getDest().getFirstInstruction().getInstruction(); int numSlotsConsumed = firstInDest.consumeStack(methodGen.getConstantPool()); if (numSlotsConsumed == Constants.UNPREDICTABLE) throw new DataflowAnalysisException("Unpredictable stack consumption for " + firstInDest); ValueNumber replaceMe = vnaFrame.getValue(numSlots - numSlotsConsumed); fact = replaceValues(fact, replaceMe, vnaFrame, IsNullValue.nonNullValue()); } break; default: assert false; } } } } } // Normal dataflow merge result.mergeWith(fact); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/2d1bed4751c00c9dd32317b32f15a03efc54b49b/IsNullValueAnalysis.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/IsNullValueAnalysis.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
18721,
5952,
12,
2520,
2041,
620,
3219,
5410,
16,
11342,
3591,
16,
30230,
620,
3219,
563,
13,
202,
202,
15069,
1910,
2426,
9418,
503,
288,
202,
202,
430,
261,
3493,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
18721,
5952,
12,
2520,
2041,
620,
3219,
5410,
16,
11342,
3591,
16,
30230,
620,
3219,
563,
13,
202,
202,
15069,
1910,
2426,
9418,
503,
288,
202,
202,
430,
261,
3493,
18,
2... |
args.add (0, compiler); cmdline_len += compiler.length()+1; | args.add(0, compiler); cmdline_len += compiler.length() + 1; | public CompileResult perform (String compiler, ArrayList arguments) { Debug.trace ("starting job " + this.name); // we have some maximum command line length - need to count int cmdline_len = 0; // used to collect the arguments for executing the compiler LinkedList args = new LinkedList(arguments); { Iterator arg_it = args.iterator(); while (arg_it.hasNext ()) cmdline_len += ((String)arg_it.next()).length()+1; } // add compiler in front of arguments args.add (0, compiler); cmdline_len += compiler.length()+1; // construct classpath argument for compiler // - collect all classpaths StringBuffer classpath_sb = new StringBuffer(); Iterator cp_it = this.classpath.iterator(); while (cp_it.hasNext ()) { String cp = (String)cp_it.next(); if (classpath_sb.length() > 0) classpath_sb.append (File.pathSeparatorChar); classpath_sb.append (new File (cp).getAbsolutePath()); } String classpath_str = classpath_sb.toString (); // - add classpath argument to command line if (classpath_str.length() > 0) { args.add ("-classpath"); cmdline_len = cmdline_len + 11; args.add (classpath_str); cmdline_len += classpath_str.length()+1; } // remember how many arguments we have which don't change for the job int common_args_no = args.size(); // remember how long the common command line is int common_args_len = cmdline_len; // used for execution FileExecutor executor = new FileExecutor (); String output[] = new String[2]; // used for displaying the progress bar String jobfiles = ""; int fileno = 0; int last_fileno = 0; // now iterate over all files of this job Iterator file_it = this.files.iterator(); while (file_it.hasNext()) { File f = (File)file_it.next(); String fpath = f.getAbsolutePath(); Debug.trace ("processing "+fpath); // we add the file _first_ to the arguments to have a better // chance to get something done if the command line is almost // MAX_CMDLINE_SIZE or even above fileno++; jobfiles += f.getName() + " "; args.add (fpath); cmdline_len += fpath.length(); // start compilation if maximum command line length reached if (cmdline_len >= MAX_CMDLINE_SIZE) { Debug.trace ("compiling " + jobfiles); // display useful progress bar (avoid showing 100% while still // compiling a lot) this.listener.progress (last_fileno, jobfiles); last_fileno = fileno; String[] full_cmdline = (String[])args.toArray (output); int retval = executor.executeCommand (full_cmdline, output); // update progress bar: compilation of fileno files done this.listener.progress (fileno, jobfiles); if (retval != 0) { CompileResult result = new CompileResult (this.langpack.getString ("CompilePanel.error"), full_cmdline, output[0], output[1]); this.listener.handleCompileError (result); if (! result.isContinue()) return result; } else { // verify that all files have been compiled successfully // I found that sometimes, no error code is returned although // compilation failed. Iterator arg_it = args.listIterator (common_args_no); while (arg_it.hasNext()) { File java_file = new File ((String)arg_it.next()); String basename = java_file.getName(); int dotpos = basename.lastIndexOf ('.'); basename = basename.substring (0, dotpos) + ".class"; File class_file = new File (java_file.getParentFile(), basename); if (! class_file.exists ()) { CompileResult result = new CompileResult (this.langpack.getString ("CompilePanel.error.noclassfile")+java_file.getAbsolutePath(), full_cmdline, output[0], output[1]); this.listener.handleCompileError (result); if (! result.isContinue()) return result; // don't continue any further break; } } } // clean command line: remove files we just compiled for (int i = args.size()-1; i >= common_args_no; i--) { args.removeLast (); } cmdline_len = common_args_len; jobfiles = ""; } } if (cmdline_len > common_args_len) { this.listener.progress (last_fileno, jobfiles); String[] full_cmdline = (String[])args.toArray (output); int retval = executor.executeCommand (full_cmdline, output); this.listener.progress (fileno, jobfiles); if (retval != 0) { CompileResult result = new CompileResult (this.langpack.getString ("CompilePanel.error"), full_cmdline, output[0], output[1]); this.listener.handleCompileError (result); if (! result.isContinue()) return result; } } Debug.trace ("job "+this.name+" done (" + fileno + " files compiled)"); return new CompileResult(); } | 58440 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58440/47db88bfea6b64e47a33aa3c937b2ce6e8640d56/CompileWorker.java/buggy/izpack-src/trunk/src/lib/com/izforge/izpack/installer/CompileWorker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16143,
1253,
3073,
261,
780,
5274,
16,
2407,
1775,
13,
565,
288,
1377,
4015,
18,
5129,
7566,
18526,
1719,
315,
397,
333,
18,
529,
1769,
1377,
368,
732,
1240,
2690,
4207,
1296,
980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16143,
1253,
3073,
261,
780,
5274,
16,
2407,
1775,
13,
565,
288,
1377,
4015,
18,
5129,
7566,
18526,
1719,
315,
397,
333,
18,
529,
1769,
1377,
368,
732,
1240,
2690,
4207,
1296,
980,
... |
String newname = text.getText(); if (renameJob(fname, newname, frepdir)) { ti.setText(newname); } text.dispose(); | text.dispose(); | public void focusLost(FocusEvent arg0) { // Focus is lost: connect to repository and change name. String newname = text.getText(); if (renameJob(fname, newname, frepdir)) { ti.setText(newname); } text.dispose(); } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/19cb297a8d9a862529b82769e5fc6ae9f2f48e1a/RepositoryExplorerDialog.java/clean/kettle/src/be/ibridge/kettle/repository/dialog/RepositoryExplorerDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
7155,
19024,
12,
9233,
1133,
1501,
20,
13,
4405,
202,
95,
25083,
202,
759,
478,
4560,
353,
13557,
30,
3077,
358,
3352,
471,
2549,
508,
18,
25083,
202,
780,
26722,
273,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
7155,
19024,
12,
9233,
1133,
1501,
20,
13,
4405,
202,
95,
25083,
202,
759,
478,
4560,
353,
13557,
30,
3077,
358,
3352,
471,
2549,
508,
18,
25083,
202,
780,
26722,
273,
9... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.