rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
boardL = new Label("Board:", Label.LEFT); boardNewB = new Button("New..."); boardNewB.setActionCommand("board_new"); boardNewB.addActionListener(this); boardLoadB = new Button("Load..."); boardLoadB.setActionCommand("board_load"); boardLoadB.addActionListener(this); boardSaveB = new Button("Save"); boardSaveB.setActionCommand("board_save"); boardSaveB.addActionListener(this); boardSaveAsB = new Button("Save As..."); boardSaveAsB.setActionCommand("board_saveas"); boardSaveAsB.addActionListener(this); | butAddTerrain = new Button("Add/Set Terrain"); butAddTerrain.addActionListener(this); panTerrainType = new Panel(new BorderLayout()); panTerrainType.add(choTerrainType, BorderLayout.WEST); panTerrainType.add(texTerrainLevel, BorderLayout.CENTER); cheTerrExitSpecified = new Checkbox("Set Exits : "); butTerrExits = new Button("A"); texTerrExits = new TextField("0", 1); butTerrExits.addActionListener(this); panTerrExits = new Panel(new FlowLayout()); panTerrExits.add(cheTerrExitSpecified); panTerrExits.add(butTerrExits); panTerrExits.add(texTerrExits); labBoard = new Label("Board:", Label.LEFT); butBoardNew = new Button("New..."); butBoardNew.addActionListener(this); butBoardLoad = new Button("Load..."); butBoardLoad.addActionListener(this); butBoardSave = new Button("Save"); butBoardSave.addActionListener(this); butBoardSaveAs = new Button("Save As..."); butBoardSaveAs.addActionListener(this); panButtons = new Panel(new GridLayout(2, 2, 2, 2)); panButtons.add(butBoardNew); panButtons.add(butBoardLoad); panButtons.add(butBoardSave); panButtons.add(butBoardSaveAs); | public BoardEditor(Frame frame, Board board, BoardView1 bv) { this.frame = frame; this.board = board; this.bv = bv; board.newData(0, 0, new Hex[0]); frame.setTitle("MegaMek Editor : Unnamed"); nameL = new Label("Name (no tile selected)", Label.CENTER); typeL = new Label("Type (no tile selected)", Label.CENTER); hexC = new HexCanvas(); elevL = new Label("Elevation:", Label.RIGHT); elevC = new Choice(); for(int i = 9; i > -6; i--) { elevC.add("" + i); } elevC.select("0"); elevC.addItemListener(this); loadedL = new Label("Hexes Loaded:", Label.LEFT); loadedList = new List(10); loadedList.addItemListener(this); refreshTerrainList(); loadHexesB = new Button("Load More Hexes..."); loadHexesB.setActionCommand("hexes_load"); loadHexesB.addActionListener(this); clearUnusedB = new Button("Clear Unused Hexes"); clearUnusedB.setActionCommand("hexes_clear"); clearUnusedB.addActionListener(this); boardL = new Label("Board:", Label.LEFT); boardNewB = new Button("New..."); boardNewB.setActionCommand("board_new"); boardNewB.addActionListener(this); boardLoadB = new Button("Load..."); boardLoadB.setActionCommand("board_load"); boardLoadB.addActionListener(this); boardSaveB = new Button("Save"); boardSaveB.setActionCommand("board_save"); boardSaveB.addActionListener(this); boardSaveAsB = new Button("Save As..."); boardSaveAsB.setActionCommand("board_saveas"); boardSaveAsB.addActionListener(this); blankL = new Label("", Label.CENTER); GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); setLayout(gridbag); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 0.0; c.weighty = 0.0; c.insets = new Insets(4, 4, 1, 1); c.gridwidth = GridBagConstraints.REMAINDER; addBag(nameL, gridbag, c); addBag(hexC, gridbag, c); addBag(typeL, gridbag, c); c.gridwidth = 1; addBag(elevL, gridbag, c); c.gridwidth = GridBagConstraints.REMAINDER; addBag(elevC, gridbag, c); addBag(loadedL, gridbag, c); addBag(loadedList, gridbag, c); addBag(loadHexesB, gridbag, c); addBag(clearUnusedB, gridbag, c); c.weightx = 1.0; c.weighty = 1.0; addBag(blankL, gridbag, c); c.weightx = 0.0; c.weighty = 0.0; addBag(boardL, gridbag, c); c.gridwidth = 1; addBag(boardNewB, gridbag, c); c.gridwidth = GridBagConstraints.REMAINDER; addBag(boardLoadB, gridbag, c); c.gridwidth = 1; addBag(boardSaveB, gridbag, c); c.gridwidth = GridBagConstraints.REMAINDER; addBag(boardSaveAsB, gridbag, c); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/3045e322f5d70e8d851c863279a5680bed754e84/BoardEditor.java/buggy/megamek/src/megamek/client/ui/AWT/BoardEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
17980,
1060,
6946,
12,
3219,
2623,
16,
17980,
1060,
11094,
16,
17980,
1060,
1767,
21,
18021,
13,
288,
3639,
333,
18,
3789,
273,
2623,
31,
3639,
333,
18,
3752,
273,
11094,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
17980,
1060,
6946,
12,
3219,
2623,
16,
17980,
1060,
11094,
16,
17980,
1060,
1767,
21,
18021,
13,
288,
3639,
333,
18,
3789,
273,
2623,
31,
3639,
333,
18,
3752,
273,
11094,
31,
3639,
... |
this.spec = (XMLElement) parser.parse(); | spec = (XMLElement) parser.parse(); | private boolean readSpec() throws IOException { InputStream input; try { input = ResourceManager.getInstance().getInputStream(SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setValidator(new NonValidator()); try { parser.setReader(new StdXMLReader(input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println("Error parsing XML specification for processing."); System.err.println(e.toString()); return false; } if (!this.spec.hasChildren()) return false; // Handle logfile XMLElement lfd = spec.getFirstChildNamed("logfiledir"); if (lfd != null) { logfiledir = lfd.getContent(); } for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext();) { XMLElement job_el = (XMLElement) job_it.next(); // ExecuteForPack Patch // Check if processing required for pack Vector forPacks = job_el.getChildrenNamed("executeForPack"); if (!jobRequiredFor(forPacks)) { continue; } // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList(job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList(); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator(); ef_it .hasNext();) { XMLElement ef = (XMLElement) ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList(); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement) arg_it.next(); String arg_val = arg_el.getContent(); args.add(arg_val); } ef_list.add(new ExecutableFile(ef_name, args)); } for (Iterator ef_it = job_el.getChildrenNamed("executeclass").iterator(); ef_it .hasNext();) { XMLElement ef = (XMLElement) ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println("missing \"name\" attribute for <executeclass>"); return false; } List args = new ArrayList(); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement) arg_it.next(); String arg_val = arg_el.getContent(); args.add(arg_val); } ef_list.add(new ExecutableClass(ef_name, args)); } this.jobs.add(new ProcessingJob(job_name, ef_list)); } } return true; } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
855,
1990,
1435,
1216,
1860,
565,
288,
3639,
5037,
810,
31,
3639,
775,
3639,
288,
5411,
810,
273,
2591,
1318,
18,
588,
1442,
7675,
588,
4348,
12,
13847,
67,
11395,
67,
1985,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
855,
1990,
1435,
1216,
1860,
565,
288,
3639,
5037,
810,
31,
3639,
775,
3639,
288,
5411,
810,
273,
2591,
1318,
18,
588,
1442,
7675,
588,
4348,
12,
13847,
67,
11395,
67,
1985,
... |
c.put("EnumLiteralExp", new Ctor() { public Object cr() { return f.createEnumLiteralExp(); } } ); | c.put("AssociationClassCallExp", new Ctor() { public Object cr() { return f.createAssociationClassCallExp(); } } ); | c.put("EnumLiteralExp", new Ctor() { public Object cr() { return f.createEnumLiteralExp(); } } ); | 6381 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6381/73bbb5d3af6ca7d33751b68011f7710a6a65ab4c/NodeFactory.java/clean/ocl20/src/tudresden/ocl20/core/parser/astgen/NodeFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
276,
18,
458,
2932,
3572,
6177,
2966,
3113,
2398,
394,
385,
13039,
1435,
288,
1071,
1033,
4422,
1435,
288,
327,
284,
18,
2640,
3572,
6177,
2966,
5621,
289,
289,
11272,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
276,
18,
458,
2932,
3572,
6177,
2966,
3113,
2398,
394,
385,
13039,
1435,
288,
1071,
1033,
4422,
1435,
288,
327,
284,
18,
2640,
3572,
6177,
2966,
5621,
289,
289,
11272,
2,
-100,
-100,
-100... |
public static Test suite() throws Throwable { try { File classRoot = new File("build/classes"); TestSuite suite = new TestSuite(); if (classRoot == null) // No test cases found. return suite; ClassFinder classFinder = new ClassFinder(classRoot); TestCaseLoader testCaseLoader = new TestCaseLoader(); testCaseLoader.loadTestCases(classFinder.getClasses()); int numberOfTests = addAllTests(suite, testCaseLoader.getClasses()); System.out.println("Number of test classes found: " + numberOfTests); return suite; } catch (Throwable t) { // This ensures we have extra information. // Otherwise we get a "Could not invoke the suite method." message. t.printStackTrace (); throw t; } } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/5cee6094c7b77e3bcf6338f68456e6e531e781b7/TestAll.java/clean/modules/junit/src/TestAll.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3845,
14650,
9519,
1435,
202,
15069,
15155,
95,
202,
698,
95,
202,
812,
1106,
2375,
33,
2704,
812,
2932,
3510,
19,
4701,
8863,
202,
4709,
22024,
9519,
33,
2704,
4709,
13587,
5621,
202,
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,
1071,
3845,
14650,
9519,
1435,
202,
15069,
15155,
95,
202,
698,
95,
202,
812,
1106,
2375,
33,
2704,
812,
2932,
3510,
19,
4701,
8863,
202,
4709,
22024,
9519,
33,
2704,
4709,
13587,
5621,
202,
4... | ||
if(isReallyConnected() && verifiedIncompatibleOlderVersion) | if(verifiedIncompatibleOlderVersion) | public void receivedLinkPong(long id) { Long lid = new Long(id); long startTime; synchronized(pingSync) { Long s = (Long) pingsSentTimes.get(lid); if(s == null) { Logger.normal(this, "Dropping ping "+id+" on "+this); return; } startTime = s.longValue(); pingsSentTimes.removeKey(lid); long now = System.currentTimeMillis(); pingAverage.report(now - startTime); Logger.minor(this, "Reporting ping time to "+this+" : "+(now - startTime)); } if(isReallyConnected() && verifiedIncompatibleOlderVersion) forceDisconnect(); } | 8026 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8026/f18d01b1fb86ddf4053d90e1f337f99ccd2ec255/PeerNode.java/buggy/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5079,
2098,
52,
932,
12,
5748,
612,
13,
288,
202,
202,
3708,
328,
350,
273,
394,
3407,
12,
350,
1769,
202,
202,
5748,
8657,
31,
202,
202,
22043,
12,
1382,
4047,
13,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5079,
2098,
52,
932,
12,
5748,
612,
13,
288,
202,
202,
3708,
328,
350,
273,
394,
3407,
12,
350,
1769,
202,
202,
5748,
8657,
31,
202,
202,
22043,
12,
1382,
4047,
13,
288... |
this.abortDueToInternalError(Util.bind("abort.missingCode")); | this.abortDueToInternalError(Messages.abort_missingCode); | public void needImplementation() { this.abortDueToInternalError(Util.bind("abort.missingCode")); //$NON-NLS-1$} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/8da7bfb257556f8a461744b38ac4cda420972b74/ProblemReporter.java/clean/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1608,
13621,
1435,
288,
202,
2211,
18,
18623,
30023,
774,
20980,
12,
5058,
18,
18623,
67,
7337,
1085,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
97,
2,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1608,
13621,
1435,
288,
202,
2211,
18,
18623,
30023,
774,
20980,
12,
5058,
18,
18623,
67,
7337,
1085,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
97,
2,
-100,
-100,
-100,
-100,
-100,
-... |
private void addDroolsLibraries(IJavaProject project) | private void addDroolsLibraries(IJavaProject project, IProgressMonitor monitor) | private void addDroolsLibraries(IJavaProject project) throws JavaModelException { createDroolsLibraryContainer(project); List list = new ArrayList(); list.addAll(Arrays.asList(project.getRawClasspath())); list.add(JavaCore.newContainerEntry(getClassPathContainerPath())); project.setRawClasspath((IClasspathEntry[]) list .toArray(new IClasspathEntry[list.size()]), null); } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7caef71316a31d6e10aafdd596304b5688614924/NewDroolsProjectWizard.java/buggy/drools-ide/src/main/java/org/drools/ide/wizard/project/NewDroolsProjectWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
40,
17473,
31909,
12,
45,
5852,
4109,
1984,
16,
467,
5491,
7187,
6438,
13,
5411,
1216,
5110,
1488,
503,
288,
3639,
752,
40,
17473,
9313,
2170,
12,
4406,
1769,
3639,
987,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
40,
17473,
31909,
12,
45,
5852,
4109,
1984,
16,
467,
5491,
7187,
6438,
13,
5411,
1216,
5110,
1488,
503,
288,
3639,
752,
40,
17473,
9313,
2170,
12,
4406,
1769,
3639,
987,
... |
wsdlParser = new Parser(); int retryCount = 3; int retryDelay = 1000; boolean loaded = false; while (retryCount > 0 && !loaded) { try { wsdlParser.run(wsdlLocation); loaded = true; | this.wsdlLocation = wsdlLocation; this.operationName = operationName; WSIFPluggableProviders.overrideDefaultProvider("http: new WSIFDynamicProvider_ApacheAxis()); Definition def = WSIFUtils.readWSDL(null, wsdlLocation); Service service = WSIFUtils.selectService(def, null, null); PortType portType = WSIFUtils.selectPortType(def, null, null); WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService dpf = factory.getService(def, service, portType); port = dpf.getPort(); String inputName = null; String outputName = null; List operationList = portType.getOperations(); boolean found = false; Operation op = null; for (Iterator i = operationList.iterator(); i.hasNext();) { Operation opTemp = (Operation)i.next(); String name = opTemp.getName(); if (!name.equals(operationName)) { continue; | public WSDLBasedProcessor(ScuflModel model, String name, String wsdlLocation, String operationName) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); this.wsdlLocation = wsdlLocation; this.operationName = operationName; // Load the WSDL document try { wsdlParser = new Parser(); int retryCount = 3; int retryDelay = 1000; boolean loaded = false; while (retryCount > 0 && !loaded) { try { wsdlParser.run(wsdlLocation); loaded = true; } catch (Exception ex2) { retryCount--; if (retryCount > 0) { Thread.sleep(retryDelay); } else { throw ex2; } } } } catch (Exception ex) { ProcessorCreationException pce = new ProcessorCreationException("Unable to load wsdl at "+wsdlLocation); pce.initCause(ex); pce.printStackTrace(); throw pce; } // Set up input and output vectors and create the Call object configureFor(operationName); // Build ports from the input and output vectors try { for (int i = 0; i < outNames.size(); i++) { String outName = (String)outNames.get(i); OutputPort outputPort = new OutputPort(this, outName); // Check whether there's a base type (which we can handle) or not... if (((Parameter)outTypes.get(i)).getType().isBaseType() || ((Parameter)outTypes.get(i)).getType().getQName().getLocalPart().startsWith("ArrayOf")) { outputPort.setSyntacticType(xsdTypeToInternalType(((Parameter)outTypes.get(i)).getType().getQName().getLocalPart())); } else { // Register the serializer for the element ((org.apache.axis.client.Call)call).registerTypeMapping(org.w3c.dom.Element.class, ((Parameter)outTypes.get(i)).getType().getQName(), new ElementSerializerFactory(), new ElementDeserializerFactory()); outputPort.setSyntacticType("'text/xml'"); } addPort(outputPort); } for (int i = 0; i < inNames.size(); i++) { String inName = (String)inNames.get(i); InputPort inputPort = new InputPort(this, inName); inputPort.setSyntacticType(xsdTypeToInternalType(((Parameter)inTypes.get(i)).getType().getQName().getLocalPart())); addPort(inputPort); } } catch (DuplicatePortNameException dpne) { ProcessorCreationException pce = new ProcessorCreationException("Duplicate port names!"); pce.initCause(dpne); throw pce; } catch (PortCreationException portce) { ProcessorCreationException pce = new ProcessorCreationException("Port creation failure!"); pce.initCause(portce); throw pce; } } | 7616 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7616/3f5049497995cc9ce95dc258b9849c7b6875afa9/WSDLBasedProcessor.java/clean/trunk/taverna1.0/src/org/embl/ebi/escience/scuflworkers/wsdl/WSDLBasedProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
30567,
9802,
5164,
12,
1541,
696,
80,
1488,
938,
16,
514,
508,
16,
514,
17642,
2735,
16,
514,
22697,
13,
202,
15069,
15476,
9906,
503,
16,
202,
4202,
19072,
5164,
26771,
288,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
30567,
9802,
5164,
12,
1541,
696,
80,
1488,
938,
16,
514,
508,
16,
514,
17642,
2735,
16,
514,
22697,
13,
202,
15069,
15476,
9906,
503,
16,
202,
4202,
19072,
5164,
26771,
288,
202,
... |
throw new PDOMNotImplementedError(); | return getBit(getByte(record + ANNOTATIONS), PDOMCAnnotation.REGISTER_OFFSET); | public boolean isRegister() throws DOMException { throw new PDOMNotImplementedError(); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/4c2b2120e49bda069e08a1cb69fb67723aedcb28/PDOMCVariable.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCVariable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
3996,
1435,
1216,
4703,
503,
288,
202,
202,
12849,
394,
453,
8168,
1248,
8644,
668,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
3996,
1435,
1216,
4703,
503,
288,
202,
202,
12849,
394,
453,
8168,
1248,
8644,
668,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
private Slot addSlotImpl(String id, int index, Slot newSlot) { | private Slot addSlotImpl(String id, int index, Slot newSlot) { | private Slot addSlotImpl(String id, int index, Slot newSlot) { int start = (index & 0x7fffffff) % slots.length; int i = start; do { Slot slot = slots[i]; if (slot == null || slot == REMOVED) { if ((4 * (count+1)) > (3 * slots.length)) { grow(); return addSlotImpl(id, index, newSlot); } slot = (newSlot == null) ? new Slot() : newSlot; slot.stringKey = id; slot.intKey = index; slots[i] = slot; count++; return slot; } if (slot.intKey == index && (slot.stringKey == id || (id != null && id.equals(slot.stringKey)))) { return slot; } if (++i == slots.length) i = 0; } while (i != start); // Unreachable code if (Context.check) Kit.codeBug(); return null; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/1bd4e8e9db275c9bbea0c953d5b79593a26d3d21/ScriptableObject.java/buggy/js/rhino/src/org/mozilla/javascript/ScriptableObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
23195,
527,
8764,
2828,
12,
780,
612,
16,
509,
770,
16,
23195,
394,
8764,
13,
288,
3639,
509,
787,
273,
261,
1615,
473,
374,
92,
27,
18217,
74,
13,
738,
12169,
18,
2469,
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,
23195,
527,
8764,
2828,
12,
780,
612,
16,
509,
770,
16,
23195,
394,
8764,
13,
288,
3639,
509,
787,
273,
261,
1615,
473,
374,
92,
27,
18217,
74,
13,
738,
12169,
18,
2469,
31,
363... |
String url() { | public String url() { | String url() { return this.url; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/2d4fc75b74d717c754829dde488ff0a7456682cc/Dim.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Dim.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
514,
880,
1435,
3639,
288,
5411,
327,
333,
18,
718,
31,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
514,
880,
1435,
3639,
288,
5411,
327,
333,
18,
718,
31,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return breakValue == null ? runtime.getNil() : breakValue; | return breakValue == null ? getRuntime().getNil() : breakValue; | private IRubyObject yieldUnder(RubyModule under) { return under.executeUnder(new Callback() { public IRubyObject execute(IRubyObject self, IRubyObject[] args) { ThreadContext context = runtime.getCurrentContext(); Block block = context.getBlockStack().getCurrent(); Visibility savedVisibility = block.getVisibility(); block.setVisibility(Visibility.PUBLIC); try { IRubyObject valueInYield = args[0]; IRubyObject selfInYield = args[0]; return context.yield(valueInYield, selfInYield, context.getRubyClass(), false, false); } catch (BreakJump e) { IRubyObject breakValue = e.getBreakValue(); return breakValue == null ? runtime.getNil() : breakValue; } finally { block.setVisibility(savedVisibility); } } public Arity getArity() { return Arity.optional(); } }, new IRubyObject[] { this }); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/buggy/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
2824,
14655,
12,
54,
10340,
3120,
3613,
13,
288,
3639,
327,
3613,
18,
8837,
14655,
12,
2704,
8444,
1435,
288,
5411,
1071,
15908,
10340,
921,
1836,
12,
7937,
10340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15908,
10340,
921,
2824,
14655,
12,
54,
10340,
3120,
3613,
13,
288,
3639,
327,
3613,
18,
8837,
14655,
12,
2704,
8444,
1435,
288,
5411,
1071,
15908,
10340,
921,
1836,
12,
7937,
10340,
... |
case Id_setUTCFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCFullYear(args)); | case Id_setUTCFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCFullYear(args)); | public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case ConstructorId_UTC: return wrap_double (jsStaticFunction_UTC(args)); case ConstructorId_parse: return wrap_double (jsStaticFunction_parse(ScriptRuntime.toString(args, 0))); case Id_constructor: return jsConstructor(args, thisObj == null); case Id_toString: return realThis(thisObj, f, true). jsFunction_toString(); case Id_toTimeString: return realThis(thisObj, f, true). jsFunction_toTimeString(); case Id_toDateString: return realThis(thisObj, f, true). jsFunction_toDateString(); case Id_toLocaleString: return realThis(thisObj, f, true). jsFunction_toLocaleString(); case Id_toLocaleTimeString: return realThis(thisObj, f, true). jsFunction_toLocaleTimeString(); case Id_toLocaleDateString: return realThis(thisObj, f, true). jsFunction_toLocaleDateString(); case Id_toGMTString: case Id_toUTCString: return realThis(thisObj, f, true). jsFunction_toUTCString(); case Id_valueOf: return wrap_double(realThis(thisObj, f, true). jsFunction_valueOf()); case Id_getTime: return wrap_double(realThis(thisObj, f, true). jsFunction_getTime()); case Id_getYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getYear(cx)); case Id_getFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getFullYear()); case Id_getUTCFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCFullYear()); case Id_getMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getMonth()); case Id_getUTCMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMonth()); case Id_getDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getDate()); case Id_getUTCDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDate()); case Id_getDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getDay()); case Id_getUTCDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDay()); case Id_getHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getHours()); case Id_getUTCHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCHours()); case Id_getMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getMinutes()); case Id_getUTCMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMinutes()); case Id_getSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getSeconds()); case Id_getUTCSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCSeconds()); case Id_getMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getMilliseconds()); case Id_getUTCMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMilliseconds()); case Id_getTimezoneOffset: return wrap_double(realThis(thisObj, f, true). jsFunction_getTimezoneOffset()); case Id_setTime: return wrap_double(realThis(thisObj, f, true). jsFunction_setTime(ScriptRuntime.toNumber(args, 0))); case Id_setMilliseconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setMilliseconds(args)); case Id_setUTCMilliseconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMilliseconds(args)); case Id_setSeconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setSeconds(args)); case Id_setUTCSeconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCSeconds(args)); case Id_setMinutes: return wrap_double(realThis(thisObj, f, false). jsFunction_setMinutes(args)); case Id_setUTCMinutes: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMinutes(args)); case Id_setHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setHours(args)); case Id_setUTCHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCHours(args)); case Id_setDate: return wrap_double(realThis(thisObj, f, false). jsFunction_setDate(args)); case Id_setUTCDate: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCDate(args)); case Id_setMonth: return wrap_double(realThis(thisObj, f, false). jsFunction_setMonth(args)); case Id_setUTCMonth: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMonth(args)); case Id_setFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setFullYear(args)); case Id_setUTCFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCFullYear(args)); case Id_setYear: return wrap_double(realThis(thisObj, f, true). jsFunction_setYear(ScriptRuntime.toNumber(args, 0))); } return super.execMethod(methodId, f, cx, scope, thisObj, args); } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/35caf7c2bb93872680ae16e34746d94fe1e533e3/NativeDate.java/buggy/js/rhino/src/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... |
AST tmp1567_AST_in = (AST)_t; | AST tmp1568_AST_in = (AST)_t; | public final void triggerprocedurestate(AST _t) throws RecognitionException { AST triggerprocedurestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST t1 = null; AST rec = null; AST id4 = null; AST id3 = null; AST id = null; AST id2 = null; AST __t1172 = _t; AST tmp1563_AST_in = (AST)_t; match(_t,TRIGGER); _t = _t.getFirstChild(); AST tmp1564_AST_in = (AST)_t; match(_t,PROCEDURE); _t = _t.getNextSibling(); AST tmp1565_AST_in = (AST)_t; match(_t,FOR); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CREATE: case DELETE_KW: case FIND: case REPLICATIONCREATE: case REPLICATIONDELETE: { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CREATE: { AST tmp1566_AST_in = (AST)_t; match(_t,CREATE); _t = _t.getNextSibling(); break; } case DELETE_KW: { AST tmp1567_AST_in = (AST)_t; match(_t,DELETE_KW); _t = _t.getNextSibling(); break; } case FIND: { AST tmp1568_AST_in = (AST)_t; match(_t,FIND); _t = _t.getNextSibling(); break; } case REPLICATIONCREATE: { AST tmp1569_AST_in = (AST)_t; match(_t,REPLICATIONCREATE); _t = _t.getNextSibling(); break; } case REPLICATIONDELETE: { AST tmp1570_AST_in = (AST)_t; match(_t,REPLICATIONDELETE); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } AST tmp1571_AST_in = (AST)_t; match(_t,OF); _t = _t.getNextSibling(); t1 = _t==ASTNULL ? null : (AST)_t; tbl(_t,CQ.SYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } if ( inputState.guessing==0 ) { action.defineBufferForTrigger(t1); } break; } case REPLICATIONWRITE: case WRITE: { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WRITE: { AST tmp1572_AST_in = (AST)_t; match(_t,WRITE); _t = _t.getNextSibling(); break; } case REPLICATIONWRITE: { AST tmp1573_AST_in = (AST)_t; match(_t,REPLICATIONWRITE); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } AST tmp1574_AST_in = (AST)_t; match(_t,OF); _t = _t.getNextSibling(); rec = _t==ASTNULL ? null : (AST)_t; tbl(_t,CQ.SYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case EOF: case PERIOD: case NEW: case OLD: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NEW: { AST tmp1575_AST_in = (AST)_t; match(_t,NEW); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case BUFFER: { AST tmp1576_AST_in = (AST)_t; match(_t,BUFFER); _t = _t.getNextSibling(); break; } case ID: { break; } default: { throw new NoViableAltException(_t); } } } id4 = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case EOF: case PERIOD: case OLD: { break; } default: { throw new NoViableAltException(_t); } } } if ( inputState.guessing==0 ) { action.defineBuffer(id4, id4, rec, true); } break; } case EOF: case PERIOD: case OLD: { break; } default: { throw new NoViableAltException(_t); } } } if ( inputState.guessing==0 ) { if (id4 == null) action.defineBufferForTrigger(rec); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OLD: { AST tmp1577_AST_in = (AST)_t; match(_t,OLD); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case BUFFER: { AST tmp1578_AST_in = (AST)_t; match(_t,BUFFER); _t = _t.getNextSibling(); break; } case ID: { break; } default: { throw new NoViableAltException(_t); } } } id3 = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } if ( inputState.guessing==0 ) { action.defineBuffer(id3, id3, rec, true); } break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } break; } case ASSIGN: { AST tmp1579_AST_in = (AST)_t; match(_t,ASSIGN); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OF: { AST __t1185 = _t; AST tmp1580_AST_in = (AST)_t; match(_t,OF); _t = _t.getFirstChild(); fld(_t,CQ.SYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TABLE: { AST __t1187 = _t; AST tmp1581_AST_in = (AST)_t; match(_t,TABLE); _t = _t.getFirstChild(); AST tmp1582_AST_in = (AST)_t; match(_t,LABEL); _t = _t.getNextSibling(); constant(_t); _t = _retTree; _t = __t1187; _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1185; _t = _t.getNextSibling(); break; } case NEW: { AST __t1188 = _t; AST tmp1583_AST_in = (AST)_t; match(_t,NEW); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALUE: { AST tmp1584_AST_in = (AST)_t; match(_t,VALUE); _t = _t.getNextSibling(); break; } case ID: { break; } default: { throw new NoViableAltException(_t); } } } id = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { push(action.defineVariable(id, id)); } defineparam_var(_t); _t = _retTree; if ( inputState.guessing==0 ) { action.addToSymbolScope(pop()); } _t = __t1188; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case OLD: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OLD: { AST __t1191 = _t; AST tmp1585_AST_in = (AST)_t; match(_t,OLD); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALUE: { AST tmp1586_AST_in = (AST)_t; match(_t,VALUE); _t = _t.getNextSibling(); break; } case ID: { break; } default: { throw new NoViableAltException(_t); } } } id2 = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { push(action.defineVariable(id2, id2)); } defineparam_var(_t); _t = _retTree; _t = __t1191; _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.addToSymbolScope(pop()); } break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t1172; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3080,
685,
8153,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3080,
685,
8153,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3080,
685,
8153,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3080,
685,
8153,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
69... |
} | } | public static void addOverrideAnnotations(JMethodSignature jms) { String name = jms.getName(); boolean addOverrideAnnotation = false; // 0. It the method already has an override annotation, then jump out JAnnotation override = jms.getAnnotation(new JAnnotationType("Override")); if ( override != null) { return; } // 1. Does the method name exist in our list// MethodSpec methodSpec = definedSpecs.get(name); MethodSpec methodSpec = (MethodSpec) definedSpecs.get(name); // 2. If we have a methodSpec, then test the parameters if ( methodSpec != null) { // if the correct number of parameters int paramCount = jms.getParameters().length; if ( paramCount == methodSpec.paramCount ) { // then check the 0 param methods if (paramCount == 0 && methodSpec.paramCount == 0 ) { addOverrideAnnotation = true; } // then check the 1 param methods if (paramCount == 1 && methodSpec.paramCount == 1 ) { String incommingClassName1 = jms.getParameter(0).getType().getName(); if ( incommingClassName1.equalsIgnoreCase(methodSpec.param1ClassName) ) { addOverrideAnnotation = true; } } // then check the 2 param methods if (paramCount == 2 && methodSpec.paramCount == 2 ){ String incommingClassName1 = jms.getParameter(0).getType().getName(); String incommingClassName2 = jms.getParameter(1).getType().getName(); if ( incommingClassName1.equalsIgnoreCase(methodSpec.param1ClassName) && incommingClassName2.equalsIgnoreCase(methodSpec.param2ClassName) ) { addOverrideAnnotation = true; } } } } // 3. do the work if we need to if ( addOverrideAnnotation ) { jms.addAnnotation(new JAnnotation(new JAnnotationType("Override"))); } } | 57307 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57307/639ed93115321ad51c2450f306c4d50d146ede46/Java5HacksHelper.java/buggy/src/main/java/org/exolab/javasource/Java5HacksHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
527,
6618,
5655,
12,
46,
1305,
5374,
23007,
13,
288,
202,
202,
780,
508,
273,
23007,
18,
17994,
5621,
202,
202,
6494,
527,
6618,
3257,
273,
629,
31,
9506,
202,
759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
527,
6618,
5655,
12,
46,
1305,
5374,
23007,
13,
288,
202,
202,
780,
508,
273,
23007,
18,
17994,
5621,
202,
202,
6494,
527,
6618,
3257,
273,
629,
31,
9506,
202,
759,
... |
RubyId key = null; try { key = (RubyId) _key; } catch (ClassCastException ccExcptn) { key = getRuby().intern((String) _key); System.out.println("key isn't ID: \"" + _key + "\""); } if (!(_value instanceof RubyObject)) { return RubyMapMethod.CONTINUE; } RubyObject value = (RubyObject) _value; FindClassPathResult res = (FindClassPathResult) _res; | RubyId key = null; try { key = (RubyId) _key; } catch (ClassCastException ccExcptn) { key = getRuby().intern((String) _key); System.out.println("key isn't ID: \"" + _key + "\""); } if (!(_value instanceof RubyObject)) { return RubyMapMethod.CONTINUE; } RubyObject value = (RubyObject) _value; FindClassPathResult res = (FindClassPathResult) _res; | public int execute(Object _key, Object _value, Object _res) { // Cast the values. RubyId key = null; try { key = (RubyId) _key; } catch (ClassCastException ccExcptn) { key = getRuby().intern((String) _key); System.out.println("key isn't ID: \"" + _key + "\""); } if (!(_value instanceof RubyObject)) { return RubyMapMethod.CONTINUE; } RubyObject value = (RubyObject) _value; FindClassPathResult res = (FindClassPathResult) _res; RubyString path = null; if (!key.isConstId()) { return RubyMapMethod.CONTINUE; } String name = key.toName(); if (res.path != null) { path = (RubyString) res.path.m_dup(); path.m_cat("::"); path.m_cat(name); } else { path = RubyString.m_newString(getRuby(), name); } if (value == res.klass) { res.name = key; res.path = path; return RubyMapMethod.STOP; } if (value.m_kind_of(getRuby().getClasses().getModuleClass()).isTrue()) { if (value.getInstanceVariables() == null) { return RubyMapMethod.CONTINUE; } FindClassPathResult list = res; while (list != null) { if (list.track == value) { return RubyMapMethod.CONTINUE; } list = list.prev; } FindClassPathResult arg = new FindClassPathResult(); arg.name = null; arg.path = path; arg.klass = res.klass; arg.track = value; arg.prev = res; value.getInstanceVariables().foreach(this, arg); if (arg.name != null) { res.name = arg.name; res.path = arg.path; return RubyMapMethod.STOP; } } return RubyMapMethod.CONTINUE; } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
1836,
12,
921,
389,
856,
16,
1033,
389,
1132,
16,
1033,
389,
455,
13,
288,
1082,
202,
759,
19782,
326,
924,
18,
1082,
202,
54,
10340,
548,
498,
273,
446,
31,
1082,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
1836,
12,
921,
389,
856,
16,
1033,
389,
1132,
16,
1033,
389,
455,
13,
288,
1082,
202,
759,
19782,
326,
924,
18,
1082,
202,
54,
10340,
548,
498,
273,
446,
31,
1082,
202... |
String location = getProjectLocation(); | String location = wProjectContentsDirectoryText.getText(); | private boolean verifyProjectLocation() { String location = getProjectLocation(); // TODO:Check that project location is valid folder name // TODO:Check that project location not already exists return true; } | 14547 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14547/c47a7f2616c12043b7d9877aa33aae915c4e72ef/ProjectWizardPage.java/clean/org.knopflerfish.eclipse.core.ui/src/org/knopflerfish/eclipse/core/ui/wizards/ProjectWizardPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
3929,
4109,
2735,
1435,
288,
565,
514,
2117,
273,
341,
4109,
6323,
2853,
1528,
18,
588,
1528,
5621,
3639,
368,
2660,
30,
1564,
716,
1984,
2117,
353,
923,
3009,
508,
3639,
368,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
3929,
4109,
2735,
1435,
288,
565,
514,
2117,
273,
341,
4109,
6323,
2853,
1528,
18,
588,
1528,
5621,
3639,
368,
2660,
30,
1564,
716,
1984,
2117,
353,
923,
3009,
508,
3639,
368,... |
return new JarEnumeration(super.entries()); | return new JarEnumeration(super.entries(), this); | public Enumeration entries() throws IllegalStateException { return new JarEnumeration(super.entries()); } | 45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/10e43e4a13ff4ff70c4a1e2dd83efb7a29681520/JarFile.java/buggy/libjava/java/util/jar/JarFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13864,
3222,
1435,
1216,
5477,
225,
288,
565,
327,
394,
15644,
21847,
12,
9565,
18,
8219,
9334,
333,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13864,
3222,
1435,
1216,
5477,
225,
288,
565,
327,
394,
15644,
21847,
12,
9565,
18,
8219,
9334,
333,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
myList.setVisibleRowCount(Math.max(20, myListModel.getSize())); | myList.setVisibleRowCount(Math.min(20, myListModel.getSize())); | protected void beforeShow() { myList.addMouseMotionListener(myMouseMotionListener); myList.addMouseListener(myMouseListener); myList.setVisibleRowCount(Math.max(20, myListModel.getSize())); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/35758a11d6cc52706f95ebb311da04b7c493aea1/ListPopupImpl.java/clean/ui/impl/com/intellij/ui/popup/list/ListPopupImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1865,
5706,
1435,
288,
565,
3399,
682,
18,
1289,
9186,
29360,
2223,
12,
4811,
9186,
29360,
2223,
1769,
565,
3399,
682,
18,
1289,
9186,
2223,
12,
4811,
9186,
2223,
1769,
565,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1865,
5706,
1435,
288,
565,
3399,
682,
18,
1289,
9186,
29360,
2223,
12,
4811,
9186,
29360,
2223,
1769,
565,
3399,
682,
18,
1289,
9186,
2223,
12,
4811,
9186,
2223,
1769,
565,
33... |
throw new RuntimeException( "[Page] Implementation of ICDynamicPageTrigger could not be found. Implementing bundle was not loaded."); | throw new RuntimeException("[Page] Implementation of ICDynamicPageTrigger could not be found. Implementing bundle was not loaded."); | public ICDynamicPageTrigger getDynamicPageTrigger() { if (this.dynamicPageTrigger == null) { this.dynamicPageTrigger = (ICDynamicPageTrigger) ImplementorRepository.getInstance().newInstanceOrNull( ICDynamicPageTrigger.class, this.getClass()); if (this.dynamicPageTrigger == null) { throw new RuntimeException( "[Page] Implementation of ICDynamicPageTrigger could not be found. Implementing bundle was not loaded."); } } return this.dynamicPageTrigger; } | 52001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52001/676ebb37c7cd996bcfbaebc15d17741fa4f6b50a/Page.java/clean/src/java/com/idega/presentation/Page.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
26899,
9791,
1964,
6518,
2343,
3920,
1964,
6518,
1435,
288,
202,
202,
430,
261,
2211,
18,
14507,
1964,
6518,
422,
446,
13,
288,
1082,
202,
2211,
18,
14507,
1964,
6518,
273,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
26899,
9791,
1964,
6518,
2343,
3920,
1964,
6518,
1435,
288,
202,
202,
430,
261,
2211,
18,
14507,
1964,
6518,
422,
446,
13,
288,
1082,
202,
2211,
18,
14507,
1964,
6518,
273,
261,... |
} | } | public AddressBook() { super("Address Book","0"); setBackground(Color.lightGray); getContentPane().setLayout(new BorderLayout()); //create menubar (top) //merge both the editors commands with this applications commands. //mMenubar = NsMenuManager.createMenuBar("grendel.addressbook.Menus", "grendel.addressbook.MenuLabels", "mainMenubar", defaultActions); // FIXME - need to build the menu bar // (Jeff) mMenubar = buildMenu("menus.xml",defaultActions); setJMenuBar(mMenubar); //collapsble panels holds toolbar. CollapsiblePanel collapsePanel = new CollapsiblePanel(true); collapsePanel.setBorder (new EmptyBorder(5,5,5,5)); //toolbar buttons mTtoolbar = createToolbar(); //collapsible item collapsePanel.add(mTtoolbar); //create status bar (bottom) // mStatusbar = createStatusbar(); JPanel panel1 = new JPanel(); panel1.setLayout(new BorderLayout()); panel1.add(collapsePanel, BorderLayout.NORTH); //hack together the data sources. mDataSourceList = new DataSourceList (); mDataSourceList.addEntry (new DataSource ("Four11 Directory", "ldap.four11.com")); mDataSourceList.addEntry (new DataSource ("InfoSpace Directory", "ldap.infospace.com")); mDataSourceList.addEntry (new DataSource ("WhoWhere Directory", "ldap.whowhere.com")); mDataSourceList.addEntry (new DataSource ("InfoSeek Directory", "ldap.infoseek.com")); //Create address panel AddressPanel addressPanel = new AddressPanel (mDataSourceList); panel1.add(addressPanel, BorderLayout.CENTER); // getContentPane().add(mMenubar, BorderLayout.NORTH); getContentPane().add(panel1, BorderLayout.CENTER); setSize (600, 400); //Create Local Address Book //myLocalAddressBook = new ACS_Personal ("MyAddressBook.nab", true); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/b0fa2f56cd2dcc90452b768e6b38187cfb8c30eb/AddressBook.java/buggy/grendel/addressbook/AddressBook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5267,
9084,
1435,
288,
3639,
2240,
2932,
1887,
20258,
15937,
20,
8863,
3639,
31217,
12,
2957,
18,
5099,
23521,
1769,
3639,
5154,
8485,
7675,
542,
3744,
12,
2704,
30814,
10663,
3639,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5267,
9084,
1435,
288,
3639,
2240,
2932,
1887,
20258,
15937,
20,
8863,
3639,
31217,
12,
2957,
18,
5099,
23521,
1769,
3639,
5154,
8485,
7675,
542,
3744,
12,
2704,
30814,
10663,
3639,
3... |
NativeJavaPackage packages = new NativeJavaPackage.TopLevelPackage(); | final NativeJavaPackage packages = new TopLevelPackage(); | public static Scriptable init(Scriptable scope) throws PropertyException { NativeJavaPackage packages = new NativeJavaPackage.TopLevelPackage(); packages.setPrototype(getObjectPrototype(scope)); packages.setParentScope(scope); // We want to get a real alias, and not a distinct JavaPackage // with the same packageName, so that we share classes and packages // that are underneath. NativeJavaPackage javaAlias = (NativeJavaPackage)packages.get("java", packages); for (int nameStart = 0; ;) { int nameEnd = commonPackages.indexOf(';', nameStart); if (nameEnd < 0) { break; } String packageName = commonPackages.substring(nameStart, nameEnd); packages.forcePackage(packageName); nameStart = nameEnd + 1; } Method[] methods = FunctionObject.getMethodList( NativeJavaPackage.class); Method m = FunctionObject.findSingleMethod(methods, "jsFunction_getClass"); FunctionObject f = new FunctionObject("getClass", m, scope); // It's safe to downcast here since initStandardObjects takes // a ScriptableObject. ScriptableObject global = (ScriptableObject) scope; global.defineProperty("getClass", f, ScriptableObject.DONTENUM); global.defineProperty("Packages", packages, ScriptableObject.DONTENUM); global.defineProperty("java", javaAlias, ScriptableObject.DONTENUM); // I think I'm supposed to return the prototype, but I don't have one. return packages; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/b7d1664a5d03bd54df207a5ec86214ea4fb9f6d3/NativeJavaPackage.java/buggy/js/rhino/src/org/mozilla/javascript/NativeJavaPackage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
22780,
1208,
12,
3651,
429,
2146,
13,
3639,
1216,
4276,
503,
565,
288,
3639,
727,
16717,
5852,
2261,
5907,
273,
394,
7202,
2355,
2261,
5621,
3639,
5907,
18,
542,
15846,
12,
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,
377,
1071,
760,
22780,
1208,
12,
3651,
429,
2146,
13,
3639,
1216,
4276,
503,
565,
288,
3639,
727,
16717,
5852,
2261,
5907,
273,
394,
7202,
2355,
2261,
5621,
3639,
5907,
18,
542,
15846,
12,
588... |
return returnNode((_currentNode = node) | m_dtmIdent); | return returnNode(makeNodeHandle(_currentNode = node)); | public int next() { int node = _currentNode + 1; if ((_sp >= 0) && (node < _stack[_sp])) { return returnNode((_currentNode = node) | m_dtmIdent); } else { _currentNode = node; // skip ancestor return --_sp >= 0 ? next() : NULL; } } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/2d102c245a54c9167bd2255d2b93ba5f3b7667e8/DTMDefaultBaseIterators.java/buggy/src/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1024,
1435,
565,
288,
1377,
509,
756,
273,
389,
2972,
907,
397,
404,
31,
1377,
309,
14015,
67,
1752,
1545,
374,
13,
597,
261,
2159,
411,
389,
3772,
63,
67,
1752,
22643,
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,
377,
1071,
509,
1024,
1435,
565,
288,
1377,
509,
756,
273,
389,
2972,
907,
397,
404,
31,
1377,
309,
14015,
67,
1752,
1545,
374,
13,
597,
261,
2159,
411,
389,
3772,
63,
67,
1752,
22643,
1377,... |
public org.quickfix.field.BidPx getBidPx() throws FieldNotFound { org.quickfix.field.BidPx value = new org.quickfix.field.BidPx(); | public quickfix.field.BidPx getBidPx() throws FieldNotFound { quickfix.field.BidPx value = new quickfix.field.BidPx(); | public org.quickfix.field.BidPx getBidPx() throws FieldNotFound { org.quickfix.field.BidPx value = new org.quickfix.field.BidPx(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/Quote.java/buggy/src/java/src/quickfix/fix44/Quote.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
21776,
2882,
350,
21776,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
21776,
460,
273,
394,
2358,
18,
1952... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21776,
2882,
350,
21776,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
21776,
460,
273,
394,
2358,
18,
1952... |
if (!force && patternString.equals(oldPattern)) return; | if (!force && patternString.equals(oldPattern)) { return; } | private void gatherResources(boolean force) { String oldPattern = force ? null : patternString; patternString = adjustPattern(); if (!force && patternString.equals(oldPattern)) return; updateGatherThread.stop = true; updateGatherThread = new UpdateGatherThread(); if (patternString.equals("")) { //$NON-NLS-1$ updateGatherThread.start(); return; } stringMatcher = new StringMatcher(patternString, true, false); if (oldPattern != null && (oldPattern.length() != 0) && oldPattern.endsWith("*") && patternString.endsWith("*")) { //$NON-NLS-1$ //$NON-NLS-2$ // see if the new pattern is a derivative of the old pattern int matchLength = oldPattern.length() - 1; if (patternString.regionMatches(0, oldPattern, 0, matchLength)) { updateGatherThread.refilter = true; updateGatherThread.firstMatch = 0; updateGatherThread.lastMatch = descriptorsSize - 1; updateGatherThread.start(); return; } } final ArrayList resources = new ArrayList(); BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { getMatchingResources(resources); IResource resourcesArray[] = new IResource[resources.size()]; resources.toArray(resourcesArray); initDescriptors(resourcesArray); } }); updateGatherThread.firstMatch = 0; updateGatherThread.lastMatch = descriptorsSize - 1; updateGatherThread.start(); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ResourceListSelectionDialog.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceListSelectionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
11090,
3805,
12,
6494,
2944,
13,
288,
3639,
514,
1592,
3234,
273,
2944,
692,
446,
294,
1936,
780,
31,
3639,
1936,
780,
273,
5765,
3234,
5621,
3639,
309,
16051,
5734,
597,
1936,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11090,
3805,
12,
6494,
2944,
13,
288,
3639,
514,
1592,
3234,
273,
2944,
692,
446,
294,
1936,
780,
31,
3639,
1936,
780,
273,
5765,
3234,
5621,
3639,
309,
16051,
5734,
597,
1936,... |
firstLetterStyle = null; | public Box layoutChildren(Context c, Box box) { //u.p("starting to lay out the children"); /* resolved by ContentUtil if (LayoutUtil.isHiddenNode(box.getElement(), c)) { return box; }*/ List contentList = box.getContent().getChildContent(c); if (contentList.size() == 0) return box;//we can do this if there is no content, right? //TODO: unravel the mysteries of the layout hierarchy. Perhaps the Context should know if we are block-laying out or inline laying-out? if (!box.isAnonymous()) {//this check should really be unnecessary when content layout is completed. tobe 2004-12-09 //This where the magic decision of creating AnonymousBlockBox is //if (LayoutUtil.isBlockLayout(box.getElement(), c)) { if (ContentUtil.isBlockContent(contentList)) {//this should be block layed out return super.layoutChildren(c, box); } } // calculate the initial position and dimensions Box block = (Box) box; Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; bounds.width -= box.margin.left + box.border.left + box.padding.left + box.padding.right + box.border.right + box.margin.right; validateBounds(bounds); bounds.x = 0; bounds.y = 0; bounds.height = 0; // prepare remaining width and first linebox int remaining_width = bounds.width; LineBox curr_line = newLine(box, bounds, null); c.setFirstLine(true); // account for text-indent CalculatedStyle parentStyle = box.getContent().getStyle();//this should work already remaining_width = TextIndent.doTextIndent(parentStyle, remaining_width, curr_line); // more setup LineBox prev_line = new LineBox(); prev_line.setParent(box); prev_line.y = bounds.y; prev_line.height = 0; InlineBox prev_inline = null; InlineBox prev_align_inline = null; // adjust the first line for float tabs remaining_width = FloatUtil.adjustForTab(c, prev_line, remaining_width); CalculatedStyle currentStyle = parentStyle; CascadedStyle firstLineStyle = null; CascadedStyle firstLetterStyle = null; boolean isFirstLetter = true; // loop until no more nodes while (contentList.size() > 0) { Object o = contentList.get(0); contentList.remove(0); if (o instanceof FirstLineStyle) {//can actually only be the first object in list firstLineStyle = ((FirstLineStyle) o).getStyle(); continue; } if (o instanceof FirstLetterStyle) {//can actually only be the first or second object in list firstLetterStyle = ((FirstLetterStyle) o).getStyle(); continue; } Content currentContent = (Content) o; // loop until no more text in this node while (true) { // debugging check if (bounds.width < 0) { u.p("bounds width = " + bounds.width); u.dump_stack(); System.exit(-1); } // the crash warning code if (bounds.width < 1) { u.p("warning. width < 1 " + bounds.width); } // test if there is no more text in the current text node // if there is a prev, and if the prev was part of this current node if (prev_inline != null && prev_inline.getContent() == currentContent) { if (isEndOfBlock(prev_inline, currentContent)) { break; } } currentStyle = currentContent.getStyle(); // look at current inline // break off the longest section that will fit InlineBox new_inline = calculateInline(c, currentContent, remaining_width, bounds.width, prev_inline, prev_align_inline, isFirstLetter, firstLetterStyle, firstLineStyle); // u.p("got back inline: " + new_inline); isFirstLetter = false; firstLetterStyle = null; // if this inline needs to be on a new line if (new_inline.break_before && !new_inline.floated) { remaining_width = bounds.width; saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, block, false); firstLineStyle = null; bounds.height += curr_line.height; prev_line = curr_line; curr_line = newLine(box, bounds, prev_line); remaining_width = FloatUtil.adjustForTab(c, curr_line, remaining_width); } // save the new inline to the list curr_line.addChild(new_inline); // calc new height of the line // don't count the inline towards the line height and // line baseline if it's a floating inline. if (!(currentContent instanceof InlineBlockContent)) { if (!(currentContent instanceof FloatedBlockContent)) { adjustLineHeight(curr_line, new_inline); } } // handle float //FloatUtil.handleFloated( c, new_inline, curr_line, bounds.width, elem ); // calc new width of the line curr_line.width += new_inline.width; // reduce the available width remaining_width = remaining_width - new_inline.width; // if the last inline was at the end of a line, then go to next line if (new_inline.break_after) { // then remaining_width = max_width remaining_width = bounds.width; // save the line saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, block, false); firstLineStyle = null; // increase bounds height to account for the new line bounds.height += curr_line.height; prev_line = curr_line; curr_line = newLine(box, bounds, prev_line); remaining_width = FloatUtil.adjustForTab(c, curr_line, remaining_width); } // set the inline to use for left alignment if (!(currentContent instanceof FloatedBlockContent)) { prev_align_inline = new_inline; } prev_inline = new_inline; } } // save the final line saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, block, true); finishBlock(block, curr_line, bounds); return block; } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/e65470765b9501b251ba6faf1734b383bb9b1578/InlineLayout.java/buggy/src/java/org/xhtmlrenderer/layout/InlineLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8549,
3511,
4212,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
368,
89,
18,
84,
2932,
18526,
358,
328,
528,
596,
326,
2325,
8863,
3639,
1748,
4640,
635,
3697,
1304,
309,
261,
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,
377,
1071,
8549,
3511,
4212,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
368,
89,
18,
84,
2932,
18526,
358,
328,
528,
596,
326,
2325,
8863,
3639,
1748,
4640,
635,
3697,
1304,
309,
261,
374... | |
public void listPortlets(RenderFormEvent event) { PortletRequest req = event.getRenderRequest(); PortletResponse res = event.getRenderResponse(); List portletapps; List otherapps; try { portletapps = getPortletAppList(req, res); otherapps = getNonPortletAppList(req, res); log.info("result is OK"); } catch (TomcatManagerException e) { log.error("Unable to retrieve list of portlets.", e); MessageBoxBean msg = event.getMessageBoxBean("msg"); msg.setValue(e.getMessage()); msg.setMessageType(MessageStyle.MSG_ERROR); portletapps = new ArrayList(); otherapps = new ArrayList(); } event.getRenderRequest().setAttribute("result", portletapps); event.getRenderRequest().setAttribute("others", otherapps); setNextState(req, LIST_APPS_JSP); | public void listPortlets(ActionFormEvent event) { setNextState(event.getActionRequest(), "listPortlets"); | public void listPortlets(RenderFormEvent event) { PortletRequest req = event.getRenderRequest(); PortletResponse res = event.getRenderResponse(); List portletapps; List otherapps; try { portletapps = getPortletAppList(req, res); otherapps = getNonPortletAppList(req, res); log.info("result is OK"); } catch (TomcatManagerException e) { log.error("Unable to retrieve list of portlets.", e); MessageBoxBean msg = event.getMessageBoxBean("msg"); msg.setValue(e.getMessage()); msg.setMessageType(MessageStyle.MSG_ERROR); portletapps = new ArrayList(); otherapps = new ArrayList(); } event.getRenderRequest().setAttribute("result", portletapps); event.getRenderRequest().setAttribute("others", otherapps); //if (result != null) log.debug("result: " + result.getReturnCode() + " " + result.getDescription()); setNextState(req, LIST_APPS_JSP); } | 49343 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49343/130d36a3be41587d15018ede052833730c2ea429/PortletApplicationManager.java/buggy/src/org/gridsphere/portlets/core/admin/portlets/PortletApplicationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
666,
2617,
17307,
12,
3420,
1204,
1133,
871,
13,
288,
3639,
21305,
691,
1111,
273,
871,
18,
588,
3420,
691,
5621,
3639,
21305,
1064,
400,
273,
871,
18,
588,
3420,
1064,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
666,
2617,
17307,
12,
3420,
1204,
1133,
871,
13,
288,
3639,
21305,
691,
1111,
273,
871,
18,
588,
3420,
691,
5621,
3639,
21305,
1064,
400,
273,
871,
18,
588,
3420,
1064,
5621,
... |
public org.quickfix.field.LegSymbolSfx getLegSymbolSfx() throws FieldNotFound { org.quickfix.field.LegSymbolSfx value = new org.quickfix.field.LegSymbolSfx(); | public quickfix.field.LegSymbolSfx getLegSymbolSfx() throws FieldNotFound { quickfix.field.LegSymbolSfx value = new quickfix.field.LegSymbolSfx(); | public org.quickfix.field.LegSymbolSfx getLegSymbolSfx() throws FieldNotFound { org.quickfix.field.LegSymbolSfx value = new org.quickfix.field.LegSymbolSfx(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityDefinition.java/clean/src/java/src/quickfix/fix43/SecurityDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
5335,
55,
19595,
336,
8329,
5335,
55,
19595,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
5335,
55,
19595,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
5335,
55,
19595,
336,
8329,
5335,
55,
19595,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
5335,
55,
19595,
... |
mAttrs = attrs; | mFields = fields; | public ModifyContactOperation(Session session, OperationContext oc, Mailbox mbox, Requester req, ItemId iid, HashMap<String, String> attrs, boolean replace) { super(session, oc, mbox, req, LOAD); mIid = iid; mAttrs = attrs; mReplace = replace; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/0d719147d8837d957bf92999a1b429be1368fa77/ModifyContactOperation.java/buggy/ZimbraServer/src/java/com/zimbra/cs/operation/ModifyContactOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9518,
6567,
2988,
12,
2157,
1339,
16,
4189,
1042,
13345,
16,
11542,
2147,
312,
2147,
16,
868,
21207,
1111,
16,
1171,
4342,
548,
22819,
16,
4317,
32,
780,
16,
514,
34,
3422,
16,
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,
9518,
6567,
2988,
12,
2157,
1339,
16,
4189,
1042,
13345,
16,
11542,
2147,
312,
2147,
16,
868,
21207,
1111,
16,
1171,
4342,
548,
22819,
16,
4317,
32,
780,
16,
514,
34,
3422,
16,
12... |
} | } | private static String repairDirSeps(String command) { // TODO: This could be improved and optimized StringTokenizer toker = new StringTokenizer(command, " "); StringBuffer executable = new StringBuffer(); boolean insideQuotes = false; char quoteChar = 0; loop: while (true) { String token = toker.nextToken(); if (!insideQuotes) { char first = token.charAt(0); switch (first) { case '"': case '\'': insideQuotes = true; quoteChar = first; executable.append(token + " "); break; default: executable.append(token); break loop; } } else { char last = token.charAt(token.length() - 1); executable.append(token); if (last == quoteChar) { insideQuotes = false; break loop; } else { executable.append(" "); } } } String remainder = command.substring(executable.length()); // Matcher.replaceAll treats backslashes in the replacement string as escaped characters String replacement = File.separator; if (File.separatorChar == '\\') replacement = "\\\\"; return PATH_SEPARATORS.matcher(executable).replaceAll(replacement) + remainder; } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/b4a189a27604d62c317938f16a124fb9dab1e94a/RubyKernel.java/clean/src/org/jruby/RubyKernel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
20994,
1621,
5097,
87,
12,
780,
1296,
13,
288,
3639,
368,
2660,
30,
1220,
3377,
506,
13069,
2155,
471,
15411,
3639,
16370,
946,
264,
273,
394,
16370,
12,
3076,
16,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
20994,
1621,
5097,
87,
12,
780,
1296,
13,
288,
3639,
368,
2660,
30,
1220,
3377,
506,
13069,
2155,
471,
15411,
3639,
16370,
946,
264,
273,
394,
16370,
12,
3076,
16,
315,
... |
private void update() { String oldText = getText(); String newText = _property.getProperty(_container); // Update the text if we have changed from or to nothing, or if the old // and new text are different. if ((oldText == null) || (newText == null) || (!(oldText.equals(newText)))) { try { setText(newText); } catch (IllegalStateException il) {} } // Now look at the associated NSUML element and see if we need to do // anything special. Discard if we are null. As a start we need to mark // this for saving. _target = _container.getTarget(); if (_target == null) { return; } // Commented out for now, because this triggers from all over the // place. Project p = ProjectBrowser.TheInstance.getProject(); //p.setNeedsSave(true); // If we are a use case update all our extension points. if (_target instanceof MUseCase) { MUseCase useCase = (MUseCase) _target; useCase.setExtensionPoints(useCase.getExtensionPoints()); } // If we are an extension point update the extension points of our // owning use case. This could be null of course. else if (_target instanceof MExtensionPoint) { MUseCase useCase = ((MExtensionPoint) _target).getUseCase(); if (useCase != null) { useCase.setExtensionPoints(useCase.getExtensionPoints()); } } // If we are any other (non-use case) sort of classifier update all our // features. else if (_target instanceof MClassifier) { _classifier = (MClassifier) _target; if (_classifier == null) { return; } _classifier.setFeatures(_classifier.getFeatures()); } else if (_target instanceof MOperation) { _classifier = (MClassifier) ((MOperation) _target).getOwner(); if (_classifier == null) { return; } _classifier.setFeatures(_classifier.getFeatures()); } else if (_target instanceof MAttribute) { _classifier = (MClassifier) ((MAttribute) _target).getOwner(); // Argo.log.info("UMLTextField.update()..._classifier = " + _classifier); if (_classifier == null) { return; } _classifier.setFeatures(_classifier.getFeatures()); } else if (_target instanceof MParameter) { MBehavioralFeature feature = ((MParameter) _target).getBehavioralFeature(); // // check if we are dealing with a valid parameter... // if (feature == null) { return; } _classifier = (MClassifier) feature.getOwner(); if (_classifier == null) { return; } _classifier.setFeatures(_classifier.getFeatures()); } else if (_target instanceof MCallEvent) { // Argo.log.info("UMLTextField.update()...target = " + _target); } // else // Argo.log.info("UMLTextField.update()else...target = " + _target); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/e880c0ae8a43aa3e3fdd70cec0416ad6de1f956a/UMLTextField.java/buggy/src_new/org/argouml/uml/ui/UMLTextField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
2725,
1435,
95,
780,
1673,
1528,
33,
588,
1528,
5621,
780,
2704,
1528,
33,
67,
4468,
18,
588,
1396,
24899,
3782,
1769,
759,
1211,
3404,
546,
27830,
430,
1814,
21516,
6703,
2080,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
2725,
1435,
95,
780,
1673,
1528,
33,
588,
1528,
5621,
780,
2704,
1528,
33,
67,
4468,
18,
588,
1396,
24899,
3782,
1769,
759,
1211,
3404,
546,
27830,
430,
1814,
21516,
6703,
2080,
49... | ||
if (getChannelDataWatch(getChannel(channel)) != null) { getChannelDataWatch(getChannel(channel)).userAdded(getUser(nickname)); } | if (getChannelDataWatch(getChannel(channel)) != null) { getChannelDataWatch(getChannel(channel)).userAdded(getUser(nickname)); | public void JoinNick(String nickname, String channel) { if (getMyNick().equals(nickname)) { createChannel(channel); } getUser(nickname).getChannelData().put(getChannel(channel), new Integer(0)); getChannel(channel).getAllUsers().add(getUser(nickname)); if (getChannelDataWatch(getChannel(channel)) != null) { getChannelDataWatch(getChannel(channel)).userAdded(getUser(nickname)); } } | 12160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12160/ed0c6eff25b6d7ed992af5a5f7eb4bc086a475ae/InternalDataList.java/clean/rero/src/rero/ircfw/InternalDataList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4214,
29756,
12,
780,
19570,
16,
514,
1904,
13,
565,
288,
3639,
309,
261,
588,
12062,
29756,
7675,
14963,
12,
17091,
529,
3719,
288,
5411,
752,
2909,
12,
4327,
1769,
3639,
289,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4214,
29756,
12,
780,
19570,
16,
514,
1904,
13,
565,
288,
3639,
309,
261,
588,
12062,
29756,
7675,
14963,
12,
17091,
529,
3719,
288,
5411,
752,
2909,
12,
4327,
1769,
3639,
289,... |
protected void processItemEvent(ItemEvent event) { | processItemEvent(ItemEvent event) { | protected void processItemEvent(ItemEvent event) { if (item_listeners != null) item_listeners.itemStateChanged(event); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CheckboxMenuItem.java/clean/core/src/classpath/java/java/awt/CheckboxMenuItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1207,
1180,
1133,
12,
1180,
1133,
871,
13,
288,
202,
202,
430,
261,
1726,
67,
16072,
480,
446,
13,
1082,
202,
1726,
67,
16072,
18,
1726,
1119,
5033,
12,
2575,
1769,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1117,
918,
1207,
1180,
1133,
12,
1180,
1133,
871,
13,
288,
202,
202,
430,
261,
1726,
67,
16072,
480,
446,
13,
1082,
202,
1726,
67,
16072,
18,
1726,
1119,
5033,
12,
2575,
1769,
202,... |
public static void initDefaults(IPreferenceStore store) { // set the default values for the bugzilla server and the // most recent query getCachedData(); store.setDefault(IBugzillaConstants.BUGZILLA_SERVER, IBugzillaConstants.DEFAULT_BUGZILLA_SERVER); store.setDefault(IBugzillaConstants.MOST_RECENT_QUERY, ""); store.setDefault(IBugzillaConstants.SERVER_VERSION, IBugzillaConstants.SERVER_220);// store.setDefault(IBugzillaConstants.IS_218, true); store.setDefault(IBugzillaConstants.REFRESH_QUERY, false); store.setDefault(IBugzillaConstants.MAX_RESULTS, 100); // set the default query options for the bugzilla search setDefaultQueryOptions(); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/b26db65588a080b713dc4a0c9e080a5c53dd7807/BugzillaPreferencePage.java/clean/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugzillaPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1208,
7019,
12,
45,
9624,
2257,
1707,
13,
288,
202,
202,
759,
444,
326,
805,
924,
364,
326,
7934,
15990,
1438,
471,
326,
3196,
202,
759,
4486,
8399,
843,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1208,
7019,
12,
45,
9624,
2257,
1707,
13,
288,
202,
202,
759,
444,
326,
805,
924,
364,
326,
7934,
15990,
1438,
471,
326,
3196,
202,
759,
4486,
8399,
843,
202,
202,
... | ||
catch(final SmackException sx) { sLogger.fatal("Could not accept key request.", sx); return; } catch(ParityException px) { sLogger.fatal("Could not accept key request.", px); return; } | iDModel.auditRecieveKey(document.getId(), loggedInUser.getId(), currentDateTime(), acceptedBy); | static void notifyKeyRequestAccepted(final UUID artifactUniqueId, final JabberId acceptedBy) { final InternalDocumentModel iDModel = DocumentModel.getInternalModel(sContext); try { final Document document = iDModel.get(artifactUniqueId); iDModel.unlock(document.getId()); SystemMessageModel.getInternalModel(sContext). createKeyResponse(document.getId(), Boolean.TRUE, acceptedBy); // audit receive key final User loggedInUser; synchronized(xmppHelperLock) { loggedInUser = xmppHelper.getUser(); } iDModel.auditRecieveKey(document.getId(), loggedInUser.getId(), currentDateTime(), acceptedBy); } catch(final SmackException sx) { sLogger.fatal("Could not accept key request.", sx); return; } catch(ParityException px) { sLogger.fatal("Could not accept key request.", px); return; } } | 53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/eec9cca9b1e474106e990e3fd29d5a0e64ecd467/SessionModelImpl.java/clean/client-model/src/main/java/com/thinkparity/model/parity/model/session/SessionModelImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
918,
5066,
653,
691,
18047,
12,
6385,
5866,
6462,
24174,
16,
1082,
202,
6385,
804,
378,
744,
548,
8494,
858,
13,
288,
202,
202,
6385,
3186,
2519,
1488,
277,
40,
1488,
273,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
5066,
653,
691,
18047,
12,
6385,
5866,
6462,
24174,
16,
1082,
202,
6385,
804,
378,
744,
548,
8494,
858,
13,
288,
202,
202,
6385,
3186,
2519,
1488,
277,
40,
1488,
273,
10... |
if (jj_3R_3()) return true; return false; } | if (jj_3R_3()) return true; return false; } | static final private boolean jj_3_1() { if (jj_3R_3()) return true; return false; } | 7955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7955/4d419924ba8165f1116f4a5eb47273815aff44c0/AnnotationParser.java/clean/backport175/src/main/org/codehaus/backport175/compiler/parser/ast/AnnotationParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
727,
3238,
1250,
10684,
67,
23,
67,
21,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
23,
10756,
327,
638,
31,
565,
327,
629,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
727,
3238,
1250,
10684,
67,
23,
67,
21,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
23,
10756,
327,
638,
31,
565,
327,
629,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,... |
temp.addLine("setSeed " + originalSeed); | public Snapshot getSnapshot(MesquiteFile file) { Snapshot temp = new Snapshot(); temp.addLine("setSeed " + originalSeed); temp.addLine("setNumRealizations " + numRealizations); return temp; } | 56479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56479/b9db0ccf007589f7d283815c9d7225804c828109/SCMCorrelation.java/clean/Source/mesquite/correl/SCMCorrelation/SCMCorrelation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10030,
1322,
2551,
12,
49,
281,
372,
1137,
812,
585,
13,
288,
3196,
202,
4568,
1906,
273,
394,
10030,
5621,
1082,
3196,
202,
5814,
18,
1289,
1670,
2932,
542,
2578,
6955,
7089,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10030,
1322,
2551,
12,
49,
281,
372,
1137,
812,
585,
13,
288,
3196,
202,
4568,
1906,
273,
394,
10030,
5621,
1082,
3196,
202,
5814,
18,
1289,
1670,
2932,
542,
2578,
6955,
7089,
... | |
if (response.getDrawingCanvas() != null) { if (control.getDrawingCanvas() == null) control.setDrawingCanvas(response.getDrawingCanvas()); | control.setDrawingCanvas(response.getDrawingCanvas()); | private void handleDisplayROI(DisplayROI response) { if (response.getDrawingCanvas() != null) { //close window if (control.getDrawingCanvas() == null) control.setDrawingCanvas(response.getDrawingCanvas()); if (presentation == null) buildPresentation(); presentation.deIconify(); } else removePresentation(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/975d69b756654b3d3810faba1b0e148d7fecd46d/ROIAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/ROIAgt.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1640,
4236,
1457,
45,
12,
4236,
1457,
45,
766,
13,
565,
288,
3639,
309,
261,
2740,
18,
588,
26885,
12971,
1435,
480,
446,
13,
288,
368,
4412,
2742,
5411,
309,
261,
7098,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1640,
4236,
1457,
45,
12,
4236,
1457,
45,
766,
13,
565,
288,
3639,
309,
261,
2740,
18,
588,
26885,
12971,
1435,
480,
446,
13,
288,
368,
4412,
2742,
5411,
309,
261,
7098,
18,
... |
new InfoAttributeHandler()); | new InfoAttributeHandler()); | public FileTransferStructureHandler(String queue) { super(); fileTransferQueue = queue; fileTransferStructure = null; //defined later in the startContextElement addHandler(FILE_TRANSFER_COPY_PROTOCOL_TAG, new SingleValueUnmarshaller()); addHandler(FILE_TRANSFER_SRC_INFO_TAG, new InfoAttributeHandler()); addHandler(FILE_TRANSFER_DST_INFO_TAG, new InfoAttributeHandler()); } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/02b74933ab36f3053e665e84b8287cd5fd62e098/ProcessDefinitionHandler.java/clean/src/org/objectweb/proactive/core/descriptor/xml/ProcessDefinitionHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1387,
5912,
6999,
1503,
12,
780,
2389,
13,
288,
7734,
2240,
5621,
7734,
585,
5912,
3183,
273,
2389,
31,
7734,
585,
5912,
6999,
273,
446,
31,
368,
2178,
5137,
316,
326,
787,
1042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1387,
5912,
6999,
1503,
12,
780,
2389,
13,
288,
7734,
2240,
5621,
7734,
585,
5912,
3183,
273,
2389,
31,
7734,
585,
5912,
6999,
273,
446,
31,
368,
2178,
5137,
316,
326,
787,
1042,
... |
if (parent == root || !parent.isRed) | if (!q.isRed) | public final void insertNode(QSortedTreeNode o) { Node node = (Node) o; Node current = (Node) root.child[0]; Node parent = (Node) root; int lastDir = 0; while (current != null) { if (current.value > node.value) lastDir = 0; else lastDir = 1; parent = current; current = (Node) current.child[lastDir]; } // Insert node parent.child[lastDir] = node; node.parent = parent; // Node color is red, so property 3 is preserved. // We must check if property 2 is violated, in which // case our tree has to be rebalanced and/or repainted. // Case 1: root node if (parent == root) { // We enforce root node to be black, this eases // other cases below. logger.debug("Case 1"); node.isRed = false; return; } for (current = node; current != root; ) { parent = (Node) current.parent; // If parent is black, property 2 is preserved, // everything is fine. // Case 2: parent is black if (parent == root || !parent.isRed) { logger.debug("Case 2"); break; } // Parent is red, so it cannot be the root tree, // and grandparent is black. Node grandparent = (Node) parent.parent; assert grandparent != root; if (grandparent.child[0] == parent) lastDir = 0; else lastDir = 1; int sibDir = 1 - lastDir; Node uncle = (Node) grandparent.child[sibDir]; if (isRedNode(uncle)) { // Case 3: uncle is red /* Paint nodes and continue from grandparent gB gR / \ ------> / \ pR uR pB uB \ \ cR cR */ logger.debug("Case 3"); parent.isRed = false; uncle.isRed = false; grandparent.isRed = true; current = grandparent; } else { assert !isRedNode(uncle); if (parent.child[lastDir] != current) { /* Rotate to put red nodes on the same side gB gB / \ ------> / \ pR uB cR uB \ / cR pR */ logger.debug("Case 4"); current = parent; if (lastDir == 0) grandparent.child[0] = parent.rotateL(); else grandparent.child[1] = parent.rotateR(); parent = (Node) current.parent; } /* Rotate on opposite way and recolor. Either uncle is null, or we come from case 3 and current node has 2 black children. gB pB / \ ------> / \ pR uB cR gR / \ / \ / \ cR zB xB yB zB uB / \ xB yB */ assert (uncle == null && parent.child[sibDir] == null && current.child[0] == null && current.child[1] == null) || (uncle != null && parent.child[sibDir] != null && current.child[0] != null && current.child[1] != null); logger.debug("Case 5"); Node greatgrandparent = (Node) grandparent.parent; grandparent.isRed = true; parent.isRed = false; if (greatgrandparent.child[0] == grandparent) lastDir = 0; else lastDir = 1; // lastDir has been modified, so use sibDir here if (sibDir == 1) greatgrandparent.child[lastDir] = grandparent.rotateR(); else greatgrandparent.child[lastDir] = grandparent.rotateL(); break; } } ((Node) root.child[0]).isRed = false; assert isValid(); } | 46701 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46701/aabb0b5f67b561171594de4a3b264eb276b1df17/PRedBlackSortedTree.java/buggy/amibe/src/org/jcae/mesh/amibe/util/PRedBlackSortedTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2243,
907,
12,
53,
11739,
12513,
320,
13,
202,
95,
202,
202,
907,
756,
273,
261,
907,
13,
320,
31,
202,
202,
907,
783,
273,
261,
907,
13,
1365,
18,
3624,
63,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2243,
907,
12,
53,
11739,
12513,
320,
13,
202,
95,
202,
202,
907,
756,
273,
261,
907,
13,
320,
31,
202,
202,
907,
783,
273,
261,
907,
13,
1365,
18,
3624,
63,
20,... |
assertEquals( ((IASTVariable)node.getCompletionContext()).getName(), "b" ); | assertEquals( ((IASTVariable)node.getCompletionContext()).getName(), "b" ); | public void testMemberCompletion_Dot() throws Exception { StringWriter writer = new StringWriter(); writer.write( "class A {" ); writer.write( " public: void aPublicBaseMethod();" ); writer.write( " private: void aPrivateBaseMethod();" ); writer.write( "};" ); writer.write( "class B : public A {" ); writer.write( " public: void aMethod();" ); writer.write( "};" ); writer.write( "void foo(){" ); writer.write( " B b;" ); writer.write( " b. \n" ); String code = writer.toString(); int index = code.indexOf( "b." ); IASTCompletionNode node = parse( code, index + 2 ); assertNotNull(node); assertEquals( node.getCompletionPrefix(), "" ); assertEquals(node.getCompletionKind(), IASTCompletionNode.CompletionKind.MEMBER_REFERENCE); assertTrue(node.getCompletionScope() instanceof IASTFunction ); assertEquals( ((IASTFunction)node.getCompletionScope()).getName(), "foo" ); assertTrue(node.getCompletionContext() instanceof IASTVariable ); assertEquals( ((IASTVariable)node.getCompletionContext()).getName(), "b" ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/d730ff0f947954910a1a59eb5fe977d0983fd23e/CompletionParseTest.java/buggy/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompletionParseTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
4419,
11238,
67,
10412,
1435,
1216,
1185,
202,
95,
202,
202,
780,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
1106,
432,
12528,
11272,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
4419,
11238,
67,
10412,
1435,
1216,
1185,
202,
95,
202,
202,
780,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
1106,
432,
12528,
11272,
202,
... |
rect.x = j; rect.y = i; | r.x = j; r.y = i; | public MapLayer createDiff(MapLayer ml) { if(ml == null) return null; Rectangle rect = new Rectangle(); boolean start=false; for (int i = yOffset; i < heightInTiles + yOffset; i++) { for (int j = xOffset; j < widthInTiles + xOffset; j++) { if (ml.getTileAt(j, i) != getTileAt(j, i)) { if (start) { rect.width = Math.abs(j - rect.x); rect.height = Math.abs(i - rect.y); } else { start = true; rect.x = j; rect.y = i; } } } } MapLayer diff = new MapLayer(rect); diff.copyFrom(ml); return diff; } | 6621 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6621/7290e52726b7f4e4765dd150613f07234a5da5cf/MapLayer.java/buggy/tiled/core/MapLayer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1635,
4576,
752,
5938,
12,
863,
4576,
12931,
13,
288,
1082,
3639,
309,
12,
781,
422,
446,
13,
5411,
327,
446,
31,
3639,
13264,
4917,
273,
394,
13264,
5621,
3639,
1250,
787,
33,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1635,
4576,
752,
5938,
12,
863,
4576,
12931,
13,
288,
1082,
3639,
309,
12,
781,
422,
446,
13,
5411,
327,
446,
31,
3639,
13264,
4917,
273,
394,
13264,
5621,
3639,
1250,
787,
33,
57... |
public double jsFunction_getDate() { | private double jsFunction_getDate() { | public double jsFunction_getDate() { if (this.date != this.date) return this.date; return DateFromTime(LocalTime(this.date)); } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/5af1999afa2517f3fdd455bd42c304be785b5b59/NativeDate.java/buggy/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1645,
3828,
2083,
67,
588,
1626,
1435,
288,
3639,
309,
261,
2211,
18,
712,
480,
333,
18,
712,
13,
5411,
327,
333,
18,
712,
31,
3639,
327,
2167,
1265,
950,
12,
2042,
950,
12,
221... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1645,
3828,
2083,
67,
588,
1626,
1435,
288,
3639,
309,
261,
2211,
18,
712,
480,
333,
18,
712,
13,
5411,
327,
333,
18,
712,
31,
3639,
327,
2167,
1265,
950,
12,
2042,
950,
12,
221... |
myExpectation.addActual("B"); myExpectation.addActual("A"); | myExpectation.addActual("B"); myExpectation.addActual("A"); | public void testUnsorted() { myExpectation.addExpected("A"); myExpectation.addExpected("B"); myExpectation.addActual("B"); myExpectation.addActual("A"); myExpectation.verify(); } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/4aaf60d8fa76687c3492c508dd98678fbbd3d935/ExpectationSetTest.java/buggy/jmock/core/src/test/jmock/expectation/ExpectationSetTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
984,
10350,
1435,
288,
3639,
3399,
11988,
367,
18,
1289,
6861,
2932,
37,
8863,
3639,
3399,
11988,
367,
18,
1289,
6861,
2932,
38,
8863,
3639,
3399,
11988,
367,
18,
1289,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
984,
10350,
1435,
288,
3639,
3399,
11988,
367,
18,
1289,
6861,
2932,
37,
8863,
3639,
3399,
11988,
367,
18,
1289,
6861,
2932,
38,
8863,
3639,
3399,
11988,
367,
18,
1289,
1... |
if (left instanceof JThisExpression) | if (left instanceof JThisExpression) { | public Object visitFieldExpression(JFieldAccessExpression self, JExpression left, String ident) { //if this field access is just a this expression, convert it //to a local variable access //otherwise it is accessing a field of a variable, so just //keep the name, it does not matter what it is... if (left instanceof JThisExpression) return new JLocalVariableExpression(null, getVarDef(ident)); else return self; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/17c5595e1d433b1d0b6bc49054e53474ae5d940a/RemoveGlobals.java/buggy/streams/src/at/dms/kjc/raw/RemoveGlobals.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3757,
974,
2300,
12,
46,
974,
1862,
2300,
365,
16,
25083,
282,
804,
2300,
2002,
16,
25083,
282,
514,
3390,
13,
202,
95,
202,
565,
368,
430,
333,
652,
2006,
353,
2537,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
974,
2300,
12,
46,
974,
1862,
2300,
365,
16,
25083,
282,
804,
2300,
2002,
16,
25083,
282,
514,
3390,
13,
202,
95,
202,
565,
368,
430,
333,
652,
2006,
353,
2537,
... |
Logger.minor(this, "Lost connection to source"); | Logger.minor(this, "Lost connection to source on "+uid); | private void realRun() { runThread = Thread.currentThread(); // Send Accepted Message accepted = DMT.createFNPSSKAccepted(uid, pubKey == null); try { source.send(accepted); } catch (NotConnectedException e1) { Logger.minor(this, "Lost connection to source"); return; } if(pubKey == null) { // Wait for pub key Logger.minor(this, "Waiting for pubkey on "+uid); MessageFilter mfPK = MessageFilter.create().setType(DMT.FNPSSKPubKey).setField(DMT.UID, uid).setSource(source).setTimeout(PUBKEY_TIMEOUT); try { Message pk = node.usm.waitFor(mfPK); if(pk == null) { Logger.normal(this, "Failed to receive FNPSSKPubKey for "+uid); return; } byte[] pubkeyAsBytes = ((ShortBuffer)pk.getObject(DMT.PUBKEY_AS_BYTES)).getData(); try { pubKey = new DSAPublicKey(pubkeyAsBytes); Logger.minor(this, "Got pubkey on "+uid); } catch (IOException e) { Logger.error(this, "Invalid pubkey from "+source+" on "+uid); Message msg = DMT.createFNPDataInsertRejected(uid, DMT.DATA_INSERT_REJECTED_SSK_ERROR); try { source.send(msg); } catch (NotConnectedException ee) { // Ignore } return; } } catch (DisconnectedException e) { Logger.minor(this, "Lost connection to source"); return; } } // Now we have the data, the headers and the pubkey. Commit it. try { key.setPubKey(pubKey); block = new SSKBlock(data, headers, key, false); } catch (SSKVerifyException e1) { Logger.error(this, "Invalid SSK from "+source, e1); Message msg = DMT.createFNPDataInsertRejected(uid, DMT.DATA_INSERT_REJECTED_SSK_ERROR); try { source.send(msg); } catch (NotConnectedException e) { // Ignore } return; } Logger.minor(this, "Committed SSK "+key+" for "+uid); if(htl == 0) { Message msg = DMT.createFNPInsertReply(uid); sentSuccess = true; try { source.send(msg); } catch (NotConnectedException e) { // Ignore } canCommit = true; finish(); return; } if(htl > 0) sender = node.makeInsertSender(block, htl, uid, source, false, closestLoc, true); boolean receivedRejectedOverload = false; while(true) { synchronized(sender) { try { if(sender.getStatus() == SSKInsertSender.NOT_FINISHED) sender.wait(5000); } catch (InterruptedException e) { // Ignore } } if((!receivedRejectedOverload) && sender.receivedRejectedOverload()) { receivedRejectedOverload = true; // Forward it Message m = DMT.createFNPRejectedOverload(uid, false); try { source.send(m); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } } if(sender.hasRecentlyCollided()) { // Forward collision data = sender.getData(); headers = sender.getHeaders(); try { block = new SSKBlock(data, headers, key, true); } catch (SSKVerifyException e1) { // Is verified elsewhere... throw new Error("Impossible: "+e1); } Message msg = DMT.createFNPSSKDataFound(uid, headers, data); try { source.send(msg); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } } int status = sender.getStatus(); if(status == CHKInsertSender.NOT_FINISHED) { continue; } // Local RejectedOverload's (fatal). // Internal error counts as overload. It'd only create a timeout otherwise, which is the same thing anyway. // We *really* need a good way to deal with nodes that constantly R_O! if(status == SSKInsertSender.TIMED_OUT || status == SSKInsertSender.GENERATED_REJECTED_OVERLOAD || status == SSKInsertSender.INTERNAL_ERROR) { Message msg = DMT.createFNPRejectedOverload(uid, true); try { source.send(msg); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } // Might as well store it anyway. if(status == CHKInsertSender.TIMED_OUT || status == CHKInsertSender.GENERATED_REJECTED_OVERLOAD) canCommit = true; finish(); return; } if(status == CHKInsertSender.ROUTE_NOT_FOUND || status == CHKInsertSender.ROUTE_REALLY_NOT_FOUND) { Message msg = DMT.createFNPRouteNotFound(uid, sender.getHTL()); try { source.send(msg); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } canCommit = true; finish(); return; } if(status == CHKInsertSender.SUCCESS) { Message msg = DMT.createFNPInsertReply(uid); sentSuccess = true; try { source.send(msg); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection to source"); return; } canCommit = true; finish(); return; } // Otherwise...? Logger.error(this, "Unknown status code: "+sender.getStatusString()); Message msg = DMT.createFNPRejectedOverload(uid, true); try { source.send(msg); } catch (NotConnectedException e) { // Ignore } finish(); return; } } | 50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/a839bffed82942d395781554f67a6c363866f5a4/SSKInsertHandler.java/clean/src/freenet/node/SSKInsertHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2863,
1997,
1435,
288,
3639,
1086,
3830,
273,
4884,
18,
2972,
3830,
5621,
7734,
368,
2479,
8662,
329,
3639,
2350,
8494,
273,
463,
6152,
18,
2640,
19793,
52,
1260,
47,
18047,
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,
2863,
1997,
1435,
288,
3639,
1086,
3830,
273,
4884,
18,
2972,
3830,
5621,
7734,
368,
2479,
8662,
329,
3639,
2350,
8494,
273,
463,
6152,
18,
2640,
19793,
52,
1260,
47,
18047,
12... |
MessageContainer response = servlet.service(next); | Mail response = servlet.service(next); | public void run() { logger.log("run JamesSpoolManager", "JAMES", logger.INFO); String key; Vector unprocessed = new Vector(servlets.size() + 1, 2); unprocessed.setSize(servlets.size() + 1); GenericMailServlet errorServlet = (GenericMailServlet) servlets.elementAt(servlets.size() - 1); Stack errors = new Stack(); while(true) { try { key = spool.accept(); MessageContainer mc = spool.retrieve(key); logger.log("==== Begin processing mail " + mc.getMessageId() + " ====", "JAMES", logger.INFO); unprocessed.insertElementAt(mc, 0);// ---- Reactor begin ---- printPipe(unprocessed); for (int i = 0; true ; i++) { logger.log("===== i = " + i + " =====", "JAMES", logger.DEBUG); MessageContainer next = (MessageContainer) unprocessed.elementAt(i); if (!isEmpty(next)) { split(unprocessed, i, (String) servletMatchs.elementAt(i)); logger.log("--- after split (" + i + ")---", "JAMES", logger.DEBUG); printPipe(unprocessed); } else { try { do { next = (MessageContainer) unprocessed.elementAt(--i); } while (isEmpty(next)); } catch (ArrayIndexOutOfBoundsException emptyPipe) { break; } GenericMailServlet servlet = (GenericMailServlet) servlets.elementAt(i); MessageContainer response = servlet.service(next); if (response == null) { unprocessed.setElementAt(null, i + 1); } else if (response.getState() == MessageContainer.ERROR) { errorServlet.service(response); unprocessed.setElementAt(null, i + 1); } else if (response.getRecipients().isEmpty()) { unprocessed.setElementAt(null, i + 1); } else { unprocessed.setElementAt(response, i + 1); } unprocessed.setElementAt(null, i); logger.log("--- after service (" + i + ")---", "JAMES", logger.DEBUG); printPipe(unprocessed); } }// ---- Reactor end ---- spool.remove(key); logger.log("==== Removed from spool mail " + mc.getMessageId() + " ====", "JAMES", logger.INFO); } catch (Exception e) { logger.log("Exception in JamesSpoolManager.run " + e.getMessage(), "JAMES", logger.ERROR); e.printStackTrace(); } } } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/47e1f1dd324aaa19b69c89398ecab34856a55c89/JamesSpoolManager.java/buggy/trunk/src/org/apache/james/james/JamesSpoolManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
1194,
18,
1330,
2932,
2681,
804,
753,
3389,
1371,
1318,
3113,
315,
46,
1642,
55,
3113,
1194,
18,
5923,
1769,
3639,
514,
498,
31,
3639,
5589,
26663,
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,
1086,
1435,
288,
3639,
1194,
18,
1330,
2932,
2681,
804,
753,
3389,
1371,
1318,
3113,
315,
46,
1642,
55,
3113,
1194,
18,
5923,
1769,
3639,
514,
498,
31,
3639,
5589,
26663,
273,
... |
JOptionPane.showMessageDialog(null, message, "Unavailable extension", JOptionPane.ERROR_MESSAGE); runExit(); } | animator.stop(); System.exit(0); } | public void run() { JOptionPane.showMessageDialog(null, message, "Unavailable extension", JOptionPane.ERROR_MESSAGE); runExit(); } | 6783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6783/69ca977ccf8d329cd72dced5ebb92501da460561/VertexArrayRange.java/buggy/src/demos/vertexArrayRange/VertexArrayRange.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
1086,
1435,
288,
5411,
804,
1895,
8485,
18,
4500,
1079,
6353,
12,
2011,
16,
883,
16,
315,
11333,
2710,
3113,
804,
1895,
8485,
18,
3589,
67,
8723,
1769,
5411,
1086,
6767,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6647,
1071,
918,
1086,
1435,
288,
5411,
804,
1895,
8485,
18,
4500,
1079,
6353,
12,
2011,
16,
883,
16,
315,
11333,
2710,
3113,
804,
1895,
8485,
18,
3589,
67,
8723,
1769,
5411,
1086,
6767,
5621,... |
toolBar.add(button = new JButton("Step Out")); | button = stepOutButton = new JButton("Step Out"); | void init() { setJMenuBar(menubar = new Menubar(this)); toolBar = new JToolBar(); JButton button; toolBar.add(button = new JButton("Break")); JButton focusButton = button; button.setToolTipText("Break"); button.setActionCommand("Break"); button.addActionListener(menubar); button.setEnabled(true); toolBar.add(button = new JButton("Go")); button.setToolTipText("Go"); button.setActionCommand("Go"); button.addActionListener(menubar); button.setEnabled(false); toolBar.add(button = new JButton("Step Into")); button.setToolTipText("Step Into"); button.setActionCommand("Step Into"); button.addActionListener(menubar); button.setEnabled(false); toolBar.add(button = new JButton("Step Over")); button.setToolTipText("Step Over"); button.setActionCommand("Step Over"); button.setEnabled(false); button.addActionListener(menubar); toolBar.add(button = new JButton("Step Out")); button.setToolTipText("Step Out"); button.setActionCommand("Step Out"); button.setEnabled(false); button.addActionListener(menubar); //toolBar.add(button = new JButton(new String("Run to Cursor"))); //button.setToolTipText("Run to Cursor"); //button.setActionCommand("Run to Cursor"); //button.setEnabled(false); //button.addActionListener(menubar); JPanel contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); getContentPane().add(toolBar, BorderLayout.NORTH); getContentPane().add(contentPane, BorderLayout.CENTER); desk = new JDesktopPane(); desk.setPreferredSize(new Dimension(600, 300)); desk.setMinimumSize(new Dimension(150, 50)); desk.add(console = new JSInternalConsole("JavaScript Console")); context = new ContextWindow(this); context.setPreferredSize(new Dimension(600, 120)); context.setMinimumSize(new Dimension(50, 50)); split1 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, desk, context); split1.setOneTouchExpandable(true); JSDebugger.setResizeWeight(split1, 0.66); contentPane.add(split1, BorderLayout.CENTER); statusBar = new JLabel(); statusBar.setText("Thread: "); contentPane.add(statusBar, BorderLayout.SOUTH); dlg = new JFileChooser(); javax.swing.filechooser.FileFilter filter = new javax.swing.filechooser.FileFilter() { public boolean accept(File f) { if(f.isDirectory()) { return true; } String n = f.getName(); int i = n.lastIndexOf('.'); if(i > 0 && i < n.length() -1) { String ext = n.substring(i + 1).toLowerCase(); if(ext.equals("js")) { return true; } } return false; } public String getDescription() { return "JavaScript Files (*.js)"; } }; dlg.addChoosableFileFilter(filter); final JSDebugger self = this; addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { self.Exit(); } }); } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/a867dbf67d847db4781713a5cd7fbd592d310b36/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1208,
1435,
288,
202,
542,
46,
4599,
5190,
12,
27617,
373,
297,
273,
394,
490,
275,
373,
297,
12,
2211,
10019,
202,
6738,
5190,
273,
394,
804,
6364,
5190,
5621,
202,
46,
3616,
3568... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1208,
1435,
288,
202,
542,
46,
4599,
5190,
12,
27617,
373,
297,
273,
394,
490,
275,
373,
297,
12,
2211,
10019,
202,
6738,
5190,
273,
394,
804,
6364,
5190,
5621,
202,
46,
3616,
3568... |
public ProducerDelegate createProducerDelegate(Destination jmsDestination) throws JBossJMSException { // look-up destination DestinationManager dm = serverPeer.getDestinationManager(); AbstractDestination destination = null; try { destination = dm.getDestination(jmsDestination); } catch(Exception e) { throw new JBossJMSException("Cannot map destination " + jmsDestination, e); } log.debug("got producer's destination: " + destination); // create the dynamic proxy that implements ProducerDelegate ProducerDelegate pd = null; Serializable oid = serverPeer.getProducerAdvisor().getName(); String stackName = "ProducerStack"; AdviceStack stack = AspectManager.instance().getAdviceStack(stackName); // TODO why do I need to the advisor to create the interceptor stack? Interceptor[] interceptors = stack.createInterceptors(serverPeer.getProducerAdvisor(), null); // TODO: The ConnectionFactoryDelegate and ConnectionDelegate share the same locator (TCP/IP connection?). Performance? JMSInvocationHandler h = new JMSInvocationHandler(interceptors); String producerID = generateProducerID(); SimpleMetaData metadata = new SimpleMetaData(); // TODO: The ConnectionFactoryDelegate and ConnectionDelegate share the same locator (TCP/IP connection?). Performance? metadata.addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, oid, PayloadKey.AS_IS); metadata.addMetaData(InvokerInterceptor.REMOTING, InvokerInterceptor.INVOKER_LOCATOR, serverPeer.getLocator(), PayloadKey.AS_IS); metadata.addMetaData(InvokerInterceptor.REMOTING, InvokerInterceptor.SUBSYSTEM, "JMS", PayloadKey.AS_IS); // TODO: Is this really necessary? Can't I just use the producerID? metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.CLIENT_ID, connectionEndpoint.getClientID(), PayloadKey.AS_IS); metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.SESSION_ID, sessionID, PayloadKey.AS_IS); metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.PRODUCER_ID, producerID, PayloadKey.AS_IS); h.getMetaData().mergeIn(metadata); // TODO ClassLoader loader = getClass().getClassLoader(); Class[] interfaces = new Class[] { ProducerDelegate.class }; pd = (ProducerDelegate)Proxy.newProxyInstance(loader, interfaces, h); // create the corresponding "server-side" ProducerDelegate and register it with this // SessionDelegate instance ServerProducerDelegate spd = new ServerProducerDelegate(producerID, destination, jmsDestination, this); putProducerDelegate(producerID, spd); log.debug("created producer delegate (producerID=" + producerID + ")"); return pd; } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/ab698b865a8e3d17c97393b6deb426d8cf8652c9/ServerSessionDelegate.java/clean/src/main/org/jboss/jms/delegate/ServerSessionDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
21123,
9586,
752,
12140,
9586,
12,
5683,
23007,
5683,
13,
540,
1216,
804,
38,
8464,
46,
3537,
503,
282,
288,
1377,
368,
2324,
17,
416,
2929,
1377,
10691,
1318,
9113,
273,
1438,
6813... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
21123,
9586,
752,
12140,
9586,
12,
5683,
23007,
5683,
13,
540,
1216,
804,
38,
8464,
46,
3537,
503,
282,
288,
1377,
368,
2324,
17,
416,
2929,
1377,
10691,
1318,
9113,
273,
1438,
6813... | ||
Label label = new Label(exclusionControl, SWT.LEFT); | Label label = new Label(composite, SWT.LEFT); | private void createExclusionFilterControl(Composite parent) { Group exclusionControl = new Group(parent, SWT.SHADOW_ETCHED_IN); exclusionControl.setLayout(new GridLayout(1, false)); exclusionControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); exclusionControl.setText("Interest Filter"); Label label = new Label(exclusionControl, SWT.LEFT); label.setText("Exclusion pattern, matches will always be shown (e.g. build*.xml):"); exclusionFieldEditor = new StringFieldEditor("", "", StringFieldEditor.UNLIMITED, exclusionControl); String text = getPreferenceStore().getString(MylarUiPrefContstants.INTEREST_FILTER_EXCLUSION); if (text != null) exclusionFieldEditor.setStringValue(text); return; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/28c183c87074736e91acdcd5959fbf3f9fdba4e2/MylarPreferencePage.java/buggy/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/ui/preferences/MylarPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
424,
15335,
1586,
3367,
12,
9400,
982,
13,
288,
202,
202,
1114,
21244,
3367,
273,
394,
3756,
12,
2938,
16,
348,
8588,
18,
2664,
1880,
7306,
67,
9235,
2056,
67,
706,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
424,
15335,
1586,
3367,
12,
9400,
982,
13,
288,
202,
202,
1114,
21244,
3367,
273,
394,
3756,
12,
2938,
16,
348,
8588,
18,
2664,
1880,
7306,
67,
9235,
2056,
67,
706,... |
String s = new String(buf, offset, len); | public void characters(char buf[], int offset, int len) throws SAXException { String s = new String(buf, offset, len); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/be97d27fa9a1c63d6b24e560d768f83b9ecaafcc/CreatureXMLLoader.java/buggy/src/games/stendhal/server/rule/defaultruleset/CreatureXMLLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3949,
12,
3001,
1681,
63,
6487,
509,
1384,
16,
509,
562,
13,
1216,
14366,
565,
288,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3949,
12,
3001,
1681,
63,
6487,
509,
1384,
16,
509,
562,
13,
1216,
14366,
565,
288,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
appendByte( ( byte ) ( ( l >> 0 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 8 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 16 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 24 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 32 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 40 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 48 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 56 ) & 0xff ) ); | appendByte((byte) ((l >> 0) & 0xff)); appendByte((byte) ((l >> 8) & 0xff)); appendByte((byte) ((l >> 16) & 0xff)); appendByte((byte) ((l >> 24) & 0xff)); appendByte((byte) ((l >> 32) & 0xff)); appendByte((byte) ((l >> 40) & 0xff)); appendByte((byte) ((l >> 48) & 0xff)); appendByte((byte) ((l >> 56) & 0xff)); | public void appendFlt8( Double value ) throws java.io.IOException { long l = Double.doubleToLongBits( value.doubleValue() ); appendByte( ( byte ) ( ( l >> 0 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 8 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 16 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 24 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 32 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 40 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 48 ) & 0xff ) ); appendByte( ( byte ) ( ( l >> 56 ) & 0xff ) ); } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/8552aa9a2df546b4d1977c587b04556c7b854ab4/TdsComm.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/TdsComm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
714,
2340,
88,
28,
12,
3698,
460,
262,
2398,
1216,
2252,
18,
1594,
18,
14106,
565,
288,
3639,
1525,
328,
273,
3698,
18,
9056,
30220,
6495,
12,
460,
18,
9056,
620,
1435,
11272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
714,
2340,
88,
28,
12,
3698,
460,
262,
2398,
1216,
2252,
18,
1594,
18,
14106,
565,
288,
3639,
1525,
328,
273,
3698,
18,
9056,
30220,
6495,
12,
460,
18,
9056,
620,
1435,
11272... |
else if (name.equals(Constants.DOM_WHITESPACE_IN_ELEMENT_CONTENT) && state == Boolean.FALSE) { return false; } else if (name.equals(Constants.DOM_CANONICAL_FORM) && state == Boolean.TRUE) { return false; } else if (name.equals(Constants.DOM_FORMAT_PRETTY_PRINT) && state == Boolean.TRUE) { return false; } else if (serializer.fFeatures.get(name)!=null || name.equals(Constants.DOM_ERROR_HANDLER)){ return true; } | public boolean canSetParameter(String name, Object state) { if (name.equals(Constants.DOM_NORMALIZE_CHARACTERS) && state == Boolean.TRUE){ return false; } else if (name.equals(Constants.DOM_VALIDATE) && state == Boolean.TRUE) { return false; } else if (name.equals(Constants.DOM_WHITESPACE_IN_ELEMENT_CONTENT) && state == Boolean.FALSE) { return false; } else if (name.equals(Constants.DOM_CANONICAL_FORM) && state == Boolean.TRUE) { return false; } else if (name.equals(Constants.DOM_FORMAT_PRETTY_PRINT) && state == Boolean.TRUE) { return false; } else if (serializer.fFeatures.get(name)!=null || name.equals(Constants.DOM_ERROR_HANDLER)){ return true; } return false; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/8eddf8658a4037adbc5f580f1e045a2d978fde56/DOMWriterImpl.java/buggy/src/org/apache/xml/serialize/DOMWriterImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
694,
1662,
12,
780,
508,
16,
1033,
919,
13,
288,
202,
202,
430,
261,
529,
18,
14963,
12,
2918,
18,
8168,
67,
15480,
15641,
67,
7305,
6526,
11367,
13,
1875,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
694,
1662,
12,
780,
508,
16,
1033,
919,
13,
288,
202,
202,
430,
261,
529,
18,
14963,
12,
2918,
18,
8168,
67,
15480,
15641,
67,
7305,
6526,
11367,
13,
1875,
202,
1... | |
private static void clearModifiers(List modifiers, | private static void clearModifiers(List<String> modifiers, | private static void clearModifiers(List modifiers, PsiModifierList modifierList) { for (Iterator iterator = modifiers.iterator(); iterator.hasNext();) { final String modifier = (String) iterator.next(); try { modifierList.setModifierProperty(modifier, false); } catch (IncorrectOperationException e) { s_logger.error(e); } } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/2d46d291193579a7564649b4881c7ea8e02eda5b/MissortedModifiersInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/style/MissortedModifiersInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
760,
918,
2424,
11948,
12,
682,
32,
780,
34,
10429,
16,
4766,
6647,
453,
7722,
9829,
682,
9606,
682,
13,
288,
5411,
364,
261,
3198,
2775,
273,
10429,
18,
9838,
5621,
2775,
18,
533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
918,
2424,
11948,
12,
682,
32,
780,
34,
10429,
16,
4766,
6647,
453,
7722,
9829,
682,
9606,
682,
13,
288,
5411,
364,
261,
3198,
2775,
273,
10429,
18,
9838,
5621,
2775,
18,
533... |
if (initialNames[agentIndex] == null) { logger.warning("Required name attribute missing, ignoring agent"); continue; } | public TankSoarSimulation(String settingsFile, boolean quiet, boolean noRandom) { super(noRandom, true); String [] initialNames = new String[0]; String [] initialProductions = new String[0]; String [] initialColors = new String[0]; java.awt.Point [] initialLocations = new java.awt.Point[0]; String [] initialFacing = new String[0]; int [] initialEnergy = new int[0]; int [] initialHealth = new int[0]; int [] initialMissiles = new int[0]; setWinningScore(50); setDefaultMap(kDefaultMap); // Load settings file ElementXML rootTag = ElementXML.ParseXMLFromFile(settingsFile); if (rootTag == null) { fireErrorMessageSevere("Error parsing file: " + ElementXML.GetLastParseErrorDescription()); shutdown(); System.exit(1); } if (rootTag.IsTag(kTagTankSoar)) { ElementXML mainTag = null; for (int rootTagIndex = 0 ; rootTagIndex < rootTag.GetNumberChildren() ; ++rootTagIndex) { mainTag = new ElementXML(); rootTag.GetChild(mainTag, rootTagIndex); if (mainTag == null) { assert false; continue; } if (mainTag.IsTag(kTagSimulation)) { for (int attrIndex = 0; attrIndex < mainTag.GetNumberAttributes(); ++attrIndex) { String attribute = mainTag.GetAttributeName(attrIndex); if (attribute == null) { assert false; continue; } String value = mainTag.GetAttributeValue(attrIndex); if (value == null) { assert false; continue; } if (attribute.equalsIgnoreCase(kParamDebuggers)) { if (value.equalsIgnoreCase(kFalse)) { setSpawnDebuggers(false); } } else if (attribute.equalsIgnoreCase(kParamDefaultMap)) { setDefaultMap(value); if (logger.isLoggable(Level.FINE)) logger.fine("Default map: " + value); } else if (attribute.equalsIgnoreCase(kParamRuns)) { setRuns(Integer.parseInt(value)); } else if (attribute.equalsIgnoreCase(kParamMaxUpdates)) { setMaxUpdates(Integer.parseInt(value)); } else if (attribute.equalsIgnoreCase(kParamWinningScore)) { setWinningScore(Integer.parseInt(value)); } } } else if (mainTag.IsTag(kTagAgents)) { ElementXML agentTag = null; int children = mainTag.GetNumberChildren(); if (children > 7) { // BADBAD: this is not the best way to deal with this. fireErrorMessageSevere("Too many agents in settings file!"); shutdown(); System.exit(1); } initialNames = new String[children]; initialProductions = new String[children]; initialColors = new String[children]; initialLocations = new java.awt.Point[children]; initialFacing = new String[children]; initialEnergy = new int[children]; initialHealth = new int[children]; initialMissiles = new int[children]; for (int agentIndex = 0 ; agentIndex < children; ++agentIndex) { agentTag = new ElementXML(); mainTag.GetChild(agentTag, agentIndex); if (agentTag == null) { assert false; continue; } if (agentTag.IsTag(kTagAgent)) { int x = -1; int y = -1; initialEnergy[agentIndex] = -1; initialHealth[agentIndex] = -1; initialMissiles[agentIndex] = -1; for (int attrIndex = 0; attrIndex < agentTag.GetNumberAttributes(); ++attrIndex) { String attribute = agentTag.GetAttributeName(attrIndex); if (attribute == null) { assert false; continue; } String value = agentTag.GetAttributeValue(attrIndex); if (value == null) { assert false; continue; } if (attribute.equalsIgnoreCase(kParamName)) { initialNames[agentIndex] = value; } else if (attribute.equalsIgnoreCase(kParamProductions)) { initialProductions[agentIndex] = getAgentPath() + value; // Next two lines kind of a hack. Convert / to \\ on windows, and vice versa if (System.getProperty("file.separator").equalsIgnoreCase("\\")) { initialProductions[agentIndex] = initialProductions[agentIndex].replaceAll("/", "\\\\"); } else if (System.getProperty("file.separator").equalsIgnoreCase("/")) { initialProductions[agentIndex] = initialProductions[agentIndex].replaceAll("\\\\", "/"); } } else if (attribute.equalsIgnoreCase(kParamProductionsAbsolute)) { initialProductions[agentIndex] = value; // Next two lines kind of a hack. Convert / to \\ on windows, and vice versa if (System.getProperty("file.separator").equalsIgnoreCase("\\")) { initialProductions[agentIndex] = initialProductions[agentIndex].replaceAll("/", "\\\\"); } else if (System.getProperty("file.separator").equalsIgnoreCase("/")) { initialProductions[agentIndex] = initialProductions[agentIndex].replaceAll("\\\\", "/"); } } else if (attribute.equalsIgnoreCase(kParamColor)) { initialColors[agentIndex] = value; } else if (attribute.equalsIgnoreCase(kParamX)) { x = Integer.parseInt(value); } else if (attribute.equalsIgnoreCase(kParamY)) { y = Integer.parseInt(value); } else if (attribute.equalsIgnoreCase(kParamFacing)) { initialFacing[agentIndex] = value; } else if (attribute.equalsIgnoreCase(kParamEnergy)) { initialEnergy[agentIndex] = Integer.parseInt(value); } else if (attribute.equalsIgnoreCase(kParamHealth)) { initialHealth[agentIndex] = Integer.parseInt(value); } else if (attribute.equalsIgnoreCase(kParamMissiles)) { initialMissiles[agentIndex] = Integer.parseInt(value); } } if (initialNames[agentIndex] == null) { logger.warning("Required name attribute missing, ignoring agent"); continue; } initialLocations[agentIndex] = new java.awt.Point(x, y); } else { logger.warning("Unknown tag: " + agentTag.GetTagName()); } agentTag.delete(); agentTag = null; } } else { logger.warning("Unknown tag: " + mainTag.GetTagName()); } mainTag.delete(); mainTag = null; } } else { logger.warning("Unknown tag: " + rootTag.GetTagName()); fireErrorMessageWarning("No root eaters tag."); } rootTag.ReleaseRefOnHandle(); rootTag = null; setCurrentMap(getMapPath() + getDefaultMap()); // Load default world m_World = new TankSoarWorld(this, quiet); setWorldManager(m_World); resetSimulation(false); // add initial tanks for (int i = 0; i < initialNames.length; ++i) { if (initialNames[i] == null) { continue; } createEntity(initialNames[i], initialProductions[i], initialColors[i], initialLocations[i], initialFacing[i], initialEnergy[i], initialHealth[i], initialMissiles[i]); } // if in quiet mode, run! if (quiet) { if (m_World.getTanks() == null || m_World.getTanks().length == 0) { super.fireErrorMessageSevere("Quiet mode started with no tanks!"); shutdown(); return; } if (m_World.getTanks().length == 1) { super.fireErrorMessageSevere("Quiet mode started with only one tank!"); shutdown(); return; } if (logger.isLoggable(Level.FINER)) logger.finer("Quiet mode execution starting."); startSimulation(false); shutdown(); } } | 47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/29d33d43cdd6e35077edbb7060f197f3c19b50af/TankSoarSimulation.java/clean/SoarSuite/Environments/JavaTankSoar/source/tanksoar/TankSoarSimulation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
2304,
10225,
297,
18419,
12,
780,
1947,
812,
16,
1250,
10902,
16,
1250,
1158,
8529,
13,
288,
9506,
202,
9565,
12,
2135,
8529,
16,
638,
1769,
9506,
202,
780,
5378,
2172,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
2304,
10225,
297,
18419,
12,
780,
1947,
812,
16,
1250,
10902,
16,
1250,
1158,
8529,
13,
288,
9506,
202,
9565,
12,
2135,
8529,
16,
638,
1769,
9506,
202,
780,
5378,
2172,
1... | |
bestTokenMap = new HashMap(); | bestTokenMap = new HashMap<Object,Object>(); | protected void localStart() { SearchGraph searchGraph = linguist.getSearchGraph(); currentFrameNumber = 0; curTokensScored.value = 0; skewMap = new HashMap(); numStateOrder = searchGraph.getNumStateOrder(); activeListManager.setNumStateOrder(numStateOrder); if (buildWordLattice) { loserManager = new AlternateHypothesisManager(maxLatticeEdges); } SearchState state = searchGraph.getInitialState(); activeList = activeListManager.getEmittingList(); activeList.add(new Token(state, currentFrameNumber)); resultList = new LinkedList(); bestTokenMap = new HashMap(); growBranches(); growNonEmittingLists(); // tokenTracker.setEnabled(false); // tokenTracker.startUtterance(); } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/0b8eaa69d3b447e31f696846972bf0f1559a096f/WordPruningBreadthFirstSearchManager.java/buggy/src/sphinx4/edu/cmu/sphinx/decoder/search/WordPruningBreadthFirstSearchManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1191,
1685,
1435,
288,
3639,
5167,
4137,
1623,
4137,
273,
328,
14344,
376,
18,
588,
2979,
4137,
5621,
3639,
783,
3219,
1854,
273,
374,
31,
3639,
662,
5157,
7295,
72,
18,
1132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1191,
1685,
1435,
288,
3639,
5167,
4137,
1623,
4137,
273,
328,
14344,
376,
18,
588,
2979,
4137,
5621,
3639,
783,
3219,
1854,
273,
374,
31,
3639,
662,
5157,
7295,
72,
18,
1132,
... |
if(min == null) { this.appliedConstraints.remove( MIN_CONSTRAINT ); return; } | if(min == null) { this.appliedConstraints.remove( MIN_CONSTRAINT ); return; } | public void setMin(Comparable min) { if(min == null) { this.appliedConstraints.remove( MIN_CONSTRAINT ); return; } if(!propertyType.equals( min.getClass() )) { throw new MissingPropertyException(MIN_CONSTRAINT,propertyType); } Range r = getRange(); if(r != null) { LOG.warn("Range constraint already set ignoring constraint ["+MIN_CONSTRAINT+"] for value ["+min+"]"); return; } Constraint c = (MinConstraint)this.appliedConstraints.get( MIN_CONSTRAINT ); if(c != null) { c.setParameter(min); } else { c = new MinConstraint(); c.setOwningClass(this.owningClass); c.setPropertyName(this.propertyName); c.setParameter(min); this.appliedConstraints.put( MIN_CONSTRAINT, c ); } } | 51763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51763/975905c7e8c55e5fe91c94dc583c4269318ca341/ConstrainedProperty.java/buggy/src/commons/org/codehaus/groovy/grails/validation/ConstrainedProperty.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
27724,
12,
799,
10207,
1131,
13,
288,
202,
202,
430,
12,
1154,
422,
446,
13,
288,
1082,
202,
2211,
18,
438,
3110,
4878,
18,
4479,
12,
6989,
67,
15199,
11272,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
27724,
12,
799,
10207,
1131,
13,
288,
202,
202,
430,
12,
1154,
422,
446,
13,
288,
1082,
202,
2211,
18,
438,
3110,
4878,
18,
4479,
12,
6989,
67,
15199,
11272,
1082,
202,
... |
Enumeration en = incomingMoveSub.getAddedList(); | Enumeration en = incomingControlSub.getAddedList(); | protected void execute() { if (isNode) { return; } if (log.isDebugEnabled()) { log.debug("Execute"); } if (incomingMoveSub.hasChanged()) { // additions Enumeration en = incomingMoveSub.getAddedList(); while (en.hasMoreElements()) { AgentMove inMove = (AgentMove) en.nextElement(); addedIncomingMove(inMove); } // ignore changes: this plugin does them // removals en = incomingMoveSub.getRemovedList(); while (en.hasMoreElements()) { AgentMove inMove = (AgentMove) en.nextElement(); removedIncomingMove(inMove); } } if (outgoingMoveSub.hasChanged()) { // ignore additions: this plugin does them // changes Enumeration en = outgoingMoveSub.getChangedList(); while (en.hasMoreElements()) { AgentMove inMove = (AgentMove) en.nextElement(); changedOutgoingMove(inMove); } // ignore removals: this plugin does them } } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/027ed78e4ca04382cabe19469ad962db991fcc53/RedirectMovePlugin.java/clean/core/src/org/cougaar/core/mobility/service/RedirectMovePlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1836,
1435,
288,
565,
309,
261,
291,
907,
13,
288,
1377,
327,
31,
565,
289,
565,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
288,
1377,
613,
18,
4148,
2932,
5289,
8863,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1836,
1435,
288,
565,
309,
261,
291,
907,
13,
288,
1377,
327,
31,
565,
289,
565,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
288,
1377,
613,
18,
4148,
2932,
5289,
8863,
565,
... |
case M_TO_S: | case FixnumDefinition.TO_S: | public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/5f6bd2ce57ff6ed96fea5760d028882d8af6113c/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
745,
15034,
12,
474,
770,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
1620,
261,
1615,
13,
288,
3639,
648,
490,
67,
4296,
67,
42,
30,
5411,
327,
358,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
745,
15034,
12,
474,
770,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
1620,
261,
1615,
13,
288,
3639,
648,
490,
67,
4296,
67,
42,
30,
5411,
327,
358,
67,
... |
private String getDescriptionText() { if (decoration == null) { return null; } return decoration.getDescription(); | public String getDescriptionText() { return descriptionText; | private String getDescriptionText() { if (decoration == null) { return null; } return decoration.getDescription(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/5d978daa84859bbf3a8e2e3902ccfdb899d1248e/ControlDecoration.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
11056,
1528,
1435,
288,
202,
202,
430,
261,
11880,
367,
422,
446,
13,
288,
1082,
202,
2463,
446,
31,
202,
202,
97,
202,
202,
2463,
29217,
18,
588,
3291,
5621,
202,
97,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1152,
514,
11056,
1528,
1435,
288,
202,
202,
430,
261,
11880,
367,
422,
446,
13,
288,
1082,
202,
2463,
446,
31,
202,
202,
97,
202,
202,
2463,
29217,
18,
588,
3291,
5621,
202,
97,
... |
private String num_to(Object arg, int zeroArgMode, int oneArgMode, int precisionMin, int precisionMax, int precisionOffset) { int precision; | private String num_to(Context cx, Object[] args, int zeroArgMode, int oneArgMode, int precisionMin, int precisionMax, int precisionOffset) { int precision; | private String num_to(Object arg, int zeroArgMode, int oneArgMode, int precisionMin, int precisionMax, int precisionOffset) { int precision; if (arg == Undefined.instance) { precision = 0; oneArgMode = zeroArgMode; } else { precision = ScriptRuntime.toInt32(arg); if (precision < precisionMin || precision > precisionMax) { throw NativeGlobal.constructError( Context.getCurrentContext(), "RangeError", ScriptRuntime.getMessage1( "msg.bad.precision", Integer.toString(precision)), this); } } StringBuffer result = new StringBuffer(); DToA.JS_dtostr(result, oneArgMode, precision + precisionOffset, doubleValue); return result.toString(); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/8584f9aa43e87015068b51a9cd8ce3a893b2449a/NativeNumber.java/clean/js/rhino/src/org/mozilla/javascript/NativeNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
818,
67,
869,
12,
921,
1501,
16,
509,
3634,
4117,
2309,
16,
4202,
509,
1245,
4117,
2309,
16,
509,
6039,
2930,
16,
509,
6039,
2747,
16,
509,
6039,
2335,
13,
202,
95,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
818,
67,
869,
12,
921,
1501,
16,
509,
3634,
4117,
2309,
16,
4202,
509,
1245,
4117,
2309,
16,
509,
6039,
2930,
16,
509,
6039,
2747,
16,
509,
6039,
2335,
13,
202,
95,
20... |
if (intType.hasSymbols()) { os.println(" {"); os.print(indent + " "); printEnumeration(intType.getAllSymbols(), indent + " "); os.println(); os.print(indent); os.print("}"); } else if (intType.hasConstraint()) { os.print(" ("); os.print(intType.getConstraint()); os.print(")"); } | printConstraint(type, indent); | private void printType(MibType type, String indent) { SequenceType seqType; SequenceOfType seqOfType; IntegerType intType; BitSetType bitType; StringType strType; if (type.getReferenceSymbol() != null) { // TODO: handle constraints? os.print(type.getReferenceSymbol().getName()); } else if (type instanceof SequenceType) { seqType = (SequenceType) type; os.println("SEQUENCE {"); os.print(indent + " "); printTypeElements(seqType.getAllElements(), indent + " "); os.println(); os.print(indent); os.print("}"); } else if (type instanceof SequenceOfType) { seqOfType = (SequenceOfType) type; os.print("SEQUENCE "); if (seqOfType.getConstraint() != null) { os.print("("); os.print(seqOfType.getConstraint()); os.print(") "); } os.print("OF "); printType(seqOfType.getElementType(), indent); } else if (type instanceof IntegerType) { intType = (IntegerType) type; os.print("INTEGER"); if (intType.hasSymbols()) { os.println(" {"); os.print(indent + " "); printEnumeration(intType.getAllSymbols(), indent + " "); os.println(); os.print(indent); os.print("}"); } else if (intType.hasConstraint()) { os.print(" ("); os.print(intType.getConstraint()); os.print(")"); } } else if (type instanceof BitSetType) { bitType = (BitSetType) type; os.print("BITS"); if (bitType.hasSymbols()) { os.println(" {"); os.print(indent + " "); printEnumeration(bitType.getAllSymbols(), indent + " "); os.println(); os.print(indent); os.print("}"); } else if (bitType.hasConstraint()) { os.print(" ("); os.print(bitType.getConstraint()); os.print(")"); } } else if (type instanceof StringType) { strType = (StringType) type; os.print("OCTET STRING"); if (strType.hasConstraint()) { os.print(" ("); os.print(strType.getConstraint()); os.print(")"); } } else if (type.isPrimitive()) { os.print(type.getName()); } else if (type instanceof SnmpModuleIdentity) { printType((SnmpModuleIdentity) type, indent); } else if (type instanceof SnmpObjectIdentity) { printType((SnmpObjectIdentity) type, indent); } else if (type instanceof SnmpObjectType) { printType((SnmpObjectType) type, indent); } else if (type instanceof SnmpNotificationType) { printType((SnmpNotificationType) type, indent); } else if (type instanceof SnmpTrapType) { printType((SnmpTrapType) type, indent); } else if (type instanceof SnmpTextualConvention) { printType((SnmpTextualConvention) type, indent); } else if (type instanceof SnmpObjectGroup) { printType((SnmpObjectGroup) type, indent); } else if (type instanceof SnmpNotificationGroup) { printType((SnmpNotificationGroup) type, indent); } else if (type instanceof SnmpModuleCompliance) { printType((SnmpModuleCompliance) type, indent); } else if (type instanceof SnmpAgentCapabilities) { printType((SnmpAgentCapabilities) type, indent); } else { // TODO: print error on unhandled types os.print("-- TODO: currently unhandled type"); } } | 48557 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48557/848417d57c0d1b39da66904b7309f3c1720eb3fb/MibWriter.java/clean/src/java/net/percederberg/mibble/MibWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
559,
12,
49,
495,
559,
618,
16,
514,
3504,
13,
288,
3639,
8370,
559,
565,
3833,
559,
31,
3639,
8370,
18859,
225,
3833,
18859,
31,
3639,
2144,
559,
377,
509,
559,
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,
3238,
918,
1172,
559,
12,
49,
495,
559,
618,
16,
514,
3504,
13,
288,
3639,
8370,
559,
565,
3833,
559,
31,
3639,
8370,
18859,
225,
3833,
18859,
31,
3639,
2144,
559,
377,
509,
559,
31,
... |
System.err.println("a > b"); | System.err.println(depth + ":" + "a > b. Removing b"); | public final static FeatureFilter optimize(FeatureFilter filter) { System.err.println("Optimizing " + filter); if(filter instanceof FeatureFilter.And) { System.err.println("is AND"); List filters = new ArrayList(); expandAnd(filter, filters); System.err.println("as list: " + filters); // get all children of this AND, and of all AND children for(int i = 0; i < filters.size(); i++) { filters.set(i, (FeatureFilter) filters.get(i)); } // now scan this list for all OR children List ors = new ArrayList(); for(int i = 0; i < filters.size(); i++) { FeatureFilter f = (FeatureFilter) filters.get(i); if(f instanceof FeatureFilter.Or) { filters.remove(i); ors.add(f); i--; } } // optimize all simple filters for(int i = 1; i < filters.size(); i++) { System.err.println("i: " + i); FeatureFilter a = (FeatureFilter) filters.get(i); for(int j = 0; j < i; j++) { System.err.println("j: " + j); FeatureFilter b = (FeatureFilter) filters.get(j); System.err.println("Comparing " + a + ", " + b + " of " + filters); if(areDisjoint(a, b)) { // a n b = E System.err.println("Disjoint"); return none(); } else if(areProperSubset(a, b)) { System.err.println("a < b"); // if a < b then a n b = a filters.remove(j); j--; i--; } else if(areProperSubset(b, a)) { System.err.println("a > b"); // if a > b then a n b = b filters.remove(i); i--; break; } else { System.err.println("Attempting to calculate intersection"); FeatureFilter intersect = intersection(a, b); if(intersect != null) { System.err.println("got intersection: " + intersect); filters.set(i, intersect); filters.remove(j); j--; i--; } else { System.err.println("no luck - moving on"); } } } } System.err.println("Reduced to: " + filters); if(filters.isEmpty()) { System.err.println("empty filter set"); return none(); } else { FeatureFilter ands = and((FeatureFilter[]) filters.toArray(new FeatureFilter[] {})); if(ors.isEmpty()) { System.err.println("No ors, just returning anded values: " + ands); return ands; } else { System.err.println("Mixing in ors: " + ors); System.err.println("to: " + ands); List combs = new ArrayList(); combs.add(ands); for(int i = 0; i < ors.size(); i++) { List newCombs = new ArrayList(); FeatureFilter.Or or = (FeatureFilter.Or) ors.get(i); for(int j = 0; j < combs.size(); j++) { FeatureFilter f = (FeatureFilter) combs.get(j); newCombs.add(and(f, or.getChild1())); newCombs.add(and(f, or.getChild2())); } combs = newCombs; } return optimize(or((FeatureFilter[]) combs.toArray(new FeatureFilter[] {}))); } } } else if(filter instanceof FeatureFilter.Or) { System.err.println("is OR"); List filters = new ArrayList(); expandOr(filter, filters); System.err.println("as list: " + filters); for(int i = 0; i < filters.size(); i++) { filters.set(i, optimize((FeatureFilter) filters.get(i))); } // now scan this list for all OR children List ands = new ArrayList(); for(int i = 0; i < filters.size(); i++) { FeatureFilter f = (FeatureFilter) filters.get(i); if(f instanceof FeatureFilter.And) { filters.remove(i); ands.add(f); i--; } } for(int i = 1; i < filters.size(); i++) { System.err.println("i: " + i); FeatureFilter a = (FeatureFilter) filters.get(i); for(int j = 0; j < i; j++) { System.err.println("j: " + j); FeatureFilter b = (FeatureFilter) filters.get(j); System.err.println("Comparing " + a + ", " + b + " of " + filters); if(a == all() || b == all()) { System.err.println("Found an all"); return all(); } else if(areProperSubset(a, b)) { System.err.println("a < b"); filters.remove(i); i--; } else if(areProperSubset(b, a)) { System.err.println("a > b"); filters.remove(j); j--; i--; } else { System.err.println("Trying to calculate union"); FeatureFilter union = union(a, b); if(union != null) { System.err.println("Got union: " + union); filters.set(i, union); filters.remove(j); j--; i--; } else { System.err.println("no luck - moving on"); } } } } FeatureFilter ors = or((FeatureFilter[]) filters.toArray(new FeatureFilter[] {})); if(ands.isEmpty()) { System.err.println("no ands, returning ors: " + ors); return ors; } else { System.err.println("Mixing in ands: " + ands); System.err.println("to: " + ors); List combs = new ArrayList(); combs.add(ors); for(int i = 0; i < ands.size(); i++) { List newCombs = new ArrayList(); FeatureFilter.And and = (FeatureFilter.And) ands.get(i); for(int j = 0; j < combs.size(); j++) { FeatureFilter f = (FeatureFilter) combs.get(j); newCombs.add(or(f, and.getChild1())); newCombs.add(or(f, and.getChild2())); } } return optimize(and((FeatureFilter[]) combs.toArray(new FeatureFilter[] {}))); } } else if(filter instanceof FeatureFilter.Not) { FeatureFilter.Not not = (FeatureFilter.Not) filter; return not(optimize(not.getChild())); } else { return filter; } } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/7e35756d6acc4e7db8b3eec8a8305a95ce838b70/FilterUtils.java/clean/src/org/biojava/bio/seq/FilterUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
760,
7881,
1586,
10979,
12,
4595,
1586,
1034,
13,
288,
565,
2332,
18,
370,
18,
8222,
2932,
13930,
6894,
315,
397,
1034,
1769,
3639,
309,
12,
2188,
1276,
7881,
1586,
18,
1876,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
7881,
1586,
10979,
12,
4595,
1586,
1034,
13,
288,
565,
2332,
18,
370,
18,
8222,
2932,
13930,
6894,
315,
397,
1034,
1769,
3639,
309,
12,
2188,
1276,
7881,
1586,
18,
1876,
... |
systemMenuManager.dispose(); systemMenuManager.removeAll(); | systemMenuManager.dispose(); systemMenuManager.removeAll(); | public void dispose() { if (isDisposed()) return; // remove shell listener tabFolder.getShell().removeShellListener(shellListener); // remove close listener tabFolder.removeCTabFolderListener(closeListener); // remove drag listener PresentationUtil.removeDragListener(tabFolder, dragListener); // dispose system menu manager systemMenuManager.dispose(); systemMenuManager.removeAll(); // dispose tab folder tabFolder.dispose(); tabFolder = null; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/38085a8072ad4fd21bad0983f8bc31ac736c9f72/R21EditorStackPresentation.java/buggy/bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/R21EditorStackPresentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15825,
1435,
288,
3639,
309,
261,
291,
1669,
7423,
10756,
5411,
327,
31,
3639,
368,
1206,
5972,
2991,
3639,
3246,
3899,
18,
588,
13220,
7675,
4479,
13220,
2223,
12,
10304,
2223,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15825,
1435,
288,
3639,
309,
261,
291,
1669,
7423,
10756,
5411,
327,
31,
3639,
368,
1206,
5972,
2991,
3639,
3246,
3899,
18,
588,
13220,
7675,
4479,
13220,
2223,
12,
10304,
2223,
... |
public Object getProperty(String propertyName) { return propertyTable.get(propertyName); } | public Object getProperty(String propertyName) { return propertyTable.get(propertyName); } | public Object getProperty(String propertyName) { return propertyTable.get(propertyName); } | 13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/38e89cc957cc0f494d1f24328dc0963bc616d4c4/DOMContentBuilderImpl.java/clean/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilderImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
3911,
12,
780,
5470,
13,
225,
288,
565,
327,
1272,
1388,
18,
588,
12,
4468,
461,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
282,
1071,
1033,
3911,
12,
780,
5470,
13,
225,
288,
565,
327,
1272,
1388,
18,
588,
12,
4468,
461,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
+ ValidatorUtil.replace( | + ValidatorUtils.replace( | public int doStartTag() throws JspException { StringBuffer results = new StringBuffer(); ModuleConfig config = RequestUtils.getModuleConfig(pageContext); ValidatorResources resources = (ValidatorResources) pageContext.getAttribute( ValidatorPlugIn.VALIDATOR_KEY + config.getPrefix(), PageContext.APPLICATION_SCOPE); Locale locale = RequestUtils.retrieveUserLocale(this.pageContext, null); Form form = resources.get(locale, formName); if (form != null) { if ("true".equalsIgnoreCase(dynamicJavascript)) { MessageResources messages = (MessageResources) pageContext.getAttribute( bundle + config.getPrefix(), PageContext.APPLICATION_SCOPE); List lActions = new ArrayList(); List lActionMethods = new ArrayList(); // Get List of actions for this Form for (Iterator i = form.getFields().iterator(); i.hasNext();) { Field field = (Field) i.next(); for (Iterator x = field.getDependencies().iterator(); x.hasNext();) { Object o = x.next(); if (o != null && !lActionMethods.contains(o)) { lActionMethods.add(o); } } } // Create list of ValidatorActions based on lActionMethods for (Iterator i = lActionMethods.iterator(); i.hasNext();) { String depends = (String) i.next(); ValidatorAction va = resources.getValidatorAction(depends); // throw nicer NPE for easier debugging if (va == null) { throw new NullPointerException( "Depends string \"" + depends + "\" was not found in validator-rules.xml."); } String javascript = va.getJavascript(); if (javascript != null && javascript.length() > 0) { lActions.add(va); } else { i.remove(); } } Collections.sort(lActions, new Comparator() { public int compare(Object o1, Object o2) { ValidatorAction va1 = (ValidatorAction) o1; ValidatorAction va2 = (ValidatorAction) o2; if ((va1.getDepends() == null || va1.getDepends().length() == 0) && (va2.getDepends() == null || va2.getDepends().length() == 0)) { return 0; } else if ( (va1.getDepends() != null && va1.getDepends().length() > 0) && (va2.getDepends() == null || va2.getDepends().length() == 0)) { return 1; } else if ( (va1.getDepends() == null || va1.getDepends().length() == 0) && (va2.getDepends() != null && va2.getDepends().length() > 0)) { return -1; } else { return va1.getDependencies().size() - va2.getDependencies().size(); } } }); String methods = null; for (Iterator i = lActions.iterator(); i.hasNext();) { ValidatorAction va = (ValidatorAction) i.next(); if (methods == null) { methods = va.getMethod() + "(form)"; } else { methods += " && " + va.getMethod() + "(form)"; } } results.append(getJavascriptBegin(methods)); for (Iterator i = lActions.iterator(); i.hasNext();) { ValidatorAction va = (ValidatorAction) i.next(); String jscriptVar = null; String functionName = null; if (va.getJsFunctionName() != null && va.getJsFunctionName().length() > 0) { functionName = va.getJsFunctionName(); } else { functionName = va.getName(); } results.append(" function " + functionName + " () { \n"); for (Iterator x = form.getFields().iterator(); x.hasNext();) { Field field = (Field) x.next(); // Skip indexed fields for now until there is a good way to handle // error messages (and the length of the list (could retrieve from scope?)) if (field.isIndexed() || field.getPage() != page || !field.isDependency(va.getName())) { continue; } String message = Resources.getMessage(messages, locale, va, field); message = (message != null) ? message : ""; jscriptVar = this.getNextVar(jscriptVar); results.append( " this." + jscriptVar + " = new Array(\"" + getFormClientId() + ":" + field.getKey() + "\", \"" + message + "\", "); results.append("new Function (\"varName\", \""); Map vars = field.getVars(); // Loop through the field's variables. Iterator varsIterator = vars.keySet().iterator(); while (varsIterator.hasNext()) { String varName = (String) varsIterator.next(); Var var = (Var) vars.get(varName); String varValue = var.getValue(); String jsType = var.getJsType(); // skip requiredif variables field, fieldIndexed, fieldTest, fieldValue if (varName.startsWith("field")) { continue; } if (Var.JSTYPE_INT.equalsIgnoreCase(jsType)) { results.append( "this." + varName + "=" + ValidatorUtil.replace( varValue, "\\", "\\\\") + "; "); } else if (Var.JSTYPE_REGEXP.equalsIgnoreCase(jsType)) { results.append( "this." + varName + "=/" + ValidatorUtil.replace( varValue, "\\", "\\\\") + "/; "); } else if (Var.JSTYPE_STRING.equalsIgnoreCase(jsType)) { results.append( "this." + varName + "='" + ValidatorUtil.replace( varValue, "\\", "\\\\") + "'; "); // So everyone using the latest format doesn't need to change their xml files immediately. } else if ("mask".equalsIgnoreCase(varName)) { results.append( "this." + varName + "=/" + ValidatorUtil.replace( varValue, "\\", "\\\\") + "/; "); } else { results.append( "this." + varName + "='" + ValidatorUtil.replace( varValue, "\\", "\\\\") + "'; "); } } results.append(" return this[varName];\"));\n"); } results.append(" } \n\n"); } } else if ("true".equalsIgnoreCase(staticJavascript)) { results.append(this.getStartElement()); if ("true".equalsIgnoreCase(htmlComment)) { results.append(htmlBeginComment); } } } if ("true".equalsIgnoreCase(staticJavascript)) { results.append(getJavascriptStaticMethods(resources)); } if (form != null && ("true".equalsIgnoreCase(dynamicJavascript) || "true".equalsIgnoreCase(staticJavascript))) { results.append(getJavascriptEnd()); } JspWriter writer = pageContext.getOut(); try { writer.print(results.toString()); } catch (IOException e) { throw new JspException(e.getMessage()); } return (EVAL_BODY_TAG); } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/65e85bbc1ac14b329e2243f4bac48d3c77aae7ca/JavascriptValidatorTag.java/buggy/contrib/struts-faces/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
741,
30512,
1435,
1216,
27485,
288,
3639,
6674,
1686,
273,
394,
6674,
5621,
3639,
5924,
809,
642,
273,
1567,
1989,
18,
588,
3120,
809,
12,
2433,
1042,
1769,
3639,
9150,
3805,
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,
509,
741,
30512,
1435,
1216,
27485,
288,
3639,
6674,
1686,
273,
394,
6674,
5621,
3639,
5924,
809,
642,
273,
1567,
1989,
18,
588,
3120,
809,
12,
2433,
1042,
1769,
3639,
9150,
3805,
2... |
getEditorManager().closeEditor((IEditorReference)getReference(editor)); | getEditorManager().closeEditor(editor); | public boolean closeAllSavedEditors() { // If part is added / removed always unzoom. if (isZoomed()) zoomOut(); boolean deactivated = false; // Close all editors. IEditorPart [] editors = getEditorManager().getDirtyEditors(); for (int i = 0; i < editors.length; i ++) { IEditorPart editor = editors[i]; if(!editor.isDirty()) { if (editor == activePart) { deactivated = true; setActivePart(null); } else if (lastActiveEditor == editor) { lastActiveEditor = null; actionSwitcher.updateTopEditor(null); } getEditorManager().closeEditor((IEditorReference)getReference(editor)); activationList.remove(editor); firePartClosed(editor); editor.dispose(); } } if (deactivated) activate(activationList.getActive()); // Notify interested listeners window.firePerspectiveChanged(this, getPerspective(), CHANGE_EDITOR_CLOSE); // Return true on success. return true;} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/92c1cc1904ac1dae5ce9c01d5ebd1f2140187480/WorkbenchPage.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
1746,
1595,
16776,
4666,
1383,
1435,
288,
202,
759,
971,
1087,
353,
3096,
342,
3723,
3712,
640,
14932,
18,
202,
430,
261,
291,
11497,
329,
10756,
202,
202,
14932,
1182,
5621,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
1746,
1595,
16776,
4666,
1383,
1435,
288,
202,
759,
971,
1087,
353,
3096,
342,
3723,
3712,
640,
14932,
18,
202,
430,
261,
291,
11497,
329,
10756,
202,
202,
14932,
1182,
5621,
1082,
... |
if (targetFolder != null && !targetFolder.trim().equals("")){ | if (targetFolder != null && !targetFolder.trim().equals("")) { | public void run(IAction action) { String[] folderStrings = getFolderStrings(); String targetFolder = null; if (folderStrings != null){ targetFolder = showComboSelectionDialog(folderStrings); } if (targetFolder != null && !targetFolder.trim().equals("")){ switchTaskDataFolder(targetFolder); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/60a11b503bcd5753572f2ff6f9276a4b414f3931/SwitchTaskDataFolderAction.java/buggy/sandbox/org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/monitor/reports/ui/actions/SwitchTaskDataFolderAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
45,
1803,
1301,
13,
288,
202,
202,
780,
8526,
3009,
7957,
273,
29001,
7957,
5621,
202,
202,
780,
1018,
3899,
273,
446,
31,
202,
202,
430,
261,
5609,
7957,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
45,
1803,
1301,
13,
288,
202,
202,
780,
8526,
3009,
7957,
273,
29001,
7957,
5621,
202,
202,
780,
1018,
3899,
273,
446,
31,
202,
202,
430,
261,
5609,
7957,
480,
... |
public void initialize() throws InitializationException { getLogger().info( "Initializing JDO." ); persistenceManagerFactory = JDOHelper.getPersistenceManagerFactory( properties ); String driverClass = null; try { driverClass = (String) properties.get( "javax.jdo.option.ConnectionDriverName" ); //TDDO: Class.forName is evil Class.forName( driverClass ); } catch ( ClassNotFoundException e ) { throw new InitializationException( "Cannot find driver class: " + driverClass, e ); } } | 55907 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55907/b175588fb72642a5469df6aecebe5cdceca84863/DefaultJdoFactory.java/clean/plexus-jdo2/src/main/java/org/codehaus/plexus/jdo/DefaultJdoFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
1435,
3639,
1216,
26586,
503,
565,
288,
3639,
7156,
7675,
1376,
12,
315,
29782,
804,
3191,
1199,
11272,
3639,
9756,
20012,
273,
804,
3191,
2276,
18,
588,
13182,
20012,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
1435,
3639,
1216,
26586,
503,
565,
288,
3639,
7156,
7675,
1376,
12,
315,
29782,
804,
3191,
1199,
11272,
3639,
9756,
20012,
273,
804,
3191,
2276,
18,
588,
13182,
20012,
12,
... | ||
following.push(FOLLOW_rule_attribute_in_rule_attributes712); | following.push(FOLLOW_rule_attribute_in_rule_attributes758); | public void rule_attributes(RuleDescr rule) throws RecognitionException { AttributeDescr a = null; try { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: ( ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: ( 'attributes' )? int alt25=2; int LA25_0 = input.LA(1); if ( LA25_0==32 ) { alt25=1; } else if ( LA25_0==EOL||LA25_0==22||(LA25_0>=29 && LA25_0<=31)||(LA25_0>=33 && LA25_0<=38) ) { alt25=2; } else { NoViableAltException nvae = new NoViableAltException("257:25: ( \'attributes\' )?", 25, 0, input); throw nvae; } switch (alt25) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: 'attributes' { match(input,32,FOLLOW_32_in_rule_attributes694); } break; } // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:39: ( ':' )? int alt26=2; int LA26_0 = input.LA(1); if ( LA26_0==30 ) { alt26=1; } else if ( LA26_0==EOL||LA26_0==22||LA26_0==29||LA26_0==31||(LA26_0>=33 && LA26_0<=38) ) { alt26=2; } else { NoViableAltException nvae = new NoViableAltException("257:39: ( \':\' )?", 26, 0, input); throw nvae; } switch (alt26) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:39: ':' { match(input,30,FOLLOW_30_in_rule_attributes697); } break; } following.push(FOLLOW_opt_eol_in_rule_attributes700); opt_eol(); following.pop(); // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:25: ( ( ',' )? a= rule_attribute opt_eol )* loop28: do { int alt28=2; int LA28_0 = input.LA(1); if ( LA28_0==22||(LA28_0>=33 && LA28_0<=38) ) { alt28=1; } switch (alt28) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:33: ( ',' )? a= rule_attribute opt_eol { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:33: ( ',' )? int alt27=2; int LA27_0 = input.LA(1); if ( LA27_0==22 ) { alt27=1; } else if ( (LA27_0>=33 && LA27_0<=38) ) { alt27=2; } else { NoViableAltException nvae = new NoViableAltException("258:33: ( \',\' )?", 27, 0, input); throw nvae; } switch (alt27) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:33: ',' { match(input,22,FOLLOW_22_in_rule_attributes707); } break; } following.push(FOLLOW_rule_attribute_in_rule_attributes712); a=rule_attribute(); following.pop(); following.push(FOLLOW_opt_eol_in_rule_attributes714); opt_eol(); following.pop(); rule.addAttribute( a ); } break; default : break loop28; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/75f5f3ef6a8af3fa9515d2007a16f1fd6f3ce0d0/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,
64,
... |
encoding = descriptor.getEncoding(); | public ImmutableMuleDescriptor(ImmutableMuleDescriptor descriptor) { inboundRouter = descriptor.getInboundRouter(); outboundRouter = descriptor.getOutboundRouter(); responseRouter = descriptor.getResponseRouter(); inboundTransformer = descriptor.getInboundTransformer(); outboundTransformer = descriptor.getOutboundTransformer(); responseTransformer = descriptor.getResponseTransformer(); implementationReference = descriptor.getImplementation(); version = descriptor.getVersion(); intecerptorList = descriptor.getInterceptors(); properties = descriptor.getProperties(); name = descriptor.getName(); encoding = descriptor.getEncoding(); threadingProfile = descriptor.getThreadingProfile(); poolingProfile = descriptor.getPoolingProfile(); queueProfile = descriptor.getQueueProfile(); exceptionListener = descriptor.getExceptionListener(); initialState = descriptor.getInitialState(); singleton = descriptor.isSingleton(); containerManaged = descriptor.isContainerManaged(); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/e7a904f2d4b39c4e1d7e55677ec26d46fa90e676/ImmutableMuleDescriptor.java/buggy/core/src/main/java/org/mule/impl/ImmutableMuleDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7252,
49,
725,
3187,
12,
16014,
49,
725,
3187,
4950,
13,
565,
288,
3639,
13357,
8259,
273,
4950,
18,
588,
20571,
8259,
5621,
3639,
11663,
8259,
273,
4950,
18,
588,
17873,
8259,
5621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7252,
49,
725,
3187,
12,
16014,
49,
725,
3187,
4950,
13,
565,
288,
3639,
13357,
8259,
273,
4950,
18,
588,
20571,
8259,
5621,
3639,
11663,
8259,
273,
4950,
18,
588,
17873,
8259,
5621... | |
if (LogFactory.getLog("SFManagamentConsole").isIgnoreEnabled()){ LogFactory.getLog("SFManagamentConsole").ignore("Failure refresh() SFDeployDisplay!",ex); | if (LogFactory.getLog("sfManagementConsole").isIgnoreEnabled()){ LogFactory.getLog("sfManagementConsole").ignore("Failure refresh() SFDeployDisplay!",ex); | public void refresh() { try { //System.out.println("Refreshing info"); Object root = this.sfResolve(SmartFrogCoreKeys.SF_ROOT,true); ((DeployTreePanel) panelTree).setModel(root); ((DeployTreePanel) panelTree).refresh(); } catch (Throwable ex) {// Logger.logQuietly("Failure refresh() SFDeployDisplay!",ex); if (LogFactory.getLog("SFManagamentConsole").isIgnoreEnabled()){ LogFactory.getLog("SFManagamentConsole").ignore("Failure refresh() SFDeployDisplay!",ex); } } } | 4987 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4987/6d881b2e71edc579bb235fb0f2127890423bc023/SFDeployDisplay.java/buggy/core/smartfrog/src/org/smartfrog/services/management/SFDeployDisplay.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
4460,
1435,
288,
1377,
775,
288,
540,
368,
3163,
18,
659,
18,
8222,
2932,
8323,
310,
1123,
8863,
540,
1033,
1365,
273,
333,
18,
21668,
8460,
12,
23824,
42,
303,
75,
4670,
239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
4460,
1435,
288,
1377,
775,
288,
540,
368,
3163,
18,
659,
18,
8222,
2932,
8323,
310,
1123,
8863,
540,
1033,
1365,
273,
333,
18,
21668,
8460,
12,
23824,
42,
303,
75,
4670,
239... |
public void rule_attributes(RuleDescr rule) throws RecognitionException { AttributeDescr a = null; try { // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:497:4: ( ( 'attributes' ':' )? ( ( ',' )? a= rule_attribute )* ) // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:497:4: ( 'attributes' ':' )? ( ( ',' )? a= rule_attribute )* { // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:497:4: ( 'attributes' ':' )? int alt15=2; int LA15_0 = input.LA(1); if ( (LA15_0==41) ) { alt15=1; } switch (alt15) { case 1 : // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:497:5: 'attributes' ':' { match(input,41,FOLLOW_41_in_rule_attributes732); match(input,40,FOLLOW_40_in_rule_attributes734); } break; } // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:498:4: ( ( ',' )? a= rule_attribute )* loop17: do { int alt17=2; int LA17_0 = input.LA(1); if ( (LA17_0==34||(LA17_0>=42 && LA17_0<=47)) ) { alt17=1; } switch (alt17) { case 1 : // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:498:6: ( ',' )? a= rule_attribute { // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:498:6: ( ',' )? int alt16=2; int LA16_0 = input.LA(1); if ( (LA16_0==34) ) { alt16=1; } switch (alt16) { case 1 : // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:498:6: ',' { match(input,34,FOLLOW_34_in_rule_attributes743); } break; } pushFollow(FOLLOW_rule_attribute_in_rule_attributes748); a=rule_attribute(); _fsp--; rule.addAttribute( a ); } break; default : break loop17; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/c3437c2488c314384990c4282a547e0f92ca02c2/DRLParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
463,
31027,
5206,
1695,
10649,
8464,
7482,
1695,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
463,
31027,
5206,
1695,
10649,
8464,
7482,
1695,
26... | ||
catch (IOException io) { io.printStackTrace(); } | catch (IOException io) { } | @Test public void testByteArrayDimensions() { boolean success = true; try { int imageCount = reader.getImageCount(currentFile); int sizeX = reader.getSizeX(currentFile); int sizeY = reader.getSizeY(currentFile); int bytesPerPixel = FormatReader.getBytesPerPixel(reader.getPixelType(currentFile)); int sizeC = reader.getSizeC(currentFile); boolean rgb = reader.isRGB(currentFile); int expectedBytes = sizeX * sizeY * bytesPerPixel * (rgb ? sizeC : 1); for (int i=0; i<imageCount; i++) { byte[] b = reader.openBytes(currentFile, i); if (b.length != expectedBytes) success = false; } } catch (Exception e) { e.printStackTrace(); success = false; } try { if (!success) { logFile.write(currentFile + " failed byte array test\n"); logFile.flush(); } } catch (IOException io) { io.printStackTrace(); } assertTrue(success); } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/099f018499f749c51c5b9b2e744efa18eb5b8045/ReaderTest.java/clean/loci/formats/test/ReaderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
632,
4709,
1071,
918,
1842,
8826,
10796,
1435,
288,
565,
1250,
2216,
273,
638,
31,
565,
775,
288,
1377,
509,
1316,
1380,
273,
2949,
18,
588,
2040,
1380,
12,
2972,
812,
1769,
1377,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
632,
4709,
1071,
918,
1842,
8826,
10796,
1435,
288,
565,
1250,
2216,
273,
638,
31,
565,
775,
288,
1377,
509,
1316,
1380,
273,
2949,
18,
588,
2040,
1380,
12,
2972,
812,
1769,
1377,
509,
... |
throw new Error("You cannot make something from nothing"); | throw new Error( "The default default active scheme id is not defined."); | private static final void readActiveScheme( final IConfigurationElement[] configurationElements, final int configurationElementCount, final IMemento preferences, final BindingManager bindingManager) { // A non-default preference. final IPreferenceStore store = PlatformUI.getPreferenceStore(); final String defaultActiveSchemeId = store .getDefaultString(IWorkbenchPreferenceConstants.KEY_CONFIGURATION_ID); final String preferenceActiveSchemeId = store .getString(IWorkbenchPreferenceConstants.KEY_CONFIGURATION_ID); if ((preferenceActiveSchemeId != null) && (!preferenceActiveSchemeId.equals(defaultActiveSchemeId))) { try { bindingManager.setActiveScheme(bindingManager .getScheme(preferenceActiveSchemeId)); return; } catch (final NotDefinedException e) { // Let's keep looking.... } } // A legacy preference XML memento. if (preferences != null) { final IMemento[] preferenceMementos = preferences .getChildren(ELEMENT_ACTIVE_KEY_CONFIGURATION); int preferenceMementoCount = preferenceMementos.length; for (int i = preferenceMementoCount - 1; i >= 0; i--) { final IMemento memento = preferenceMementos[i]; String id = memento.getString(ATTRIBUTE_KEY_CONFIGURATION_ID); if (id != null) { try { bindingManager.setActiveScheme(bindingManager .getScheme(id)); return; } catch (final NotDefinedException e) { // Let's keep looking.... } } } } // A default preference value that is different than the default. if ((defaultActiveSchemeId != null) && (!defaultActiveSchemeId .equals(IBindingService.DEFAULT_DEFAULT_ACTIVE_SCHEME_ID))) { try { bindingManager.setActiveScheme(bindingManager .getScheme(defaultActiveSchemeId)); return; } catch (final NotDefinedException e) { // Let's keep looking.... } } // The registry. for (int i = configurationElementCount - 1; i >= 0; i--) { final IConfigurationElement configurationElement = configurationElements[i]; String id = configurationElement .getAttribute(ATTRIBUTE_KEY_CONFIGURATION_ID); if (id != null) { try { bindingManager .setActiveScheme(bindingManager.getScheme(id)); return; } catch (final NotDefinedException e) { // Let's keep looking.... } } id = configurationElement.getAttribute(ATTRIBUTE_VALUE); if (id != null) { try { bindingManager .setActiveScheme(bindingManager.getScheme(id)); return; } catch (final NotDefinedException e) { // Let's keep looking.... } } } // The default default active scheme id. try { bindingManager .setActiveScheme(bindingManager .getScheme(IBindingService.DEFAULT_DEFAULT_ACTIVE_SCHEME_ID)); } catch (final NotDefinedException e) { // Damn, we're fucked. throw new Error("You cannot make something from nothing"); //$NON-NLS-1$ } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1671611fb23105fcf09097a0f698a2673c6a3376/BindingPersistence.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
918,
855,
3896,
9321,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
1664,
3471,
16,
1082,
202,
6385,
509,
1664,
1046,
1380,
16,
727,
6246,
820,
83,
12750,
16,
1082,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
918,
855,
3896,
9321,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
1664,
3471,
16,
1082,
202,
6385,
509,
1664,
1046,
1380,
16,
727,
6246,
820,
83,
12750,
16,
1082,
2... |
void submit(String[] rCommands) throws CoreException; | boolean submit(String[] rCommands, boolean gotoConsole) throws CoreException; | void submit(String[] rCommands) throws CoreException; | 47575 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47575/d83823f01254ee41f13ac0d4757d43056fcc9f0b/IRCodeLaunchConnector.java/buggy/de.walware.statet.r.ui/srcDebug/de/walware/statet/r/launching/IRCodeLaunchConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
4879,
12,
780,
8526,
436,
9127,
13,
1216,
30015,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
225,
202,
6459,
4879,
12,
780,
8526,
436,
9127,
13,
1216,
30015,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
assertEquals("a.c=v\n", insertEdit.getText()); assertEquals(6, insertEdit.getOffset()); | assertEquals("a.b=v\n" + "a.c=v\n" + "\n" + "org.eclipse.test=value\n", props.get()); | public void testInsertIntoDocWithBlankLines2() { String props = "a.b=v\n" + "\n" + "org.eclipse.test=value\n"; PropertyFileDocumentModell modell = new PropertyFileDocumentModell(new Document(props)); InsertEdit insertEdit = modell.insert("a.c", "v"); assertEquals("a.c=v\n", insertEdit.getText()); assertEquals(6, insertEdit.getOffset()); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/eb6f0619842c7f0cb11df4bd9684e3bf0c5c49ab/PropertyFileDocumentModellTest.java/buggy/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/nls/PropertyFileDocumentModellTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4600,
5952,
1759,
1190,
7796,
5763,
22,
1435,
288,
3639,
514,
3458,
273,
2398,
315,
69,
18,
70,
33,
90,
64,
82,
6,
397,
5411,
1548,
82,
6,
397,
5411,
315,
3341,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4600,
5952,
1759,
1190,
7796,
5763,
22,
1435,
288,
3639,
514,
3458,
273,
2398,
315,
69,
18,
70,
33,
90,
64,
82,
6,
397,
5411,
1548,
82,
6,
397,
5411,
315,
3341,
18,
... |
Class cl = Class.forName(pojoClass); | ClassLoader classLoader = ((XBeanServiceUnit) getServiceUnit()).getConfigurationClassLoader(); Class cl = Class.forName(pojoClass, true, classLoader); | public void registerService() throws Exception { if (pojo == null) { Class cl = Class.forName(pojoClass); pojo = cl.newInstance(); } // Determine annotations WebAnnotations wa = null; String selectedAnnotations = null; if (annotations != null) { selectedAnnotations = annotations; if (!annotations.equals("none")) { wa = (WebAnnotations) knownAnnotations.get(annotations); if (wa == null) { throw new Exception("Unrecognized annotations: " + annotations); } } } else { for (Iterator it = knownAnnotations.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); WebAnnotations w = (WebAnnotations) entry.getValue(); if (w.hasWebServiceAnnotation(pojo.getClass())) { selectedAnnotations = (String) entry.getKey(); wa = w; break; } } } // Determine TypeMappingRegistry TypeMappingRegistry tm = null; String selectedTypeMapping = null; if (typeMapping == null) { selectedTypeMapping = (wa == null) ? "default" : "jaxb2"; } else { selectedTypeMapping = typeMapping; } tm = (TypeMappingRegistry) knownTypeMappings.get(selectedTypeMapping); if (tm == null) { throw new Exception("Unrecognized typeMapping: " + typeMapping); } // Create factory XFire xfire = getXFire(); ObjectServiceFactory factory = null; Class serviceClass = pojo.getClass(); if (serviceInterface != null) { serviceClass = Class.forName(serviceInterface); } if (wa == null) { factory = new ObjectServiceFactory(xfire.getTransportManager(), new AegisBindingProvider(tm)); } else if (selectedAnnotations.equals("java5") && selectedTypeMapping.equals("jaxb2")) { try { Class clazz = Class.forName("org.codehaus.xfire.jaxws.JAXWSServiceFactory"); Constructor ct = clazz.getDeclaredConstructor(new Class[] { TransportManager.class }); factory = (ObjectServiceFactory) ct.newInstance(new Object[] { xfire.getTransportManager() }); } catch (Exception e) { factory = new AnnotationServiceFactory(wa, xfire.getTransportManager(), new AegisBindingProvider(tm)); } } else { factory = new AnnotationServiceFactory(wa, xfire.getTransportManager(), new AegisBindingProvider(tm)); } String svcLocalName = (service != null) ? service.getLocalPart() : null; String svcNamespace = (service != null) ? service.getNamespaceURI() : null; Map props = new HashMap(); props.put(ObjectServiceFactory.PORT_TYPE, interfaceName); props.put(ObjectServiceFactory.STYLE, SoapConstants.STYLE_WRAPPED); props.put(ObjectServiceFactory.USE, SoapConstants.USE_LITERAL); factory.getSoap11Transports().clear(); factory.getSoap12Transports().clear(); factory.getSoap11Transports().add(JbiTransport.JBI_BINDING); xfireService = factory.create(serviceClass, svcLocalName, svcNamespace, props); xfireService.setInvoker(new BeanInvoker(getPojo())); xfire.getServiceRegistry().register(xfireService); this.description = generateWsdl(); // Check service name and endpoint name QName serviceName = xfireService.getName(); QName interfName = xfireService.getServiceInfo().getPortType(); String endpointName = null; if (service == null) { service = serviceName; } else if (!service.equals(serviceName)) { logger.warn("The service name defined in the wsdl (" + serviceName + ") does not match the service name defined in the endpoint spec (" + service + "). WSDL description may be unusable."); } if (interfaceName == null) { interfaceName = interfName; } else if (!interfaceName.equals(interfName)) { logger.warn("The interface name defined in the wsdl (" + interfName + ") does not match the service name defined in the endpoint spec (" + interfaceName + "). WSDL description may be unusable."); } Definition d = WSDLFactory.newInstance().newWSDLReader().readWSDL(null, description); javax.wsdl.Service service = d.getService(serviceName); if (service != null) { if (service.getPorts().values().size() == 1) { Port port = (Port) service.getPorts().values().iterator().next(); // Check if this is the same as defined in endpoint spec endpointName = port.getName(); if (endpoint == null) { endpoint = endpointName; } else if (!endpoint.equals(endpointName)) { logger.warn("The endpoint name defined in the wsdl (" + endpointName + ") does not match the endpoint name defined in the endpoint spec (" + endpoint + "). WSDL description may be unusable."); } } } if (endpoint == null) { throw new IllegalArgumentException("endpoint name should be provided"); } } | 6264 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6264/d84f592795644457617d24a1861d32213e50f105/Jsr181Endpoint.java/clean/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1744,
1179,
1435,
1216,
1185,
288,
3639,
309,
261,
1631,
30952,
422,
446,
13,
288,
5411,
9403,
11138,
273,
14015,
60,
3381,
1179,
2802,
13,
6373,
2802,
1435,
2934,
588,
1750,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1744,
1179,
1435,
1216,
1185,
288,
3639,
309,
261,
1631,
30952,
422,
446,
13,
288,
5411,
9403,
11138,
273,
14015,
60,
3381,
1179,
2802,
13,
6373,
2802,
1435,
2934,
588,
1750,
7... |
String key = (String) pkAttributes.objectAtIndex(count); if (!classPropertyNames.containsObject(key)) return null; | String key = (String)pkAttributes.objectAtIndex(count); if(!classPropertyNames.containsObject(key)) return null; | public static NSDictionary newPrimaryKeyDictionaryForObjectFromClassProperties( EOEnterpriseObject eo) { EOEditingContext ec = eo.editingContext(); EOEntity entity = EOUtilities.entityNamed(ec, eo.entityName()); NSArray pkAttributes = entity.primaryKeyAttributeNames(); int count = pkAttributes.count(); NSMutableDictionary nsmutabledictionary = new NSMutableDictionary(count); NSArray classPropertyNames = entity.classPropertyNames(); while (count-- != 0) { String key = (String) pkAttributes.objectAtIndex(count); if (!classPropertyNames.containsObject(key)) return null; Object value = eo.valueForKey(key); if (value == null) return null; nsmutabledictionary.setObjectForKey(value, key); } return nsmutabledictionary; } | 50512 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50512/34bd76e4415f130e75e7bb5959a34935299de2cf/ERXEOControlUtilities.java/clean/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXEOControlUtilities.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
423,
9903,
3192,
394,
11575,
10905,
1290,
921,
1265,
797,
2297,
12,
5411,
512,
51,
30699,
921,
425,
83,
13,
288,
3639,
512,
51,
28029,
1042,
6557,
273,
425,
83,
18,
4619,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
423,
9903,
3192,
394,
11575,
10905,
1290,
921,
1265,
797,
2297,
12,
5411,
512,
51,
30699,
921,
425,
83,
13,
288,
3639,
512,
51,
28029,
1042,
6557,
273,
425,
83,
18,
4619,
310... |
final IAssistContext context= new AssistContext(cu, offset, length); | final IInvocationContext context= new AssistContext(cu, offset, length); | private void doSelectionChanged() { Point point= fViewer.getSelectedRange(); int offset= point.x; int length= point.y; final IAnnotationModel model= getAnnotationModel(); boolean hasQuickFix= hasQuickFixLightBulb(model, offset); ICompilationUnit cu= getCompilationUnit(fEditor.getEditorInput()); if (hasQuickFix || cu == null) { if (fIsAnnotationShown) { model.removeAnnotation(fAnnotation); } return; } final IAssistContext context= new AssistContext(cu, offset, length); calculateLightBulb(model, context); //Runnable runnable= new Runnable() { // public void run() { // calculateLightBulb(model, context); // } //}; //runnable.run(); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/743c8e3c183622ead26220802483db7fbb3772ab/QuickAssistLightBulbUpdater.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistLightBulbUpdater.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
6233,
5033,
1435,
288,
202,
202,
2148,
1634,
33,
284,
18415,
18,
588,
7416,
2655,
5621,
202,
202,
474,
1384,
33,
1634,
18,
92,
31,
202,
202,
474,
769,
33,
1634,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
6233,
5033,
1435,
288,
202,
202,
2148,
1634,
33,
284,
18415,
18,
588,
7416,
2655,
5621,
202,
202,
474,
1384,
33,
1634,
18,
92,
31,
202,
202,
474,
769,
33,
1634,
1... |
(this.theme != other.getTheme()) || | (!this.theme.equals(other.getTheme())) || | public boolean equalMapGenParameters(MapSettings other) { if ((this.boardWidth != other.getBoardWidth()) || (this.boardHeight != other.getBoardHeight()) || (this.mapWidth != other.getMapWidth()) || (this.mapHeight != other.getMapHeight()) || (this.hilliness != other.getHilliness()) || (this.cliffs != other.getCliffs()) || (this.range != other.getRange()) || (this.minWaterSpots != other.getMinWaterSpots()) || (this.maxWaterSpots != other.getMaxWaterSpots()) || (this.minWaterSize != other.getMinWaterSize()) || (this.maxWaterSize != other.getMaxWaterSize()) || (this.probDeep != other.getProbDeep()) || (this.minForestSpots != other.getMinForestSpots()) || (this.maxForestSpots != other.getMaxForestSpots()) || (this.minForestSize != other.getMinForestSize()) || (this.maxForestSize != other.getMaxForestSize()) || (this.probHeavy != other.getProbHeavy()) || (this.minRoughSpots != other.getMinRoughSpots()) || (this.maxRoughSpots != other.getMaxRoughSpots()) || (this.minRoughSize != other.getMinRoughSize()) || (this.maxRoughSize != other.getMaxRoughSize()) || (this.minSwampSpots != other.getMinSwampSpots()) || (this.maxSwampSpots != other.getMaxSwampSpots()) || (this.minSwampSize != other.getMinSwampSize()) || (this.maxSwampSize != other.getMaxSwampSize()) || (this.minPavementSpots != other.getMinPavementSpots()) || (this.maxPavementSpots != other.getMaxPavementSpots()) || (this.minPavementSize != other.getMinPavementSize()) || (this.maxPavementSize != other.getMaxPavementSize()) || (this.minRubbleSpots != other.getMinRubbleSpots()) || (this.maxRubbleSpots != other.getMaxRubbleSpots()) || (this.minRubbleSize != other.getMinRubbleSize()) || (this.maxRubbleSize != other.getMaxRubbleSize()) || (this.minFortifiedSpots != other.getMinFortifiedSpots()) || (this.maxFortifiedSpots != other.getMaxFortifiedSpots()) || (this.minFortifiedSize != other.getMinFortifiedSize()) || (this.maxFortifiedSize != other.getMaxFortifiedSize()) || (this.minIceSpots != other.getMinIceSpots()) || (this.maxIceSpots != other.getMaxIceSpots()) || (this.minIceSize != other.getMinIceSize()) || (this.maxIceSize != other.getMaxIceSize()) || (this.probRoad != other.getProbRoad()) || (this.probInvert != other.getProbInvert()) || (this.probRiver != other.getProbRiver()) || (this.probCrater != other.getProbCrater()) || (this.minRadius != other.getMinRadius()) || (this.maxRadius != other.getMaxRadius()) || (this.minCraters != other.getMinCraters()) || (this.maxCraters != other.getMaxCraters()) || (this.theme != other.getTheme()) || (this.fxMod != other.getFxMod()) || (this.cityBlocks != other.getCityBlocks()) || (this.cityType != other.getCityType()) || (this.cityMinCF != other.getCityMinCF()) || (this.cityMaxCF != other.getCityMaxCF()) || (this.cityMinFloors != other.getCityMinFloors()) || (this.cityMaxFloors != other.getCityMaxFloors()) || (this.cityDensity != other.getCityDensity()) || (this.probFlood != other.getProbFlood()) || (this.probForestFire != other.getProbForestFire()) || (this.probFreeze != other.getProbFreeze()) || (this.probDrought != other.getProbDrought()) || (this.algorithmToUse != other.getAlgorithmToUse()) || (this.boardBuildings != other.getBoardBuildings())) { return false; } else { return true; } } /* equalMapGenParameters */ | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/94e93687b33e89322ecc6691ea7f75506c277d96/MapSettings.java/buggy/megamek/src/megamek/common/MapSettings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
3959,
863,
7642,
2402,
12,
863,
2628,
1308,
13,
288,
3639,
309,
14015,
2211,
18,
3752,
2384,
480,
1308,
18,
588,
22233,
2384,
10756,
747,
5411,
261,
2211,
18,
3752,
2686,
480,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
3959,
863,
7642,
2402,
12,
863,
2628,
1308,
13,
288,
3639,
309,
14015,
2211,
18,
3752,
2384,
480,
1308,
18,
588,
22233,
2384,
10756,
747,
5411,
261,
2211,
18,
3752,
2686,
480,... |
if (!useDefaults && Platform.getLocation().isPrefixOf( new Path(locationFieldContents))) { | IPath projectPath = new Path(locationFieldContents); if (!useDefaults && Platform.getLocation().isPrefixOf(projectPath)) { | protected boolean validatePage() { IWorkspace workspace = WorkbenchPlugin.getPluginWorkspace(); String projectFieldContents = getProjectNameFieldValue(); if (projectFieldContents.equals("")) { //$NON-NLS-1$ setErrorMessage(null); setMessage(WorkbenchMessages.getString("WizardNewProjectCreationPage.projectNameEmpty")); //$NON-NLS-1$ return false; } IStatus nameStatus = workspace.validateName(projectFieldContents, IResource.PROJECT); if (!nameStatus.isOK()) { setErrorMessage(nameStatus.getMessage()); return false; } String locationFieldContents = getProjectLocationFieldValue(); if (locationFieldContents.equals("")) { //$NON-NLS-1$ setErrorMessage(null); setMessage(WorkbenchMessages.getString("WizardNewProjectCreationPage.projectLocationEmpty")); //$NON-NLS-1$ return false; } IPath path = new Path(""); //$NON-NLS-1$ if (!path.isValidPath(locationFieldContents)) { setErrorMessage(WorkbenchMessages.getString("WizardNewProjectCreationPage.locationError")); //$NON-NLS-1$ return false; } if (!useDefaults && Platform.getLocation().isPrefixOf( new Path(locationFieldContents))) { setErrorMessage(WorkbenchMessages.getString("WizardNewProjectCreationPage.defaultLocationError")); //$NON-NLS-1$ return false; } if (getProjectHandle().exists()) { setErrorMessage(WorkbenchMessages.getString("WizardNewProjectCreationPage.projectExistsMessage")); //$NON-NLS-1$ return false; } setErrorMessage(null); setMessage(null); return true; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/929de3c3f460aa221918dd203601c2d7e32042c2/WizardNewProjectCreationPage.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/WizardNewProjectCreationPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
1954,
1964,
1435,
288,
202,
202,
45,
8241,
6003,
273,
4147,
22144,
3773,
18,
588,
3773,
8241,
5621,
202,
202,
780,
1984,
974,
6323,
273,
11080,
461,
13559,
5621,
202,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
1954,
1964,
1435,
288,
202,
202,
45,
8241,
6003,
273,
4147,
22144,
3773,
18,
588,
3773,
8241,
5621,
202,
202,
780,
1984,
974,
6323,
273,
11080,
461,
13559,
5621,
202,
202... |
File jarFile = new File( basedir, finalName + ".jar" ); | File jarFile = new File( targetDirectory, finalName + ".jar" ); | public File createArchive() throws MojoExecutionException { File jarFile = new File( basedir, finalName + ".jar" ); MavenArchiver archiver = new MavenArchiver(); archiver.setArchiver( jarArchiver ); archiver.setOutputFile( jarFile ); try { if ( contentDirectory.exists() ) { archiver.getArchiver().addDirectory( contentDirectory, DEFAULT_INCLUDES, DEFAULT_EXCLUDES ); } addFile( archiver, new File( "plugin.jelly" ) ); addFile( archiver, new File( "plugin.properties" ) ); addFile( archiver, new File( "project.properties" ) ); addFile( archiver, new File( "build.properties" ) ); addFile( archiver, new File( "project.xml" ) ); addDirectory( archiver, new File( "src/plugin-resources" ) ); archiver.createArchive( project, new MavenArchiveConfiguration() ); return jarFile; } catch ( Exception e ) { // TODO: improve error handling throw new MojoExecutionException( "Error assembling JAR", e ); } } | 7444 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7444/74a8b764399a916546d1b6336afd87f1f334149d/MavenOnePluginMojo.java/clean/maven-one-plugin/src/main/java/org/apache/maven/plugins/mavenone/MavenOnePluginMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1387,
752,
7465,
1435,
3639,
1216,
18780,
565,
288,
3639,
1387,
22588,
273,
394,
1387,
12,
1018,
2853,
16,
727,
461,
397,
3552,
11930,
6,
11272,
3639,
17176,
12269,
1667,
6637,
1667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1387,
752,
7465,
1435,
3639,
1216,
18780,
565,
288,
3639,
1387,
22588,
273,
394,
1387,
12,
1018,
2853,
16,
727,
461,
397,
3552,
11930,
6,
11272,
3639,
17176,
12269,
1667,
6637,
1667,
... |
public void characters (char ch[], int start, int length) throws SAXException { if(!m_haveDocContent) { int n = ch.length; for(int i = 0; i < n; i++) { // todo: isSpaceChar doesn't seem to be recognizing 0x0A. (??) -sb if(!Character.isSpaceChar(ch[i])) { m_haveDocContent = true; break; } } } if(m_haveDocContent) { flushPending(); /* if((null != m_stylesheetRoot.getCDataSectionElems()) && !m_cdataStack.isEmpty() && (m_cdataStack.peek() == TRUE)) { boolean isLexHandler = (m_flistener instanceof LexicalHandler); if(isLexHandler) ((LexicalHandler)m_flistener).startCDATA(); m_flistener.characters(ch, start, length); if(isLexHandler) ((LexicalHandler)m_flistener).endCDATA(); if(null != m_traceListeners) fireGenerateEvent(new GenerateEvent(m_transformer, GenerateEvent.EVENTTYPE_CDATA, ch, start, length)); } else */ } getContentHandler().characters(ch, start, length); m_transformer.getTraceManager().fireGenerateEvent(new GenerateEvent(m_transformer, GenerateEvent.EVENTTYPE_CHARACTERS, ch, start, length)); } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/0a59c863c802607a229820e928e851db21b9d055/ResultTreeHandler.java/buggy/src/org/apache/xalan/transformer/ResultTreeHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
3949,
261,
3001,
462,
63,
6487,
509,
787,
16,
509,
769,
13,
15069,
14366,
95,
430,
12,
5,
81,
67,
21516,
1759,
1350,
15329,
474,
290,
273,
462,
18,
2469,
31,
1884,
12,
474,
277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
3949,
261,
3001,
462,
63,
6487,
509,
787,
16,
509,
769,
13,
15069,
14366,
95,
430,
12,
5,
81,
67,
21516,
1759,
1350,
15329,
474,
290,
273,
462,
18,
2469,
31,
1884,
12,
474,
277,... | ||
return prefSize; | public Dimension getPreferredSize() { if(/*tabbedPane.*/getComponentCount() == 0) return new Dimension(0,0); Dimension prefSize = super.getPreferredSize(); if(dimension == -1) { if(position.equals(DockableWindowManager.LEFT) || position.equals(DockableWindowManager.RIGHT)) dimension = prefSize.width; else if(position.equals(DockableWindowManager.TOP) || position.equals(DockableWindowManager.BOTTOM)) dimension = prefSize.height; return prefSize; } else { if(position.equals(DockableWindowManager.LEFT) || position.equals(DockableWindowManager.RIGHT)) prefSize.width = dimension; else if(position.equals(DockableWindowManager.TOP) || position.equals(DockableWindowManager.BOTTOM)) prefSize.height = dimension; return prefSize; } } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/f9aee13250730719b064ed496c41323a7de62ed4/DockableWindowContainer.java/clean/org/gjt/sp/jedit/gui/DockableWindowContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
13037,
12822,
4193,
1225,
1435,
202,
202,
95,
1082,
202,
430,
12,
20308,
7032,
2992,
8485,
4509,
19,
588,
1841,
1380,
1435,
422,
374,
13,
9506,
202,
2463,
394,
13037,
12,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
13037,
12822,
4193,
1225,
1435,
202,
202,
95,
1082,
202,
430,
12,
20308,
7032,
2992,
8485,
4509,
19,
588,
1841,
1380,
1435,
422,
374,
13,
9506,
202,
2463,
394,
13037,
12,
20,
... | |
protected void openConnection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { // Throw an exception if the user or password properties are missing // This occasionally occurs when the client uses the properties version // of getConnection(), and is a common question on the email lists if(info.getProperty("user")==null) throw new PSQLException("postgresql.con.user"); if(info.getProperty("password")==null) throw new PSQLException("postgresql.con.pass"); this_driver = d; this_url = url; PG_DATABASE = database; PG_PASSWORD = info.getProperty("password"); PG_USER = info.getProperty("user"); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; // Now make the initial connection try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed",e); } // Now we need to construct and send a startup packet try { // Ver 6.3 code pg_stream.SendInteger(4+4+SM_DATABASE+SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY,4); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MAJOR,2); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MINOR,2); pg_stream.Send(database.getBytes(),SM_DATABASE); // This last send includes the unused fields pg_stream.Send(PG_USER.getBytes(),SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY); // now flush the startup packets to the backend pg_stream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new SQLException(pg_stream.ReceiveString(getEncoding())); case 'R': // Get the type of request areq = pg_stream.ReceiveIntegerR(4); // Get the password salt if there is one if(areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst,0,2); DriverManager.println("Salt="+salt); } // now send the auth packet switch(areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: DriverManager.println("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: DriverManager.println("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: DriverManager.println("postgresql: PASSWORD"); pg_stream.SendInteger(5+PG_PASSWORD.length(),4); pg_stream.Send(PG_PASSWORD.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: DriverManager.println("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt,PG_PASSWORD); pg_stream.SendInteger(5+crypted.length(),4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth",new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while(areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed",e); } // As of protocol version 2.0, we should now receive the cancellation key and the pid int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'K': pid = pg_stream.ReceiveInteger(4); ckey = pg_stream.ReceiveInteger(4); break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Expect ReadyForQuery packet beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'Z': break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Originally we issued a SHOW DATESTYLE statement to find the databases default // datestyle. However, this caused some problems with timestamps, so in 6.5, we // went the way of ODBC, and set the connection to ISO. // // This may cause some clients to break when they assume anything other than ISO, // but then - they should be using the proper methods ;-) // // We also ask the DB for certain properties (i.e. DatabaseEncoding at this time) // firstWarning = null; java.sql.ResultSet initrset = ExecSQL("set datestyle to 'ISO'; " + "select case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"); String dbEncoding = null; //retrieve DB properties if(initrset.next()) { //handle DatabaseEncoding dbEncoding = initrset.getString(1); //convert from the PostgreSQL name to the Java name if (dbEncoding.equals("SQL_ASCII")) { dbEncoding = "ASCII"; } else if (dbEncoding.equals("UNICODE")) { dbEncoding = "UTF8"; } else if (dbEncoding.equals("LATIN1")) { dbEncoding = "ISO8859_1"; } else if (dbEncoding.equals("LATIN2")) { dbEncoding = "ISO8859_2"; } else if (dbEncoding.equals("LATIN3")) { dbEncoding = "ISO8859_3"; } else if (dbEncoding.equals("LATIN4")) { dbEncoding = "ISO8859_4"; } else if (dbEncoding.equals("LATIN5")) { dbEncoding = "ISO8859_5"; } else if (dbEncoding.equals("LATIN6")) { dbEncoding = "ISO8859_6"; } else if (dbEncoding.equals("LATIN7")) { dbEncoding = "ISO8859_7"; } else if (dbEncoding.equals("LATIN8")) { dbEncoding = "ISO8859_8"; } else if (dbEncoding.equals("LATIN9")) { dbEncoding = "ISO8859_9"; } else if (dbEncoding.equals("EUC_JP")) { dbEncoding = "EUC_JP"; } else if (dbEncoding.equals("EUC_CN")) { dbEncoding = "EUC_CN"; } else if (dbEncoding.equals("EUC_KR")) { dbEncoding = "EUC_KR"; } else if (dbEncoding.equals("EUC_TW")) { dbEncoding = "EUC_TW"; } else if (dbEncoding.equals("KOI8")) { // try first if KOI8_U is present, it's a superset of KOI8_R try { dbEncoding = "KOI8_U"; "test".getBytes(dbEncoding); } catch(UnsupportedEncodingException uee) { // well, KOI8_U is still not in standard JDK, falling back to KOI8_R :( dbEncoding = "KOI8_R"; } } else if (dbEncoding.equals("WIN")) { dbEncoding = "Cp1252"; } else if (dbEncoding.equals("UNKNOWN")) { //This isn't a multibyte database so we don't have an encoding to use //We leave dbEncoding null which will cause the default encoding for the //JVM to be used dbEncoding = null; } else { dbEncoding = null; } } //Set the encoding for this connection //Since the encoding could be specified or obtained from the DB we use the //following order: // 1. passed as a property // 2. value from DB if supported by current JVM // 3. default for JVM (leave encoding null) String passedEncoding = info.getProperty("charSet"); // could be null if (passedEncoding != null) { encoding = passedEncoding; } else { if (dbEncoding != null) { //test DB encoding try { "TEST".getBytes(dbEncoding); //no error the encoding is supported by the current JVM encoding = dbEncoding; } catch (UnsupportedEncodingException uee) { //dbEncoding is not supported by the current JVM encoding = null; } } else { encoding = null; } } // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup firstWarning = null; PG_STATUS = CONNECTION_OK; } | 45497 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45497/ff21a8e5c86457e205ff7c598b930efd711cb2dc/Connection.java/clean/src/interfaces/jdbc/org/postgresql/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
22... | ||
if (obj1 == null || obj2 == null || !(obj1 instanceof ConcreteMarker) || !(obj2 instanceof ConcreteMarker)) { return 0; } | public int compare(Object obj1, Object obj2) { if (obj1 == null || obj2 == null || !(obj1 instanceof ConcreteMarker) || !(obj2 instanceof ConcreteMarker)) { return 0; } ConcreteMarker marker1 = (ConcreteMarker) obj1; ConcreteMarker marker2 = (ConcreteMarker) obj2; return getValue(marker1).compareTo(getValue(marker2)); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/0446a7ffd95451a95b1b9aea90290a8cb25be855/FieldMarkerGroup.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldMarkerGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
3400,
12,
921,
1081,
21,
16,
1033,
1081,
22,
13,
288,
202,
202,
430,
261,
2603,
21,
422,
446,
747,
1081,
22,
422,
446,
747,
401,
12,
2603,
21,
1276,
735,
6883,
7078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
3400,
12,
921,
1081,
21,
16,
1033,
1081,
22,
13,
288,
202,
202,
430,
261,
2603,
21,
422,
446,
747,
1081,
22,
422,
446,
747,
401,
12,
2603,
21,
1276,
735,
6883,
7078,
... | |
if(paramExp instanceof IASTExpressionList) { IASTExpressionList list = (IASTExpressionList) paramExp; IASTExpression[] paramExps = list.getExpressions(); types = new IType[paramExps.length]; for(int i=0; i<paramExps.length; i++) { types[i] = paramExps[i].getExpressionType(); } } else { types = new IType[] {paramExp.getExpressionType()}; } | types = new IType[] {paramExp.getExpressionType()}; | public IType[] getTypes(IASTExpression paramExp) throws DOMException { IType[] types = null; if(paramExp==null) { // void function/method types = new IType[0]; } else if(paramExp instanceof ICPPASTNewExpression) { // aftodo - I'm not 100% sure why a new expression doesn't // have a pointer type already ICPPASTNewExpression exp3 = (ICPPASTNewExpression) paramExp; IType type = exp3.getExpressionType(); types = new IType[] {new CPPPointerType(type)}; } else { if(paramExp instanceof IASTExpressionList) { IASTExpressionList list = (IASTExpressionList) paramExp; IASTExpression[] paramExps = list.getExpressions(); types = new IType[paramExps.length]; for(int i=0; i<paramExps.length; i++) { types[i] = paramExps[i].getExpressionType(); } } else { types = new IType[] {paramExp.getExpressionType()}; } } if(types!=null) { // aftodo - unit test coverage of this is low for(int i=0; i<types.length; i++) { // aftodo - assumed this always terminates while(types[i] instanceof ITypedef) { types[i] = ((ITypedef)types[i]).getType(); } if(types[i] instanceof ProblemBinding) return null; } } return types; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/e714b8461209f89ffefebbd2f87034f993511e1a/PDOMCPPLinkage.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
559,
8526,
20780,
12,
45,
9053,
2300,
579,
2966,
13,
1216,
4703,
503,
288,
202,
202,
45,
559,
8526,
1953,
273,
446,
31,
9506,
202,
430,
12,
891,
2966,
631,
2011,
13,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
559,
8526,
20780,
12,
45,
9053,
2300,
579,
2966,
13,
1216,
4703,
503,
288,
202,
202,
45,
559,
8526,
1953,
273,
446,
31,
9506,
202,
430,
12,
891,
2966,
631,
2011,
13,
28... |
s = s.replaceAll("\r|\n", ""); | final String unfolded = raw.replaceAll("\r|\n", ""); | public static Field parse(String s) { String raw = s; /* * Unfold the field. */ s = s.replaceAll("\r|\n", ""); /* * Split into name and value. */ Matcher fieldMatcher = fieldNamePattern.matcher(s); if (!fieldMatcher.find()) { throw new IllegalArgumentException("Invalid field in string"); } String name = fieldMatcher.group(1); String body = s.substring(fieldMatcher.end()); if (body.length() > 0 && body.charAt(0) == ' ') { body = body.substring(1); } Field f = null; // TODO jcheng 2004-09-27: Clean this up if (name.equalsIgnoreCase(CONTENT_TRANSFER_ENCODING)) { f = new ContentTransferEncodingField(); } else if (name.equalsIgnoreCase(CONTENT_TYPE)) { f = new ContentTypeField(); } else if (name.equalsIgnoreCase(DATE) || name.equalsIgnoreCase(RESENT_DATE)) { f = new DateTimeField(); } else if (name.equalsIgnoreCase(FROM) || name.equalsIgnoreCase(RESENT_FROM)) { f = new MailboxListField(); } else if (name.equalsIgnoreCase(SENDER) || name.equalsIgnoreCase(RESENT_SENDER)) { f = new MailboxField(); } else if (name.equalsIgnoreCase(TO) || name.equalsIgnoreCase(CC) || name.equalsIgnoreCase(BCC) || name.equalsIgnoreCase(RESENT_TO) || name.equalsIgnoreCase(RESENT_CC) || name.equalsIgnoreCase(RESENT_BCC) || name.equalsIgnoreCase(REPLY_TO)) { f = new AddressListField(); } else { f = new UnstructuredField(); } f.name = name; f.raw = raw; f.body = body; f.parseBody(body); return f; } | 50980 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50980/b9ddb88cad3c0c2cf13fa9b643d7e8c4b0be59f1/Field.java/buggy/src/main/java/org/mime4j/field/Field.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2286,
1109,
12,
780,
272,
13,
288,
3639,
514,
1831,
273,
272,
31,
7734,
1748,
540,
380,
1351,
16007,
326,
652,
18,
540,
1195,
3639,
727,
514,
640,
9002,
785,
273,
1831,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2286,
1109,
12,
780,
272,
13,
288,
3639,
514,
1831,
273,
272,
31,
7734,
1748,
540,
380,
1351,
16007,
326,
652,
18,
540,
1195,
3639,
727,
514,
640,
9002,
785,
273,
1831,
18,
... |
AntMacroDef macrodef = PsiTreeUtil.getParentOfType(getElement(), AntMacroDef.class); | final AntMacroDef macrodef = PsiTreeUtil.getParentOfType(getElement(), AntMacroDef.class); | public PsiElement resolve() { AntMacroDef macrodef = PsiTreeUtil.getParentOfType(getElement(), AntMacroDef.class); if (macrodef != null) { final String name = getCanonicalText(); for (PsiElement child : macrodef.getChildren()) { if (child instanceof AntStructuredElement && !(child instanceof AntAllTasksContainer)) { if (name.equals(((AntStructuredElement)child).getName())) { return child; } } } } return null; } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/7f7dc32cdeec2e71c61bbeef27d5ce51671ab917/AntMacroDefParameterReference.java/buggy/plugins/ant/src/com/intellij/lang/ant/psi/impl/reference/AntMacroDefParameterReference.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
453,
7722,
1046,
2245,
1435,
288,
565,
727,
18830,
17392,
3262,
11522,
536,
273,
453,
7722,
2471,
1304,
18,
588,
3054,
18859,
12,
21336,
9334,
18830,
17392,
3262,
18,
1106,
1769,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
453,
7722,
1046,
2245,
1435,
288,
565,
727,
18830,
17392,
3262,
11522,
536,
273,
453,
7722,
2471,
1304,
18,
588,
3054,
18859,
12,
21336,
9334,
18830,
17392,
3262,
18,
1106,
1769,
565,... |
/* * Note: I'm using the opennms-database.xml file in target/classes/etc * so that it has been filtered first. */ | System.setProperty("opennms.home", "src/test/opennms-home"); | public AvailabilityReportSchedulerServiceTest() throws MarshalException, ValidationException, IOException, PropertyVetoException, SQLException { /* * Note: I'm using the opennms-database.xml file in target/classes/etc * so that it has been filtered first. */ //DataSourceFactory.setInstance(new C3P0ConnectionFactory("../opennms-daemon/target/classes/etc/opennms-database.xml")); m_db = new MockDatabase(); DataSourceFactory.setInstance(m_db); } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/b1303b13b5b01c1746502874007067efce14b49a/AvailabilityReportSchedulerServiceTest.java/buggy/opennms-reporting/src/test/java/org/opennms/report/availability/AvailabilityReportSchedulerServiceTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
19309,
4820,
11870,
1179,
4709,
1435,
1216,
5884,
503,
16,
15614,
16,
1860,
16,
4276,
58,
11453,
503,
16,
6483,
288,
5411,
1748,
2398,
380,
3609,
30,
467,
17784,
1450,
326,
1696,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
19309,
4820,
11870,
1179,
4709,
1435,
1216,
5884,
503,
16,
15614,
16,
1860,
16,
4276,
58,
11453,
503,
16,
6483,
288,
5411,
1748,
2398,
380,
3609,
30,
467,
17784,
1450,
326,
1696,
82... |
window.setAlwaysOnTop(true); | try { window.setAlwaysOnTop(true); } catch (NoSuchMethodError e) { window.toFront(); } | public void showSplash(boolean progressBar) { if (instance != null) return; if (!progressBar) MainFrame.getInstance().setEnabled(false); JPanel panel = new JPanel(); JPanel foreground = new JPanel(); foreground.setOpaque(false); JPanel background = new JPanel() { public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setPaint(new GradientPaint(0, 0, Color.WHITE, getWidth() / 2, getHeight() * 3, Color.GRAY)); g2.fillRect(0, 0, getWidth(), getHeight()); } }; panel.setLayout(new OverlayLayout(panel)); panel.add(foreground); panel.add(background); window.setAlwaysOnTop(true); foreground.setLayout(new BorderLayout()); JProgressBar progress = new JProgressBar(); progress.setIndeterminate(true); progress.setName("Starting JPatch..."); progress.setBorderPainted(false); progress.setBackground(Color.GRAY); foreground.add(logo, BorderLayout.NORTH); JLabel label = new JLabel("<html><center><font size='+1' color='red'><b>DEVELOPMENT VERSION</b></font><br><br>written by Sascha Ledinsky<br>Copyright © 2002-2005<br><br>" + "<font size = '-2'>This program is free software.<br>You can redistribute it and/or modify" + "it under the terms of the<br>GNU General Public License as published by" + "the Free Software Foundation.<br><br></font>" + "<font color='gray'><b>http://www.jpatch.com</b></font></center></html>" ); label.setFont(new Font("Sans Serif", Font.PLAIN, 14)); JPanel testPanel = new JPanel(); testPanel.add(label); testPanel.setOpaque(false); foreground.add(testPanel, BorderLayout.CENTER); if (progressBar) foreground.add(progress, BorderLayout.SOUTH); panel.setBorder(BorderFactory.createRaisedBevelBorder()); window.getContentPane().add(panel); window.setSize(400,300); window.setLocationRelativeTo(null); window.setVisible(true); instance = this; window.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { clearSplash(); } }); } | 9769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9769/20d50e040a791418362f9541a915f1cebe4f8b3b/SplashScreen.java/clean/jpatch/src/jpatch/boundary/SplashScreen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2405,
16881,
961,
12,
6494,
29101,
13,
288,
202,
202,
430,
261,
1336,
480,
446,
13,
1082,
202,
2463,
31,
202,
202,
430,
16051,
8298,
5190,
13,
1082,
202,
6376,
3219,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2405,
16881,
961,
12,
6494,
29101,
13,
288,
202,
202,
430,
261,
1336,
480,
446,
13,
1082,
202,
2463,
31,
202,
202,
430,
16051,
8298,
5190,
13,
1082,
202,
6376,
3219,
18,
... |
ToolReference toolRef = (ToolReference) iter.next(); Element toolRefElement = doc.createElement(IConfiguration.TOOLREF_ELEMENT_NAME); element.appendChild(toolRefElement); toolRef.serialize(doc, toolRefElement); | ResourceConfiguration resConfig = (ResourceConfiguration) iter.next(); Element resElement = doc.createElement(IResourceConfiguration.RESOURCE_CONFIGURATION_ELEMENT_NAME); element.appendChild(resElement); resConfig.serialize(doc, resElement); | public void serialize(Document doc, Element element) { element.setAttribute(IConfiguration.ID, id); if (name != null) element.setAttribute(IConfiguration.NAME, name); if (parent != null) element.setAttribute(IConfiguration.PARENT, parent.getId()); // Serialize only the tool references defined in the configuration Iterator iter = getLocalToolReferences().listIterator(); while (iter.hasNext()) { ToolReference toolRef = (ToolReference) iter.next(); Element toolRefElement = doc.createElement(IConfiguration.TOOLREF_ELEMENT_NAME); element.appendChild(toolRefElement); toolRef.serialize(doc, toolRefElement); } // I am clean now isDirty = false; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/18b49394c46cbbecf041078a70e83e4975d004a7/Configuration.java/buggy/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4472,
12,
2519,
997,
16,
3010,
930,
13,
288,
202,
202,
2956,
18,
542,
1499,
12,
45,
1750,
18,
734,
16,
612,
1769,
9506,
202,
430,
261,
529,
480,
446,
13,
1082,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4472,
12,
2519,
997,
16,
3010,
930,
13,
288,
202,
202,
2956,
18,
542,
1499,
12,
45,
1750,
18,
734,
16,
612,
1769,
9506,
202,
430,
261,
529,
480,
446,
13,
1082,
202,
2... |
if (tabUnderPointer == null) return null; | if (tabUnderPointer == null) return null; | public StackDropResult dragOver(Control currentControl, Point location) { // Determine which tab we're currently dragging over Point localPos = paneFolder.getControl().toControl(location); final CTabItem tabUnderPointer = paneFolder.getItem(localPos); // This drop target only deals with tabs... if we're not dragging over // a tab, exit. if (tabUnderPointer == null) return null; // workaround when left tab is dragged over next int dragOverIndex = paneFolder.indexOf(tabUnderPointer); return new StackDropResult(Geometry.toDisplay(paneFolder.getControl(), tabUnderPointer.getBounds()), new Integer(dragOverIndex)); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/38085a8072ad4fd21bad0983f8bc31ac736c9f72/R21BasicStackPresentation.java/buggy/bundles/org.eclipse.ui.presentations.r21/src/org/eclipse/ui/internal/presentations/R21BasicStackPresentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7283,
7544,
1253,
8823,
4851,
12,
3367,
783,
3367,
16,
4686,
2117,
13,
288,
3639,
368,
10229,
1492,
3246,
732,
4565,
4551,
25434,
1879,
3639,
4686,
1191,
1616,
273,
13618,
3899,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7283,
7544,
1253,
8823,
4851,
12,
3367,
783,
3367,
16,
4686,
2117,
13,
288,
3639,
368,
10229,
1492,
3246,
732,
4565,
4551,
25434,
1879,
3639,
4686,
1191,
1616,
273,
13618,
3899,
18,
... |
RGB black = new RGB(0, 0, 0); RGB[] rgbs = new RGB[256]; rgbs[0] = black; rgbs[1] = black; | PaletteData dataPalette = new PaletteData(rgbs); imageData = new ImageData(size.x, size.y, 8, dataPalette); imageData.transparentPixel = getTransparentPixel(); | public ImageData getImageData() { Point size = getSize(); RGB black = new RGB(0, 0, 0); RGB[] rgbs = new RGB[256]; rgbs[0] = black; // transparency rgbs[1] = black; // black PaletteData dataPalette = new PaletteData(rgbs); imageData = new ImageData(size.x, size.y, 8, dataPalette); imageData.transparentPixel = 0; drawCompositeImage(size.x, size.y); for (int i = 0; i < rgbs.length; i++) { if (rgbs[i] == null) { rgbs[i] = black; } } return imageData; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e3dd797feef0e8d8e6d4e9d98c04b37c34c84ac0/CompositeImageDescriptor.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/CompositeImageDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3421,
751,
10567,
751,
1435,
288,
3639,
4686,
963,
273,
9950,
5621,
3639,
11510,
7721,
273,
394,
11510,
12,
20,
16,
374,
16,
374,
1769,
3639,
11510,
8526,
14524,
2038,
273,
394,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3421,
751,
10567,
751,
1435,
288,
3639,
4686,
963,
273,
9950,
5621,
3639,
11510,
7721,
273,
394,
11510,
12,
20,
16,
374,
16,
374,
1769,
3639,
11510,
8526,
14524,
2038,
273,
394,
115... |
return new ContributionItem(getId(sepAddition)) { /* (non-Javadoc) * @see org.eclipse.ui.internal.menus.AdditionBase#isSeparator() */ public boolean isSeparator() { return true; } /* (non-Javadoc) * @see org.eclipse.ui.internal.menus.AdditionBase#fill(org.eclipse.swt.widgets.Menu, int) */ public void fill(Menu parent, int index) { if (isSeparatorVisible(sepAddition)) { new MenuItem(parent, SWT.SEPARATOR, index); } } /* (non-Javadoc) * @see org.eclipse.ui.internal.menus.AdditionBase#fill(org.eclipse.swt.widgets.Menu, int) */ public void fill(ToolBar parent, int index) { if (isVisible()) { new ToolItem(parent, SWT.SEPARATOR, index); } } }; | return new SeparatorContributionItem(getId(sepAddition), sepAddition); | private IContributionItem createSeparatorAdditionContribution( final IConfigurationElement sepAddition) { return new ContributionItem(getId(sepAddition)) { /* (non-Javadoc) * @see org.eclipse.ui.internal.menus.AdditionBase#isSeparator() */ public boolean isSeparator() { return true; } /* (non-Javadoc) * @see org.eclipse.ui.internal.menus.AdditionBase#fill(org.eclipse.swt.widgets.Menu, int) */ public void fill(Menu parent, int index) { if (isSeparatorVisible(sepAddition)) { new MenuItem(parent, SWT.SEPARATOR, index); } } /* (non-Javadoc) * @see org.eclipse.ui.internal.menus.AdditionBase#fill(org.eclipse.swt.widgets.Menu, int) */ public void fill(ToolBar parent, int index) { if (isVisible()) { new ToolItem(parent, SWT.SEPARATOR, index); } } }; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/7708c9aa128d7f727df6c085dc73634c29372cac/MenuAdditionCacheEntry.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
442,
4027,
1180,
752,
6581,
30296,
442,
4027,
12,
1082,
202,
6385,
467,
1750,
1046,
5478,
30296,
13,
288,
1082,
202,
2463,
394,
735,
4027,
1180,
12,
26321,
12,
10814,
3029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
442,
4027,
1180,
752,
6581,
30296,
442,
4027,
12,
1082,
202,
6385,
467,
1750,
1046,
5478,
30296,
13,
288,
1082,
202,
2463,
394,
735,
4027,
1180,
12,
26321,
12,
10814,
3029... |
cfg.setFlags(cfg.getFlags() | PRUNED_INFEASIBLE_EXCEPTIONS); | public CFG getCFG(Method method) throws CFGBuilderException { MethodGen methodGen = getMethodGen(method); CFG cfg = getRawCFG(method); if (PRUNE_INFEASIBLE_EXCEPTION_EDGES && !cfg.isFlagSet(PRUNED_INFEASIBLE_EXCEPTIONS)) { try { TypeDataflow typeDataflow = getTypeDataflow(method); new PruneInfeasibleExceptionEdges(cfg, typeDataflow, getConstantPoolGen()).execute(); } catch (DataflowAnalysisException e) { // FIXME: should report the error } catch (ClassNotFoundException e) { lookupFailureCallback.reportMissingClass(e); } cfg.setFlags(cfg.getFlags() | PRUNED_INFEASIBLE_EXCEPTIONS); } if (PRUNE_UNCONDITIONAL_EXCEPTION_THROWER_EDGES && !cfg.isFlagSet(PRUNED_UNCONDITIONAL_THROWERS)) { try { new PruneUnconditionalExceptionThrowerEdges( methodGen, cfg, getConstantPoolGen(), lookupFailureCallback).execute(); } catch (DataflowAnalysisException e) { // FIXME: should report the error } cfg.setFlags(cfg.getFlags() | PRUNED_UNCONDITIONAL_THROWERS); } return cfg; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/ff3ea720ee372116f7c1e389ca1a48b2ed166ed8/ClassContext.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/ClassContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7577,
1927,
42,
43,
12,
1305,
707,
13,
1216,
7577,
1263,
503,
288,
202,
202,
1305,
7642,
707,
7642,
273,
6272,
7642,
12,
2039,
1769,
202,
202,
19727,
2776,
273,
10547,
19727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7577,
1927,
42,
43,
12,
1305,
707,
13,
1216,
7577,
1263,
503,
288,
202,
202,
1305,
7642,
707,
7642,
273,
6272,
7642,
12,
2039,
1769,
202,
202,
19727,
2776,
273,
10547,
19727,
... | |
return getConstant((NODE)rubyFrame.getCbase(), (RubyId)node.nd_vid(), self); | return getConstant((NODE)getRubyFrame().getCbase(), (RubyId)node.nd_vid(), self); | public RubyObject eval(RubyObject self, NODE n) { NODE node = n; RubyBoolean cond = null; RubyObject[] args = null; RubyObject value = null; RubyObject result = null; RubyModule rubyClass = 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: while (true) { try { // while (!rb_gets().isNil() false) { // HACK +++ if (true) { // HACK --- try { eval(self, node.nd_body()); } catch (RedoException rExcptn) { } } break; } catch (NextException nExcptn) { } catch (BreakException bExcptn) { break; } } 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: rubyBlock.push(node.nd_var(), node.nd_body(), self); rubyIter.push(Iter.ITER_PRE); while (true) { try { if (node.nd_type() == NODE_ITER) { result = eval(self, node.nd_iter()); } else { // String file = // int line = rubyBlock.flags &= ~RubyBlock.BLOCK_D_SCOPE; RubyBlock tmpBlock = beginCallargs(); RubyObject recv = eval(self, node.nd_iter()); endCallArgs(tmpBlock); // = file; // = line; result = recv.getRubyClass().call(recv, ruby.intern("each"), null, 0); } break; } catch (RetryException rExcptn) { } catch (ReturnException rExcptn) { result = rExcptn.getReturnValue(); break; } catch (BreakException bExcptn) { result = ruby.getNil(); break; } } rubyIter.pop(); rubyBlock.pop(); return result; 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() != null) { result = eval(self, node.nd_stts()); if (node.nd_stts().nd_type() == NODE_RESTARGS && ((RubyArray)result).length() == 1) { result = ((RubyArray)result).entry(0); } } else { result = ruby.getNil(); } return yield0(result, null, null, false); 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 */ /*if (ruby_scope->local_vars == 0) { rb_bug("unexpected local variable"); }*/ if (ruby.rubyScope.getLocalVars(node.nd_cnt()).isFalse()) { if (eval(self, node.nd_beg()).isTrue()) { ruby.rubyScope.setLocalVars(node.nd_cnt(), eval(self, node.nd_end()).isTrue() ? ruby.getFalse() : ruby.getTrue()); result = ruby.getTrue(); } else { result = ruby.getFalse(); } } else { if (eval(self, node.nd_end()).isTrue()) { ruby.rubyScope.setLocalVars(node.nd_cnt(), ruby.getFalse()); } result = ruby.getTrue(); } return result; case NODE_FLIP3: /* like SED */ /*if (ruby_scope->local_vars == 0) { rb_bug("unexpected local variable"); }*/ if (ruby.rubyScope.getLocalVars(node.nd_cnt()).isFalse()) { result = eval(self, node.nd_beg()).isTrue() ? ruby.getFalse() : ruby.getTrue(); ruby.rubyScope.setLocalVars(node.nd_cnt(), result); } else { if (eval(self, node.nd_end()).isTrue()) { ruby.rubyScope.setLocalVars(node.nd_cnt(), ruby.getFalse()); } result = ruby.getTrue(); } 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; RubyBlock tmpBlock = beginCallargs(); RubyObject recv = eval(self, node.nd_recv()); args = setupArgs(self, node.nd_args()); endCallArgs(tmpBlock); return recv.getRubyClass().call(recv, (RubyId)node.nd_mid(), args, 0); case NODE_FCALL: // TMP_PROTECT; tmpBlock = beginCallargs(); args = setupArgs(self, node.nd_args()); endCallArgs(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 = beginCallargs(); args = setupArgs(self, node.nd_args()); endCallArgs(tmpBlock); } rubyIter.push(rubyIter.getIter() != Iter.ITER_NOT ? Iter.ITER_PRE : Iter.ITER_NOT); result = rubyFrame.getLastClass().getSuperClass().call(rubyFrame.getSelf(), rubyFrame.getLastFunc(), args, 3); rubyIter.pop(); return result; case NODE_SCOPE: NODE saved_cref = null; Frame frame = rubyFrame; frame.setTmp(rubyFrame); rubyFrame = frame; ruby.rubyScope.push(); if (node.nd_rval() != null) { saved_cref = ruby_cref; ruby_cref = (NODE)node.nd_rval(); rubyFrame.setCbase(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); } result = eval(self, node.nd_next()); ruby.rubyScope.pop(); rubyFrame = frame.getTmp(); if (saved_cref != null) { ruby_cref = saved_cref; } return result; 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())); } // HACK +++ val = (RubyBoolean)recv.funcall((RubyId)node.nd_next().nd_aid(), val); // HACK --- 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.isInstanceVarDefined((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.setInstanceVar((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.getInstanceVar("__attached__").getClassVarSingleton().declareClassVar((RubyId)node.nd_vid(), result); return result; } ruby_cbase.declareClassVar((RubyId)node.nd_vid(), result); return result; case NODE_CVASGN: result = eval(self, node.nd_value()); self.getClassVarSingleton().setClassVar((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.getInstanceVar((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().getClassVar((RubyId)node.nd_vid()); } if (!ruby_cbase.isSingleton()) { return ruby_cbase.getClassVar((RubyId)node.nd_vid()); } return ruby_cbase.getInstanceVar("__attached__").getClassVarSingleton().getClassVar((RubyId)node.nd_vid()); case NODE_CVAR2: /* singleton method */ return self.getClassVarSingleton().getClassVar((RubyId)node.nd_vid()); case NODE_BLOCK_ARG: if (ruby.rubyScope.getLocalVars() == null) { throw new RuntimeException("BUG: unexpected block argument"); } if (isBlockGiven()) { result = getRuby().getNil(); // Create Proc object ruby.rubyScope.setLocalVars(node.nd_cnt(), result); return result; } else { return getRuby().getNil(); } case NODE_COLON2: value = eval(self, node.nd_head()); if (value instanceof RubyModule) { return ((RubyModule)value).getConstant((RubyId)node.nd_mid()); } else { return value.funcall((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(ruby); NODE list = node.nd_head(); while(list != null) { RubyObject key = eval(self, list.nd_head()); list = list.nd_next(); if (list == null) { // HACK +++ throw new RubyArgumentException("odd number list for Hash"); // HACK --- } value = eval(self, list.nd_head()); hash.m_aset(key, value); list = list.nd_next(); } return hash; case NODE_ZARRAY: /* zero length list */ return RubyArray.m_newArray(getRuby()); case NODE_ARRAY: ArrayList ary = new ArrayList(node.nd_alen()); for (; node != null ; node = node.nd_next()) { ary.add(eval(self, node.nd_head())); } return RubyArray.m_newArray(getRuby(), 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 (rubyFrame.getArgs().size() != 1) { throw new RubyArgumentException("wrong # of arguments(" + rubyFrame.getArgs().size() + "for 1)"); } return self.setInstanceVar((RubyId)node.nd_vid(), (RubyObject)rubyFrame.getArgs().get(0)); 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.getInstanceVar("__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: RubyGlobalEntry.getGlobalEntry((RubyId)node.nd_old()).alias((RubyId)node.nd_new()); 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 (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()); // end goto } } 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)); } } } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/f220dcff8a7e427e32a7f1f1bc78f38876b83620/RubyInterpreter.java/clean/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,
3639,
11922,
756,
273,
290,
31,
7734,
19817,
5507,
6941,
273,
446,
31,
3639,
19817,
921,
8526,
833,
273,
446,
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,
19817,
921,
5302,
12,
54,
10340,
921,
365,
16,
11922,
290,
13,
288,
3639,
11922,
756,
273,
290,
31,
7734,
19817,
5507,
6941,
273,
446,
31,
3639,
19817,
921,
8526,
833,
273,
446,
3... |
assertEquals(false, pb.isPaused(cal)); assertEquals(true, pb.isPaused(cal2)); assertEquals(false, pb.isPaused(cal3)); | assertEquals(false, pb.isPaused(cal.getTime())); assertEquals(true, pb.isPaused(cal2.getTime())); assertEquals(false, pb.isPaused(cal3.getTime())); | public void testIsPaused() { Calendar cal = Calendar.getInstance(); cal.set(2002, Calendar.DECEMBER, 23, 18, 00, 00); Calendar cal2 = Calendar.getInstance(); cal2.set(2002, Calendar.DECEMBER, 23, 20, 00, 00); Calendar cal3 = Calendar.getInstance(); cal3.set(2002, Calendar.DECEMBER, 23, 22, 00, 00); Calendar cal4 = Calendar.getInstance(); cal4.set(2002, Calendar.DECEMBER, 24, 3, 00, 00); Calendar cal5 = Calendar.getInstance(); cal5.set(2002, Calendar.DECEMBER, 24, 7, 00, 00); PauseBuilder pb = new PauseBuilder(); pb.setStartTime(1900); pb.setEndTime(2100); assertEquals(false, pb.isPaused(cal)); assertEquals(true, pb.isPaused(cal2)); assertEquals(false, pb.isPaused(cal3)); pb.setDay("monday"); assertEquals(false, pb.isPaused(cal)); assertEquals(true, pb.isPaused(cal2)); assertEquals(false, pb.isPaused(cal3)); pb.setDay("tuesday"); assertEquals(false, pb.isPaused(cal)); assertEquals(false, pb.isPaused(cal2)); assertEquals(false, pb.isPaused(cal3)); pb = new PauseBuilder(); pb.setStartTime(2100); pb.setEndTime(500); assertEquals(false, pb.isPaused(cal)); assertEquals(true, pb.isPaused(cal3)); assertEquals(true, pb.isPaused(cal4)); assertEquals(false, pb.isPaused(cal5)); pb.setDay("monday"); assertEquals(false, pb.isPaused(cal)); assertEquals(true, pb.isPaused(cal3)); assertEquals(true, pb.isPaused(cal4)); assertEquals(false, pb.isPaused(cal5)); pb.setDay("tuesday"); assertEquals(false, pb.isPaused(cal)); assertEquals(false, pb.isPaused(cal3)); assertEquals(false, pb.isPaused(cal4)); assertEquals(false, pb.isPaused(cal5)); } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/d899f4e50f7ae7a660e169e3d96d7cfc685f1893/PauseBuilderTest.java/buggy/main/test/net/sourceforge/cruisecontrol/PauseBuilderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
28590,
1435,
288,
3639,
5542,
1443,
273,
5542,
18,
588,
1442,
5621,
3639,
1443,
18,
542,
12,
6976,
22,
16,
5542,
18,
1639,
1441,
49,
6271,
16,
10213,
16,
6549,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
28590,
1435,
288,
3639,
5542,
1443,
273,
5542,
18,
588,
1442,
5621,
3639,
1443,
18,
542,
12,
6976,
22,
16,
5542,
18,
1639,
1441,
49,
6271,
16,
10213,
16,
6549,
16... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.