rem
stringlengths 1
226k
| add
stringlengths 0
227k
| context
stringlengths 6
326k
| meta
stringlengths 143
403
| input_ids
listlengths 256
256
| attention_mask
listlengths 256
256
| labels
listlengths 128
128
|
|---|---|---|---|---|---|---|
session = request.getSession(true); session.setAttribute("test", "xy");
|
if (threaded) { session = request.getSession(true); session.setAttribute("test", "xy"); }
|
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String resource = request.getPathInfo(); if (resource != null) { streamResource(resource, response); return; } String test = request.getParameter(PARAM_TEST); String runAll = request.getParameter(PARAM_RUN_ALL); String xsl = request.getParameter(PARAM_XSL); String stop = request.getParameter(PARAM_STOP); String output = request.getParameter(PARAM_OUTPUT); String[] testClassNames = null; String message; boolean filterTrace = true; boolean threaded = "true".equals(request.getParameter(PARAM_THREAD)) | getDefaultThreadMode(); if ("false".equals(request.getParameter(PARAM_FILTER_TRACE))) { filterTrace = false; } // xsl parameter overwrites init param, so use the init param only if the request parameter is null if (xsl == null) { xsl = xslStylesheet; } if (output == null) { output = getDefaultOutput(); } HttpSession session = request.getSession(false); if (session != null && stop != null) { TestRunner runner = (TestRunner)session.getAttribute(TESTRUNNER_KEY); runner.stop(); } TestRunnerResults results = null; if (session != null) { results = (TestRunnerResults)session.getAttribute(TESTRESULT_KEY); } if (results != null) { renderResults(results, request, response, xsl, filterTrace); if (results.isFinished()) { session.removeAttribute(TESTRESULT_KEY); session.removeAttribute(TESTRUNNER_KEY); } return; } if (runAll != null) { testClassNames = searchForTests(request.getParameterValues(PARAM_SEARCH)); } else { testClassNames = request.getParameterValues(PARAM_SUITE); } if (testClassNames == null) { if (runAll == null) { message = ""; } else { message = "You requested all test cases to be run by setting the \"all\" parameter, but no test case was found."; } errorResponse(searchForTests(request.getParameterValues(PARAM_SEARCH)), request.getContextPath() + request.getServletPath(), message, response.getWriter(), output, request, response, xsl, filterTrace); return; } if ((test != null) && (testClassNames.length != 1)) { message = "You requested to run a single test case but provided more than one test suite."; errorResponse(searchForTests(request.getParameterValues(PARAM_SEARCH)), request.getContextPath() + request.getServletPath(), message, response.getWriter(), output, request, response, xsl, filterTrace); return; } // Support for Jakarta Cactus test cases: // Set up default Cactus System properties so that there is no need // to have a cactus.properties file in WEB-INF/classes System.setProperty(CACTUS_CONTEXT_URL_PROPERTY, "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath()); session = request.getSession(true); session.setAttribute("test", "xy"); results = runTests(test, testClassNames, request, threaded); renderResults(results, request, response, xsl, filterTrace); }
|
3994 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3994/77d35b92d95655c57d4b7b79f70a77f8e5550b6c/JUnitEEServlet.java/buggy/JUnitEE/src/testrunner/org/junitee/servlet/JUnitEEServlet.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
12446,
766,
13,
1216,
16517,
16,
1860,
288,
565,
514,
1058,
273,
590,
18,
588,
743,
966,
5621,
565,
309,
261,
3146,
480,
446,
13,
288,
1377,
1407,
1420,
12,
3146,
16,
766,
1769,
1377,
327,
31,
565,
289,
565,
514,
1842,
273,
590,
18,
588,
1662,
12,
8388,
67,
16961,
1769,
565,
514,
1086,
1595,
273,
590,
18,
588,
1662,
12,
8388,
67,
15238,
67,
4685,
1769,
565,
514,
20791,
273,
590,
18,
588,
1662,
12,
8388,
67,
60,
4559,
1769,
565,
514,
2132,
273,
590,
18,
588,
1662,
12,
8388,
67,
17513,
1769,
565,
514,
876,
273,
590,
18,
588,
1662,
12,
8388,
67,
15527,
1769,
565,
514,
8526,
1842,
18127,
273,
446,
31,
565,
514,
883,
31,
565,
1250,
1034,
3448,
273,
638,
31,
565,
1250,
286,
20528,
273,
315,
3767,
9654,
14963,
12,
2293,
18,
588,
1662,
12,
8388,
67,
21730,
3719,
571,
4829,
3830,
2309,
5621,
565,
309,
7566,
5743,
9654,
14963,
12,
2293,
18,
588,
1662,
12,
8388,
67,
11126,
67,
23827,
20349,
288,
1377,
1034,
3448,
273,
629,
31,
565,
289,
565,
368,
20791,
1569,
28151,
1208,
579,
16,
1427,
999,
326,
1208,
579,
1338,
309,
326,
590,
1569,
353,
446,
565,
309,
261,
30903,
422,
446,
13,
288,
1377,
20791,
273,
20791,
24656,
31,
565,
289,
565,
309,
261,
2844,
422,
446,
13,
288,
1377,
876,
273,
4829,
1447,
5621,
565,
289,
565,
26166,
1339,
273,
590,
18,
588,
2157,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
12446,
766,
13,
1216,
16517,
16,
1860,
288,
565,
514,
1058,
273,
590,
18,
588,
743,
966,
5621,
565,
309,
261,
3146,
480,
446,
13,
288,
1377,
1407,
1420,
12,
3146,
16,
766,
1769,
1377,
327,
31,
565,
289,
565,
514,
1842,
273,
590,
18,
588,
1662,
12,
8388,
67,
16961,
1769,
565,
514,
1086,
1595,
273,
590,
18,
588,
1662,
12,
8388,
67,
15238,
67,
4685,
1769,
565,
514,
20791,
273,
590,
18,
588,
1662,
12,
8388,
67,
60,
4559,
1769,
565,
514,
2132,
273,
590,
18,
588,
1662,
12,
8388,
67,
17513,
1769,
565,
514,
876,
273,
590,
18,
588,
1662,
12,
8388,
67,
15527,
1769,
565,
514,
2
] |
if (toolItem != null)
|
if (toolItem != null){
|
private void showPerspectiveBarPopup(Point pt) { if (perspectiveBar == null) return; // Get the tool item under the mouse. ToolBar toolBar = perspectiveBar.getControl(); ToolItem toolItem = toolBar.getItem(toolBar.toControl(pt)); // Get the action for the tool item. Object data = null; if (toolItem != null) data = toolItem.getData(); if (toolItem == null || !(data instanceof PerspectiveBarContributionItem)) { if (genericMenu == null) { Menu menu = new Menu(toolBar); addDockOnSubMenu(menu); addShowTextItem(menu); genericMenu = menu; } // set the state of the menu items to match the preferences genericMenu .getItem(1) .setSelection( PrefUtil .getAPIPreferenceStore() .getBoolean( IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR)); updateLocationItems(genericMenu.getItem(0).getMenu(), currentLocation); // Show popup menu. genericMenu.setLocation(pt.x, pt.y); genericMenu.setVisible(true); return; } if (data == null || !(data instanceof PerspectiveBarContributionItem)) return; // The perspective bar menu is created lazily here. // Its data is set (each time) to the tool item, which refers to the SetPagePerspectiveAction // which in turn refers to the page and perspective. // It is important not to refer to the action, the page or the perspective directly // since otherwise the menu hangs on to them after they are closed. // By hanging onto the tool item instead, these references are cleared when the // corresponding page or perspective is closed. // See bug 11282 for more details on why it is done this way. if (popupMenu == null) { Menu menu = new Menu(toolBar); addCustomizeItem(menu); addSaveAsItem(menu); addResetItem(menu); addCloseItems(menu); new MenuItem(menu, SWT.SEPARATOR); addDockOnSubMenu(menu); addShowTextItem(menu); popupMenu = menu; } popupMenu.setData(toolItem); // set the state of the menu items to match the preferences popupMenu .getItem(7) .setSelection( PrefUtil .getAPIPreferenceStore() .getBoolean( IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR)); updateLocationItems(popupMenu.getItem(6).getMenu(), currentLocation); // Show popup menu. popupMenu.setLocation(pt.x, pt.y); popupMenu.setVisible(true); }
|
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/1b241b2dc9f3fb95553a17afa2c33565880587ba/PerspectiveSwitcher.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2405,
14781,
16772,
5190,
13770,
12,
2148,
5818,
13,
288,
3639,
309,
261,
10422,
16772,
5190,
422,
446,
13,
5411,
327,
31,
3639,
368,
968,
326,
5226,
761,
3613,
326,
7644,
18,
3639,
13288,
5190,
5226,
5190,
273,
26651,
5190,
18,
588,
3367,
5621,
3639,
13288,
1180,
5226,
1180,
273,
5226,
5190,
18,
588,
1180,
12,
6738,
5190,
18,
869,
3367,
12,
337,
10019,
3639,
368,
968,
326,
1301,
364,
326,
5226,
761,
18,
3639,
1033,
501,
273,
446,
31,
3639,
309,
261,
6738,
1180,
480,
446,
15329,
5411,
501,
273,
5226,
1180,
18,
588,
751,
5621,
3639,
309,
261,
6738,
1180,
422,
446,
7734,
747,
401,
12,
892,
1276,
453,
414,
16772,
5190,
442,
4027,
1180,
3719,
288,
5411,
309,
261,
13540,
4599,
422,
446,
13,
288,
7734,
9809,
3824,
273,
394,
9809,
12,
6738,
5190,
1769,
7734,
527,
40,
975,
1398,
1676,
4599,
12,
5414,
1769,
7734,
527,
5706,
1528,
1180,
12,
5414,
1769,
7734,
5210,
4599,
273,
3824,
31,
5411,
289,
5411,
368,
444,
326,
919,
434,
326,
3824,
1516,
358,
845,
326,
12750,
5411,
5210,
4599,
10792,
263,
588,
1180,
12,
21,
13,
10792,
263,
542,
6233,
12,
18701,
28184,
1304,
4766,
565,
263,
588,
2557,
9624,
2257,
1435,
4766,
565,
263,
588,
5507,
12,
4766,
5411,
467,
2421,
22144,
9624,
2918,
18,
16677,
67,
5151,
67,
673,
67,
3194,
23810,
1268,
5354,
67,
21908,
10019,
5411,
1089,
2735,
3126,
12,
13540,
4599,
18,
588,
1180,
12,
20,
2934,
588,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
14781,
16772,
5190,
13770,
12,
2148,
5818,
13,
288,
3639,
309,
261,
10422,
16772,
5190,
422,
446,
13,
5411,
327,
31,
3639,
368,
968,
326,
5226,
761,
3613,
326,
7644,
18,
3639,
13288,
5190,
5226,
5190,
273,
26651,
5190,
18,
588,
3367,
5621,
3639,
13288,
1180,
5226,
1180,
273,
5226,
5190,
18,
588,
1180,
12,
6738,
5190,
18,
869,
3367,
12,
337,
10019,
3639,
368,
968,
326,
1301,
364,
326,
5226,
761,
18,
3639,
1033,
501,
273,
446,
31,
3639,
309,
261,
6738,
1180,
480,
446,
15329,
5411,
501,
273,
5226,
1180,
18,
588,
751,
5621,
3639,
309,
261,
6738,
1180,
422,
446,
7734,
747,
401,
12,
892,
1276,
453,
414,
16772,
5190,
442,
4027,
2
] |
int wrapGuidePos = textArea.getDisplayManager().wrapMargin
|
int wrapGuidePos = textArea.wrapMargin
|
public String getToolTipText(int x, int y) { DisplayManager displayManager = textArea.displayManager; if(displayManager.wrapMargin != 0 && !displayManager.wrapToWidth && isWrapGuidePainted()) { int wrapGuidePos = textArea.getDisplayManager().wrapMargin + textArea.getHorizontalOffset(); if(Math.abs(x - wrapGuidePos) < 5) { return String.valueOf(textArea.getBuffer() .getProperty("maxLineLen")); } } return null; }
|
6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/d6424d4954f7bbd53ec91d40fabf6c78ea62faca/TextAreaPainter.java/clean/org/gjt/sp/jedit/textarea/TextAreaPainter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
514,
336,
29250,
1528,
12,
474,
619,
16,
509,
677,
13,
202,
202,
95,
1082,
202,
4236,
1318,
2562,
1318,
273,
977,
5484,
18,
5417,
1318,
31,
1082,
202,
430,
12,
5417,
1318,
18,
4113,
9524,
480,
374,
9506,
202,
10,
10,
401,
5417,
1318,
18,
4113,
774,
2384,
9506,
202,
10,
10,
353,
2964,
17424,
12699,
329,
10756,
1082,
202,
95,
9506,
202,
474,
2193,
17424,
1616,
273,
977,
5484,
18,
588,
4236,
1318,
7675,
4113,
9524,
6862,
202,
15,
977,
5484,
18,
588,
14457,
2335,
5621,
9506,
202,
430,
12,
10477,
18,
5113,
12,
92,
300,
2193,
17424,
1616,
13,
411,
1381,
13,
9506,
202,
95,
6862,
202,
2463,
514,
18,
1132,
951,
12,
955,
5484,
18,
588,
1892,
1435,
25083,
202,
18,
588,
1396,
2932,
1896,
1670,
2891,
7923,
1769,
9506,
202,
97,
1082,
202,
97,
1082,
202,
2463,
446,
31,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3196,
202,
482,
514,
336,
29250,
1528,
12,
474,
619,
16,
509,
677,
13,
202,
202,
95,
1082,
202,
4236,
1318,
2562,
1318,
273,
977,
5484,
18,
5417,
1318,
31,
1082,
202,
430,
12,
5417,
1318,
18,
4113,
9524,
480,
374,
9506,
202,
10,
10,
401,
5417,
1318,
18,
4113,
774,
2384,
9506,
202,
10,
10,
353,
2964,
17424,
12699,
329,
10756,
1082,
202,
95,
9506,
202,
474,
2193,
17424,
1616,
273,
977,
5484,
18,
588,
4236,
1318,
7675,
4113,
9524,
6862,
202,
15,
977,
5484,
18,
588,
14457,
2335,
5621,
9506,
202,
430,
12,
10477,
18,
5113,
12,
92,
300,
2193,
17424,
1616,
13,
411,
1381,
13,
9506,
202,
95,
6862,
202,
2463,
514,
18,
1132,
951,
12,
2
] |
new FCPServer(portNumber+3000, this); System.out.println("Starting FCP server on port "+(portNumber+3000)); SNMPAgent.setSNMPPort(portNumber+4000); System.out.println("Starting SNMP server on port "+(portNumber+4000)); SNMPStarter.initialize();
|
void start(boolean noSwaps) throws NodeInitException { if(!noSwaps) lm.startSender(this, this.swapInterval); ps.start(); usm.start(); // Start services // TMCI TextModeClientInterface.maybeCreate(this, config); // Fproxy // FIXME this is a hack, the real way to do this is plugins SimpleToadletServer.maybeCreateFproxyEtc(this, config); // FCP try { fcpServer = FCPServer.maybeCreate(this, config); } catch (IOException e) { throw new NodeInitException(EXIT_COULD_NOT_START_FCP, "Could not start FCP: "+e); } // SNMP SNMPStarter.maybeCreate(this, config); // FIXME old code to use above new FCPServer(portNumber+3000, this); System.out.println("Starting FCP server on port "+(portNumber+3000)); SNMPAgent.setSNMPPort(portNumber+4000); System.out.println("Starting SNMP server on port "+(portNumber+4000)); SNMPStarter.initialize(); // Start testnet handler if(testnetHandler != null) testnetHandler.start(); }
|
51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/01c14cd48d872bfb5d34b94395d44bb4bf44316e/Node.java/clean/src/freenet/node/Node.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
787,
12,
6494,
1158,
6050,
6679,
13,
1216,
2029,
2570,
503,
288,
3639,
309,
12,
5,
2135,
6050,
6679,
13,
5411,
14966,
18,
1937,
12021,
12,
2211,
16,
333,
18,
22270,
4006,
1769,
3639,
4250,
18,
1937,
5621,
3639,
584,
81,
18,
1937,
5621,
7734,
368,
3603,
4028,
7734,
368,
27435,
7266,
3639,
3867,
2309,
1227,
1358,
18,
19133,
1684,
12,
2211,
16,
642,
1769,
7734,
368,
478,
5656,
3639,
368,
9852,
333,
353,
279,
11769,
16,
326,
2863,
4031,
358,
741,
333,
353,
4799,
3639,
4477,
774,
361,
1810,
2081,
18,
19133,
1684,
42,
5656,
41,
5111,
12,
2211,
16,
642,
1769,
7734,
368,
478,
4258,
3639,
775,
288,
1082,
202,
74,
4057,
2081,
273,
478,
4258,
2081,
18,
19133,
1684,
12,
2211,
16,
642,
1769,
202,
202,
97,
1044,
261,
14106,
425,
13,
288,
1082,
202,
12849,
394,
2029,
2570,
503,
12,
28682,
67,
3865,
24608,
67,
4400,
67,
7570,
67,
42,
4258,
16,
315,
4445,
486,
787,
478,
4258,
30,
13773,
73,
1769,
202,
202,
97,
7734,
368,
14204,
4566,
3639,
14204,
4566,
510,
14153,
18,
19133,
1684,
12,
2211,
16,
642,
1769,
7734,
368,
9852,
1592,
981,
358,
999,
5721,
7734,
394,
478,
4258,
2081,
12,
655,
1854,
15,
23,
3784,
16,
333,
1769,
3639,
2332,
18,
659,
18,
8222,
2932,
11715,
478,
4258,
1438,
603,
1756,
13773,
12,
655,
1854,
15,
23,
3784,
10019,
3639,
14204,
4566,
3630,
18,
542,
13653,
4566,
2617,
12,
655,
1854,
15,
24,
3784,
1769,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
12,
6494,
1158,
6050,
6679,
13,
1216,
2029,
2570,
503,
288,
3639,
309,
12,
5,
2135,
6050,
6679,
13,
5411,
14966,
18,
1937,
12021,
12,
2211,
16,
333,
18,
22270,
4006,
1769,
3639,
4250,
18,
1937,
5621,
3639,
584,
81,
18,
1937,
5621,
7734,
368,
3603,
4028,
7734,
368,
27435,
7266,
3639,
3867,
2309,
1227,
1358,
18,
19133,
1684,
12,
2211,
16,
642,
1769,
7734,
368,
478,
5656,
3639,
368,
9852,
333,
353,
279,
11769,
16,
326,
2863,
4031,
358,
741,
333,
353,
4799,
3639,
4477,
774,
361,
1810,
2081,
18,
19133,
1684,
42,
5656,
41,
5111,
12,
2211,
16,
642,
1769,
7734,
368,
478,
4258,
3639,
775,
288,
1082,
202,
74,
4057,
2081,
273,
478,
2
] |
|
sfs.put("FCPVersion", "0.7.0");
|
sfs.put("FCPVersion", "2.0");
|
public SimpleFieldSet getFieldSet() { SimpleFieldSet sfs = new SimpleFieldSet(); // FIXME sfs.put("FCPVersion", "0.7.0"); sfs.put("Node", "Fred"); sfs.put("Version", Version.getVersionString()); sfs.put("Testnet", Boolean.toString(node.isTestnetEnabled())); return sfs; }
|
50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/4098bfefecadbd60516f6a933dcc6de3842eca52/NodeHelloMessage.java/buggy/src/freenet/node/fcp/NodeHelloMessage.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4477,
974,
694,
5031,
694,
1435,
288,
202,
202,
5784,
974,
694,
272,
2556,
273,
394,
4477,
974,
694,
5621,
202,
202,
759,
9852,
202,
202,
87,
2556,
18,
458,
2932,
42,
4258,
1444,
3113,
315,
20,
18,
27,
18,
20,
8863,
202,
202,
87,
2556,
18,
458,
2932,
907,
3113,
315,
42,
1118,
8863,
202,
202,
87,
2556,
18,
458,
2932,
1444,
3113,
4049,
18,
588,
1444,
780,
10663,
202,
202,
87,
2556,
18,
458,
2932,
4709,
2758,
3113,
3411,
18,
10492,
12,
2159,
18,
291,
4709,
2758,
1526,
1435,
10019,
202,
202,
2463,
272,
2556,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4477,
974,
694,
5031,
694,
1435,
288,
202,
202,
5784,
974,
694,
272,
2556,
273,
394,
4477,
974,
694,
5621,
202,
202,
759,
9852,
202,
202,
87,
2556,
18,
458,
2932,
42,
4258,
1444,
3113,
315,
20,
18,
27,
18,
20,
8863,
202,
202,
87,
2556,
18,
458,
2932,
907,
3113,
315,
42,
1118,
8863,
202,
202,
87,
2556,
18,
458,
2932,
1444,
3113,
4049,
18,
588,
1444,
780,
10663,
202,
202,
87,
2556,
18,
458,
2932,
4709,
2758,
3113,
3411,
18,
10492,
12,
2159,
18,
291,
4709,
2758,
1526,
1435,
10019,
202,
202,
2463,
272,
2556,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
RandomGrabArrayWithClient[] newArrays = new RandomGrabArrayWithClient[grabArrays.length+1];
|
RemoveRandomWithClient[] newArrays = new RemoveRandomWithClient[grabArrays.length+1];
|
public synchronized void add(Object client, RandomGrabArrayItem item) { RandomGrabArrayWithClient rga; if(!grabArraysByClient.containsKey(client)) { rga = new RandomGrabArrayWithClient(client, rand); RandomGrabArrayWithClient[] newArrays = new RandomGrabArrayWithClient[grabArrays.length+1]; System.arraycopy(grabArrays, 0, newArrays, 0, grabArrays.length); newArrays[grabArrays.length] = rga; grabArrays = newArrays; grabArraysByClient.put(client, rga); } else { rga = (RandomGrabArrayWithClient) grabArraysByClient.get(client); } rga.add(item); }
|
50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/297590d81e836aa059723f8bbaa0e7d87d0bca77/SectoredRandomGrabArray.java/clean/src/freenet/support/SectoredRandomGrabArray.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
12,
921,
1004,
16,
8072,
14571,
70,
1076,
1180,
761,
13,
288,
202,
202,
8529,
14571,
70,
1076,
1190,
1227,
14524,
69,
31,
202,
202,
430,
12,
5,
2752,
70,
12726,
858,
1227,
18,
12298,
653,
12,
2625,
3719,
288,
1082,
202,
86,
15833,
273,
394,
8072,
14571,
70,
1076,
1190,
1227,
12,
2625,
16,
5605,
1769,
1082,
202,
8529,
14571,
70,
1076,
1190,
1227,
8526,
11653,
87,
273,
394,
8072,
14571,
70,
1076,
1190,
1227,
63,
2752,
70,
12726,
18,
2469,
15,
21,
15533,
1082,
202,
3163,
18,
1126,
3530,
12,
2752,
70,
12726,
16,
374,
16,
11653,
87,
16,
374,
16,
11086,
12726,
18,
2469,
1769,
1082,
202,
2704,
12726,
63,
2752,
70,
12726,
18,
2469,
65,
273,
14524,
69,
31,
1082,
202,
2752,
70,
12726,
273,
11653,
87,
31,
1082,
202,
2752,
70,
12726,
858,
1227,
18,
458,
12,
2625,
16,
14524,
69,
1769,
202,
202,
97,
469,
288,
1082,
202,
86,
15833,
273,
261,
8529,
14571,
70,
1076,
1190,
1227,
13,
11086,
12726,
858,
1227,
18,
588,
12,
2625,
1769,
202,
202,
97,
202,
202,
86,
15833,
18,
1289,
12,
1726,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
12,
921,
1004,
16,
8072,
14571,
70,
1076,
1180,
761,
13,
288,
202,
202,
8529,
14571,
70,
1076,
1190,
1227,
14524,
69,
31,
202,
202,
430,
12,
5,
2752,
70,
12726,
858,
1227,
18,
12298,
653,
12,
2625,
3719,
288,
1082,
202,
86,
15833,
273,
394,
8072,
14571,
70,
1076,
1190,
1227,
12,
2625,
16,
5605,
1769,
1082,
202,
8529,
14571,
70,
1076,
1190,
1227,
8526,
11653,
87,
273,
394,
8072,
14571,
70,
1076,
1190,
1227,
63,
2752,
70,
12726,
18,
2469,
15,
21,
15533,
1082,
202,
3163,
18,
1126,
3530,
12,
2752,
70,
12726,
16,
374,
16,
11653,
87,
16,
374,
16,
11086,
12726,
18,
2469,
1769,
1082,
202,
2704,
12726,
63,
2
] |
int type = T80; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; { match("static");
|
try { int type = T80; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; { match("static");
|
public void mT80() throws RecognitionException { int type = T80; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:21:7: ( 'static' ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:21:7: 'static' { match("static"); } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} }
|
6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7e425814ce563fcc662b266adb2a4dc8e1a95d19/JavaParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParserLexer.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21115,
3672,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
399,
3672,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,
3639,
509,
1149,
2555,
273,
23577,
2555,
382,
1670,
5621,
3639,
509,
1904,
273,
3155,
18,
5280,
67,
15814,
31,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290,
19,
3341,
19,
12215,
19,
18756,
19,
6290,
19,
4288,
19,
5852,
2678,
18,
31731,
18,
75,
30,
5340,
30,
27,
30,
261,
296,
3845,
11,
262,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290,
19,
3341,
19,
12215,
19,
18756,
19,
6290,
19,
4288,
19,
5852,
2678,
18,
31731,
18,
75,
30,
5340,
30,
27,
30,
296,
3845,
11,
3639,
288,
3639,
845,
2932,
3845,
8863,
3639,
289,
3639,
309,
261,
1147,
631,
2011,
262,
288,
18356,
12,
723,
16,
1369,
16,
3001,
2555,
16,
4327,
16,
1937,
16,
588,
2156,
1016,
1435,
17,
21,
1769,
97,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21115,
3672,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
399,
3672,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,
3639,
509,
1149,
2555,
273,
23577,
2555,
382,
1670,
5621,
3639,
509,
1904,
273,
3155,
18,
5280,
67,
15814,
31,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290,
19,
3341,
19,
12215,
19,
18756,
19,
6290,
19,
4288,
19,
5852,
2678,
18,
31731,
18,
75,
30,
5340,
30,
27,
30,
261,
296,
3845,
11,
262,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
2
] |
String relatedClassPropertyName = null; for(Iterator i = relatedClassRelationships.keySet().iterator();i.hasNext();) { String currentKey = (String)i.next(); Class currentClass = (Class)relatedClassRelationships.get( currentKey ); if(property.getDomainClass().getClazz().getName().equals( currentClass.getName() )) { relatedClassPropertyName = currentKey; break; } } relatedClassPropertyType = GrailsClassUtils.getProperyType( propType, relatedClassPropertyName ); } if(relatedClassPropertyType == null) { PropertyDescriptor[] descriptors = GrailsClassUtils.getPropertiesOfType(propType, getClazz()); if(descriptors.length == 1) { relatedClassPropertyType = descriptors[0].getPropertyType(); } } establishDomainClassRelationshipToType( property, relatedClassPropertyType ); }
|
if( relatedClassRelationships != null && !relatedClassRelationships.isEmpty() ) { String relatedClassPropertyName = null; for(Iterator i = relatedClassRelationships.keySet().iterator();i.hasNext();) { String currentKey = (String)i.next(); Class currentClass = (Class)relatedClassRelationships.get( currentKey ); if(property.getDomainClass().getClazz().getName().equals( currentClass.getName() )) { relatedClassPropertyName = currentKey; break; } } relatedClassPropertyType = GrailsClassUtils.getProperyType( propType, relatedClassPropertyName ); } if(relatedClassPropertyType == null) { PropertyDescriptor[] descriptors = GrailsClassUtils.getPropertiesOfType(propType, getClazz()); if(descriptors.length == 1) { relatedClassPropertyType = descriptors[0].getPropertyType(); } } establishDomainClassRelationshipToType( property, relatedClassPropertyType ); }
|
private void establishDomainClassRelationship(DefaultGrailsDomainClassProperty property) { Class propType = property.getType(); // establish relationship to type Map relatedClassRelationships = GrailsDomainConfigurationUtil.getAssociationMap(propType); Class relatedClassPropertyType = null; // if there is a relationships map use that to find out // whether it is mapped to a Set if( relatedClassRelationships != null && !relatedClassRelationships.isEmpty() ) { String relatedClassPropertyName = null; // retrieve the property name for(Iterator i = relatedClassRelationships.keySet().iterator();i.hasNext();) { String currentKey = (String)i.next(); Class currentClass = (Class)relatedClassRelationships.get( currentKey ); if(property.getDomainClass().getClazz().getName().equals( currentClass.getName() )) { relatedClassPropertyName = currentKey; break; } } // get the type of the property relatedClassPropertyType = GrailsClassUtils.getProperyType( propType, relatedClassPropertyName ); } // otherwise retrieve all the properties of the type from the associated class if(relatedClassPropertyType == null) { PropertyDescriptor[] descriptors = GrailsClassUtils.getPropertiesOfType(propType, getClazz()); // if there is only one then the association is established if(descriptors.length == 1) { relatedClassPropertyType = descriptors[0].getPropertyType(); } } // establish relationship based on this type establishDomainClassRelationshipToType( property, relatedClassPropertyType ); }
|
28089 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28089/58974951e3276884850340e13cf2bb066cb110b9/DefaultGrailsDomainClass.java/clean/src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClass.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
18312,
3748,
797,
8180,
12,
1868,
14571,
14573,
3748,
797,
1396,
1272,
13,
288,
202,
202,
797,
2270,
559,
273,
1272,
18,
588,
559,
5621,
202,
202,
759,
18312,
5232,
358,
618,
202,
202,
863,
3746,
797,
17185,
273,
10812,
14573,
3748,
1750,
1304,
18,
588,
7174,
863,
12,
5986,
559,
1769,
202,
202,
797,
3746,
797,
22802,
273,
446,
31,
9506,
202,
759,
309,
1915,
353,
279,
11499,
852,
999,
716,
358,
1104,
596,
3196,
202,
759,
2856,
518,
353,
5525,
358,
279,
1000,
202,
202,
430,
12,
202,
9243,
797,
17185,
480,
446,
597,
9506,
202,
5,
9243,
797,
17185,
18,
291,
1921,
1435,
262,
288,
6862,
6862,
9506,
202,
780,
3746,
797,
13073,
273,
446,
31,
1082,
202,
759,
4614,
326,
1272,
508,
1082,
202,
1884,
12,
3198,
277,
273,
3746,
797,
17185,
18,
856,
694,
7675,
9838,
5621,
77,
18,
5332,
2134,
5621,
13,
288,
9506,
202,
780,
19447,
273,
261,
780,
13,
77,
18,
4285,
5621,
9506,
202,
797,
28742,
273,
261,
797,
13,
9243,
797,
17185,
18,
588,
12,
19447,
11272,
9506,
202,
430,
12,
4468,
18,
588,
3748,
797,
7675,
588,
14616,
7675,
17994,
7675,
14963,
12,
225,
28742,
18,
17994,
1435,
225,
8623,
288,
6862,
202,
9243,
797,
13073,
273,
19447,
31,
6862,
202,
8820,
31,
9506,
202,
97,
6862,
9506,
202,
97,
1082,
202,
759,
336,
326,
618,
434,
326,
1272,
6862,
6862,
6862,
1082,
202,
9243,
797,
22802,
273,
10812,
14573,
797,
1989,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18312,
3748,
797,
8180,
12,
1868,
14571,
14573,
3748,
797,
1396,
1272,
13,
288,
202,
202,
797,
2270,
559,
273,
1272,
18,
588,
559,
5621,
202,
202,
759,
18312,
5232,
358,
618,
202,
202,
863,
3746,
797,
17185,
273,
10812,
14573,
3748,
1750,
1304,
18,
588,
7174,
863,
12,
5986,
559,
1769,
202,
202,
797,
3746,
797,
22802,
273,
446,
31,
9506,
202,
759,
309,
1915,
353,
279,
11499,
852,
999,
716,
358,
1104,
596,
3196,
202,
759,
2856,
518,
353,
5525,
358,
279,
1000,
202,
202,
430,
12,
202,
9243,
797,
17185,
480,
446,
597,
9506,
202,
5,
9243,
797,
17185,
18,
291,
1921,
1435,
262,
288,
6862,
6862,
9506,
202,
780,
3746,
797,
2
] |
locationArray = fLocationPairs.get(namespace) ; if(locationArray != null){ String [] temp = ((XMLSchemaLoader.LocationArray)locationArray).getLocationArray() ; fXSDDescription.fLocationHints = new String [temp.length] ; System.arraycopy(temp, 0 , fXSDDescription.fLocationHints, 0, temp.length ); }
|
Object locationArray = fLocationPairs.get(namespace) ; if(locationArray != null) temp = ((XMLSchemaLoader.LocationArray)locationArray).getLocationArray() ;
|
SchemaGrammar findSchemaGrammar(short contextType , String namespace , QName enclosingElement, QName triggeringComponet, XMLAttributes attributes ){ SchemaGrammar grammar = null ; //get the grammar from local pool... grammar = fGrammarBucket.getGrammar(namespace); if (grammar == null){ fXSDDescription.reset(); fXSDDescription.fContextType = contextType ; fXSDDescription.fTargetNamespace = namespace ; fXSDDescription.fEnclosedElementName = enclosingElement ; fXSDDescription.fTriggeringComponent = triggeringComponet ; fXSDDescription.fAttributes = attributes ; if (fBaseURI != null) { fXSDDescription.setBaseSystemId(fBaseURI); } Object locationArray = null ; if( namespace != null){ locationArray = fLocationPairs.get(namespace) ; if(locationArray != null){ String [] temp = ((XMLSchemaLoader.LocationArray)locationArray).getLocationArray() ; fXSDDescription.fLocationHints = new String [temp.length] ; System.arraycopy(temp, 0 , fXSDDescription.fLocationHints, 0, temp.length ); } }else{ String [] temp = fNoNamespaceLocationArray.getLocationArray() ; fXSDDescription.fLocationHints = new String [temp.length] ; System.arraycopy(temp, 0 , fXSDDescription.fLocationHints, 0, temp.length ); } // give a chance to application to be able to retreive the grammar. if (fGrammarPool != null){ grammar = (SchemaGrammar)fGrammarPool.retrieveGrammar(fXSDDescription); if (grammar != null) { // put this grammar into the bucket, along with grammars // imported by it (directly or indirectly) if (!fGrammarBucket.putGrammar(grammar, true)) { // REVISIT: a conflict between new grammar(s) and grammars // in the bucket. What to do? A warning? An exception? fXSIErrorReporter.fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "GrammarConflict", null, XMLErrorReporter.SEVERITY_WARNING); grammar = null; } } } if (grammar == null) { // try to parse the grammar using location hints from that namespace.. fLocationPairs.put("", fNoNamespaceLocationArray); try { XMLInputSource xis = XMLSchemaLoader.resolveDocument(fXSDDescription, fLocationPairs, fEntityResolver); grammar = fSchemaLoader.loadSchema(fXSDDescription, xis, fLocationPairs); } catch (IOException ex) { fXSIErrorReporter.fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "schema_reference.4", new Object[]{fXSDDescription.getLocationHints()[0]}, XMLErrorReporter.SEVERITY_WARNING); } } } return grammar ; }//findSchemaGrammar
|
6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/456687296d92cd61f6daeaa2c7ace18c328deba2/XMLSchemaValidator.java/buggy/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4611,
18576,
1104,
3078,
18576,
12,
6620,
819,
559,
269,
514,
1981,
269,
16723,
16307,
1046,
16,
16723,
27411,
799,
500,
278,
16,
3167,
2498,
1677,
262,
95,
3639,
4611,
18576,
6473,
273,
446,
274,
3639,
368,
588,
326,
6473,
628,
1191,
2845,
2777,
3639,
6473,
273,
284,
18576,
4103,
18,
588,
18576,
12,
4937,
1769,
3639,
309,
261,
31628,
422,
446,
15329,
5411,
284,
31244,
3291,
18,
6208,
5621,
5411,
284,
31244,
3291,
18,
74,
1042,
559,
273,
819,
559,
274,
5411,
284,
31244,
3291,
18,
74,
2326,
3402,
273,
1981,
274,
5411,
284,
31244,
3291,
18,
74,
4280,
13783,
30584,
273,
16307,
1046,
274,
5411,
284,
31244,
3291,
18,
74,
6518,
310,
1841,
273,
27411,
799,
500,
278,
274,
5411,
284,
31244,
3291,
18,
74,
2498,
273,
1677,
274,
5411,
309,
261,
74,
2171,
3098,
480,
446,
13,
288,
7734,
284,
31244,
3291,
18,
542,
2171,
3163,
548,
12,
74,
2171,
3098,
1769,
5411,
289,
5411,
1033,
2117,
1076,
273,
446,
274,
5411,
309,
12,
1981,
480,
446,
15329,
7734,
2117,
1076,
273,
284,
2735,
10409,
18,
588,
12,
4937,
13,
274,
7734,
309,
12,
3562,
1076,
480,
446,
15329,
10792,
514,
5378,
1906,
273,
14015,
4201,
3078,
2886,
18,
2735,
1076,
13,
3562,
1076,
2934,
588,
2735,
1076,
1435,
274,
10792,
284,
31244,
3291,
18,
74,
2735,
13368,
273,
394,
514,
306,
5814,
18,
2469,
65,
274,
10792,
2332,
18,
1126,
3530,
12,
5814,
16,
374,
269,
284,
31244,
3291,
18,
74,
2735,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4611,
18576,
1104,
3078,
18576,
12,
6620,
819,
559,
269,
514,
1981,
269,
16723,
16307,
1046,
16,
16723,
27411,
799,
500,
278,
16,
3167,
2498,
1677,
262,
95,
3639,
4611,
18576,
6473,
273,
446,
274,
3639,
368,
588,
326,
6473,
628,
1191,
2845,
2777,
3639,
6473,
273,
284,
18576,
4103,
18,
588,
18576,
12,
4937,
1769,
3639,
309,
261,
31628,
422,
446,
15329,
5411,
284,
31244,
3291,
18,
6208,
5621,
5411,
284,
31244,
3291,
18,
74,
1042,
559,
273,
819,
559,
274,
5411,
284,
31244,
3291,
18,
74,
2326,
3402,
273,
1981,
274,
5411,
284,
31244,
3291,
18,
74,
4280,
13783,
30584,
273,
16307,
1046,
274,
5411,
284,
31244,
3291,
18,
74,
6518,
310,
1841,
273,
27411,
799,
2
] |
int pel1A = (sp0A + (((sp1A-sp0A)*frac)>>16)) & 0xFFFF; int pel1R = (sp0R + (((sp1R-sp0R)*frac)>>16)) & 0xFFFF; int pel1G = (sp0G + (((sp1G-sp0G)*frac)>>16)) & 0xFFFF; int pel1B = (sp0B + (((sp1B-sp0B)*frac)>>16)) & 0xFFFF;
|
pel1A = (sp0A + (((sp1A-sp0A)*frac)>>15)) & 0xFFFF; pel1R = (sp0R + (((sp1R-sp0R)*frac)>>15)) & 0xFFFF; pel1G = (sp0G + (((sp1G-sp0G)*frac)>>15)) & 0xFFFF; pel1B = (sp0B + (((sp1B-sp0B)*frac)>>15)) & 0xFFFF;
|
public WritableRaster filterBL(Raster src, WritableRaster dest){ final int w = in2.getWidth(); final int h = in2.getHeight(); final int xStart = in2.getMinX()-src.getMinX(); final int yStart = in2.getMinY()-src.getMinY(); final int xEnd = xStart+w; final int yEnd = yStart+h; // Access the integer buffer for each image. DataBufferInt srcDB = (DataBufferInt)src.getDataBuffer(); DataBufferInt dstDB = (DataBufferInt)dest.getDataBuffer(); DataBufferInt in2DB = (DataBufferInt)in2.getDataBuffer(); // Offset defines where in the stack the real data begin SinglePixelPackedSampleModel sppsm; sppsm = (SinglePixelPackedSampleModel)src.getSampleModel(); final int srcOff = srcDB.getOffset() + sppsm.getOffset(src.getMinX() - src.getSampleModelTranslateX(), src.getMinY() - src.getSampleModelTranslateY()); sppsm = (SinglePixelPackedSampleModel)dest.getSampleModel(); final int dstOff = dstDB.getOffset() + sppsm.getOffset(in2.getMinX() - dest.getSampleModelTranslateX(), in2.getMinY() - dest.getSampleModelTranslateY()); sppsm = (SinglePixelPackedSampleModel)in2.getSampleModel(); final int in2Off = in2DB.getOffset() + sppsm.getOffset(in2.getMinX() - in2.getSampleModelTranslateX(), in2.getMinY() - in2.getSampleModelTranslateY()); // Stride is the distance between two consecutive column elements, // in the one-dimention dataBuffer final int srcScanStride = ((SinglePixelPackedSampleModel)src.getSampleModel()).getScanlineStride(); final int dstScanStride = ((SinglePixelPackedSampleModel)dest.getSampleModel()).getScanlineStride(); final int in2ScanStride = ((SinglePixelPackedSampleModel)in2.getSampleModel()).getScanlineStride(); final int dstAdjust = dstScanStride - w; final int in2Adjust = in2ScanStride - w; // Access the pixel value array final int srcPixels[] = srcDB.getBankData()[0]; final int destPixels[] = dstDB.getBankData()[0]; final int in2Pixels[] = in2DB.getBankData()[0]; // Below is the number of shifts for each axis // e.g when xChannel is ALPHA, the pixel needs // to be shifted 24, RED 16, GREEN 8 and BLUE 0 final int xShift = xChannel.toInt()*8; final int yShift = yChannel.toInt()*8; // The pointer of src and dest indicating where the pixel values are int sp = srcOff, dp = dstOff, ip = in2Off; // Fixed point representation of scale factor. final int fpScaleX = scaleX*(1<<16)/255; final int fpScaleY = scaleY*(1<<16)/255; final int maxDx = (scaleX/2)+1; final int dangerZoneX = w-maxDx; final int maxDy = (scaleY/2)+1; final int dangerZoneY = h-maxDy; long start = System.currentTimeMillis(); final int srcXExt = src.getWidth()-1; final int srcYExt = src.getHeight()-1; for (int y=yStart; y<yEnd; y++) { for (int x=xStart; x<xEnd; x++){ final int dPel = in2Pixels[ip]; final int xDisplace = fpScaleX*(((dPel>>xShift)&0xff) - 127); final int yDisplace = fpScaleY*(((dPel>>yShift)&0xff) - 127); final int x0 = x+(xDisplace>>16); final int y0 = y+(yDisplace>>16); if ((x0 < 0) || (x0 > srcXExt) || (y0 < 0) || (y0 > srcYExt)){ destPixels[dp] = 0x0; } else { int sdp = srcOff + y0*srcScanStride + x0; int pel = srcPixels[sdp]; int sp0A = (pel>>>16) & 0xFF00; int sp0R = (pel>> 8) & 0xFF00; int sp0G = (pel ) & 0xFF00; int sp0B = (pel<< 8) & 0xFF00; if (x0 != srcXExt) pel = srcPixels[sdp+1]; int sp1A = (pel>>>16) & 0xFF00; int sp1R = (pel>> 8) & 0xFF00; int sp1G = (pel ) & 0xFF00; int sp1B = (pel<< 8) & 0xFF00; int frac = xDisplace&0xFFFF; int pel0A = (sp0A + (((sp1A-sp0A)*frac)>>16)) & 0xFFFF; int pel0R = (sp0R + (((sp1R-sp0R)*frac)>>16)) & 0xFFFF; int pel0G = (sp0G + (((sp1G-sp0G)*frac)>>16)) & 0xFFFF; int pel0B = (sp0B + (((sp1B-sp0B)*frac)>>16)) & 0xFFFF; if (y0 != srcYExt) sdp+=srcScanStride; pel = srcPixels[sdp]; sp0A = (pel>>>16) & 0xFF00; sp0R = (pel>> 8) & 0xFF00; sp0G = (pel ) & 0xFF00; sp0B = (pel<< 8) & 0xFF00; if (x0 != srcXExt) pel = srcPixels[sdp+1]; sp1A = (pel>>>16) & 0xFF00; sp1R = (pel>> 8) & 0xFF00; sp1G = (pel ) & 0xFF00; sp1B = (pel<< 8) & 0xFF00; int pel1A = (sp0A + (((sp1A-sp0A)*frac)>>16)) & 0xFFFF; int pel1R = (sp0R + (((sp1R-sp0R)*frac)>>16)) & 0xFFFF; int pel1G = (sp0G + (((sp1G-sp0G)*frac)>>16)) & 0xFFFF; int pel1B = (sp0B + (((sp1B-sp0B)*frac)>>16)) & 0xFFFF; frac = yDisplace&0xFFFF; int newPel = (((((pel0A<<16) + (pel1A-pel0A)*frac)&0xFF000000) ) | ((((pel0R<<16) + (pel1R-pel0R)*frac)&0xFF000000)>>>8) | ((((pel0G<<16) + (pel1G-pel0G)*frac)&0xFF000000)>>>16)| ((((pel0B<<16) + (pel1B-pel0B)*frac)) >>>24)); destPixels[dp] = newPel; } dp++; ip++; } dp += dstAdjust; ip += in2Adjust; } if (TIME) { long end = System.currentTimeMillis(); System.out.println("Time: " + (end-start)); } return dest; }// end of the filter() method for Raster
|
45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/7a0559e3f8329ea840683754f1218deeb20d367b/DisplacementMapOp.java/clean/sources/org/apache/batik/ext/awt/image/rendered/DisplacementMapOp.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14505,
18637,
1034,
14618,
12,
18637,
1705,
16,
14505,
18637,
1570,
15329,
3639,
727,
509,
341,
1377,
273,
316,
22,
18,
588,
2384,
5621,
3639,
727,
509,
366,
1377,
273,
316,
22,
18,
588,
2686,
5621,
3639,
727,
509,
619,
1685,
273,
316,
22,
18,
588,
2930,
60,
1435,
17,
4816,
18,
588,
2930,
60,
5621,
3639,
727,
509,
677,
1685,
273,
316,
22,
18,
588,
2930,
61,
1435,
17,
4816,
18,
588,
2930,
61,
5621,
3639,
727,
509,
619,
1638,
282,
273,
619,
1685,
15,
91,
31,
3639,
727,
509,
677,
1638,
282,
273,
677,
1685,
15,
76,
31,
3639,
368,
5016,
326,
3571,
1613,
364,
1517,
1316,
18,
3639,
1910,
1892,
1702,
1705,
2290,
273,
261,
751,
1892,
1702,
13,
4816,
18,
588,
751,
1892,
5621,
3639,
1910,
1892,
1702,
3046,
2290,
273,
261,
751,
1892,
1702,
13,
10488,
18,
588,
751,
1892,
5621,
3639,
1910,
1892,
1702,
316,
22,
2290,
273,
261,
751,
1892,
1702,
13,
267,
22,
18,
588,
751,
1892,
5621,
3639,
368,
9874,
11164,
1625,
316,
326,
2110,
326,
2863,
501,
2376,
3639,
10326,
9037,
4420,
329,
8504,
1488,
1694,
1121,
81,
31,
3639,
1694,
1121,
81,
273,
261,
5281,
9037,
4420,
329,
8504,
1488,
13,
4816,
18,
588,
8504,
1488,
5621,
3639,
727,
509,
1705,
7210,
273,
1705,
2290,
18,
588,
2335,
1435,
397,
5411,
1694,
1121,
81,
18,
588,
2335,
12,
4816,
18,
588,
2930,
60,
1435,
300,
1705,
18,
588,
8504,
1488,
12818,
60,
9334,
18701,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14505,
18637,
1034,
14618,
12,
18637,
1705,
16,
14505,
18637,
1570,
15329,
3639,
727,
509,
341,
1377,
273,
316,
22,
18,
588,
2384,
5621,
3639,
727,
509,
366,
1377,
273,
316,
22,
18,
588,
2686,
5621,
3639,
727,
509,
619,
1685,
273,
316,
22,
18,
588,
2930,
60,
1435,
17,
4816,
18,
588,
2930,
60,
5621,
3639,
727,
509,
677,
1685,
273,
316,
22,
18,
588,
2930,
61,
1435,
17,
4816,
18,
588,
2930,
61,
5621,
3639,
727,
509,
619,
1638,
282,
273,
619,
1685,
15,
91,
31,
3639,
727,
509,
677,
1638,
282,
273,
677,
1685,
15,
76,
31,
3639,
368,
5016,
326,
3571,
1613,
364,
1517,
1316,
18,
3639,
1910,
1892,
1702,
1705,
2290,
273,
2
] |
move = Move.create(INT_MOVE, resultOperand, new OPT_IntConstantOperand(0));
|
move = Move.create(INT_MOVE, resultOperand, IC(0));
|
public static byte simplify(OPT_AbstractRegisterPool regpool, OPT_Instruction s) { switch (s.getOpcode()) { //////////////////// // GUARD operations //////////////////// case GUARD_COMBINE_opcode: { OPT_Operand op2 = Binary.getVal2(s); if (op2 instanceof OPT_TrueGuardOperand) { OPT_Operand op1 = Binary.getVal1(s); if (op1 instanceof OPT_TrueGuardOperand) { // BOTH TrueGuards: FOLD Move.mutate(s, GUARD_MOVE, Binary.getClearResult(s), op1); return MOVE_FOLDED; } else { // ONLY OP2 IS TrueGuard: MOVE REDUCE Move.mutate(s, GUARD_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } return UNCHANGED; //////////////////// // TRAP operations //////////////////// case TRAP_IF_opcode: { OPT_Operand op1 = TrapIf.getVal1(s); OPT_Operand op2 = TrapIf.getVal2(s); if (op1.isConstant()) { if (op2.isConstant()) { int willTrap = TrapIf.getCond(s).evaluate(op1, op2); if (willTrap == OPT_ConditionOperand.TRUE) { Trap.mutate(s, TRAP, TrapIf.getClearGuardResult(s), TrapIf.getClearTCode(s)); return TRAP_REDUCED; } else if (willTrap == OPT_ConditionOperand.FALSE) { Move.mutate(s, GUARD_MOVE, TrapIf.getClearGuardResult(s), TG()); return MOVE_FOLDED; } } else { // canonicalize TrapIf.mutate(s, TRAP_IF, TrapIf.getClearGuardResult(s), TrapIf.getClearVal2(s), TrapIf.getClearVal1(s), TrapIf.getClearCond(s).flipOperands(), TrapIf.getClearTCode(s)); } } } return UNCHANGED; case NULL_CHECK_opcode: { OPT_Operand ref = NullCheck.getRef(s); if (ref.isNullConstant()) { Trap.mutate(s, TRAP, NullCheck.getClearGuardResult(s), OPT_TrapCodeOperand.NullPtr()); return TRAP_REDUCED; } else if (ref.isStringConstant()) { Move.mutate(s, GUARD_MOVE, NullCheck.getClearGuardResult(s), TG()); return MOVE_FOLDED; } else if (ref.isAddressConstant()) { if (ref.asAddressConstant().value.isZero()) { Trap.mutate(s, TRAP, NullCheck.getClearGuardResult(s), OPT_TrapCodeOperand.NullPtr()); return TRAP_REDUCED; } else { // Make the slightly suspect assumption that all non-zero address // constants are actually valid pointers. Not necessarily true, // but unclear what else we can do. Move.mutate(s, GUARD_MOVE, NullCheck.getClearGuardResult(s), TG()); return MOVE_FOLDED; } } return UNCHANGED; } case INT_ZERO_CHECK_opcode: { OPT_Operand op = ZeroCheck.getValue(s); if (op.isIntConstant()) { int val = op.asIntConstant().value; if (val == 0) { Trap.mutate(s, TRAP, ZeroCheck.getClearGuardResult(s), OPT_TrapCodeOperand.DivByZero()); return TRAP_REDUCED; } else { Move.mutate(s, GUARD_MOVE, ZeroCheck.getClearGuardResult(s), TG()); return MOVE_FOLDED; } } } return UNCHANGED; case LONG_ZERO_CHECK_opcode: { OPT_Operand op = ZeroCheck.getValue(s); if (op.isLongConstant()) { long val = op.asLongConstant().value; if (val == 0L) { Trap.mutate(s, TRAP, ZeroCheck.getClearGuardResult(s), OPT_TrapCodeOperand.DivByZero()); return TRAP_REDUCED; } else { Move.mutate(s, GUARD_MOVE, ZeroCheck.getClearGuardResult(s), TG()); return MOVE_FOLDED; } } } return UNCHANGED; case CHECKCAST_opcode: { OPT_Operand ref = TypeCheck.getRef(s); if (ref.isNullConstant()) { Empty.mutate(s, NOP); return REDUCED; } else if (ref.isStringConstant()) { s.operator = CHECKCAST_NOTNULL; return simplify(regpool, s); } else { VM_TypeReference lhsType = TypeCheck.getType(s).getTypeRef(); VM_TypeReference rhsType = ref.getType(); byte ans = OPT_ClassLoaderProxy.includesType(lhsType, rhsType); if (ans == OPT_Constants.YES) { Empty.mutate(s, NOP); return REDUCED; } // NOTE: OPT_Constants.NO can't help us because (T)null always succeeds } } return UNCHANGED; case CHECKCAST_NOTNULL_opcode: { OPT_Operand ref = TypeCheck.getRef(s); VM_TypeReference lhsType = TypeCheck.getType(s).getTypeRef(); VM_TypeReference rhsType = ref.getType(); byte ans = OPT_ClassLoaderProxy.includesType(lhsType, rhsType); if (ans == OPT_Constants.YES) { Empty.mutate(s, NOP); return REDUCED; } else if (ans == OPT_Constants.NO) { VM_Type rType = rhsType.peekResolvedType(); if (rType != null && rType.isClassType() && rType.asClass().isFinal()) { // only final (or precise) rhs types can be optimized since rhsType may be conservative Trap.mutate(s, TRAP, null, OPT_TrapCodeOperand.CheckCast()); return TRAP_REDUCED; } } } return UNCHANGED; case INSTANCEOF_opcode: { OPT_Operand ref = InstanceOf.getRef(s); if (ref.isNullConstant()) { Move.mutate(s, INT_MOVE, InstanceOf.getClearResult(s), IC(0)); return MOVE_FOLDED; } else if (ref.isStringConstant()) { s.operator = INSTANCEOF_NOTNULL; return simplify(regpool, s); } VM_TypeReference lhsType = InstanceOf.getType(s).getTypeRef(); VM_TypeReference rhsType = ref.getType(); byte ans = OPT_ClassLoaderProxy.includesType(lhsType, rhsType); // NOTE: OPT_Constants.YES doesn't help because ref may be null and null instanceof T is false if (ans == OPT_Constants.NO) { VM_Type rType = rhsType.peekResolvedType(); if (rType != null && rType.isClassType() && rType.asClass().isFinal()) { // only final (or precise) rhs types can be optimized since rhsType may be conservative Move.mutate(s, INT_MOVE, InstanceOf.getClearResult(s), IC(0)); return MOVE_FOLDED; } } } return UNCHANGED; case INSTANCEOF_NOTNULL_opcode: { OPT_Operand ref = InstanceOf.getRef(s); VM_TypeReference lhsType = InstanceOf.getType(s).getTypeRef(); VM_TypeReference rhsType = ref.getType(); byte ans = OPT_ClassLoaderProxy.includesType(lhsType, rhsType); if (ans == OPT_Constants.YES) { Move.mutate(s, INT_MOVE, InstanceOf.getClearResult(s), IC(1)); return MOVE_FOLDED; } else if (ans == OPT_Constants.NO) { VM_Type rType = rhsType.peekResolvedType(); if (rType != null && rType.isClassType() && rType.asClass().isFinal()) { // only final (or precise) rhs types can be optimized since rhsType may be conservative Move.mutate(s, INT_MOVE, InstanceOf.getClearResult(s), IC(0)); return MOVE_FOLDED; } } } return UNCHANGED; //////////////////// // Conditional moves //////////////////// case INT_COND_MOVE_opcode: { OPT_Operand val1 = CondMove.getVal1(s); OPT_Operand val2 = CondMove.getVal2(s); if (val1.isConstant()) { if (val2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = CondMove.getCond(s).evaluate(val1, val2); if (cond != OPT_ConditionOperand.UNKNOWN) { OPT_Operand val = (cond == OPT_ConditionOperand.TRUE) ? CondMove.getClearTrueValue(s) : CondMove.getClearFalseValue(s); Move.mutate(s, INT_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = CondMove.getClearVal1(s); CondMove.setVal1(s, CondMove.getClearVal2(s)); CondMove.setVal2(s, tmp); CondMove.getCond(s).flipOperands(); } } OPT_Operand tv = CondMove.getTrueValue(s); OPT_Operand fv = CondMove.getFalseValue(s); if (tv.similar(fv)) { Move.mutate(s, INT_MOVE, CondMove.getClearResult(s), tv); return tv.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } if (tv.isIntConstant() && fv.isIntConstant() && !CondMove.getCond(s).isFLOATINGPOINT()) { int itv = tv.asIntConstant().value; int ifv = fv.asIntConstant().value; OPT_Operator op = null; if(val1.isLong()) { op = BOOLEAN_CMP_LONG; } else if(val1.isFloat()) { op = BOOLEAN_CMP_FLOAT; } else if(val1.isDouble()) { op = BOOLEAN_CMP_DOUBLE; } else { op = BOOLEAN_CMP_INT; } if (itv == 1 && ifv == 0) { BooleanCmp.mutate(s, op, CondMove.getClearResult(s), CondMove.getClearVal1(s), CondMove.getClearVal2(s), CondMove.getClearCond(s), new OPT_BranchProfileOperand()); return REDUCED; } if (itv == 0 && ifv == 1) { BooleanCmp.mutate(s, op, CondMove.getClearResult(s), CondMove.getClearVal1(s), CondMove.getClearVal2(s), CondMove.getClearCond(s).flipCode(), new OPT_BranchProfileOperand()); return REDUCED; } } } return UNCHANGED; case LONG_COND_MOVE_opcode: { OPT_Operand val1 = CondMove.getVal1(s); if (val1.isConstant()) { OPT_Operand val2 = CondMove.getVal2(s); if (val2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = CondMove.getCond(s).evaluate(val1, val2); if (cond != OPT_ConditionOperand.UNKNOWN) { OPT_Operand val = (cond == OPT_ConditionOperand.TRUE) ? CondMove.getClearTrueValue(s) : CondMove.getClearFalseValue(s); Move.mutate(s, LONG_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = CondMove.getClearVal1(s); CondMove.setVal1(s, CondMove.getClearVal2(s)); CondMove.setVal2(s, tmp); CondMove.getCond(s).flipOperands(); } } if (CondMove.getTrueValue(s).similar(CondMove.getFalseValue(s))) { OPT_Operand val = CondMove.getClearTrueValue(s); Move.mutate(s, LONG_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } return UNCHANGED; case FLOAT_COND_MOVE_opcode: { OPT_Operand val1 = CondMove.getVal1(s); if (val1.isConstant()) { OPT_Operand val2 = CondMove.getVal2(s); if (val2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = CondMove.getCond(s).evaluate(val1, val2); if (cond != OPT_ConditionOperand.UNKNOWN) { OPT_Operand val = (cond == OPT_ConditionOperand.TRUE) ? CondMove.getClearTrueValue(s) : CondMove.getClearFalseValue(s); Move.mutate(s, FLOAT_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = CondMove.getClearVal1(s); CondMove.setVal1(s, CondMove.getClearVal2(s)); CondMove.setVal2(s, tmp); CondMove.getCond(s).flipOperands(); } } if (CondMove.getTrueValue(s).similar(CondMove.getFalseValue(s))) { OPT_Operand val = CondMove.getClearTrueValue(s); Move.mutate(s, FLOAT_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } return UNCHANGED; case DOUBLE_COND_MOVE_opcode: { OPT_Operand val1 = CondMove.getVal1(s); if (val1.isConstant()) { OPT_Operand val2 = CondMove.getVal2(s); if (val2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = CondMove.getCond(s).evaluate(val1, val2); if (cond != OPT_ConditionOperand.UNKNOWN) { OPT_Operand val = (cond == OPT_ConditionOperand.TRUE) ? CondMove.getClearTrueValue(s) : CondMove.getClearFalseValue(s); Move.mutate(s, DOUBLE_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = CondMove.getClearVal1(s); CondMove.setVal1(s, CondMove.getClearVal2(s)); CondMove.setVal2(s, tmp); CondMove.getCond(s).flipOperands(); } } if (CondMove.getTrueValue(s).similar(CondMove.getFalseValue(s))) { OPT_Operand val = CondMove.getClearTrueValue(s); Move.mutate(s, DOUBLE_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } return UNCHANGED; case REF_COND_MOVE_opcode: { OPT_Operand val1 = CondMove.getVal1(s); if (val1.isConstant()) { OPT_Operand val2 = CondMove.getVal2(s); if (val2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = CondMove.getCond(s).evaluate(val1, val2); if (cond != OPT_ConditionOperand.UNKNOWN) { OPT_Operand val = (cond == OPT_ConditionOperand.TRUE) ? CondMove.getClearTrueValue(s) : CondMove.getClearFalseValue(s); Move.mutate(s, REF_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = CondMove.getClearVal1(s); CondMove.setVal1(s, CondMove.getClearVal2(s)); CondMove.setVal2(s, tmp); CondMove.getCond(s).flipOperands(); } } if (CondMove.getTrueValue(s).similar(CondMove.getFalseValue(s))) { OPT_Operand val = CondMove.getClearTrueValue(s); Move.mutate(s, REF_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } return UNCHANGED; case GUARD_COND_MOVE_opcode: { OPT_Operand val1 = CondMove.getVal1(s); if (val1.isConstant()) { OPT_Operand val2 = CondMove.getVal2(s); if (val2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = CondMove.getCond(s).evaluate(val1, val2); if (cond == OPT_ConditionOperand.UNKNOWN) { OPT_Operand val = (cond == OPT_ConditionOperand.TRUE) ? CondMove.getClearTrueValue(s) : CondMove.getClearFalseValue(s); Move.mutate(s, GUARD_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = CondMove.getClearVal1(s); CondMove.setVal1(s, CondMove.getClearVal2(s)); CondMove.setVal2(s, tmp); CondMove.getCond(s).flipOperands(); } } if (CondMove.getTrueValue(s).similar(CondMove.getFalseValue(s))) { OPT_Operand val = CondMove.getClearTrueValue(s); Move.mutate(s, GUARD_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } } return UNCHANGED; //////////////////// // INT ALU operations //////////////////// case BOOLEAN_NOT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; if (val == 0) { Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC(1)); } else { Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC(0)); } return MOVE_FOLDED; } } return UNCHANGED; case BOOLEAN_CMP_INT_opcode: if (CF_INT) { OPT_Operand op1 = BooleanCmp.getVal1(s); OPT_Operand op2 = BooleanCmp.getVal2(s); if (op1.isConstant()) { if (op2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = BooleanCmp.getCond(s).evaluate(op1, op2); if (cond != OPT_ConditionOperand.UNKNOWN) { Move.mutate(s, INT_MOVE, BooleanCmp.getResult(s), (cond == OPT_ConditionOperand.TRUE) ? IC(1):IC(0)); return MOVE_FOLDED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = BooleanCmp.getClearVal1(s); BooleanCmp.setVal1(s, BooleanCmp.getClearVal2(s)); BooleanCmp.setVal2(s, tmp); BooleanCmp.getCond(s).flipOperands(); } } } return UNCHANGED; case BOOLEAN_CMP_ADDR_opcode: if (CF_ADDR) { OPT_Operand op1 = BooleanCmp.getVal1(s); OPT_Operand op2 = BooleanCmp.getVal2(s); if (op1.isConstant()) { if (op2.isConstant()) { // BOTH CONSTANTS: FOLD int cond = BooleanCmp.getCond(s).evaluate(op1, op2); if (cond != OPT_ConditionOperand.UNKNOWN) { Move.mutate(s, REF_MOVE, BooleanCmp.getResult(s), (cond == OPT_ConditionOperand.TRUE) ? IC(1):IC(0)); return MOVE_FOLDED; } } else { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = BooleanCmp.getClearVal1(s); BooleanCmp.setVal1(s, BooleanCmp.getClearVal2(s)); BooleanCmp.setVal2(s, tmp); BooleanCmp.getCond(s).flipOperands(); } } } return UNCHANGED; case INT_ADD_opcode: if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 + val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case INT_AND_opcode: if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 & val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x & 0 == 0 Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(0)); return MOVE_FOLDED; } if (val2 == -1) { // x & -1 == x & 0xffffffff == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case INT_DIV_opcode: if (CF_INT) { OPT_Operand op2 = GuardedBinary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; if (val2 == 0) { // TODO: This instruction is actually unreachable. // There will be an INT_ZERO_CHECK // guarding this instruction that will result in an // ArithmeticException. We // should probabbly just remove the INT_DIV as dead code. return UNCHANGED; } OPT_Operand op1 = GuardedBinary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, GuardedBinary.getClearResult(s), IC(val1/val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 1) { // x / 1 == x; Move.mutate(s, INT_MOVE, GuardedBinary.getClearResult(s), GuardedBinary.getClearVal1(s)); return MOVE_REDUCED; } // x / c == x >> (log c) if c is power of 2 int power = PowerOf2(val2); if (power != -1) { Binary.mutate(s, INT_SHR, GuardedBinary.getClearResult(s), GuardedBinary.getClearVal1(s), IC(power)); return REDUCED; } } } } return UNCHANGED; case INT_MUL_opcode: if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1*val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == -1) { // x * -1 == -x Unary.mutate(s, INT_NEG, Binary.getClearResult(s), Binary.getClearVal1(s)); return REDUCED; } if (val2 == 0) { // x * 0 == 0 Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(0)); return MOVE_FOLDED; } if (val2 == 1) { // x * 1 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } // try to reduce x*c into shift and adds, but only if cost is cheap if (s.getPrev() != null) { // don't attempt to reduce if this instruction isn't // part of a well-formed sequence int cost = 0; for(int i=1; i < 32; i++) { if((val2 & (1 << i)) != 0) { // each 1 requires a shift and add cost++; } } if (cost < 5) { // generate shift and adds OPT_RegisterOperand val1Operand = Binary.getClearVal1(s).asRegister(); OPT_RegisterOperand resultOperand = regpool.makeTempInt(); OPT_Instruction move; if ((val2 & 1) == 1) { // result = val1 * 1 move = Move.create(INT_MOVE, resultOperand, val1Operand); } else { // result = 0 move = Move.create(INT_MOVE, resultOperand, new OPT_IntConstantOperand(0)); } move.copyPosition(s); s.insertBefore(move); for(int i=1; i < 32; i++) { if((val2 & (1 << i)) != 0) { OPT_RegisterOperand tempInt = regpool.makeTempInt(); OPT_Instruction shift = Binary.create(INT_SHL, tempInt, val1Operand.copyRO(), new OPT_IntConstantOperand(i) ); shift.copyPosition(s); s.insertBefore(shift); OPT_Instruction add = Binary.create(INT_ADD, resultOperand.copyRO(), resultOperand.copyRO(), tempInt.copyRO() ); add.copyPosition(s); s.insertBefore(add); } } Move.mutate(s, INT_MOVE, Binary.getClearResult(s), resultOperand.copyRO()); return REDUCED; } } } } } return UNCHANGED; case INT_NEG_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC(-val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_NOT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC(~val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_OR_opcode: if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 | val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == -1) { // x | -1 == x | 0xffffffff == 0xffffffff == -1 Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(-1)); return MOVE_FOLDED; } if (val2 == 0) { // x | 0 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case INT_REM_opcode: if (CF_INT) { OPT_Operand op2 = GuardedBinary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; if (val2 == 0) { // TODO: This instruction is actually unreachable. // There will be an INT_ZERO_CHECK // guarding this instruction that will result in an // ArithmeticException. We // should probabbly just remove the INT_REM as dead code. return UNCHANGED; } OPT_Operand op1 = GuardedBinary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, GuardedBinary.getClearResult(s), IC(val1%val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if ((val2 == 1)||(val2 == -1)) { // x % 1 == 0 Move.mutate(s, INT_MOVE, GuardedBinary.getClearResult(s), IC(0)); return MOVE_FOLDED; } // x % c == x & (c-1) if c is power of 2 int power = PowerOf2(val2); if (power != -1) { Binary.mutate(s, INT_AND, GuardedBinary.getClearResult(s), GuardedBinary.getClearVal1(s), IC(val2-1)); return REDUCED; } } } } return UNCHANGED; case INT_SHL_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 << val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x << 0 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case INT_SHR_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 >> val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x >> 0 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case INT_SUB_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 - val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x - 0 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } // x - c = x + -c // prefer adds, since some architectures have addi but not subi Binary.mutate(s, INT_ADD, Binary.getClearResult(s), Binary.getClearVal1(s), IC(-val2)); return REDUCED; } } } return UNCHANGED; case INT_USHR_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 >>> val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x >>> 0 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case INT_XOR_opcode: if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 ^ val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == -1) { // x ^ -1 == x ^ 0xffffffff = ~x Unary.mutate(s, INT_NOT, Binary.getClearResult(s), Binary.getClearVal1(s)); return REDUCED; } if (val2 == 0) { // x ^ 0 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; //////////////////// // WORD ALU operations //////////////////// case REF_ADD_opcode: if (CF_ADDR) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isConstant()) { Address val2 = getAddressValue(op2); OPT_Operand op1 = Binary.getVal1(s); if (op1.isConstant()) { // BOTH CONSTANTS: FOLD Address val1 = getAddressValue(op1); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.add(val2.toWord().toOffset()))); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2.isZero()) { // x + 0 == x if (op1.isIntLike()) { Unary.mutate(s, INT_2ADDRSigExt, Binary.getClearResult(s), Binary.getClearVal1(s)); } else { Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); } return MOVE_REDUCED; } } } } return UNCHANGED; case REF_AND_opcode: if (CF_ADDR) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isAddressConstant()) { Word val2 = op2.asAddressConstant().value.toWord(); OPT_Operand op1 = Binary.getVal1(s); if (op1.isAddressConstant()) { // BOTH CONSTANTS: FOLD Word val1 = op1.asAddressConstant().value.toWord(); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.and(val2).toAddress())); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2.isZero()) { // x & 0 == 0 Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(Address.zero())); return MOVE_FOLDED; } if (val2.isMax()) { // x & -1 == x & 0xffffffff == x Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case REF_SHL_opcode: if (CF_ADDR) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isAddressConstant()) { // BOTH CONSTANTS: FOLD Word val1 = op1.asAddressConstant().value.toWord(); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.lsh(val2).toAddress())); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x << 0 == x Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case REF_SHR_opcode: if (CF_ADDR) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isAddressConstant()) { // BOTH CONSTANTS: FOLD Word val1 = op1.asAddressConstant().value.toWord(); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.rsha(val2).toAddress())); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x >> 0 == x Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case REF_NOT_opcode: if (CF_ADDR) { OPT_Operand op = Unary.getVal(s); if (op.isAddressConstant()) { // CONSTANT: FOLD Word val = op.asAddressConstant().value.toWord(); Move.mutate(s, REF_MOVE, Unary.getClearResult(s), AC(val.not().toAddress())); return MOVE_FOLDED; } } return UNCHANGED; case REF_OR_opcode: if (CF_ADDR) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isAddressConstant()) { Word val2 = op2.asAddressConstant().value.toWord(); OPT_Operand op1 = Binary.getVal1(s); if (op1.isAddressConstant()) { // BOTH CONSTANTS: FOLD Word val1 = op1.asAddressConstant().value.toWord(); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.or(val2).toAddress())); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2.isMax()) { // x | -1 == x | 0xffffffff == 0xffffffff == -1 Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(Address.max())); return MOVE_FOLDED; } if (val2.isZero()) { // x | 0 == x Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case REF_SUB_opcode: if (CF_ADDR) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isConstant()) { Address val2 = getAddressValue(op2); OPT_Operand op1 = Binary.getVal1(s); if (op1.isConstant()) { // BOTH CONSTANTS: FOLD Address val1 = getAddressValue(op1); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.sub(val2.toWord().toOffset()))); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2.isZero()) { // x - 0 == x if (op1.isIntLike()) { Unary.mutate(s, INT_2ADDRSigExt, Binary.getClearResult(s), Binary.getClearVal1(s)); } else { Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); } return MOVE_REDUCED; } // x - c = x + -c // prefer adds, since some architectures have addi but not subi Binary.mutate(s, REF_ADD, Binary.getClearResult(s), Binary.getClearVal1(s), AC(Address.zero().sub(val2.toWord().toOffset()))); return REDUCED; } } } return UNCHANGED; case REF_USHR_opcode: if (CF_ADDR) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isAddressConstant()) { // BOTH CONSTANTS: FOLD Word val1 = op1.asAddressConstant().value.toWord(); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.rshl(val2).toAddress())); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x >>> 0 == x Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case REF_XOR_opcode: if (CF_ADDR) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isAddressConstant()) { Word val2 = op2.asAddressConstant().value.toWord(); OPT_Operand op1 = Binary.getVal1(s); if (op1.isAddressConstant()) { // BOTH CONSTANTS: FOLD Word val1 = op1.asAddressConstant().value.toWord(); Move.mutate(s, REF_MOVE, Binary.getClearResult(s), AC(val1.xor(val2).toAddress())); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2.isMax()) { // x ^ -1 == x ^ 0xffffffff = ~x Unary.mutate(s, REF_NOT, Binary.getClearResult(s), Binary.getClearVal1(s)); return REDUCED; } if (val2.isZero()) { // x ^ 0 == x Move.mutate(s, REF_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; //////////////////// // LONG ALU operations //////////////////// case LONG_ADD_opcode: if (CF_LONG) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1+val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0L) { // x + 0 == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case LONG_AND_opcode: if (CF_LONG) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1 & val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0L) { // x & 0L == 0L Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(0L)); return MOVE_FOLDED; } if (val2 == -1) { // x & -1L == x & 0xff...ff == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case LONG_CMP_opcode: if (CF_LONG) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isLongConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; long val2 = op2.asLongConstant().value; int result = (val1 > val2) ? 1 : ((val1 == val2) ? 0 : -1); Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(result)); return MOVE_FOLDED; } } } return UNCHANGED; case LONG_DIV_opcode: if (CF_LONG) { OPT_Operand op2 = GuardedBinary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; if (val2 == 0L) { // TODO: This instruction is actually unreachable. // There will be a LONG_ZERO_CHECK // guarding this instruction that will result in an // ArithmeticException. We // should probabbly just remove the LONG_DIV as dead code. return UNCHANGED; } OPT_Operand op1 = GuardedBinary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, GuardedBinary.getClearResult(s), LC(val1/val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 1L) { // x / 1L == x Move.mutate(s, LONG_MOVE, GuardedBinary.getClearResult(s), GuardedBinary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case LONG_MUL_opcode: if (CF_LONG) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1*val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == -1L) { // x * -1 == -x Move.mutate(s, LONG_NEG, Binary.getClearResult(s), Binary.getClearVal1(s)); return REDUCED; } if (val2 == 0L) { // x * 0L == 0L Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(0L)); return MOVE_FOLDED; } if (val2 == 1L) { // x * 1L == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case LONG_NEG_opcode: if (CF_LONG) { OPT_Operand op = Unary.getVal(s); if (op.isLongConstant()) { // CONSTANT: FOLD long val = op.asLongConstant().value; Move.mutate(s, LONG_MOVE, Unary.getClearResult(s), LC(-val)); return MOVE_FOLDED; } } return UNCHANGED; case LONG_NOT_opcode: if (CF_LONG) { OPT_Operand op = Unary.getVal(s); if (op.isLongConstant()) { long val = op.asLongConstant().value; // CONSTANT: FOLD Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(~val)); return MOVE_FOLDED; } } return UNCHANGED; case LONG_OR_opcode: if (CF_LONG) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1 | val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0L) { // x | 0L == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } if (val2 == -1L) { // x | -1L == x | 0xff..ff == 0xff..ff == -1L Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(-1L)); return MOVE_FOLDED; } } } } return UNCHANGED; case LONG_REM_opcode: if (CF_LONG) { OPT_Operand op2 = GuardedBinary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; if (val2 == 0L) { // TODO: This instruction is actually unreachable. // There will be a LONG_ZERO_CHECK // guarding this instruction that will result in an // ArithmeticException. We // should probabbly just remove the LONG_REM as dead code. return UNCHANGED; } OPT_Operand op1 = GuardedBinary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, GuardedBinary.getClearResult(s), LC(val1%val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 1L) { // x % 1L == 0 Move.mutate(s, LONG_MOVE, GuardedBinary.getClearResult(s), LC(0)); return MOVE_FOLDED; } } } } return UNCHANGED; case LONG_SHL_opcode: if (CF_LONG) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1 << val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x << 0 == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case LONG_SHR_opcode: if (CF_LONG) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1 >> val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x >> 0L == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case LONG_SUB_opcode: if (CF_LONG) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1-val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0L) { // x - 0 == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } //-#if RVM_FOR_64_ADDR // x - c = x + -c // prefer adds, since some architectures have addi but not subi Binary.mutate(s, LONG_ADD, Binary.getClearResult(s), Binary.getClearVal1(s), LC(-val2)); return REDUCED; //-#endif } } } return UNCHANGED; case LONG_USHR_opcode: if (CF_LONG) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1 >>> val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x >>> 0L == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; case LONG_XOR_opcode: if (CF_LONG) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isLongConstant()) { long val2 = op2.asLongConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), LC(val1 ^ val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == -1L) { // x ^ -1L == x ^ 0xff..ff = ~x Unary.mutate(s, LONG_NOT, Binary.getClearResult(s), Binary.getClearVal1(s)); return REDUCED; } if (val2 == 0L) { // x ^ 0L == x Move.mutate(s, LONG_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; //////////////////// // FLOAT ALU operations //////////////////// case FLOAT_ADD_opcode: if (CF_FLOAT) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isFloatConstant()) { float val2 = op2.asFloatConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isFloatConstant()) { // BOTH CONSTANTS: FOLD float val1 = op1.asFloatConstant().value; Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), FC(val1 + val2)); return MOVE_FOLDED; } if (val2 == 0.0f) { // x + 0.0 is x (even is x is a Nan). Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } return UNCHANGED; case FLOAT_CMPG_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isFloatConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isFloatConstant()) { // BOTH CONSTANTS: FOLD float val1 = op1.asFloatConstant().value; float val2 = op2.asFloatConstant().value; int result = (val1 < val2) ? -1 : ((val1 == val2) ? 0 : 1); Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(result)); return MOVE_FOLDED; } } } return UNCHANGED; case FLOAT_CMPL_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isFloatConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isFloatConstant()) { // BOTH CONSTANTS: FOLD float val1 = op1.asFloatConstant().value; float val2 = op2.asFloatConstant().value; int result = (val1 > val2) ? 1 : ((val1 == val2) ? 0 : -1); Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(result)); return MOVE_FOLDED; } } } return UNCHANGED; case FLOAT_DIV_opcode: if (CF_FLOAT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isFloatConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isFloatConstant()) { // BOTH CONSTANTS: FOLD float val1 = op1.asFloatConstant().value; float val2 = op2.asFloatConstant().value; Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), FC(val1/val2)); return MOVE_FOLDED; } } } return UNCHANGED; case FLOAT_MUL_opcode: if (CF_FLOAT) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isFloatConstant()) { float val2 = op2.asFloatConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isFloatConstant()) { // BOTH CONSTANTS: FOLD float val1 = op1.asFloatConstant().value; Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), FC(val1*val2)); return MOVE_FOLDED; } if (val2 == 1.0f) { // x * 1.0 is x, even if x is a NaN Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } return UNCHANGED; case FLOAT_NEG_opcode: if (CF_FLOAT) { OPT_Operand op = Unary.getVal(s); if (op.isFloatConstant()) { // CONSTANT: FOLD float val = op.asFloatConstant().value; Move.mutate(s, FLOAT_MOVE, Unary.getClearResult(s), FC(-val)); return MOVE_FOLDED; } } return UNCHANGED; case FLOAT_REM_opcode: if (CF_FLOAT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isFloatConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isFloatConstant()) { // BOTH CONSTANTS: FOLD float val1 = op1.asFloatConstant().value; float val2 = op2.asFloatConstant().value; Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), FC(val1%val2)); return MOVE_FOLDED; } } } return UNCHANGED; case FLOAT_SUB_opcode: if (CF_FLOAT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isFloatConstant()) { float val2 = op2.asFloatConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isFloatConstant()) { // BOTH CONSTANTS: FOLD float val1 = op1.asFloatConstant().value; Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), FC(val1 - val2)); return MOVE_FOLDED; } if (val2 == 0.0f) { // x - 0.0 is x, even if x is a NaN Move.mutate(s, FLOAT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } return UNCHANGED; //////////////////// // DOUBLE ALU operations //////////////////// case DOUBLE_ADD_opcode: if (CF_DOUBLE) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isDoubleConstant()) { double val2 = op2.asDoubleConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isDoubleConstant()) { // BOTH CONSTANTS: FOLD double val1 = op1.asDoubleConstant().value; Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), DC(val1 + val2)); return MOVE_FOLDED; } if (val2 == 0.0) { // x + 0.0 is x, even if x is a NaN Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } return UNCHANGED; case DOUBLE_CMPG_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isDoubleConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isDoubleConstant()) { // BOTH CONSTANTS: FOLD double val1 = op1.asDoubleConstant().value; double val2 = op2.asDoubleConstant().value; int result = (val1 < val2) ? -1 : ((val1 == val2) ? 0 : 1); Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(result)); return MOVE_FOLDED; } } } return UNCHANGED; case DOUBLE_CMPL_opcode: if (CF_INT) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isDoubleConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isDoubleConstant()) { // BOTH CONSTANTS: FOLD double val1 = op1.asDoubleConstant().value; double val2 = op2.asDoubleConstant().value; int result = (val1 > val2) ? 1 : ((val1 == val2) ? 0 : -1); Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), IC(result)); return MOVE_FOLDED; } } } return UNCHANGED; case DOUBLE_DIV_opcode: if (CF_DOUBLE) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isDoubleConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isDoubleConstant()) { // BOTH CONSTANTS: FOLD double val1 = op1.asDoubleConstant().value; double val2 = op2.asDoubleConstant().value; Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), DC(val1/val2)); return MOVE_FOLDED; } } } return UNCHANGED; case DOUBLE_MUL_opcode: if (CF_DOUBLE) { canonicalizeCommutativeOperator(s); OPT_Operand op2 = Binary.getVal2(s); if (op2.isDoubleConstant()) { double val2 = op2.asDoubleConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isDoubleConstant()) { // BOTH CONSTANTS: FOLD double val1 = op1.asDoubleConstant().value; Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), DC(val1*val2)); return MOVE_FOLDED; } if (val2 == 1.0) { // x * 1.0 is x even if x is a NaN Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } return UNCHANGED; case DOUBLE_NEG_opcode: if (CF_DOUBLE) { OPT_Operand op = Unary.getVal(s); if (op.isDoubleConstant()) { // CONSTANT: FOLD double val = op.asDoubleConstant().value; Move.mutate(s, DOUBLE_MOVE, Unary.getClearResult(s), DC(-val)); return MOVE_FOLDED; } } return UNCHANGED; case DOUBLE_REM_opcode: if (CF_DOUBLE) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isDoubleConstant()) { OPT_Operand op1 = Binary.getVal1(s); if (op1.isDoubleConstant()) { // BOTH CONSTANTS: FOLD double val1 = op1.asDoubleConstant().value; double val2 = op2.asDoubleConstant().value; Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), DC(val1%val2)); return MOVE_FOLDED; } } } return UNCHANGED; case DOUBLE_SUB_opcode: if (CF_DOUBLE) { OPT_Operand op2 = Binary.getVal2(s); if (op2.isDoubleConstant()) { double val2 = op2.asDoubleConstant().value; OPT_Operand op1 = Binary.getVal1(s); if (op1.isDoubleConstant()) { // BOTH CONSTANTS: FOLD double val1 = op1.asDoubleConstant().value; Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), DC(val1 - val2)); return MOVE_FOLDED; } if (val2 == 0.0) { // x - 0.0 is x, even if x is a NaN Move.mutate(s, DOUBLE_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } return UNCHANGED; //////////////////// // CONVERSION operations //////////////////// case DOUBLE_2FLOAT_opcode: if (CF_FLOAT) { OPT_Operand op = Unary.getVal(s); if (op.isDoubleConstant()) { // CONSTANT: FOLD double val = op.asDoubleConstant().value; Move.mutate(s, FLOAT_MOVE, Unary.getClearResult(s), FC((float)val)); return MOVE_FOLDED; } } return UNCHANGED; case DOUBLE_2INT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isDoubleConstant()) { // CONSTANT: FOLD double val = op.asDoubleConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC((int)val)); return MOVE_FOLDED; } } return UNCHANGED; case DOUBLE_2LONG_opcode: if (CF_LONG) { OPT_Operand op = Unary.getVal(s); if (op.isDoubleConstant()) { // CONSTANT: FOLD double val = op.asDoubleConstant().value; Move.mutate(s, LONG_MOVE, Unary.getClearResult(s), LC((long)val)); return MOVE_FOLDED; } } return UNCHANGED; case DOUBLE_AS_LONG_BITS_opcode: if (CF_LONG) { OPT_Operand op = Unary.getVal(s); if (op.isDoubleConstant()) { // CONSTANT: FOLD double val = op.asDoubleConstant().value; Move.mutate(s, LONG_MOVE, Unary.getClearResult(s), LC(Double.doubleToLongBits(val))); return MOVE_FOLDED; } } return UNCHANGED; case INT_2DOUBLE_opcode: if (CF_DOUBLE) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, DOUBLE_MOVE, Unary.getClearResult(s), DC((double)val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_2BYTE_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC((byte)val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_2USHORT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC((char)val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_2FLOAT_opcode: if (CF_FLOAT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, FLOAT_MOVE, Unary.getClearResult(s), FC((float)val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_2LONG_opcode: if (CF_LONG) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, LONG_MOVE, Unary.getClearResult(s), LC((long)val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_2ADDRSigExt_opcode: if (CF_ADDR) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, REF_MOVE, Unary.getClearResult(s), AC(Address.fromIntSignExtend(val))); return MOVE_FOLDED; } } return UNCHANGED; case INT_2ADDRZerExt_opcode: if (CF_ADDR) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, REF_MOVE, Unary.getClearResult(s), AC(Address.fromIntZeroExtend(val))); return MOVE_FOLDED; } } return UNCHANGED; //-#if RVM_FOR_64_ADDR case LONG_2ADDR_opcode: if (CF_ADDR) { OPT_Operand op = Unary.getVal(s); if (op.isLongConstant()) { // CONSTANT: FOLD long val = op.asLongConstant().value; Move.mutate(s, REF_MOVE, Unary.getClearResult(s), AC(Address.fromLong(val))); return MOVE_FOLDED; } } return UNCHANGED; //-#endif case INT_2SHORT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC((short)val)); return MOVE_FOLDED; } } return UNCHANGED; case INT_BITS_AS_FLOAT_opcode: if (CF_FLOAT) { OPT_Operand op = Unary.getVal(s); if (op.isIntConstant()) { // CONSTANT: FOLD int val = op.asIntConstant().value; Move.mutate(s, FLOAT_MOVE, Unary.getClearResult(s), FC(Float.intBitsToFloat(val))); return MOVE_FOLDED; } } return UNCHANGED; case ADDR_2INT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isAddressConstant()) { // CONSTANT: FOLD Address val = op.asAddressConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC(val.toInt())); return MOVE_FOLDED; } } return UNCHANGED; case ADDR_2LONG_opcode: if (CF_LONG) { OPT_Operand op = Unary.getVal(s); if (op.isAddressConstant()) { // CONSTANT: FOLD Address val = op.asAddressConstant().value; Move.mutate(s, LONG_MOVE, Unary.getClearResult(s), LC(val.toLong())); return MOVE_FOLDED; } } return UNCHANGED; case FLOAT_2DOUBLE_opcode: if (CF_DOUBLE) { OPT_Operand op = Unary.getVal(s); if (op.isFloatConstant()) { // CONSTANT: FOLD float val = op.asFloatConstant().value; Move.mutate(s, DOUBLE_MOVE, Unary.getClearResult(s), DC((double)val)); return MOVE_FOLDED; } } return UNCHANGED; case FLOAT_2INT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isFloatConstant()) { // CONSTANT: FOLD float val = op.asFloatConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC((int)val)); return MOVE_FOLDED; } } return UNCHANGED; case FLOAT_2LONG_opcode: if (CF_LONG) { OPT_Operand op = Unary.getVal(s); if (op.isFloatConstant()) { // CONSTANT: FOLD float val = op.asFloatConstant().value; Move.mutate(s, LONG_MOVE, Unary.getClearResult(s), LC((long)val)); return MOVE_FOLDED; } } return UNCHANGED; case FLOAT_AS_INT_BITS_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isFloatConstant()) { // CONSTANT: FOLD float val = op.asFloatConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC(Float.floatToIntBits(val))); return MOVE_FOLDED; } } return UNCHANGED; case LONG_2FLOAT_opcode: if (CF_FLOAT) { OPT_Operand op = Unary.getVal(s); if (op.isLongConstant()) { // CONSTANT: FOLD long val = op.asLongConstant().value; Move.mutate(s, FLOAT_MOVE, Unary.getClearResult(s), FC((float)val)); return MOVE_FOLDED; } } return UNCHANGED; case LONG_2INT_opcode: if (CF_INT) { OPT_Operand op = Unary.getVal(s); if (op.isLongConstant()) { // CONSTANT: FOLD long val = op.asLongConstant().value; Move.mutate(s, INT_MOVE, Unary.getClearResult(s), IC((int)val)); return MOVE_FOLDED; } } return UNCHANGED; case LONG_2DOUBLE_opcode: if (CF_DOUBLE) { OPT_Operand op = Unary.getVal(s); if (op.isLongConstant()) { // CONSTANT: FOLD long val = op.asLongConstant().value; Move.mutate(s, DOUBLE_MOVE, Unary.getClearResult(s), DC((double)val)); return MOVE_FOLDED; } } return UNCHANGED; case LONG_BITS_AS_DOUBLE_opcode: if (CF_DOUBLE) { OPT_Operand op = Unary.getVal(s); if (op.isLongConstant()) { // CONSTANT: FOLD long val = op.asLongConstant().value; Move.mutate(s, DOUBLE_MOVE, Unary.getClearResult(s), DC(Double.longBitsToDouble(val))); return MOVE_FOLDED; } } return UNCHANGED; default: return UNCHANGED; } }
|
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/885bdbb0bcc20101dd619f5136dd2850f157204a/OPT_Simplifier.java/buggy/rvm/src/vm/compilers/optimizing/optimizations/local/OPT_Simplifier.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1160,
16499,
12,
15620,
67,
7469,
3996,
2864,
960,
6011,
16,
16456,
67,
11983,
272,
13,
288,
565,
1620,
261,
87,
18,
588,
22808,
10756,
288,
1377,
368,
3517,
759,
1377,
368,
611,
57,
8085,
5295,
1377,
368,
3517,
759,
565,
648,
611,
57,
8085,
67,
4208,
38,
3740,
67,
556,
710,
30,
1377,
288,
3639,
16456,
67,
10265,
1061,
22,
273,
7896,
18,
588,
3053,
22,
12,
87,
1769,
3639,
309,
261,
556,
22,
1276,
16456,
67,
5510,
16709,
10265,
13,
288,
1850,
16456,
67,
10265,
1061,
21,
273,
7896,
18,
588,
3053,
21,
12,
87,
1769,
1850,
309,
261,
556,
21,
1276,
16456,
67,
5510,
16709,
10265,
13,
288,
5411,
368,
29370,
1053,
6099,
14727,
30,
478,
11846,
5411,
9933,
18,
10735,
340,
12,
87,
16,
611,
57,
8085,
67,
16537,
16,
7896,
18,
588,
9094,
1253,
12,
87,
3631,
1061,
21,
1769,
5411,
327,
16070,
3412,
67,
42,
1741,
7660,
31,
1850,
289,
469,
288,
5411,
368,
20747,
7247,
22,
4437,
1053,
16709,
30,
16070,
3412,
14411,
57,
1441,
5411,
9933,
18,
10735,
340,
12,
87,
16,
611,
57,
8085,
67,
16537,
16,
7896,
18,
588,
9094,
1253,
12,
87,
3631,
7682,
7896,
18,
588,
9094,
3053,
21,
12,
87,
10019,
5411,
327,
16070,
3412,
67,
5879,
57,
23552,
31,
1850,
289,
3639,
289,
1377,
289,
1377,
327,
5019,
24435,
31,
1377,
368,
3517,
759,
1377,
368,
4235,
2203,
5295,
1377,
368,
3517,
759,
565,
648,
4235,
2203,
67,
5501,
67,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1160,
16499,
12,
15620,
67,
7469,
3996,
2864,
960,
6011,
16,
16456,
67,
11983,
272,
13,
288,
565,
1620,
261,
87,
18,
588,
22808,
10756,
288,
1377,
368,
3517,
759,
1377,
368,
611,
57,
8085,
5295,
1377,
368,
3517,
759,
565,
648,
611,
57,
8085,
67,
4208,
38,
3740,
67,
556,
710,
30,
1377,
288,
3639,
16456,
67,
10265,
1061,
22,
273,
7896,
18,
588,
3053,
22,
12,
87,
1769,
3639,
309,
261,
556,
22,
1276,
16456,
67,
5510,
16709,
10265,
13,
288,
1850,
16456,
67,
10265,
1061,
21,
273,
7896,
18,
588,
3053,
21,
12,
87,
1769,
1850,
309,
261,
556,
21,
1276,
16456,
67,
5510,
16709,
10265,
13,
288,
5411,
368,
29370,
1053,
6099,
2
] |
Relative.untranslateRelative(c); c.popStyle();
|
public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; Border border = c.getCurrentStyle().getBorderWidth(c.getBlockFormattingContext().getWidth(), c.getBlockFormattingContext().getHeight()); Border margin = c.getCurrentStyle().getMarginWidth(c.getBlockFormattingContext().getWidth(), c.getBlockFormattingContext().getHeight()); Border padding = c.getCurrentStyle().getPaddingWidth(c.getBlockFormattingContext().getWidth(), c.getBlockFormattingContext().getHeight()); //below should maybe be done somewhere else? bounds.width -= margin.left + border.left + padding.left + padding.right + border.right + margin.right; validateBounds(bounds); bounds.x = 0; bounds.y = 0; bounds.height = 0; //dummy style to make sure that text nodes don't get extra padding and such c.pushStyle(new CascadedStyle()); int blockLineHeight = FontUtil.lineHeight(c); LineMetrics blockLineMetrics = c.getTextRenderer().getLineMetrics(c.getGraphics(), FontUtil.getFont(c), "thequickbrownfoxjumpedoverthelazydogTHEQUICKBROWNFOXJUMPEDOVERTHELAZYDOG"); // 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 = c.getCurrentStyle(); 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; boolean isFirstLetter = true; List pendingPushStyles = null; // 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 box.firstLineStyle = ((FirstLineStyle) o).getStyle(); continue; } if (o instanceof FirstLetterStyle) {//can actually only be the first or second object in list box.firstLetterStyle = ((FirstLetterStyle) o).getStyle(); continue; } if (o instanceof StylePush) { CascadedStyle style; StylePush sp = (StylePush) o; if (sp.getPseudoElement() != null) { style = c.getCss().getPseudoElementStyle(sp.getElement(), sp.getPseudoElement()); } else { style = c.getCss().getCascadedStyle(sp.getElement(), false);//already restyled by ContentUtil } c.pushStyle(style); if (pendingPushStyles == null) { pendingPushStyles = new LinkedList(); } pendingPushStyles.add((StylePush) o); Relative.translateRelative(c); continue; } if (o instanceof StylePop) { Relative.untranslateRelative(c); c.popStyle(); if (pendingPushStyles != null && pendingPushStyles.size() != 0) { pendingPushStyles.remove(pendingPushStyles.size() - 1);//was a redundant one } else { if (prev_inline != null) { if (prev_inline.popstyles == null) { prev_inline.popstyles = new LinkedList(); } prev_inline.popstyles.add(o); } } continue; } Content currentContent = (Content) o; if (currentContent.getStyle() != null) { c.pushStyle(currentContent.getStyle()); } // loop until no more text in this node InlineBox new_inline = null; int start = 0; do { new_inline = null; if (currentContent instanceof AbsolutelyPositionedContent) { // Uu.p("this might be a problem, but it could just be an absolute block"); // result = new BoxLayout().layout(c,content); Box absolute = Absolute.generateAbsoluteBox(c, currentContent); curr_line.addChild(absolute); break; } // debugging check if (bounds.width < 0) { Uu.p("bounds width = " + bounds.width); Uu.dump_stack(); System.exit(-1); } // the crash warning code if (bounds.width < 1) { Uu.p("warning. width < 1 " + bounds.width); } currentStyle = c.getCurrentStyle(); // look at current inline // break off the longest section that will fit new_inline = calculateInline(c, currentContent, remaining_width, bounds.width, prev_align_inline, isFirstLetter, box.firstLetterStyle, box.firstLineStyle, curr_line, start); // Uu.p("got back inline: " + new_inline); // if this inline needs to be on a new line if (prev_align_inline != null && new_inline.break_before) { // Uu.p("break before"); remaining_width = bounds.width; saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, false, blockLineHeight); 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); //have to discard it and recalculate, particularly if this was the first line //HACK: is my thinking straight? - tobe prev_align_inline.break_after = true; new_inline = null; continue; } // save the new inline to the list // Uu.p("adding inline child: " + new_inline); //the inline might be set to size 0,0 after this, if it is first whitespace on line. // Cannot discard because it may contain style-pushes curr_line.addInlineChild(c, new_inline); // Uu.p("current line = " + curr_line); if (new_inline instanceof InlineTextBox) { start = ((InlineTextBox) new_inline).end_index; } isFirstLetter = false; new_inline.pushstyles = pendingPushStyles; pendingPushStyles = null; // calc new height of the line // don't count floats and absolutes if (!new_inline.floated && !new_inline.absolute) { adjustLineHeight(c, curr_line, new_inline, blockLineHeight, blockLineMetrics); } if (!(currentContent instanceof FloatedBlockContent)) { // 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) { // Uu.p("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, box, false, blockLineHeight); // 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 (!isOutsideFlow(currentContent)) { prev_align_inline = new_inline; // } } prev_inline = new_inline; } while (new_inline == null || !new_inline.isEndOfParentContent()); if (currentContent.getStyle() != null) { c.popStyle(); } } // save the final line saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, true, blockLineHeight); finishBlock(box, curr_line, bounds); // Uu.p("- InlineLayout.layoutContent(): " + box); //pop the dummy style c.popStyle(); }
|
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/8f81e5fe9f6f8593d3c596d30a3f100cb87dbf27/InlineBoxing.java/clean/src/java/org/xhtmlrenderer/layout/InlineBoxing.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
3511,
1350,
12,
1042,
276,
16,
8549,
3919,
16,
987,
913,
682,
13,
288,
3639,
368,
26715,
732,
1410,
3712,
506,
4832,
5943,
716,
13955,
358,
279,
1203,
17,
2815,
930,
3639,
368,
1884,
10407,
13694,
3639,
13264,
4972,
273,
394,
13264,
5621,
3639,
4972,
18,
2819,
273,
276,
18,
588,
2482,
4877,
7675,
2819,
31,
3639,
13525,
5795,
273,
276,
18,
588,
3935,
2885,
7675,
588,
8107,
2384,
12,
71,
18,
588,
1768,
23974,
1042,
7675,
588,
2384,
9334,
276,
18,
588,
1768,
23974,
1042,
7675,
588,
2686,
10663,
3639,
13525,
7333,
273,
276,
18,
588,
3935,
2885,
7675,
588,
9524,
2384,
12,
71,
18,
588,
1768,
23974,
1042,
7675,
588,
2384,
9334,
276,
18,
588,
1768,
23974,
1042,
7675,
588,
2686,
10663,
3639,
13525,
4992,
273,
276,
18,
588,
3935,
2885,
7675,
588,
9485,
2384,
12,
71,
18,
588,
1768,
23974,
1042,
7675,
588,
2384,
9334,
276,
18,
588,
1768,
23974,
1042,
7675,
588,
2686,
10663,
3639,
368,
27916,
1410,
6944,
506,
2731,
22234,
469,
35,
3639,
4972,
18,
2819,
3947,
7333,
18,
4482,
397,
5795,
18,
4482,
397,
4992,
18,
4482,
397,
7734,
4992,
18,
4083,
397,
5795,
18,
4083,
397,
7333,
18,
4083,
31,
3639,
1954,
5694,
12,
10576,
1769,
3639,
4972,
18,
92,
273,
374,
31,
3639,
4972,
18,
93,
273,
374,
31,
3639,
4972,
18,
4210,
273,
374,
31,
3639,
368,
21050,
2154,
358,
1221,
3071,
716,
977,
2199,
2727,
1404,
336,
2870,
4992,
471,
4123,
3639,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
3511,
1350,
12,
1042,
276,
16,
8549,
3919,
16,
987,
913,
682,
13,
288,
3639,
368,
26715,
732,
1410,
3712,
506,
4832,
5943,
716,
13955,
358,
279,
1203,
17,
2815,
930,
3639,
368,
1884,
10407,
13694,
3639,
13264,
4972,
273,
394,
13264,
5621,
3639,
4972,
18,
2819,
273,
276,
18,
588,
2482,
4877,
7675,
2819,
31,
3639,
13525,
5795,
273,
276,
18,
588,
3935,
2885,
7675,
588,
8107,
2384,
12,
71,
18,
588,
1768,
23974,
1042,
7675,
588,
2384,
9334,
276,
18,
588,
1768,
23974,
1042,
7675,
588,
2686,
10663,
3639,
13525,
7333,
273,
276,
18,
588,
3935,
2885,
7675,
588,
9524,
2384,
12,
71,
18,
588,
1768,
23974,
1042,
7675,
588,
2384,
9334,
276,
2
] |
|
ModelAndView next = new ModelAndView("wiki"); viewError(request, next, e);
|
logger.error("Failure while loading stylesheet for virtualWiki " + virtualWiki, e);
|
public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) { try { String virtualWiki = JAMWikiServlet.getVirtualWikiFromURI(request); String topicName = JAMWikiServlet.getTopicFromURI(request); String stylesheet = JAMWikiServlet.getCachedContent(request, virtualWiki, WikiBase.SPECIAL_PAGE_STYLESHEET, false); response.setContentType("text/css; charset=utf-8"); // cache for 30 minutes (60 * 30 = 1800) // FIXME - make configurable response.setHeader("Cache-Control", "max-age=1800"); PrintWriter out = response.getWriter(); out.print(stylesheet); out.close(); } catch (Exception e) { ModelAndView next = new ModelAndView("wiki"); viewError(request, next, e); } // do not load defaults or redirect - return as raw CSS return null; }
|
50517 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50517/d21041c0f41f31ecaa9760e7617d74e59bdfbd87/StylesheetServlet.java/buggy/src/java/org/jamwiki/servlets/StylesheetServlet.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3164,
1876,
1767,
15713,
3061,
12,
2940,
18572,
590,
16,
12446,
766,
13,
288,
202,
202,
698,
288,
1082,
202,
780,
5024,
25438,
273,
804,
2192,
25438,
4745,
18,
588,
6466,
25438,
1265,
3098,
12,
2293,
1769,
1082,
202,
780,
31997,
273,
804,
2192,
25438,
4745,
18,
588,
6657,
1265,
3098,
12,
2293,
1769,
1082,
202,
780,
13820,
273,
804,
2192,
25438,
4745,
18,
588,
9839,
1350,
12,
2293,
16,
5024,
25438,
16,
28268,
2171,
18,
13847,
6365,
67,
11219,
67,
15066,
2664,
41,
1584,
16,
629,
1769,
1082,
202,
2740,
18,
542,
8046,
2932,
955,
19,
5212,
31,
4856,
33,
3158,
17,
28,
8863,
1082,
202,
759,
1247,
364,
5196,
6824,
261,
4848,
380,
5196,
273,
6549,
713,
13,
1082,
202,
759,
9852,
300,
1221,
14593,
1082,
202,
2740,
18,
542,
1864,
2932,
1649,
17,
3367,
3113,
315,
1896,
17,
410,
33,
2643,
713,
8863,
1082,
202,
5108,
2289,
596,
273,
766,
18,
588,
2289,
5621,
1082,
202,
659,
18,
1188,
12,
19403,
1769,
1082,
202,
659,
18,
4412,
5621,
202,
202,
97,
1044,
261,
503,
425,
13,
288,
1082,
202,
1488,
1876,
1767,
1024,
273,
394,
3164,
1876,
1767,
2932,
13044,
8863,
1082,
202,
1945,
668,
12,
2293,
16,
1024,
16,
425,
1769,
202,
202,
97,
202,
202,
759,
741,
486,
1262,
3467,
578,
3136,
300,
327,
487,
1831,
6765,
202,
202,
2463,
446,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3164,
1876,
1767,
15713,
3061,
12,
2940,
18572,
590,
16,
12446,
766,
13,
288,
202,
202,
698,
288,
1082,
202,
780,
5024,
25438,
273,
804,
2192,
25438,
4745,
18,
588,
6466,
25438,
1265,
3098,
12,
2293,
1769,
1082,
202,
780,
31997,
273,
804,
2192,
25438,
4745,
18,
588,
6657,
1265,
3098,
12,
2293,
1769,
1082,
202,
780,
13820,
273,
804,
2192,
25438,
4745,
18,
588,
9839,
1350,
12,
2293,
16,
5024,
25438,
16,
28268,
2171,
18,
13847,
6365,
67,
11219,
67,
15066,
2664,
41,
1584,
16,
629,
1769,
1082,
202,
2740,
18,
542,
8046,
2932,
955,
19,
5212,
31,
4856,
33,
3158,
17,
28,
8863,
1082,
202,
759,
1247,
364,
5196,
6824,
261,
4848,
380,
5196,
2
] |
break;
|
continue Loop;
|
static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: for (;;) { try { int op = 0xFF & iCode[pc++]; switch (op) { // Back indent to ease imlementation reading case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); int pcNew = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pcNew >= 0) { // Has catch block doCatch = true; } } if (pcNew < 0) { pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pcNew < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; // Notify instruction observer if necessary // and point pc and pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = pcNew; continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); javaException = new JavaScriptException(value, idata.itsSourceFile, sourceLine); exceptionPC = pc - 1; if (instructionThreshold != 0) { instructionCount += pc - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getJavaCatchPC(iCode); continue Loop; } case Token.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl <= lDbl); } else { valBln = ScriptRuntime.cmp_LE(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl <= rDbl); } else { valBln = ScriptRuntime.cmp_LE(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl < lDbl); } else { valBln = ScriptRuntime.cmp_LT(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl < rDbl); } else { valBln = ScriptRuntime.cmp_LT(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IFNE : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (!valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Token.IFEQ : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Icode_IFEQ_POP : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); stack[stackTop--] = null; continue Loop; } pc += 2; break; } case Token.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_RETSUB : { int slot = (iCode[pc] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 1 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } int newPC; Object value = stack[LOCAL_SHFT + slot]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; newPC = getJavaCatchPC(iCode); } else { // Normal return from GOSUB newPC = (int)sDbl[LOCAL_SHFT + slot]; } pcPrevBranch = pc = newPC; continue Loop; } case Token.POP : stack[stackTop] = null; stackTop--; break; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case Icode_DUPSECOND : { stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stackTop++; break; } case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; break; } case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; break; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_POPV : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case Token.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case Token.NOT : { stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; break; } case Token.BINDNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case Token.SETNAME : { String name = strings[getIndex(iCode, pc)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); break; } case Token.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case Token.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case Token.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case Icode_PROPINC : case Icode_PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecr(lhs, name, scope, op == Icode_PROPINC); break; } case Icode_ELEMINC : case Icode_ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecrElem(lhs, rhs, scope, op == Icode_ELEMINC); break; } case Token.LOCAL_SAVE : { int slot = (iCode[pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; --stackTop; ++pc; break; } case Token.LOCAL_LOAD : { int slot = (iCode[pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; ++pc; break; } case Icode_CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); int count = getIndex(iCode, pc + 4); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); instructionCount = cx.instructionCount; pc += 6; break; } case Token.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, count, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case Icode_TYPEOFNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case Icode_NAME_AND_THIS : { String name = strings[getIndex(iCode, pc)]; boolean skipGetThis = (0 != iCode[pc + 2]); stackTop = do_nameAndThis(stack, stackTop, scope, name, skipGetThis); pc += 3; break; } case Token.STRING : stack[++stackTop] = strings[getIndex(iCode, pc)]; pc += 2; break; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; break; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; break; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getIndex(iCode, pc)]; pc += 2; break; case Token.NAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case Icode_NAMEINC : case Icode_NAMEDEC : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.postIncrDecr(scope, name, op == Icode_NAMEINC); pc += 2; break; } case Token.SETVAR : { int slot = (iCode[pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.GETVAR : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } ++pc; break; } case Icode_VARINC : case Icode_VARDEC : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { Object val = stack[VAR_SHFT + slot]; stack[stackTop] = val; double d; if (val == DBL_MRK) { d = sDbl[VAR_SHFT + slot]; sDbl[stackTop] = d; } else { d = ScriptRuntime.toNumber(val); } stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = (op == Icode_VARINC) ? d + 1.0 : d - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; double d = ScriptRuntime.toNumber(val); val = doubleWrap((op == Icode_VARINC) ? d + 1.0 : d - 1.0); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case Token.NULL : stack[++stackTop] = null; break; case Token.THIS : stack[++stackTop] = thisObj; break; case Token.THISFN : stack[++stackTop] = fnOrScript; break; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; break; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; break; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; break; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; break; case Token.CATCH_SCOPE : { String name = strings[getIndex(iCode, pc)]; stack[stackTop] = ScriptRuntime.newCatchScope(name, stack[stackTop]); pc += 2; break; } case Token.ENUM_INIT : { int slot = (iCode[pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.enumInit(lhs, scope); ++pc; break; } case Token.ENUM_NEXT : case Token.ENUM_ID : { int slot = (iCode[pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); ++pc; break; } case Icode_PUSH_PARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[++stackTop] = ScriptRuntime.getParent(lhs); break; } case Icode_GETPROTO : case Icode_GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_GETPROTO) { val = ScriptRuntime.getProto(lhs, scope); } else { val = ScriptRuntime.getParent(lhs, scope); } stack[stackTop] = val; break; } case Icode_SETPROTO : case Icode_SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_SETPROTO) { val = ScriptRuntime.setProto(lhs, rhs, scope); } else { val = ScriptRuntime.setParent(lhs, rhs, scope); } stack[stackTop] = val; break; } case Icode_SCOPE : stack[++stackTop] = scope; break; case Icode_CLOSURE : { int i = getIndex(iCode, pc); InterpreterData closureData = idata.itsNestedFunctions[i]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); pc += 2; break; } case Token.REGEXP : { int i = getIndex(iCode, pc); Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[i]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[i]; } stack[++stackTop] = regexp; pc += 2; break; } case Icode_LITERAL_NEW : { int i = getInt(iCode, pc); ++stackTop; stack[stackTop] = new Object[i]; sDbl[stackTop] = 0; pc += 4; break; } case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; break; } case Token.ARRAYLIT : case Token.OBJECTLIT : { int offset = getInt(iCode, pc); Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.ARRAYLIT) { int[] skipIndexces = null; if (offset >= 0) { skipIndexces = (int[])idata.literalIds[offset]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } else { Object[] ids = (Object[])idata.literalIds[offset]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } stack[stackTop] = val; pc += 4; break; } case Icode_LINE : { cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1)); } // end of interpreter switch } } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } javaException = ex; exceptionPC = pc; pc = getJavaCatchPC(iCode); continue Loop; } } cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } if (javaException != null) { if (javaException instanceof JavaScriptException) { throw (JavaScriptException)javaException; } else if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; }
|
19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/369d8e109106915195bef3af1282543ab09e3869/Interpreter.java/clean/src/org/mozilla/javascript/Interpreter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701,
16717,
2083,
2295,
1162,
3651,
16,
18701,
5294,
11599,
751,
612,
396,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
309,
261,
71,
92,
18,
2761,
11599,
4368,
3748,
480,
612,
396,
18,
7462,
3748,
13,
288,
5411,
309,
261,
1968,
40,
3083,
480,
446,
13,
288,
7734,
833,
273,
30169,
1076,
12,
1968,
16,
833,
40,
3083,
16,
1501,
10544,
16,
1501,
1380,
1769,
5411,
289,
5411,
6036,
2933,
888,
273,
612,
396,
18,
7462,
2933,
31,
5411,
1033,
5198,
3748,
273,
9494,
18,
2761,
11599,
4368,
3748,
31,
5411,
9494,
18,
2761,
11599,
4368,
3748,
273,
612,
396,
18,
7462,
3748,
31,
5411,
775,
288,
7734,
327,
888,
18,
1991,
1190,
3748,
12,
350,
396,
18,
7462,
3748,
16,
9494,
16,
2295,
1162,
3651,
16,
29159,
2146,
16,
15261,
16,
833,
1769,
5411,
289,
3095,
288,
7734,
9494,
18,
2761,
11599,
4368,
3748,
273,
5198,
3748,
31,
5411,
289,
3639,
289,
3639,
727,
1033,
2383,
48,
67,
23464,
47,
273,
5294,
11599,
18,
2290,
48,
67,
23464,
47,
31,
3639,
727,
22780,
3109,
273,
22243,
18,
1336,
31,
3639,
727,
509,
8350,
67,
2664,
4464,
273,
374,
31,
3639,
727,
509,
943,
5555,
273,
612,
396,
18,
1282,
2747,
5555,
31,
3639,
727,
509,
15234,
67,
2664,
4464,
273,
8350,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701,
16717,
2083,
2295,
1162,
3651,
16,
18701,
5294,
11599,
751,
612,
396,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
309,
261,
71,
92,
18,
2761,
11599,
4368,
3748,
480,
612,
396,
18,
7462,
3748,
13,
288,
5411,
309,
261,
1968,
40,
3083,
480,
446,
13,
288,
7734,
833,
273,
30169,
1076,
12,
1968,
16,
833,
40,
3083,
16,
1501,
10544,
16,
1501,
1380,
1769,
5411,
289,
5411,
6036,
2933,
888,
273,
612,
396,
18,
7462,
2933,
31,
5411,
1033,
5198,
3748,
273,
9494,
2
] |
this._nLeftRight = 0; this._pathLast = path; this._timerHover.restart();
|
_nLeftRight = 0; _pathLast = path; _timerHover.restart();
|
public void dragOver(DropTargetDragEvent e) { if( e==null || this._raGhost == null || this._ptLast == null || JDragTree.this._ptOffset == null || JDragTree.this._imgGhost == null || this._raCueLine == null ) { return; } // Even if the mouse is not moving, this method is still invoked 10 times per second Point pt = e.getLocation(); if(pt==null) { return; } if (pt.equals(this._ptLast)) return; // Try to determine whether the user is flicking the cursor right or left int nDeltaLeftRight = pt.x - this._ptLast.x; if ( (this._nLeftRight > 0 && nDeltaLeftRight < 0) || (this._nLeftRight < 0 && nDeltaLeftRight > 0) ) this._nLeftRight = 0; this._nLeftRight += nDeltaLeftRight; this._ptLast = pt; Graphics2D g2 = (Graphics2D) JDragTree.this.getGraphics(); if( g2 == null ) { return; } // If a drag image is not supported by the platform, then draw my own drag image if (!DragSource.isDragImageSupported()) { JDragTree.this.paintImmediately(this._raGhost.getBounds()); // Rub out the last ghost image and cue line // And remember where we are about to draw the new ghost image this._raGhost.setRect(pt.x - JDragTree.this._ptOffset.x, pt.y - JDragTree.this._ptOffset.y, JDragTree.this._imgGhost.getWidth(), JDragTree.this._imgGhost.getHeight()); g2.drawImage(JDragTree.this._imgGhost, AffineTransform.getTranslateInstance(this._raGhost.getX(), this._raGhost.getY()), null); } else // Just rub out the last cue line JDragTree.this.paintImmediately(this._raCueLine.getBounds()); TreePath path = JDragTree.this.getClosestPathForLocation(pt.x, pt.y); if (!(path == this._pathLast)) { this._nLeftRight = 0; // We've moved up or down, so reset left/right movement trend this._pathLast = path; this._timerHover.restart(); } // In any case draw (over the ghost image if necessary) a cue line indicating where a drop will occur Rectangle raPath = JDragTree.this.getPathBounds(path); this._raCueLine.setRect(0, raPath.y+(int)raPath.getHeight(), JDragTree.this.getWidth(), 2); g2.setColor(this._colorCueLine); g2.fill(this._raCueLine); this._nShift = 0; // And include the cue line in the area to be rubbed out next time this._raGhost = this._raGhost.createUnion(this._raCueLine); // Do this if you want to prohibit dropping onto the drag source if (path.equals(JDragTree.this._pathSource)) e.rejectDrag(); else e.acceptDrag(e.getDropAction()); }
|
47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/0458430a0dc8a713aa2b4d64f000cbbaaeb4adea/JDragTree.java/buggy/src/thaw/gui/JDragTree.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
1071,
918,
8823,
4851,
12,
7544,
2326,
11728,
1133,
425,
13,
1082,
288,
2398,
309,
12,
425,
631,
2011,
747,
333,
6315,
354,
43,
2564,
422,
446,
747,
333,
6315,
337,
3024,
422,
446,
747,
1171,
804,
11728,
2471,
18,
2211,
6315,
337,
2335,
422,
446,
747,
804,
11728,
2471,
18,
2211,
6315,
6081,
43,
2564,
422,
446,
747,
333,
6315,
354,
39,
344,
1670,
422,
446,
262,
288,
1171,
327,
31,
2398,
289,
9506,
368,
25067,
309,
326,
7644,
353,
486,
12499,
16,
333,
707,
353,
4859,
8187,
1728,
4124,
1534,
2205,
9506,
4686,
5818,
273,
425,
18,
588,
2735,
5621,
2398,
309,
12,
337,
631,
2011,
13,
288,
1171,
327,
31,
2398,
289,
9506,
309,
261,
337,
18,
14963,
12,
2211,
6315,
337,
3024,
3719,
6862,
327,
31,
9506,
368,
6161,
358,
4199,
2856,
326,
729,
353,
1183,
1200,
310,
326,
3347,
2145,
578,
2002,
9506,
509,
290,
9242,
3910,
4726,
273,
5818,
18,
92,
300,
333,
6315,
337,
3024,
18,
92,
31,
9506,
309,
261,
261,
2211,
6315,
82,
3910,
4726,
405,
374,
597,
290,
9242,
3910,
4726,
411,
374,
13,
747,
261,
2211,
6315,
82,
3910,
4726,
411,
374,
597,
290,
9242,
3910,
4726,
405,
374,
13,
262,
6862,
333,
6315,
82,
3910,
4726,
273,
374,
31,
9506,
333,
6315,
82,
3910,
4726,
1011,
290,
9242,
3910,
4726,
31,
9506,
333,
6315,
337,
3024,
273,
5818,
31,
9506,
16830,
22,
40,
314,
22,
273,
261,
17558,
22,
40,
13,
804,
11728,
2471,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
1071,
918,
8823,
4851,
12,
7544,
2326,
11728,
1133,
425,
13,
1082,
288,
2398,
309,
12,
425,
631,
2011,
747,
333,
6315,
354,
43,
2564,
422,
446,
747,
333,
6315,
337,
3024,
422,
446,
747,
1171,
804,
11728,
2471,
18,
2211,
6315,
337,
2335,
422,
446,
747,
804,
11728,
2471,
18,
2211,
6315,
6081,
43,
2564,
422,
446,
747,
333,
6315,
354,
39,
344,
1670,
422,
446,
262,
288,
1171,
327,
31,
2398,
289,
9506,
368,
25067,
309,
326,
7644,
353,
486,
12499,
16,
333,
707,
353,
4859,
8187,
1728,
4124,
1534,
2205,
9506,
4686,
5818,
273,
425,
18,
588,
2735,
5621,
2398,
309,
12,
337,
631,
2011,
13,
288,
1171,
327,
31,
2398,
289,
9506,
309,
261,
2
] |
}
|
protected boolean updateSelection(IStructuredSelection selection) { if (!super.updateSelection(selection)) return false; if (getSelectedNonResources().size() > 0) return false; List selectedResources = getSelectedResources(); if (selectedResources.size() == 0) return false; boolean projSelected = selectionIsOfType(IResource.PROJECT); boolean fileFoldersSelected = selectionIsOfType(IResource.FILE | IResource.FOLDER); if (!projSelected && !fileFoldersSelected) return false; // selection must be homogeneous if (projSelected && fileFoldersSelected) return false; // must have a common parent IContainer firstParent = ((IResource) selectedResources.get(0)).getParent(); if (firstParent == null) return false; Iterator resourcesEnum = selectedResources.iterator(); while (resourcesEnum.hasNext()) { IResource currentResource = (IResource) resourcesEnum.next(); if (!currentResource.getParent().equals(firstParent)) { return false; } // resource location must exist if (currentResource.getLocation() == null) { return false; } } return true;}
|
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/77fa4fa7cf032f952882d781c1d0551256b402ef/CopyAction.java/clean/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/navigator/CopyAction.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
1250,
1089,
6233,
12,
45,
30733,
6233,
4421,
13,
288,
202,
430,
16051,
9565,
18,
2725,
6233,
12,
10705,
3719,
202,
202,
2463,
629,
31,
202,
202,
430,
261,
588,
7416,
3989,
3805,
7675,
1467,
1435,
405,
374,
13,
3196,
202,
2463,
629,
31,
202,
682,
3170,
3805,
273,
16625,
3805,
5621,
202,
430,
261,
8109,
3805,
18,
1467,
1435,
422,
374,
13,
202,
202,
2463,
629,
31,
202,
202,
6494,
10296,
7416,
273,
4421,
2520,
18859,
12,
45,
1420,
18,
17147,
1769,
202,
6494,
585,
14885,
7416,
273,
4421,
2520,
18859,
12,
45,
1420,
18,
3776,
571,
467,
1420,
18,
17357,
1769,
202,
430,
16051,
17995,
7416,
597,
401,
768,
14885,
7416,
13,
202,
202,
2463,
629,
31,
202,
759,
4421,
1297,
506,
13995,
30075,
1481,
202,
430,
261,
17995,
7416,
597,
585,
14885,
7416,
13,
202,
202,
2463,
629,
31,
202,
202,
759,
1297,
1240,
279,
2975,
982,
202,
202,
45,
2170,
1122,
3054,
273,
14015,
45,
1420,
13,
3170,
3805,
18,
588,
12,
20,
13,
2934,
588,
3054,
5621,
202,
430,
261,
3645,
3054,
422,
446,
13,
3196,
202,
2463,
629,
31,
202,
3198,
2703,
3572,
273,
3170,
3805,
18,
9838,
5621,
202,
17523,
261,
4683,
3572,
18,
5332,
2134,
10756,
288,
202,
202,
45,
1420,
783,
1420,
273,
261,
45,
1420,
13,
2703,
3572,
18,
4285,
5621,
202,
202,
430,
16051,
2972,
1420,
18,
588,
3054,
7675,
14963,
12,
3645,
3054,
3719,
288,
1082,
202,
2463,
629,
31,
202,
202,
97,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
1250,
1089,
6233,
12,
45,
30733,
6233,
4421,
13,
288,
202,
430,
16051,
9565,
18,
2725,
6233,
12,
10705,
3719,
202,
202,
2463,
629,
31,
202,
202,
430,
261,
588,
7416,
3989,
3805,
7675,
1467,
1435,
405,
374,
13,
3196,
202,
2463,
629,
31,
202,
682,
3170,
3805,
273,
16625,
3805,
5621,
202,
430,
261,
8109,
3805,
18,
1467,
1435,
422,
374,
13,
202,
202,
2463,
629,
31,
202,
202,
6494,
10296,
7416,
273,
4421,
2520,
18859,
12,
45,
1420,
18,
17147,
1769,
202,
6494,
585,
14885,
7416,
273,
4421,
2520,
18859,
12,
45,
1420,
18,
3776,
571,
467,
1420,
18,
17357,
1769,
202,
430,
16051,
17995,
7416,
597,
401,
768,
14885,
7416,
13,
202,
202,
2463,
629,
2
] |
|
imcode.server.User user = (imcode.server.User)session.getValue("logon.isDone");
|
imcode.server.User user = (imcode.server.User)session.getAttribute("logon.isDone");
|
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String host = req.getHeader("Host") ; String start_url = Utility.getDomainPref( "start_url",host ) ; // Get the session HttpSession session = req.getSession(true); // Does the session indicate this user already logged in? imcode.server.User user = (imcode.server.User)session.getValue("logon.isDone"); // marker object if (user == null) { // No logon.isDone means he hasn't logged in. // Save the request URL as the true target and redirect to the login page. String scheme = req.getScheme(); String serverName = req.getServerName(); int p = req.getServerPort(); String port = (p == 80) ? "" : ":" + p; res.sendRedirect(scheme + "://" + serverName + port + start_url) ; return ; } res.setContentType("text/html"); PrintWriter out = res.getWriter(); out.print(getPage(req,res)) ; }
|
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/d8b0fdd81e15dafac8d97309e61402a5d67547a5/ImageBrowse.java/buggy/servlets/ImageBrowse.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
202,
95,
202,
202,
780,
1479,
4697,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
202,
780,
787,
67,
718,
540,
202,
33,
13134,
18,
588,
3748,
23218,
12,
315,
1937,
67,
718,
3113,
2564,
262,
274,
202,
202,
759,
968,
326,
1339,
202,
202,
2940,
2157,
1339,
273,
1111,
18,
588,
2157,
12,
3767,
1769,
202,
202,
759,
9637,
326,
1339,
10768,
333,
729,
1818,
7545,
316,
35,
202,
202,
381,
710,
18,
3567,
18,
1299,
729,
225,
273,
261,
381,
710,
18,
3567,
18,
1299,
13,
3184,
18,
588,
1499,
2932,
1330,
265,
18,
291,
7387,
8863,
225,
368,
5373,
733,
202,
202,
430,
261,
1355,
422,
446,
13,
202,
202,
95,
1082,
202,
759,
2631,
613,
265,
18,
291,
7387,
4696,
3904,
13342,
1404,
7545,
316,
18,
1082,
202,
759,
7074,
326,
590,
1976,
487,
326,
638,
1018,
471,
3136,
358,
326,
3925,
1363,
18,
1082,
202,
780,
4355,
273,
1111,
18,
588,
9321,
5621,
1082,
202,
780,
10926,
273,
1111,
18,
588,
28434,
5621,
1082,
202,
474,
293,
273,
1111,
18,
588,
2081,
2617,
5621,
1082,
202,
780,
1756,
273,
261,
84,
422,
8958,
13,
692,
1408,
294,
6153,
397,
293,
31,
1082,
202,
455,
18,
4661,
5961,
12,
9068,
397,
315,
14334,
397,
10926,
397,
1756,
397,
787,
67,
718,
13,
274,
9079,
1082,
202,
2463,
274,
202,
202,
97,
202,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
202,
95,
202,
202,
780,
1479,
4697,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
202,
780,
787,
67,
718,
540,
202,
33,
13134,
18,
588,
3748,
23218,
12,
315,
1937,
67,
718,
3113,
2564,
262,
274,
202,
202,
759,
968,
326,
1339,
202,
202,
2940,
2157,
1339,
273,
1111,
18,
588,
2157,
12,
3767,
1769,
202,
202,
759,
9637,
326,
1339,
10768,
333,
729,
1818,
7545,
316,
35,
202,
202,
381,
710,
18,
3567,
18,
1299,
729,
225,
273,
261,
381,
710,
18,
3567,
18,
1299,
13,
3184,
18,
588,
1499,
2932,
1330,
265,
18,
291,
7387,
8863,
2
] |
public void mMISC() throws RecognitionException { int MISC_StartIndex = input.index(); try { int type = MISC; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 48) ) { return ; } // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:17: ( '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '|' | ',' | '{' | '}' | '[' | ']' | '=' | '/' | '(' | ')' | '\'' | '\\' | '||' | '&&' | '<<<' | '++' | '--' | '>>>' | '==' | '+=' | '=+' | '-=' | '=-' | '*=' | '=*' | '/=' | '=/' | '>>=' ) int alt1=38; switch ( input.LA(1) ) { case '!': alt1=1; break; case '@': alt1=2; break; case '$': alt1=3; break; case '%': alt1=4; break; case '^': alt1=5; break; case '&': int LA1_6 = input.LA(2); if ( LA1_6=='&' ) { alt1=24; } else { alt1=6;} break; case '*': int LA1_7 = input.LA(2); if ( LA1_7=='=' ) { alt1=34; } else { alt1=7;} break; case '_': alt1=8; break; case '-': switch ( input.LA(2) ) { case '-': alt1=27; break; case '=': alt1=32; break; default: alt1=9;} break; case '+': switch ( input.LA(2) ) { case '+': alt1=26; break; case '=': alt1=30; break; default: alt1=10;} break; case '|': int LA1_11 = input.LA(2); if ( LA1_11=='|' ) { alt1=23; } else { alt1=11;} break; case ',': alt1=12; break; case '{': alt1=13; break; case '}': alt1=14; break; case '[': alt1=15; break; case ']': alt1=16; break; case '=': switch ( input.LA(2) ) { case '+': alt1=31; break; case '-': alt1=33; break; case '=': alt1=29; break; case '/': alt1=37; break; case '*': alt1=35; break; default: alt1=17;} break; case '/': int LA1_18 = input.LA(2); if ( LA1_18=='=' ) { alt1=36; } else { alt1=18;} break; case '(': alt1=19; break; case ')': alt1=20; break; case '\'': alt1=21; break; case '\\': alt1=22; break; case '<': alt1=25; break; case '>': int LA1_24 = input.LA(2); if ( LA1_24=='>' ) { int LA1_45 = input.LA(3); if ( LA1_45=='=' ) { alt1=38; } else if ( LA1_45=='>' ) { alt1=28; } else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("1011:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 45, input); throw nvae; } } else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("1011:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 24, input); throw nvae; } break; default: if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("1011:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 0, input); throw nvae; } switch (alt1) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:17: '!' { match('!'); if (failed) return ; } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:23: '@' { match('@'); if (failed) return ; } break; case 3 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:29: '$' { match('$'); if (failed) return ; } break; case 4 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:35: '%' { match('%'); if (failed) return ; } break; case 5 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:41: '^' { match('^'); if (failed) return ; } break; case 6 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:47: '&' { match('&'); if (failed) return ; } break; case 7 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:53: '*' { match('*'); if (failed) return ; } break; case 8 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:59: '_' { match('_'); if (failed) return ; } break; case 9 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:65: '-' { match('-'); if (failed) return ; } break; case 10 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:71: '+' { match('+'); if (failed) return ; } break; case 11 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:19: '|' { match('|'); if (failed) return ; } break; case 12 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:25: ',' { match(','); if (failed) return ; } break; case 13 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:31: '{' { match('{'); if (failed) return ; } break; case 14 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:37: '}' { match('}'); if (failed) return ; } break; case 15 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:43: '[' { match('['); if (failed) return ; } break; case 16 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:49: ']' { match(']'); if (failed) return ; } break; case 17 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:55: '=' { match('='); if (failed) return ; } break; case 18 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:61: '/' { match('/'); if (failed) return ; } break; case 19 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:67: '(' { match('('); if (failed) return ; } break; case 20 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:73: ')' { match(')'); if (failed) return ; } break; case 21 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:79: '\'' { match('\''); if (failed) return ; } break; case 22 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:86: '\\' { match('\\'); if (failed) return ; } break; case 23 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:19: '||' { match("||"); if (failed) return ; } break; case 24 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:26: '&&' { match("&&"); if (failed) return ; } break; case 25 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:33: '<<<' { match("<<<"); if (failed) return ; } break; case 26 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:41: '++' { match("++"); if (failed) return ; } break; case 27 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:48: '--' { match("--"); if (failed) return ; } break; case 28 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:55: '>>>' { match(">>>"); if (failed) return ; } break; case 29 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:63: '==' { match("=="); if (failed) return ; } break; case 30 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:70: '+=' { match("+="); if (failed) return ; } break; case 31 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:77: '=+' { match("=+"); if (failed) return ; } break; case 32 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:84: '-=' { match("-="); if (failed) return ; } break; case 33 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:91: '=-' { match("=-"); if (failed) return ; } break; case 34 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:97: '*=' { match("*="); if (failed) return ; } break; case 35 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:104: '=*' { match("=*"); if (failed) return ; } break; case 36 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1015:19: '/=' { match("/="); if (failed) return ; } break; case 37 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1015:26: '=/' { match("=/"); if (failed) return ; } break; case 38 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1015:33: '>>=' { match(">>="); if (failed) return ; } break; } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 48, MISC_StartIndex); } } }
|
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/cb210a30853642e270a3bba6ce570409f6046852/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
23577,
1016,
5621,
5411,
509,
980,
273,
9851,
5621,
5411,
509,
1149,
2555,
273,
23577,
2555,
382,
1670,
5621,
5411,
509,
1904,
273,
3155,
18,
5280,
67,
15814,
31,
5411,
309,
261,
6888,
34,
20,
597,
1818,
11257,
2175,
12,
2630,
16,
9934,
13,
262,
288,
327,
274,
289,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
10649,
8464,
17,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,
19,
12215,
19,
4936,
19,
72,
1321,
18,
75,
30,
15168,
22,
30,
4033,
30,
261,
15502,
571,
9175,
571,
11874,
571,
9089,
571,
19161,
571,
9824,
571,
5306,
571,
4427,
571,
4014,
571,
10058,
571,
8030,
571,
3316,
571,
9790,
571,
9571,
571,
8375,
571,
8641,
571,
5214,
571,
2023,
571,
7321,
571,
5777,
571,
15053,
571,
5282,
571,
6699,
16637,
571,
5183,
26045,
571,
2368,
17685,
11,
571,
15126,
6797,
571,
16979,
571,
296,
9778,
1870,
571,
22853,
571,
15126,
2218,
571,
15196,
6797,
571,
2400,
2218,
571,
15196,
6627,
571,
14609,
2218,
571,
15196,
4035,
571,
1173,
2218,
571,
15196,
2473,
571,
296,
9778,
2218,
262,
5411,
509,
3770,
21,
33,
7414,
31,
5411,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
5411,
648,
11817,
4278,
7734,
3770,
21,
33,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
23577,
1016,
5621,
5411,
509,
980,
273,
9851,
5621,
5411,
509,
1149,
2555,
273,
23577,
2555,
382,
1670,
5621,
5411,
509,
1904,
273,
3155,
18,
5280,
67,
15814,
31,
5411,
309,
261,
6888,
34,
20,
597,
1818,
11257,
2175,
12,
2630,
16,
9934,
13,
262,
288,
327,
274,
289,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
10649,
8464,
17,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,
19,
12215,
19,
4936,
19,
72,
1321,
2
] |
||
"Service Name: " + this.serviceName + "Total Lifetime Registrations : " + this.lifetimeRegistrationCount + "Current Registrant Count : " + this.currentRegistrantCount + "Resource Creation Time: " + this.resourceCreationTime;
|
" Service Name: " + this.serviceName + " Total Lifetime Registrations : " + this.lifetimeRegistrationCount + " Current Registrant Count : " + this.currentRegistrantCount + " Resource Creation Time: " + this.resourceCreationTime;
|
public String toString() { return super.toString() + "Service Name: " + this.serviceName + "Total Lifetime Registrations : " + this.lifetimeRegistrationCount + "Current Registrant Count : " + this.currentRegistrantCount + "Resource Creation Time: " + this.resourceCreationTime; }
|
8719 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8719/d2a1300baa777da0fa95af04538dedb02d1de956/MDSAggregatorMonitorPacket.java/clean/usage/java/packets/source/src/org/globus/usage/packets/MDSAggregatorMonitorPacket.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
377,
288,
3639,
327,
2240,
18,
10492,
1435,
397,
3639,
315,
1179,
1770,
30,
315,
397,
333,
18,
15423,
397,
540,
315,
5269,
11695,
2374,
2526,
3337,
1012,
294,
315,
397,
333,
18,
17155,
7843,
1380,
397,
3639,
315,
3935,
2526,
3337,
970,
6974,
294,
315,
397,
333,
18,
2972,
20175,
970,
1380,
397,
3639,
315,
1420,
18199,
2647,
30,
315,
397,
333,
18,
3146,
29746,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
377,
288,
3639,
327,
2240,
18,
10492,
1435,
397,
3639,
315,
1179,
1770,
30,
315,
397,
333,
18,
15423,
397,
540,
315,
5269,
11695,
2374,
2526,
3337,
1012,
294,
315,
397,
333,
18,
17155,
7843,
1380,
397,
3639,
315,
3935,
2526,
3337,
970,
6974,
294,
315,
397,
333,
18,
2972,
20175,
970,
1380,
397,
3639,
315,
1420,
18199,
2647,
30,
315,
397,
333,
18,
3146,
29746,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public static ICalTimeZone fromVTimeZone(ZComponent comp) {
|
public static ICalTimeZone fromVTimeZone(ZComponent comp) throws ServiceException {
|
public static ICalTimeZone fromVTimeZone(ZComponent comp) { String tzname = comp.getPropVal(ICalTok.TZID, null); ZComponent standard = null; ZComponent daylight = null; // Find the most recent STANDARD and DAYLIGHT components. "Most recent" // means the component's DTSTART is later in time than that of all other // components. Thus, if multiple STANDARD components are specifieid in // a VTIMEZONE, we end up using only the most recent definition. The // assumption is that all other STANDARD components are for past dates // and they no longer matter. We're forced to make this assumption // because this class is a subclass of SimpleTimeZone, which doesn't // allow historical information. for (Iterator<ZComponent> iter = comp.getComponentIterator(); iter.hasNext(); ) { ZComponent tzComp = iter.next(); if (tzComp == null) continue; ICalTok tok = tzComp.getTok(); if (ICalTok.STANDARD.equals(tok)) { if (standard == null) { standard = tzComp; continue; } else standard = moreRecentTzComp(standard, tzComp); } else if (ICalTok.DAYLIGHT.equals(tok)) { if (daylight == null) { daylight = tzComp; continue; } else daylight = moreRecentTzComp(daylight, tzComp); } } // If both STANDARD and DAYLIGHT have no RRULE and their DTSTART has // the same month and date, they have the same onset date. Discard // the older one. (This happened with Asia/Singapore TZ definition // created by Apple iCal; see bug 7335.) if (standard != null && daylight != null) { String stdRule = standard.getPropVal(ICalTok.RRULE, null); String dayRule = daylight.getPropVal(ICalTok.RRULE, null); // The rules should be either both non-null or both null. // If only one is null then the VTIMEZONE is invalid, but we'll be // lenient and treat it as if both were null. if (stdRule == null || dayRule == null) { String stdStart = standard.getPropVal(ICalTok.DTSTART, null); String dayStart = daylight.getPropVal(ICalTok.DTSTART, null); if (stdStart != null && dayStart != null) { try { // stdStart = yyyymmddThhmiss // stdStartMMDD = mmdd String stdStartMMDD = stdStart.substring(4, 8); String dayStartMMDD = dayStart.substring(4, 8); if (stdStartMMDD.equals(dayStartMMDD)) { standard = moreRecentTzComp(standard, daylight); daylight = null; } } catch (StringIndexOutOfBoundsException e) { // DTSTART values must have been malformed. Just do // something reasonable and go on. standard = moreRecentTzComp(standard, daylight); daylight = null; } } } } // If only DAYLIGHT is given, make it the STANDARD. if (standard == null) { standard = daylight; daylight = null; } if (standard == null) throw new IllegalArgumentException("VTIMEZONE has neither STANDARD nor DAYLIGHT: TZID=" + tzname); String stddtStart = null; int stdoffsetTime = 0; String stdrrule = null; if (standard != null) { stddtStart = standard.getPropVal(ICalTok.DTSTART, null); String stdtzOffsetTo = standard.getPropVal(ICalTok.TZOFFSETTO, null); stdoffsetTime = tzOffsetToTime(stdtzOffsetTo); if (daylight != null) { // Rule is interesting only if daylight savings is in use. stdrrule = standard.getPropVal(ICalTok.RRULE, null); } } String daydtStart = null; int dayoffsetTime = stdoffsetTime; String dayrrule = null; if (daylight != null) { daydtStart = daylight.getPropVal(ICalTok.DTSTART, null); String daytzOffsetTo = daylight.getPropVal(ICalTok.TZOFFSETTO, null); dayoffsetTime = tzOffsetToTime(daytzOffsetTo); dayrrule = daylight.getPropVal(ICalTok.RRULE, null); } ICalTimeZone tz = new ICalTimeZone(tzname, stdoffsetTime, stddtStart, stdrrule, dayoffsetTime, daydtStart, dayrrule); return tz; }
|
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/ba4bbfe9548a819cd6487039ffcd4d2d0c415661/ICalTimeZone.java/clean/ZimbraServer/src/java/com/zimbra/cs/mailbox/calendar/ICalTimeZone.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
467,
3005,
16760,
628,
58,
16760,
12,
62,
1841,
1161,
13,
1216,
16489,
288,
3639,
514,
6016,
529,
273,
1161,
18,
588,
4658,
3053,
12,
2871,
287,
20477,
18,
21647,
734,
16,
446,
1769,
3639,
2285,
1841,
4529,
273,
446,
31,
3639,
2285,
1841,
2548,
5099,
273,
446,
31,
3639,
368,
4163,
326,
4486,
8399,
23255,
471,
11579,
23516,
4085,
18,
225,
315,
18714,
8399,
6,
3639,
368,
4696,
326,
1794,
1807,
10696,
7570,
353,
5137,
316,
813,
2353,
716,
434,
777,
1308,
3639,
368,
4085,
18,
225,
22073,
16,
309,
3229,
23255,
4085,
854,
857,
704,
73,
350,
316,
3639,
368,
279,
776,
4684,
20725,
16,
732,
679,
731,
1450,
1338,
326,
4486,
8399,
2379,
18,
225,
1021,
3639,
368,
24743,
353,
716,
777,
1308,
23255,
4085,
854,
364,
8854,
7811,
3639,
368,
471,
2898,
1158,
7144,
15177,
18,
225,
1660,
4565,
13852,
358,
1221,
333,
24743,
3639,
368,
2724,
333,
667,
353,
279,
10177,
434,
4477,
16760,
16,
1492,
3302,
1404,
3639,
368,
1699,
23922,
1779,
18,
3639,
364,
261,
3198,
32,
62,
1841,
34,
1400,
273,
1161,
18,
588,
1841,
3198,
5621,
2398,
1400,
18,
5332,
2134,
5621,
262,
288,
5411,
2285,
1841,
6016,
2945,
273,
1400,
18,
4285,
5621,
5411,
309,
261,
12994,
2945,
422,
446,
13,
1324,
31,
5411,
467,
3005,
20477,
946,
273,
6016,
2945,
18,
588,
20477,
5621,
5411,
309,
261,
2871,
287,
20477,
18,
882,
18264,
18,
14963,
12,
17692,
3719,
288,
7734,
309,
261,
10005,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
3005,
16760,
628,
58,
16760,
12,
62,
1841,
1161,
13,
1216,
16489,
288,
3639,
514,
6016,
529,
273,
1161,
18,
588,
4658,
3053,
12,
2871,
287,
20477,
18,
21647,
734,
16,
446,
1769,
3639,
2285,
1841,
4529,
273,
446,
31,
3639,
2285,
1841,
2548,
5099,
273,
446,
31,
3639,
368,
4163,
326,
4486,
8399,
23255,
471,
11579,
23516,
4085,
18,
225,
315,
18714,
8399,
6,
3639,
368,
4696,
326,
1794,
1807,
10696,
7570,
353,
5137,
316,
813,
2353,
716,
434,
777,
1308,
3639,
368,
4085,
18,
225,
22073,
16,
309,
3229,
23255,
4085,
854,
857,
704,
73,
350,
316,
3639,
368,
279,
776,
4684,
20725,
16,
732,
679,
731,
1450,
1338,
326,
4486,
8399,
2379,
2
] |
legendItems.add( new LegendItemHints( LEGEND_ENTRY,
|
columnList.add( new LegendItemHints( LEGEND_ENTRY,
|
public final Size compute( IDisplayServer xs, Chart cm, SeriesDefinition[] seda, RunTimeContext rtc ) throws ChartException { // THREE CASES: // 1. ALL SERIES IN ONE ARRAYLIST // 2. ONE SERIES PER ARRAYLIST // 3. ALL OTHERS final Legend lg = cm.getLegend( ); if ( !lg.isSetOrientation( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.orientation.horzvert", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } if ( !lg.isSetDirection( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.direction.tblr", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation orientation = lg.getOrientation( ); final Direction direction = lg.getDirection( ); Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); ClientArea ca = lg.getClientArea( ); LineAttributes lia = ca.getOutline( ); double dSeparatorThickness = lia.getThickness( ); double dWidth = 0, dHeight = 0; la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); double dItemHeight = itm.getFullHeight( ); Series se; List al; double dScale = xs.getDpiResolution( ) / 72d; Insets insCA = ca.getInsets( ).scaledInstance( dScale ); final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); final double maxWrappingSize = lg.getWrappingSize( ) * dScale; Series seBase; final List legendItems = new ArrayList( ); final double dHorizontalSpacing = 3 * dScale; final double dVerticalSpacing = 3 * dScale; // Get maximum block width/height available Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); double dAvailableWidth = boFull.getWidth( ) - ins.getLeft( ) - ins.getRight( ) - lgIns.getLeft( ) - lgIns.getRight( ); double dAvailableHeight = boFull.getHeight( ) - ins.getTop( ) - ins.getBottom( ) - lgIns.getTop( ) - lgIns.getBottom( ) - cm.getTitle( ) .getBounds( ) .scaledInstance( dScale ) .getHeight( ); // Calculate if minSlice applicable. boolean bMinSliceDefined = false; String sMinSliceLabel = null; boolean bMinSliceApplied = false; int[] filteredMinSliceEntry = null; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { Map renders = rtc.getSeriesRenderers( ); if ( renders != null && !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); EList sdA = sdBase.getSeriesDefinitions( ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdA.toArray( new SeriesDefinition[sdA.size( )] ); DataSetIterator dsiOrtho = null; BaseRenderer br; boolean started = false; ENTRANCE: for ( int i = 0; i < sdOrtho.length; i++ ) { List sdRuntimeSA = sdOrtho[i].getRunTimeSeries( ); Series[] alRuntimeSeries = (Series[]) sdRuntimeSA.toArray( new Series[sdRuntimeSA.size( )] ); for ( int j = 0; j < alRuntimeSeries.length; j++ ) { try { dsiOrtho = new DataSetIterator( alRuntimeSeries[j].getDataSet( ) ); LegendItemRenderingHints lirh = (LegendItemRenderingHints) renders.get( alRuntimeSeries[j] ); if ( lirh == null ) { filteredMinSliceEntry = null; break ENTRANCE; } br = lirh.getRenderer( ); // ask each render for filtered min slice info int[] fsa = br.getFilteredMinSliceEntry( dsiOrtho ); if ( fsa != null && fsa.length > 0 ) { bMinSliceApplied = true; } if ( !started ) { started = true; filteredMinSliceEntry = fsa; } else { // get duplicate indices for all renderers filteredMinSliceEntry = getDuplicateIndices( fsa, filteredMinSliceEntry ); if ( filteredMinSliceEntry == null || filteredMinSliceEntry.length == 0 ) { filteredMinSliceEntry = null; break ENTRANCE; } } } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } } } // assign a zero-length array for successive convenience if ( filteredMinSliceEntry == null ) { filteredMinSliceEntry = new int[0]; } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( orientation.getValue( ) == Orientation.VERTICAL ) { double dW, dMaxW = 0; double dRealHeight = 0, dExtraWidth = 0, dDeltaHeight; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dWidth += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (VERTICAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dW = bb.getWidth( ); double dFHeight = bb.getHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += dExtraHeight + 2 * dScale; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } // SETUP HORIZONTAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth, dHeight - dSeparatorThickness / 2 ), dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, 0, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + MAX // ITEM WIDTH + RIGHT INSETS dWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dMaxW + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (VERTICAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dW = bb.getWidth( ); double dFHeight = bb.getHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += itm.getFullHeight( ) + 2 * dScale; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } if ( oneVisibleSerie ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; } dMaxW = 0; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = 0; // SETUP VERTICAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dExtraWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth - dSeparatorThickness / 2, 0 ), 0, dRealHeight, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + // MAX ITEM WIDTH + RIGHT INSETS dWidth += dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction.getName( ) }, Messages.getResourceBundle( xs.getULocale( ) ) ); } } else if ( orientation.getValue( ) == Orientation.HORIZONTAL ) { double dH, dMaxH = 0; double dRealWidth = 0, dExtraHeight = 0, dDeltaWidth; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } double dFWidth = bb.getWidth( ); double dFHeight = bb.getHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dHeight += dExtraHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dWidth = Math.max( dWidth, dRealWidth ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (HORIZONTAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dWidth = 0; al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dH = bb.getHeight( ); double dFHeight = dH; double dFWidth = bb.getWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2 * dScale; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } if ( oneVisibleSerie ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; } dMaxH = 0; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = 0; // SETUP HORIZONTAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( 0, dExtraHeight - dSeparatorThickness / 2 ), dRealWidth, 0, null, 0, null ) ); } } dHeight += dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (HORIZONTAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); boolean oneVisibleSerie = false; for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); if ( se.isVisible( ) ) { oneVisibleSerie = true; } else { continue; } Object obj = se.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( lgtext, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dH = bb.getHeight( ); double dFHeight = dH; double dFWidth = bb.getWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2 * dScale; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } // SETUP VERTICAL SEPARATOR SPACING if ( oneVisibleSerie && j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dWidth - dSeparatorThickness / 2, dExtraHeight ), 0, dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing, null, 0, null ) ); } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dMaxH + dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction }, Messages.getResourceBundle( xs.getULocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.orientation", //$NON-NLS-1$ new Object[]{ orientation }, Messages.getResourceBundle( xs.getULocale( ) ) ); } // consider legend title size. Label lgTitle = lg.getTitle( ); Size titleSize = null; if ( lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ) ) { lgTitle = LabelImpl.copyInstance( lgTitle ); // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } int iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( rtc.isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } double shadowness = 3 * dScale; switch ( iTitlePos ) { case Position.ABOVE : case Position.BELOW : dHeight += bb.getHeight( ) + 2 * shadowness; dWidth = Math.max( dWidth, bb.getWidth( ) + 2 * shadowness ); break; case Position.LEFT : case Position.RIGHT : dWidth += bb.getWidth( ) + 2 * shadowness; dHeight = Math.max( dHeight, bb.getHeight( ) + 2 * shadowness ); break; } titleSize = SizeImpl.create( bb.getWidth( ) + 2 * shadowness, bb.getHeight( ) + 2 * shadowness ); } itm.dispose( ); // DISPOSE RESOURCE AFTER USE if ( rtc != null ) { LegendItemHints[] liha = (LegendItemHints[]) legendItems.toArray( new LegendItemHints[legendItems.size( )] ); // update context hints here. LegendLayoutHints lilh = new LegendLayoutHints( SizeImpl.create( dWidth, dHeight ), titleSize, bMinSliceApplied, sMinSliceLabel, liha ); rtc.setLegendLayoutHints( lilh ); } sz = SizeImpl.create( dWidth, dHeight ); return sz; }
|
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/bdbe857d641e2e27600409e7bb20f1950ed1536b/LegendBuilder.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/LegendBuilder.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
18979,
18403,
55,
30,
202,
202,
759,
404,
18,
8061,
7758,
8805,
2120,
15623,
14884,
7085,
202,
202,
759,
576,
18,
15623,
7758,
8805,
10950,
14884,
7085,
202,
202,
759,
890,
18,
8061,
531,
2455,
11367,
202,
202,
6385,
17167,
409,
15266,
273,
5003,
18,
588,
16812,
12,
11272,
202,
202,
430,
261,
401,
23623,
18,
291,
694,
14097,
12,
262,
262,
202,
202,
95,
1082,
202,
12849,
394,
14804,
503,
12,
14804,
4410,
3773,
18,
734,
16,
6862,
202,
7984,
503,
18,
13990,
2689,
16,
6862,
202,
6,
4064,
18,
16292,
18,
19235,
18,
76,
280,
94,
1097,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
5058,
18,
588,
18731,
12,
9280,
18,
588,
57,
3916,
12,
262,
262,
11272,
202,
202,
97,
202,
202,
430,
261,
401,
23623,
18,
291,
694,
8212,
12,
262,
262,
202,
202,
95,
1082,
202,
12849,
394,
14804,
503,
12,
14804,
4410,
3773,
18,
734,
16,
6862,
202,
7984,
503,
18,
13990,
2689,
16,
6862,
202,
6,
4064,
18,
16292,
18,
9855,
18,
16187,
86,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
5058,
18,
588,
18731,
12,
9280,
18,
588,
57,
3916,
12,
262,
262,
11272,
202,
202,
97,
202,
202,
759,
12584,
15154,
2689,
15932,
8350,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
18979,
18403,
55,
30,
202,
202,
759,
404,
18,
8061,
7758,
8805,
2120,
15623,
14884,
7085,
202,
202,
759,
576,
18,
15623,
7758,
8805,
10950,
14884,
7085,
202,
202,
759,
890,
18,
8061,
531,
2455,
11367,
202,
202,
6385,
17167,
409,
15266,
273,
5003,
18,
588,
16812,
12,
11272,
202,
202,
430,
261,
401,
23623,
18,
291,
694,
14097,
12,
262,
262,
202,
202,
95,
1082,
202,
12849,
394,
14804,
503,
12,
14804,
4410,
3773,
18,
734,
16,
6862,
202,
7984,
2
] |
outputFileName = getSimpleClassName(className) + WSDL_FILENAME_SUFFIX;
|
outputFileName = Java2WSDLUtils.getSimpleClassName(className) + WSDL_FILENAME_SUFFIX;
|
public Java2WSDLCodegenEngine(Map optionsMap) throws Exception { //create a new Java2WSDLBuilder and populate it File outputFolder; Java2WSDLCommandLineOption option = loadOption(Java2WSDLConstants.OUTPUT_LOCATION_OPTION, Java2WSDLConstants.OUTPUT_LOCATION_OPTION_LONG, optionsMap); String outputFolderName = option == null ? System.getProperty("user.dir") : option.getOptionValue(); outputFolder = new File(outputFolderName); if (!outputFolder.exists()) { outputFolder.mkdir(); } else if (!outputFolder.isDirectory()) { throw new Exception("The specivied location " + outputFolderName + "is not a folder"); } option = loadOption(Java2WSDLConstants.CLASSNAME_OPTION, Java2WSDLConstants.CLASSNAME_OPTION_LONG, optionsMap); String className = option == null ? null : option.getOptionValue(); if (className == null || className.equals("")) { throw new Exception("class name must be present!"); } option = loadOption(Java2WSDLConstants.OUTPUT_FILENAME_OPTION, Java2WSDLConstants.OUTPUT_FILENAME_OPTION_LONG, optionsMap); String outputFileName = option == null ? null : option.getOptionValue(); //derive a file name from the class name if the filename is not specified if (outputFileName == null) { outputFileName = getSimpleClassName(className) + WSDL_FILENAME_SUFFIX; } //first create a file in the given location File outputFile = new File(outputFolder, outputFileName); FileOutputStream out; try { if (!outputFile.exists()) { outputFile.createNewFile(); } out = new FileOutputStream(outputFile); } catch (IOException e) { throw new Exception(e); } //if the class path is present, create a URL class loader with those //class path entries present. if not just take the TCCL option = loadOption(Java2WSDLConstants.CLASSPATH_OPTION, Java2WSDLConstants.CLASSPATH_OPTION_LONG, optionsMap); ClassLoader classLoader; if (option != null) { ArrayList optionValues = option.getOptionValues(); URL[] urls = new URL[optionValues.size()]; String[] classPathEntries = (String[]) optionValues.toArray(new String[optionValues.size()]); try { for (int i = 0; i < classPathEntries.length; i++) { String classPathEntry = classPathEntries[i]; //this should be a file(or a URL) if (isURL(classPathEntry)) { urls[i] = new URL(classPathEntry); } else { urls[i] = new File(classPathEntry).toURL(); } } } catch (MalformedURLException e) { throw new Exception(e); } classLoader = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader()); } else { classLoader = Thread.currentThread().getContextClassLoader(); } //Now we are done with loading the basic values - time to create the builder java2WsdlBuilder = new Java2WSDLBuilder(out, className, classLoader); //set the other parameters to the builder option = loadOption(Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_OPTION, Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_OPTION_LONG, optionsMap); java2WsdlBuilder.setSchemaTargetNamespace(option == null ? null : option.getOptionValue()); option = loadOption(Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION, Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION_LONG, optionsMap); java2WsdlBuilder.setSchemaTargetNamespacePrefix(option == null ? null : option.getOptionValue()); option = loadOption(Java2WSDLConstants.TARGET_NAMESPACE_OPTION, Java2WSDLConstants.TARGET_NAMESPACE_OPTION_LONG, optionsMap); java2WsdlBuilder.setTargetNamespace(option == null ? null : option.getOptionValue()); option = loadOption(Java2WSDLConstants.TARGET_NAMESPACE_PREFIX_OPTION, Java2WSDLConstants.TARGET_NAMESPACE_PREFIX_OPTION_LONG, optionsMap); java2WsdlBuilder.setTargetNamespacePrefix(option == null ? null : option.getOptionValue()); option = loadOption(Java2WSDLConstants.SERVICE_NAME_OPTION, Java2WSDLConstants.SERVICE_NAME_OPTION_LONG, optionsMap); java2WsdlBuilder.setServiceName(option == null ? getSimpleClassName(className) : option.getOptionValue()); option = loadOption(Java2WSDLConstants.STYLE_OPTION, Java2WSDLConstants.STYLE_OPTION, optionsMap); if (option != null) { java2WsdlBuilder.setStyle(option.getOptionValue()); } option = loadOption(Java2WSDLConstants.LOCATION_OPTION, Java2WSDLConstants.LOCATION_OPTION, optionsMap); if (option != null) { java2WsdlBuilder.setLocationUri(option.getOptionValue()); } option = loadOption(Java2WSDLConstants.USE_OPTION, Java2WSDLConstants.USE_OPTION, optionsMap); if (option != null) { java2WsdlBuilder.setUse(option.getOptionValue()); } }
|
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/7bad74b73737d86baefe9febc019cb5c52d01c03/Java2WSDLCodegenEngine.java/buggy/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLCodegenEngine.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5110,
22,
2651,
8914,
1085,
4507,
4410,
12,
863,
702,
863,
13,
1216,
1185,
288,
3639,
368,
2640,
279,
394,
225,
5110,
22,
2651,
8914,
1263,
471,
6490,
518,
3639,
1387,
876,
3899,
31,
3639,
5110,
22,
2651,
8914,
21391,
1895,
1456,
273,
1262,
1895,
12,
5852,
22,
2651,
8914,
2918,
18,
15527,
67,
15277,
67,
7425,
16,
7734,
5110,
22,
2651,
8914,
2918,
18,
15527,
67,
15277,
67,
7425,
67,
14639,
16,
702,
863,
1769,
3639,
514,
876,
26169,
273,
1456,
422,
446,
692,
2332,
18,
588,
1396,
2932,
1355,
18,
1214,
7923,
294,
1456,
18,
588,
13366,
5621,
3639,
876,
3899,
273,
394,
1387,
12,
2844,
26169,
1769,
3639,
309,
16051,
2844,
3899,
18,
1808,
10756,
288,
5411,
876,
3899,
18,
26686,
5621,
3639,
289,
469,
309,
16051,
2844,
3899,
18,
291,
2853,
10756,
288,
5411,
604,
394,
1185,
2932,
1986,
857,
427,
2092,
2117,
315,
397,
876,
26169,
397,
315,
291,
486,
279,
3009,
8863,
3639,
289,
3639,
1456,
273,
1262,
1895,
12,
5852,
22,
2651,
8914,
2918,
18,
5237,
1985,
67,
7425,
16,
5110,
22,
2651,
8914,
2918,
18,
5237,
1985,
67,
7425,
67,
14639,
16,
702,
863,
1769,
3639,
514,
2658,
273,
1456,
422,
446,
692,
446,
294,
1456,
18,
588,
13366,
5621,
3639,
309,
261,
12434,
422,
446,
747,
2658,
18,
14963,
2932,
6,
3719,
288,
5411,
604,
394,
1185,
2932,
1106,
508,
1297,
506,
3430,
4442,
1769,
3639,
289,
3639,
1456,
273,
1262,
1895,
12,
5852,
22,
2651,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5110,
22,
2651,
8914,
1085,
4507,
4410,
12,
863,
702,
863,
13,
1216,
1185,
288,
3639,
368,
2640,
279,
394,
225,
5110,
22,
2651,
8914,
1263,
471,
6490,
518,
3639,
1387,
876,
3899,
31,
3639,
5110,
22,
2651,
8914,
21391,
1895,
1456,
273,
1262,
1895,
12,
5852,
22,
2651,
8914,
2918,
18,
15527,
67,
15277,
67,
7425,
16,
7734,
5110,
22,
2651,
8914,
2918,
18,
15527,
67,
15277,
67,
7425,
67,
14639,
16,
702,
863,
1769,
3639,
514,
876,
26169,
273,
1456,
422,
446,
692,
2332,
18,
588,
1396,
2932,
1355,
18,
1214,
7923,
294,
1456,
18,
588,
13366,
5621,
3639,
876,
3899,
273,
394,
1387,
12,
2844,
26169,
1769,
3639,
309,
16051,
2844,
3899,
18,
1808,
2
] |
super("DataChannel reader thread: "+name);
|
super("Channel reader thread: "+name);
|
public ReaderThread(String name) { super("DataChannel reader thread: "+name); }
|
48095 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48095/d249d5246d33855ab3bcbce28c0828dd02dfad0d/Channel.java/clean/remoting/src/main/java/hudson/remoting/Channel.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
5393,
3830,
12,
780,
508,
13,
288,
5411,
2240,
2932,
2909,
2949,
2650,
30,
13773,
529,
1769,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
5393,
3830,
12,
780,
508,
13,
288,
5411,
2240,
2932,
2909,
2949,
2650,
30,
13773,
529,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public java.sql.ResultSet searchRecords( int in_code, String in_name) {
|
public java.sql.ResultSet searchRecords(String in_egn, String in_name) {
|
public java.sql.ResultSet searchRecords( int in_code, String in_name) // -OK comprator = 5; { comprator = 5; this.code = in_code; this.name = in_name; try { registerParameters(); setRs(getCstm().executeQuery()); } catch(java.sql.SQLException sqle) { sqle.printStackTrace(); } return getRs(); }
|
12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/5d411ac32556eaff59a6d73d1a54beed1e833c7e/dbPerson.java/clean/src/nom/dbPerson.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2252,
18,
4669,
18,
13198,
1623,
6499,
12,
509,
316,
67,
710,
16,
514,
316,
67,
529,
13,
368,
300,
3141,
225,
532,
683,
639,
273,
1381,
31,
565,
288,
3639,
532,
683,
639,
273,
1381,
31,
7734,
333,
18,
710,
273,
316,
67,
710,
31,
3639,
333,
18,
529,
273,
316,
67,
529,
31,
7734,
775,
288,
5411,
1744,
2402,
5621,
5411,
444,
18880,
12,
588,
39,
334,
81,
7675,
8837,
1138,
10663,
3639,
289,
1044,
12,
6290,
18,
4669,
18,
23116,
4744,
298,
13,
288,
5411,
4744,
298,
18,
1188,
6332,
5621,
3639,
289,
3639,
327,
4170,
87,
5621,
5411,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2252,
18,
4669,
18,
13198,
1623,
6499,
12,
509,
316,
67,
710,
16,
514,
316,
67,
529,
13,
368,
300,
3141,
225,
532,
683,
639,
273,
1381,
31,
565,
288,
3639,
532,
683,
639,
273,
1381,
31,
7734,
333,
18,
710,
273,
316,
67,
710,
31,
3639,
333,
18,
529,
273,
316,
67,
529,
31,
7734,
775,
288,
5411,
1744,
2402,
5621,
5411,
444,
18880,
12,
588,
39,
334,
81,
7675,
8837,
1138,
10663,
3639,
289,
1044,
12,
6290,
18,
4669,
18,
23116,
4744,
298,
13,
288,
5411,
4744,
298,
18,
1188,
6332,
5621,
3639,
289,
3639,
327,
4170,
87,
5621,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public Tree Block(Tree[] stats) { return Block(stats[0].pos, stats);
|
public Tree Block(int pos, Tree[] stats) { Block tree = make.Block(pos, stats); global.nextPhase(); tree.setType(stats.length == 0 ? definitions.UNIT_TYPE() : stats[stats.length - 1].type); global.prevPhase(); return tree;
|
public Tree Block(Tree[] stats) { return Block(stats[0].pos, stats); }
|
5590 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5590/16afd2fc1ad46de3adc22b75e972e2019226c745/TreeGen.java/buggy/sources/scalac/ast/TreeGen.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4902,
3914,
12,
2471,
8526,
3177,
13,
288,
202,
2463,
3914,
12,
5296,
63,
20,
8009,
917,
16,
3177,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4902,
3914,
12,
2471,
8526,
3177,
13,
288,
202,
2463,
3914,
12,
5296,
63,
20,
8009,
917,
16,
3177,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
insertionPosition = getItemCount((Control)widget);
|
insertionPosition = getItemCount((Control) widget);
|
public void insert(Object parentElementOrTreePath, Object element, int position) { Assert.isNotNull(parentElementOrTreePath); Assert.isNotNull(element); if (getComparator() != null || hasFilters()) { add(parentElementOrTreePath, new Object[] { element }); return; } Widget[] items = internalFindItems(parentElementOrTreePath); for (int i = 0; i < items.length; i++) { Widget widget = items[i]; if (widget instanceof Item) { Item item = (Item) widget; Item[] childItems = getChildren(item); if (getExpanded(item) || (childItems.length > 0 && childItems[0].getData() != null)) { // item has real children, go ahead and add int insertionPosition = position; if (insertionPosition == -1) { insertionPosition = getItemCount(item); } createTreeItem(item, element, position); } } else { int insertionPosition = position; if (insertionPosition == -1) { insertionPosition = getItemCount((Control)widget); } createTreeItem(widget, element, position); } } }
|
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/7dea322b00f8363f209617dc36ba0b47497db00d/AbstractTreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2243,
12,
921,
30363,
1162,
2471,
743,
16,
1033,
930,
16,
1082,
202,
474,
1754,
13,
288,
202,
202,
8213,
18,
291,
5962,
12,
2938,
1046,
1162,
2471,
743,
1769,
202,
202,
8213,
18,
291,
5962,
12,
2956,
1769,
202,
202,
430,
261,
588,
5559,
1435,
480,
446,
747,
711,
5422,
10756,
288,
1082,
202,
1289,
12,
2938,
1046,
1162,
2471,
743,
16,
394,
1033,
8526,
288,
930,
15549,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
4609,
8526,
1516,
273,
2713,
3125,
3126,
12,
2938,
1046,
1162,
2471,
743,
1769,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
1516,
18,
2469,
31,
277,
27245,
288,
1082,
202,
4609,
3604,
273,
1516,
63,
77,
15533,
1082,
202,
430,
261,
6587,
1276,
4342,
13,
288,
9506,
202,
1180,
761,
273,
261,
1180,
13,
3604,
31,
9506,
202,
1180,
8526,
1151,
3126,
273,
10268,
12,
1726,
1769,
9506,
202,
430,
261,
588,
17957,
12,
1726,
13,
25083,
202,
20081,
261,
3624,
3126,
18,
2469,
405,
374,
597,
1151,
3126,
63,
20,
8009,
588,
751,
1435,
480,
446,
3719,
288,
6862,
202,
759,
761,
711,
2863,
2325,
16,
1960,
17510,
471,
527,
6862,
202,
474,
12626,
2555,
273,
1754,
31,
6862,
202,
430,
261,
6387,
285,
2555,
422,
300,
21,
13,
288,
25083,
202,
6387,
285,
2555,
273,
8143,
1380,
12,
1726,
1769,
6862,
202,
97,
6862,
202,
2640,
2471,
1180,
12,
1726,
16,
930,
16,
1754,
1769,
9506,
202,
97,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2243,
12,
921,
30363,
1162,
2471,
743,
16,
1033,
930,
16,
1082,
202,
474,
1754,
13,
288,
202,
202,
8213,
18,
291,
5962,
12,
2938,
1046,
1162,
2471,
743,
1769,
202,
202,
8213,
18,
291,
5962,
12,
2956,
1769,
202,
202,
430,
261,
588,
5559,
1435,
480,
446,
747,
711,
5422,
10756,
288,
1082,
202,
1289,
12,
2938,
1046,
1162,
2471,
743,
16,
394,
1033,
8526,
288,
930,
15549,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
4609,
8526,
1516,
273,
2713,
3125,
3126,
12,
2938,
1046,
1162,
2471,
743,
1769,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
1516,
18,
2469,
31,
277,
27245,
288,
1082,
202,
4609,
3604,
273,
2
] |
poolsize = safeProps.getPropertyAsInt("PoolSize", 100);
|
poolsize = safeProps.getPropertyAsInt("PoolSize", 100);
|
public void init(Object id, HashMap registry, Properties properties) throws org.openejb.OpenEJBException { containerID = id; deploymentRegistry = registry; if ( properties == null ) properties = new Properties(); SafeToolkit toolkit = SafeToolkit.getToolkit("CastorCMP11_EntityContainer"); SafeProperties safeProps = toolkit.getSafeProperties(properties); poolsize = safeProps.getPropertyAsInt("PoolSize", 100); Global_TX_Database = safeProps.getProperty("Global_TX_Database"); Local_TX_Database = safeProps.getProperty("Local_TX_Database"); String globalTxLogName = safeProps.getProperty("Global_TX_Log", "castor_global_tx.log"); String localTxLogName = safeProps.getProperty("Local_TX_Log", "castor_local_tx.log"); try { globalTransactionLogWriter = new java.io.PrintWriter( new java.io.FileWriter( globalTxLogName ) ); localTransactionLogWriter = new java.io.PrintWriter( new java.io.FileWriter( localTxLogName ) ); } catch ( java.io.IOException e ) { // TODO:1: Log this warning. // log( "Warning: Cannot open the log files "+localTxLogName+" and "+globalTxLogName+", using system out instead." ); globalTransactionLogWriter = new java.io.PrintWriter( new java.io.OutputStreamWriter( System.out ) ); localTransactionLogWriter = new java.io.PrintWriter( new java.io.OutputStreamWriter( System.out ) ); } /* * Castor JDO obtains a reference to the TransactionManager throught the InitialContext. * The new InitialContext will use the deployment's JNDI Context, which is normal inside * the container system, so we need to bind the TransactionManager to the deployment's name space * The biggest problem with this is that the bean itself may access the TransactionManager if it * knows the JNDI name, so we bind the TransactionManager into dynamically created transient name * space based every time the container starts. It nearly impossible for the bean to anticipate * and use the binding directly. It may be possible, however, to locate it using a Context listing method. */ String transactionManagerJndiName = "java:openejb/"+(new java.rmi.dgc.VMID()).toString().replace(':', '_'); /* * Because the Tyrex root (used by Castor) is different from the IntraVM root, * we have to bind the TxMgr under env in the IntraVM/comp * IntraVM/comp is bound under TyrexRoot/comp so beans can use java:comp indifferently. */ String transactionManagerJndiNameTyrex = "env/"+(new java.rmi.dgc.VMID()).toString().replace(':', '_'); /* * This container uses two different JDO objects. One whose transactions are managed by a tx manager * and which is not. The following code configures both. */ jdo_ForGlobalTransaction = new JDO(); jdo_ForGlobalTransaction.setLogWriter( globalTransactionLogWriter ); // Assign the TransactionManager JNDI name to the dynamically generated JNDI name jdo_ForGlobalTransaction.setTransactionManager("java:comp/"+transactionManagerJndiNameTyrex); jdo_ForGlobalTransaction.setDatabasePooling( true ); jdo_ForGlobalTransaction.setConfiguration(Global_TX_Database); jdo_ForGlobalTransaction.setDatabaseName("Global_TX_Database"); jdo_ForGlobalTransaction.setCallbackInterceptor(this); jdo_ForGlobalTransaction.setInstanceFactory(this); // Make sure the DB is registered as a as synchronization object before the transaction begins. jdo_ForLocalTransaction = new JDO(); jdo_ForLocalTransaction.setLogWriter( localTransactionLogWriter ); jdo_ForLocalTransaction.setConfiguration(Local_TX_Database); jdo_ForLocalTransaction.setDatabaseName("Local_TX_Database"); jdo_ForLocalTransaction.setCallbackInterceptor(this); jdo_ForLocalTransaction.setInstanceFactory(this); /* * This block of code is necessary to avoid a chicken and egg problem. The DeploymentInfo * objects must have a reference to their container during this assembly process, but the * container is created after the DeploymentInfo necessitating this loop to assign all * deployment info object's their containers. * * In addition the loop is leveraged for other oprations like creating the method ready pool * and the keyGenerator pool. */ org.openejb.DeploymentInfo [] deploys = this.deployments(); /* * the JndiTxReference will dynamically obtian a reference to the TransactionManger the first * time it used. The same Reference is shared by all deployments, which is not a problem. */ JndiTxReference txReference = new JndiTxReference(); for ( int x = 0; x < deploys.length; x++ ) { org.openejb.core.DeploymentInfo di = (org.openejb.core.DeploymentInfo)deploys[x]; di.setContainer(this); // also added this line to create the Method Ready Pool for each deployment methodReadyPoolMap.put(di.getDeploymentID(),new LinkedListStack(poolsize/2)); KeyGenerator kg = null; try { kg = KeyGeneratorFactory.createKeyGenerator(di); keyGeneratorMap.put(di.getDeploymentID(), kg); } catch ( Exception e ) { e.printStackTrace(); throw new org.openejb.SystemException("Unable to create KeyGenerator for deployment id = "+di.getDeploymentID(), e); } // bind the TransactionManager to the dynamically generated JNDI name try { if ( di instanceof org.openejb.tyrex.TyrexDeploymentInfo ) { ((javax.naming.Context)di.getJndiEnc().lookup("java:comp")).bind("comp/"+transactionManagerJndiNameTyrex,txReference); } else { di.getJndiEnc().bind(transactionManagerJndiName,txReference); jdo_ForGlobalTransaction.setTransactionManager(transactionManagerJndiName); } } catch ( Exception e ) { e.printStackTrace(); throw new org.openejb.SystemException("Unable to bind TransactionManager to deployment id = "+di.getDeploymentID()+" using JNDI name = \""+transactionManagerJndiName+"\"", e); } try { /** * The following code adds a findByPrimaryKey query-statement to the list of queries * held by the deployment descriptor. The container is required to generate this query * automatically, which is what this code does. */ String findByPrimarKeyQuery = "SELECT e FROM "+di.getBeanClass().getName()+" e WHERE "; if ( kg.isKeyComplex() ) { Field [] pkFields = di.getPrimaryKeyClass().getFields(); for ( int i = 1; i <= pkFields.length; i++ ) { findByPrimarKeyQuery += "e."+pkFields[i-1].getName()+" = $"+i; if ( (i+1)<=pkFields.length ) findByPrimarKeyQuery += " AND "; } } else { findByPrimarKeyQuery += "e."+di.getPrimaryKeyField().getName()+" = $1"; } Method findByPrimaryKeyMethod = di.getHomeInterface().getMethod("findByPrimaryKey", new Class []{di.getPrimaryKeyClass()}); di.addQuery(findByPrimaryKeyMethod, findByPrimarKeyQuery); } catch ( Exception e ) { throw new org.openejb.SystemException("Could not generate a query statement for the findByPrimaryKey method of the deployment = "+di.getDeploymentID(),e); } } }
|
47052 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47052/3672264daeda35528fc1545391d5f3b38764b0ff/CastorCMP11_EntityContainer.java/clean/openejb0/src/facilities/org/openejb/alt/containers/castor_cmp11/CastorCMP11_EntityContainer.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
921,
612,
16,
4317,
4023,
16,
6183,
1790,
13,
565,
1216,
2358,
18,
3190,
73,
10649,
18,
3678,
22719,
503,
565,
288,
3639,
24257,
273,
612,
31,
3639,
6314,
4243,
273,
4023,
31,
3639,
309,
261,
1790,
422,
446,
262,
1790,
273,
394,
6183,
5621,
3639,
14060,
6364,
8691,
5226,
8691,
273,
14060,
6364,
8691,
18,
588,
6364,
8691,
2932,
9735,
280,
39,
4566,
2499,
67,
1943,
2170,
8863,
3639,
14060,
2297,
4183,
5047,
273,
5226,
8691,
18,
588,
9890,
2297,
12,
4738,
1769,
540,
2845,
1467,
6647,
273,
4183,
5047,
18,
588,
1396,
31720,
2932,
18834,
3113,
2130,
1769,
4202,
8510,
67,
16556,
67,
4254,
273,
4183,
5047,
18,
588,
1396,
2932,
5160,
67,
16556,
67,
4254,
8863,
3639,
3566,
67,
16556,
67,
4254,
273,
4183,
5047,
18,
588,
1396,
2932,
2042,
67,
16556,
67,
4254,
8863,
3639,
514,
2552,
4188,
1343,
461,
273,
4183,
5047,
18,
588,
1396,
2932,
5160,
67,
16556,
67,
1343,
3113,
315,
4155,
280,
67,
6347,
67,
978,
18,
1330,
8863,
3639,
514,
1191,
4188,
1343,
461,
225,
273,
4183,
5047,
18,
588,
1396,
2932,
2042,
67,
16556,
67,
1343,
3113,
315,
4155,
280,
67,
3729,
67,
978,
18,
1330,
8863,
3639,
775,
288,
5411,
2552,
3342,
1343,
2289,
273,
394,
2252,
18,
1594,
18,
5108,
2289,
12,
394,
2252,
18,
1594,
18,
812,
2289,
12,
2552,
4188,
1343,
461,
262,
11272,
5397,
1191,
3342,
1343,
2289,
225,
273,
394,
2252,
18,
1594,
18,
5108,
2289,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
12,
921,
612,
16,
4317,
4023,
16,
6183,
1790,
13,
565,
1216,
2358,
18,
3190,
73,
10649,
18,
3678,
22719,
503,
565,
288,
3639,
24257,
273,
612,
31,
3639,
6314,
4243,
273,
4023,
31,
3639,
309,
261,
1790,
422,
446,
262,
1790,
273,
394,
6183,
5621,
3639,
14060,
6364,
8691,
5226,
8691,
273,
14060,
6364,
8691,
18,
588,
6364,
8691,
2932,
9735,
280,
39,
4566,
2499,
67,
1943,
2170,
8863,
3639,
14060,
2297,
4183,
5047,
273,
5226,
8691,
18,
588,
9890,
2297,
12,
4738,
1769,
540,
2845,
1467,
6647,
273,
4183,
5047,
18,
588,
1396,
31720,
2932,
18834,
3113,
2130,
1769,
4202,
8510,
67,
16556,
67,
4254,
273,
4183,
5047,
18,
588,
1396,
2932,
5160,
2
] |
if (arg1 instanceof KNode) arg1 = NumberValue.numberValue(arg1); if (arg2 instanceof KNode) arg2 = NumberValue.numberValue(arg2);
|
arg2 = NumberValue.numberCast(arg2);
|
public Object combine (Object arg1, Object arg2) { if (arg1 == Values.empty) return arg2; // FIXME - verify that arg2 is comparable. int flags = returnMax ? Compare.TRUE_IF_GRT : Compare.TRUE_IF_LSS; if (arg1 instanceof KNode) arg1 = NumberValue.numberValue(arg1); if (arg2 instanceof KNode) arg2 = NumberValue.numberValue(arg2); return Compare.apply(flags, arg1, arg2, null) ? arg1 : arg2; }
|
36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/402ef9a49086223b27654d9cdf8099b117c70108/MinMax.java/clean/gnu/xquery/util/MinMax.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
8661,
261,
921,
1501,
21,
16,
1033,
1501,
22,
13,
225,
288,
565,
309,
261,
3175,
21,
422,
6876,
18,
5531,
13,
1377,
327,
1501,
22,
31,
368,
9852,
300,
3929,
716,
1501,
22,
353,
25949,
18,
565,
509,
2943,
273,
327,
2747,
692,
11051,
18,
18724,
67,
5501,
67,
6997,
56,
294,
225,
11051,
18,
18724,
67,
5501,
67,
48,
1260,
31,
565,
309,
261,
3175,
21,
1276,
1475,
907,
13,
1377,
1501,
21,
273,
3588,
620,
18,
2696,
620,
12,
3175,
21,
1769,
565,
309,
261,
3175,
22,
1276,
1475,
907,
13,
1377,
1501,
22,
273,
3588,
620,
18,
2696,
620,
12,
3175,
22,
1769,
565,
327,
11051,
18,
9010,
12,
7133,
16,
1501,
21,
16,
1501,
22,
16,
446,
13,
692,
1501,
21,
294,
1501,
22,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
8661,
261,
921,
1501,
21,
16,
1033,
1501,
22,
13,
225,
288,
565,
309,
261,
3175,
21,
422,
6876,
18,
5531,
13,
1377,
327,
1501,
22,
31,
368,
9852,
300,
3929,
716,
1501,
22,
353,
25949,
18,
565,
509,
2943,
273,
327,
2747,
692,
11051,
18,
18724,
67,
5501,
67,
6997,
56,
294,
225,
11051,
18,
18724,
67,
5501,
67,
48,
1260,
31,
565,
309,
261,
3175,
21,
1276,
1475,
907,
13,
1377,
1501,
21,
273,
3588,
620,
18,
2696,
620,
12,
3175,
21,
1769,
565,
309,
261,
3175,
22,
1276,
1475,
907,
13,
1377,
1501,
22,
273,
3588,
620,
18,
2696,
620,
12,
3175,
22,
1769,
565,
327,
11051,
18,
9010,
12,
7133,
16,
1501,
2
] |
createButtonLayouts(editorComposite);
|
createActionsLayouts(editorComposite);
|
public void createPartControl(Composite parent) { if (getRepositoryTaskData() == null) { Composite composite = new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); Label noBugLabel = new Label(composite, SWT.NULL); noBugLabel.setText("Could not download task data, possibly due to timeout or connectivity problem.\n" + "Please check connection and try again."); return; } toolkit = new FormToolkit(parent.getDisplay()); form = toolkit.createScrolledForm(parent); editorComposite = form.getBody(); editorComposite.setLayout(new GridLayout()); editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); createContextMenu(); createReportHeaderLayout(editorComposite); Composite attribComp = createAttributeLayout(editorComposite); createCustomAttributeLayout(attribComp); createDescriptionLayout(editorComposite); createAttachmentLayout(editorComposite); createCommentLayout(editorComposite, form); createButtonLayouts(editorComposite); // editorComposite.setMenu(contextMenuManager.createContextMenu(editorComposite)); form.reflow(true); getSite().getPage().addSelectionListener(selectionListener); getSite().setSelectionProvider(selectionProvider); }
|
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/e235f4d0973bf11e55b6148a30f92b0d8c13681f/AbstractRepositoryTaskEditor.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
752,
1988,
3367,
12,
9400,
982,
13,
288,
202,
202,
430,
261,
588,
3305,
2174,
751,
1435,
422,
446,
13,
288,
1082,
202,
9400,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
8560,
1769,
1082,
202,
27676,
18,
542,
3744,
12,
2704,
7145,
3744,
10663,
1082,
202,
2224,
1158,
19865,
2224,
273,
394,
5287,
12,
27676,
16,
348,
8588,
18,
8560,
1769,
1082,
202,
2135,
19865,
2224,
18,
542,
1528,
2932,
4445,
486,
4224,
1562,
501,
16,
10016,
6541,
358,
2021,
578,
20301,
6199,
8403,
82,
6,
6862,
202,
15,
315,
8496,
866,
1459,
471,
775,
3382,
1199,
1769,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
6738,
8691,
273,
394,
2748,
6364,
8691,
12,
2938,
18,
588,
4236,
10663,
202,
202,
687,
273,
5226,
8691,
18,
2640,
1541,
25054,
1204,
12,
2938,
1769,
202,
202,
9177,
9400,
273,
646,
18,
588,
2250,
5621,
202,
202,
9177,
9400,
18,
542,
3744,
12,
2704,
7145,
3744,
10663,
202,
202,
9177,
9400,
18,
542,
3744,
751,
12,
2704,
7145,
751,
12,
6313,
751,
18,
29818,
67,
38,
18307,
10019,
202,
202,
2640,
27315,
5621,
202,
202,
2640,
4820,
1864,
3744,
12,
9177,
9400,
1769,
202,
202,
9400,
5885,
2945,
273,
752,
1499,
3744,
12,
9177,
9400,
1769,
202,
202,
2640,
3802,
1499,
3744,
12,
14588,
2945,
1769,
202,
202,
2640,
3291,
3744,
12,
9177,
9400,
1769,
202,
202,
2640,
6803,
3744,
12,
9177,
9400,
1769,
202,
202,
2640,
4469,
3744,
12,
9177,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
1988,
3367,
12,
9400,
982,
13,
288,
202,
202,
430,
261,
588,
3305,
2174,
751,
1435,
422,
446,
13,
288,
1082,
202,
9400,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
8560,
1769,
1082,
202,
27676,
18,
542,
3744,
12,
2704,
7145,
3744,
10663,
1082,
202,
2224,
1158,
19865,
2224,
273,
394,
5287,
12,
27676,
16,
348,
8588,
18,
8560,
1769,
1082,
202,
2135,
19865,
2224,
18,
542,
1528,
2932,
4445,
486,
4224,
1562,
501,
16,
10016,
6541,
358,
2021,
578,
20301,
6199,
8403,
82,
6,
6862,
202,
15,
315,
8496,
866,
1459,
471,
775,
3382,
1199,
1769,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
6738,
8691,
273,
394,
2748,
2
] |
manager.getTaskList().addQuery(new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label", "1", manager.getTaskList()));
|
manager.getTaskList().addQuery( new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label", "1", manager.getTaskList()));
|
public void testCreateQueryWithSameName() { AbstractRepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label", "1", manager.getTaskList()); manager.getTaskList().addQuery(query); assertEquals(1, manager.getTaskList().getQueries().size()); AbstractRepositoryQuery readQuery = manager.getTaskList().getQueries().iterator().next(); assertEquals(query, readQuery); manager.getTaskList().addQuery(new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label", "1", manager.getTaskList())); assertEquals(1, manager.getTaskList().getQueries().size()); }
|
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/e65bd50dcb74fc7c8f87622f06bd918df99be9b2/TaskListManagerTest.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskListManagerTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1684,
1138,
1190,
8650,
461,
1435,
288,
202,
202,
7469,
3305,
1138,
843,
273,
394,
16907,
15990,
3305,
1138,
2932,
9071,
1489,
3113,
315,
2271,
1489,
3113,
315,
1925,
3113,
315,
21,
3113,
3301,
18,
588,
2174,
682,
10663,
202,
202,
4181,
18,
588,
2174,
682,
7675,
1289,
1138,
12,
2271,
1769,
202,
202,
11231,
8867,
12,
21,
16,
3301,
18,
588,
2174,
682,
7675,
588,
9592,
7675,
1467,
10663,
202,
202,
7469,
3305,
1138,
855,
1138,
273,
3301,
18,
588,
2174,
682,
7675,
588,
9592,
7675,
9838,
7675,
4285,
5621,
202,
202,
11231,
8867,
12,
2271,
16,
855,
1138,
1769,
9506,
202,
4181,
18,
588,
2174,
682,
7675,
1289,
1138,
12,
2704,
16907,
15990,
3305,
1138,
2932,
9071,
1489,
3113,
315,
2271,
1489,
3113,
315,
1925,
3113,
315,
21,
3113,
3301,
18,
588,
2174,
682,
1435,
10019,
202,
202,
11231,
8867,
12,
21,
16,
3301,
18,
588,
2174,
682,
7675,
588,
9592,
7675,
1467,
10663,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1684,
1138,
1190,
8650,
461,
1435,
288,
202,
202,
7469,
3305,
1138,
843,
273,
394,
16907,
15990,
3305,
1138,
2932,
9071,
1489,
3113,
315,
2271,
1489,
3113,
315,
1925,
3113,
315,
21,
3113,
3301,
18,
588,
2174,
682,
10663,
202,
202,
4181,
18,
588,
2174,
682,
7675,
1289,
1138,
12,
2271,
1769,
202,
202,
11231,
8867,
12,
21,
16,
3301,
18,
588,
2174,
682,
7675,
588,
9592,
7675,
1467,
10663,
202,
202,
7469,
3305,
1138,
855,
1138,
273,
3301,
18,
588,
2174,
682,
7675,
588,
9592,
7675,
9838,
7675,
4285,
5621,
202,
202,
11231,
8867,
12,
2271,
16,
855,
1138,
1769,
9506,
202,
4181,
18,
588,
2174,
682,
7675,
1289,
1138,
12,
2704,
16907,
2
] |
String[] columnPathFrags = columnPath.split("/");
|
String[] columnPathFrags = columnPath.replaceAll("\\Q[@\\E","/@").split("/");
|
public static List populateColumnPath( String rootPath, String columnPath ) { assert rootPath != null; assert columnPath != null; List result = new ArrayList(); if( columnPath.startsWith( rootPath )) { columnPath = columnPath.replaceFirst("\\Q"+rootPath+"/\\E", ""); result.add( columnPath ); }else { String[] rootPathFrags = rootPath.split("/"); String[] columnPathFrags = columnPath.split("/"); int indexOfFirstDifferentElement = findFirstDifferentItem( rootPathFrags, columnPathFrags ); String temp = ""; for( int i = 0; i < rootPathFrags.length - 1 - indexOfFirstDifferentElement; i ++) { temp += "../"; } temp = addXPathFragsToAString( columnPathFrags, indexOfFirstDifferentElement+1, temp); result.add( temp ); } return result; }
|
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/a5b7258516eabb3103c780abd79474e551541aaf/XPathPopulationUtil.java/buggy/data/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/ui/XPathPopulationUtil.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
987,
6490,
1494,
743,
12,
514,
13959,
16,
514,
1057,
743,
262,
202,
95,
1082,
202,
11231,
13959,
480,
446,
31,
202,
202,
11231,
1057,
743,
480,
446,
31,
202,
202,
682,
563,
273,
394,
2407,
5621,
202,
202,
430,
12,
1057,
743,
18,
17514,
1190,
12,
13959,
8623,
202,
202,
95,
1082,
202,
2827,
743,
273,
1057,
743,
18,
2079,
3759,
2932,
1695,
53,
6,
15,
3085,
743,
9078,
19,
1695,
41,
3113,
1408,
1769,
1082,
202,
2088,
18,
1289,
12,
1057,
743,
11272,
202,
202,
97,
12107,
202,
202,
95,
1082,
202,
780,
8526,
13959,
7167,
1341,
273,
13959,
18,
4939,
2932,
4898,
1769,
1082,
202,
780,
8526,
1057,
743,
7167,
1341,
273,
1057,
743,
18,
4939,
2932,
4898,
1769,
25083,
202,
474,
3133,
3759,
26270,
1046,
273,
19590,
26270,
1180,
12,
13959,
7167,
1341,
16,
1057,
743,
7167,
1341,
11272,
6862,
6862,
1082,
202,
780,
1906,
273,
1408,
31,
1082,
202,
1884,
12,
509,
277,
273,
374,
31,
277,
411,
13959,
7167,
1341,
18,
2469,
300,
404,
300,
3133,
3759,
26270,
1046,
31,
277,
965,
13,
1082,
202,
95,
9506,
202,
5814,
1011,
315,
838,
4898,
31,
1082,
202,
97,
25083,
202,
5814,
273,
527,
14124,
7167,
1341,
774,
37,
780,
12,
1057,
743,
7167,
1341,
16,
3133,
3759,
26270,
1046,
15,
21,
16,
1906,
1769,
1082,
202,
2088,
18,
1289,
12,
1906,
11272,
202,
202,
97,
9506,
202,
2463,
563,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
987,
6490,
1494,
743,
12,
514,
13959,
16,
514,
1057,
743,
262,
202,
95,
1082,
202,
11231,
13959,
480,
446,
31,
202,
202,
11231,
1057,
743,
480,
446,
31,
202,
202,
682,
563,
273,
394,
2407,
5621,
202,
202,
430,
12,
1057,
743,
18,
17514,
1190,
12,
13959,
8623,
202,
202,
95,
1082,
202,
2827,
743,
273,
1057,
743,
18,
2079,
3759,
2932,
1695,
53,
6,
15,
3085,
743,
9078,
19,
1695,
41,
3113,
1408,
1769,
1082,
202,
2088,
18,
1289,
12,
1057,
743,
11272,
202,
202,
97,
12107,
202,
202,
95,
1082,
202,
780,
8526,
13959,
7167,
1341,
273,
13959,
18,
4939,
2932,
4898,
1769,
1082,
202,
780,
8526,
1057,
743,
7167,
1341,
273,
2
] |
return rs.getString(1);
|
return rs.getString( 1 );
|
String sproc_GetPhonetypeName( int phonetype_id, int lang_id ) { String sql = "select typename from phonetypes " + "where phonetype_id = ? and lang_id = ? "; Object[] paramValues = new Object[]{ new Integer(phonetype_id), new Integer(lang_id) }; ArrayList queryResult = sqlProcessor.executeQuery( sql, paramValues, new SQLProcessor.ResultProcessor() { Object mapOneRowFromResultsetToObject( ResultSet rs ) throws SQLException { return rs.getString(1); } } ); return (String)queryResult.get(0); }
|
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/21dc5f1786b0b1be4057d7b7e4ed7a929c47e2d2/DatabaseService.java/clean/server/src/imcode/server/db/DatabaseService.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
514,
272,
9381,
67,
967,
3731,
265,
5872,
461,
12,
509,
22105,
5872,
67,
350,
16,
509,
3303,
67,
350,
262,
288,
3639,
514,
1847,
273,
315,
4025,
26735,
628,
22105,
15180,
315,
397,
5411,
315,
6051,
22105,
5872,
67,
350,
273,
692,
471,
3303,
67,
350,
273,
692,
13636,
3639,
1033,
8526,
579,
1972,
273,
394,
1033,
63,
7073,
394,
2144,
12,
844,
265,
5872,
67,
350,
3631,
394,
2144,
12,
4936,
67,
350,
13,
289,
31,
3639,
2407,
26992,
273,
1847,
5164,
18,
8837,
1138,
12,
1847,
16,
579,
1972,
16,
394,
3063,
5164,
18,
1253,
5164,
1435,
288,
5411,
1033,
852,
3335,
1999,
1265,
1253,
542,
19121,
12,
10842,
3597,
262,
1216,
6483,
288,
7734,
327,
3597,
18,
588,
780,
12,
404,
11272,
5411,
289,
3639,
289,
11272,
3639,
327,
261,
780,
13,
2271,
1253,
18,
588,
12,
20,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
514,
272,
9381,
67,
967,
3731,
265,
5872,
461,
12,
509,
22105,
5872,
67,
350,
16,
509,
3303,
67,
350,
262,
288,
3639,
514,
1847,
273,
315,
4025,
26735,
628,
22105,
15180,
315,
397,
5411,
315,
6051,
22105,
5872,
67,
350,
273,
692,
471,
3303,
67,
350,
273,
692,
13636,
3639,
1033,
8526,
579,
1972,
273,
394,
1033,
63,
7073,
394,
2144,
12,
844,
265,
5872,
67,
350,
3631,
394,
2144,
12,
4936,
67,
350,
13,
289,
31,
3639,
2407,
26992,
273,
1847,
5164,
18,
8837,
1138,
12,
1847,
16,
579,
1972,
16,
394,
3063,
5164,
18,
1253,
5164,
1435,
288,
5411,
1033,
852,
3335,
1999,
1265,
1253,
542,
19121,
12,
10842,
3597,
262,
1216,
6483,
288,
7734,
2
] |
if (delta != null && (delta.getFlags() & (IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_CHILDREN)) != 0) update(createContext(false));
|
if (delta != null && (delta.getFlags() & (IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_CHILDREN)) != 0) { fUpdatingCount++; try { update(createContext(false)); } finally { fUpdatingCount--; } }
|
public void elementChanged(ElementChangedEvent e) { if (hasErrorOnCaretLine(e.getDelta().getCompilationUnitAST())) return; IJavaElementDelta delta= findElement(fInput, e.getDelta()); if (delta != null && (delta.getFlags() & (IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_CHILDREN)) != 0) update(createContext(false)); }
|
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/115d30f1570af95d1e353b86da4e8b0e5795d21f/DefaultJavaFoldingStructureProvider.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
930,
5033,
12,
1046,
27553,
425,
13,
288,
1082,
202,
430,
261,
5332,
668,
1398,
39,
20731,
1670,
12,
73,
18,
588,
9242,
7675,
588,
19184,
2802,
9053,
1435,
3719,
9506,
202,
2463,
31,
25083,
202,
45,
5852,
1046,
9242,
3622,
33,
1104,
1046,
12,
74,
1210,
16,
425,
18,
588,
9242,
10663,
1082,
202,
430,
261,
9878,
480,
446,
597,
261,
9878,
18,
588,
5094,
1435,
473,
261,
45,
5852,
1046,
9242,
18,
42,
67,
9689,
571,
467,
5852,
1046,
9242,
18,
42,
67,
27043,
24296,
3719,
480,
374,
13,
202,
5411,
1089,
12,
2640,
1042,
12,
5743,
10019,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3196,
202,
482,
918,
930,
5033,
12,
1046,
27553,
425,
13,
288,
1082,
202,
430,
261,
5332,
668,
1398,
39,
20731,
1670,
12,
73,
18,
588,
9242,
7675,
588,
19184,
2802,
9053,
1435,
3719,
9506,
202,
2463,
31,
25083,
202,
45,
5852,
1046,
9242,
3622,
33,
1104,
1046,
12,
74,
1210,
16,
425,
18,
588,
9242,
10663,
1082,
202,
430,
261,
9878,
480,
446,
597,
261,
9878,
18,
588,
5094,
1435,
473,
261,
45,
5852,
1046,
9242,
18,
42,
67,
9689,
571,
467,
5852,
1046,
9242,
18,
42,
67,
27043,
24296,
3719,
480,
374,
13,
202,
5411,
1089,
12,
2640,
1042,
12,
5743,
10019,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
Font font = projectGroup.getFont();
|
private Composite createUserSpecifiedProjectLocationGroup(Composite projectGroup, boolean enabled) { // location label locationLabel = new Label(projectGroup, SWT.NONE); locationLabel.setText(LOCATION_LABEL); locationLabel.setEnabled(enabled); // project location entry field locationPathField = new Text(projectGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; locationPathField.setLayoutData(data); locationPathField.setEnabled(enabled); // browse button this.browseButton = new Button(projectGroup, SWT.PUSH); this.browseButton.setText(BROWSE_LABEL); this.browseButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { handleLocationBrowseButtonPressed(); } }); this.browseButton.setEnabled(enabled); // Set the initial value first before listener // to avoid handling an event during the creation. if (originalPath == null) setLocationForSelection(); else locationPathField.setText(originalPath.toOSString()); createLocationListener(); return projectGroup;}
|
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/109bbe95e5c9aa69a0bb91e5a7c4f88521727119/ProjectLocationMoveDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ProjectLocationMoveDialog.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
14728,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
22992,
17068,
4109,
2735,
1114,
12,
9400,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1984,
1114,
16,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1250,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
3696,
13,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
288,
202,
759,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
2117,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1433,
202,
3562,
2224,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
273,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
394,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
5287,
12,
4406,
1114,
16,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
348,
8588,
18,
9826,
1769,
202,
3562,
2224,
18,
542,
1528,
12,
15277,
67,
13545,
1769,
202,
3562,
2224,
18,
542,
1526,
12,
5745,
1769,
202,
759,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1984,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
2117,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1241,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
652,
202,
3562,
743,
974,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
273,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
394,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
3867,
12,
4406,
1114,
16,
5711,
3512,
273,
1984,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
14728,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
22992,
17068,
4109,
2735,
1114,
12,
9400,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1984,
1114,
16,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1250,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
3696,
13,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
288,
202,
759,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
2117,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
1433,
202,
3562,
2224,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
273,
5711,
3512,
273,
1984,
1114,
18,
588,
5711,
5621,
394,
5711,
3512,
273,
1984,
2
] |
|
public void ruleAction(int ruleNumber) { if (bad_rule != 0) return; switch (ruleNumber) { // // Rule 1: identifier ::= IDENTIFIER // case 1: { if (prsStream.getKind(btParser.getToken(1)) != X10Parsersym.TK_IDENTIFIER) { System.out.println("Parser turning keyword " + prsStream.getName(btParser.getToken(1)) + " at " + prsStream.getLine(btParser.getToken(1)) + ":" + prsStream.getColumn(btParser.getToken(1)) + " into an identifier"); } break; } // // Rule 2: PrimitiveType ::= NumericType // case 2: break; // // Rule 3: PrimitiveType ::= boolean // case 3: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Boolean())); break; } // // Rule 4: NumericType ::= IntegralType // case 4: break; // // Rule 5: NumericType ::= FloatingPointType // case 5: break; // // Rule 6: IntegralType ::= byte // case 6: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 7: IntegralType ::= char // case 7: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 8: IntegralType ::= short // case 8: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 9: IntegralType ::= int // case 9: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 10: IntegralType ::= long // case 10: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 11: FloatingPointType ::= float // case 11: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 12: FloatingPointType ::= double // case 12: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 13: ReferenceType ::= ClassOrInterfaceType // case 13: break; // // Rule 14: ReferenceType ::= ArrayType // case 14: break; // // Rule 15: ClassOrInterfaceType ::= ClassType // case 15: break; // // Rule 16: ClassType ::= TypeName // case 16: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 17: InterfaceType ::= TypeName // case 17: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 18: TypeName ::= identifier // case 18: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 19: TypeName ::= TypeName DOT identifier // case 19: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 20: ClassName ::= TypeName // case 20: break; // // Rule 21: TypeVariable ::= identifier // case 21: break; // // Rule 22: ArrayType ::= Type LBRACKET RBRACKET // case 22: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(array(a, pos(), 1)); break; } // // Rule 23: TypeParameter ::= TypeVariable TypeBoundopt // case 23: bad_rule = 23; break; // // Rule 24: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 26: bad_rule = 26; break; // // Rule 27: AdditionalBound ::= AND InterfaceType // case 27: bad_rule = 27; break; // // Rule 28: TypeArguments ::= LESS ActualTypeArgumentList GREATER // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: ActualTypeArgumentList ::= ActualTypeArgumentList COMMA ActualTypeArgument // case 30: bad_rule = 30; break; // // Rule 31: Wildcard ::= QUESTION WildcardBoundsOpt // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= extends ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: WildcardBounds ::= super ReferenceType // case 33: bad_rule = 33; break; // // Rule 34: PackageName ::= identifier // case 34: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 35: PackageName ::= PackageName DOT identifier // case 35: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 36: ExpressionName ::= identifier // case 36: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 37: ExpressionName ::= AmbiguousName DOT identifier // case 37: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 38: MethodName ::= identifier // case 38: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 39: MethodName ::= AmbiguousName DOT identifier // case 39: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 40: PackageOrTypeName ::= identifier // case 40: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 41: PackageOrTypeName ::= PackageOrTypeName DOT identifier // case 41: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 42: AmbiguousName ::= identifier // case 42: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 43: AmbiguousName ::= AmbiguousName DOT identifier // case 43: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 44: CompilationUnit ::= Commentsopt PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 44: { Object comment = btParser.getSym(1); PackageNode a = (PackageNode) btParser.getSym(2); List b = (List) btParser.getSym(3), c = (List) btParser.getSym(4); Node n = nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c); if (comment != null) { n.setComment(comment.toString()); } btParser.setSym1(n); break; } // // Rule 45: Comments ::= Comment // case 45: { Object comment = comment(btParser.getToken(1)); btParser.setSym1(comment); break; } // // Rule 46: Comments ::= Comments Comment // case 46: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 47: ImportDeclarations ::= ImportDeclaration // case 47: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 48: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 48: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 49: TypeDeclarations ::= Commentsopt TypeDeclaration // case 49: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); TopLevelDecl a = (TopLevelDecl) btParser.getSym(2); if (a != null) l.add(a); if (comment != null) { a.setComment(comment.toString()); } btParser.setSym1(l); break; } // // Rule 50: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 50: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 51: PackageDeclaration ::= package PackageName SEMICOLON // case 51: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 52: ImportDeclaration ::= SingleTypeImportDeclaration // case 52: break; // // Rule 53: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 53: break; // // Rule 54: ImportDeclaration ::= SingleStaticImportDeclaration // case 54: break; // // Rule 55: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 55: break; // // Rule 56: SingleTypeImportDeclaration ::= import TypeName SEMICOLON // case 56: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 57: TypeImportOnDemandDeclaration ::= import PackageOrTypeName DOT MULTIPLY SEMICOLON // case 57: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 58: SingleStaticImportDeclaration ::= import static TypeName DOT identifier SEMICOLON // case 58: bad_rule = 58; break; // // Rule 59: StaticImportOnDemandDeclaration ::= import static TypeName DOT MULTIPLY SEMICOLON // case 59: bad_rule = 59; break; // // Rule 60: TypeDeclaration ::= ClassDeclaration // case 60: break; // // Rule 61: TypeDeclaration ::= InterfaceDeclaration // case 61: break; // // Rule 62: TypeDeclaration ::= SEMICOLON // case 62: { btParser.setSym1(null); break; } // // Rule 63: ClassDeclaration ::= NormalClassDeclaration // case 63: break; // // Rule 64: NormalClassDeclaration ::= Commentsopt ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 64: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); TypeNode c = (TypeNode) btParser.getSym(5); // by default extend x10.lang.Object if (c == null) { c= new Name(nf, ts, pos(), "x10.lang.Object").toType(); } List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); Node n = a.isValue() ? nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e) : nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e); if (comment != null) n.setComment(comment.toString()); btParser.setSym1(n); break; } // // Rule 65: ClassModifiers ::= ClassModifier // case 65: break; // // Rule 66: ClassModifiers ::= ClassModifiers ClassModifier // case 66: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 67: ClassModifier ::= public // case 67: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 68: ClassModifier ::= protected // case 68: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 69: ClassModifier ::= private // case 69: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 70: ClassModifier ::= abstract // case 70: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 71: ClassModifier ::= static // case 71: { btParser.setSym1(Flags.STATIC); break; } // // Rule 72: ClassModifier ::= final // case 72: { btParser.setSym1(Flags.FINAL); break; } // // Rule 73: ClassModifier ::= strictfp // case 73: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 74: TypeParameters ::= LESS TypeParameterList GREATER // case 74: bad_rule = 74; break; // // Rule 75: TypeParameterList ::= TypeParameter // case 75: bad_rule = 75; break; // // Rule 76: TypeParameterList ::= TypeParameterList COMMA TypeParameter // case 76: bad_rule = 76; break; // // Rule 77: Super ::= extends ClassType // case 77: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 78: Interfaces ::= implements InterfaceTypeList // case 78: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 79: InterfaceTypeList ::= InterfaceType // case 79: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 80: InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType // case 80: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 81: ClassBody ::= LBRACE ClassBodyDeclarationsopt RBRACE // case 81: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 82: ClassBodyDeclarations ::= ClassBodyDeclaration // case 82: break; // // Rule 83: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 83: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 84: ClassBodyDeclaration ::= ClassMemberDeclaration // case 84: break; // // Rule 85: ClassBodyDeclaration ::= InstanceInitializer // case 85: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.NONE, a)); btParser.setSym1(l); break; } // // Rule 86: ClassBodyDeclaration ::= StaticInitializer // case 86: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.STATIC, a)); btParser.setSym1(l); break; } // // Rule 87: ClassBodyDeclaration ::= ConstructorDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= FieldDeclaration // case 88: break; // // Rule 89: ClassMemberDeclaration ::= MethodDeclaration // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 90: ClassMemberDeclaration ::= ClassDeclaration // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 91: ClassMemberDeclaration ::= InterfaceDeclaration // case 91: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 92: ClassMemberDeclaration ::= SEMICOLON // case 92: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 93: FieldDeclaration ::= Commentsopt FieldModifiersopt Type VariableDeclarators SEMICOLON // case 93: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(2); TypeNode b = (TypeNode) btParser.getSym(3); List c = (List) btParser.getSym(4); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } if (comment != null) ((Node) l.get(0)).setComment(comment.toString()); btParser.setSym1(l); break; } // // Rule 94: VariableDeclarators ::= VariableDeclarator // case 94: { List l = new TypedList(new LinkedList(), VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 95: VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator // case 95: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 96: VariableDeclarator ::= VariableDeclaratorId // case 96: break; // // Rule 97: VariableDeclarator ::= VariableDeclaratorId EQUAL VariableInitializer // case 97: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 98: VariableDeclaratorId ::= identifier // case 98: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 99: VariableDeclaratorId ::= VariableDeclaratorId LBRACKET RBRACKET // case 99: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 100: VariableInitializer ::= Expression // case 100: break; // // Rule 101: VariableInitializer ::= ArrayInitializer // case 101: break; // // Rule 102: FieldModifiers ::= FieldModifier // case 102: break; // // Rule 103: FieldModifiers ::= FieldModifiers FieldModifier // case 103: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 104: FieldModifier ::= public // case 104: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 105: FieldModifier ::= protected // case 105: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 106: FieldModifier ::= private // case 106: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 107: FieldModifier ::= static // case 107: { btParser.setSym1(Flags.STATIC); break; } // // Rule 108: FieldModifier ::= final // case 108: { btParser.setSym1(Flags.FINAL); break; } // // Rule 109: FieldModifier ::= transient // case 109: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 110: FieldModifier ::= volatile // case 110: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 111: MethodDeclaration ::= Commentsopt MethodHeader MethodBody // case 111: { Object comment = btParser.getSym(1); MethodDecl a = (MethodDecl) btParser.getSym(2); Block b = (Block) btParser.getSym(3); if (comment != null) a.setComment(comment.toString()); btParser.setSym1(a.body(b)); break; } // // Rule 112: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 112: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 113: ResultType ::= Type // case 113: break; // // Rule 114: ResultType ::= void // case 114: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 115: MethodDeclarator ::= identifier LPAREN FormalParameterListopt RPAREN // case 115: { Object[] a = new Object[3]; a[0] = new Name(nf, ts, pos(), id(btParser.getToken(1)).getIdentifier()); a[1] = btParser.getSym(3); a[2] = new Integer(0); btParser.setSym1(a); break; } // // Rule 116: MethodDeclarator ::= MethodDeclarator LBRACKET RBRACKET // case 116: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 117: FormalParameterList ::= LastFormalParameter // case 117: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 118: FormalParameterList ::= FormalParameters COMMA LastFormalParameter // case 118: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 119: FormalParameters ::= FormalParameter // case 119: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 120: FormalParameters ::= FormalParameters COMMA FormalParameter // case 120: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 121: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 121: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); VarDeclarator b = (VarDeclarator) btParser.getSym(3); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 123: VariableModifiers ::= VariableModifiers VariableModifier // case 123: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 124: VariableModifier ::= final // case 124: { btParser.setSym1(Flags.FINAL); break; } // // Rule 125: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 125: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); VarDeclarator b = (VarDeclarator) btParser.getSym(4); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 126: MethodModifiers ::= MethodModifier // case 126: break; // // Rule 127: MethodModifiers ::= MethodModifiers MethodModifier // case 127: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 128: MethodModifier ::= public // case 128: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 129: MethodModifier ::= protected // case 129: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 130: MethodModifier ::= private // case 130: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 131: MethodModifier ::= abstract // case 131: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 132: MethodModifier ::= static // case 132: { btParser.setSym1(Flags.STATIC); break; } // // Rule 133: MethodModifier ::= final // case 133: { btParser.setSym1(Flags.FINAL); break; } // // Rule 134: MethodModifier ::= synchronized // case 134: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 135: MethodModifier ::= native // case 135: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 136: MethodModifier ::= strictfp // case 136: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 137: Throws ::= throws ExceptionTypeList // case 137: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 138: ExceptionTypeList ::= ExceptionType // case 138: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 139: ExceptionTypeList ::= ExceptionTypeList COMMA ExceptionType // case 139: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 140: ExceptionType ::= ClassType // case 140: break; // // Rule 141: ExceptionType ::= TypeVariable // case 141: break; // // Rule 142: MethodBody ::= Block // case 142: break; // // Rule 143: MethodBody ::= SEMICOLON // case 143: btParser.setSym1(null); break; // // Rule 144: InstanceInitializer ::= Block // case 144: break; // // Rule 145: StaticInitializer ::= static Block // case 145: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 146: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 146: { Flags m = (Flags) btParser.getSym(1); Object[] o = (Object []) btParser.getSym(2); Name a = (Name) o[1]; List b = (List) o[2]; List c = (List) btParser.getSym(3); Block d = (Block) btParser.getSym(4); btParser.setSym1(nf.ConstructorDecl(pos(), m, a.toString(), b, c, d)); break; } // // Rule 147: ConstructorDeclarator ::= SimpleTypeName LPAREN FormalParameterListopt RPAREN // case 147: {//vj assert(btParser.getSym(1) == null); Object[] a = new Object[3];//vj a[0] = btParser.getSym(1); a[1] = btParser.getSym(1); a[2] = btParser.getSym(3); btParser.setSym1(a); break; } // // Rule 148: SimpleTypeName ::= identifier // case 148: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 149: ConstructorModifiers ::= ConstructorModifier // case 149: break; // // Rule 150: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 150: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 151: ConstructorModifier ::= public // case 151: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 152: ConstructorModifier ::= protected // case 152: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 153: ConstructorModifier ::= private // case 153: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 154: ConstructorBody ::= LBRACE ExplicitConstructorInvocationopt BlockStatementsopt RBRACE // case 154: { Stmt a = (Stmt) btParser.getSym(2); List l; if (a == null) l = (List) btParser.getSym(3); else { l = new TypedList(new LinkedList(), Stmt.class, false); List l2 = (List) btParser.getSym(3); l.add(a); l.addAll(l2); } btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 155: ExplicitConstructorInvocation ::= this LPAREN ArgumentListopt RPAREN SEMICOLON // case 155: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.ThisCall(pos(), b)); break; } // // Rule 156: ExplicitConstructorInvocation ::= super LPAREN ArgumentListopt RPAREN SEMICOLON // case 156: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.SuperCall(pos(), b)); break; } // // Rule 157: ExplicitConstructorInvocation ::= Primary DOT this LPAREN ArgumentListopt RPAREN SEMICOLON // case 157: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.ThisCall(pos(), a, b)); break; } // // Rule 158: ExplicitConstructorInvocation ::= Primary DOT super LPAREN ArgumentListopt RPAREN SEMICOLON // case 158: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.SuperCall(pos(), a, b)); break; } // // Rule 159: EnumDeclaration ::= ClassModifiersopt enum identifier Interfacesopt EnumBody // case 159: bad_rule = 159; break; // // Rule 160: EnumBody ::= LBRACE EnumConstantsopt ,opt EnumBodyDeclarationsopt RBRACE // case 160: bad_rule = 160; break; // // Rule 161: EnumConstants ::= EnumConstant // case 161: bad_rule = 161; break; // // Rule 162: EnumConstants ::= EnumConstants COMMA EnumConstant // case 162: bad_rule = 162; break; // // Rule 163: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 163: bad_rule = 163; break; // // Rule 164: Arguments ::= LPAREN ArgumentListopt RPAREN // case 164: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 165: EnumBodyDeclarations ::= SEMICOLON ClassBodyDeclarationsopt // case 165: bad_rule = 165; break; // // Rule 166: InterfaceDeclaration ::= NormalInterfaceDeclaration // case 166: break; // // Rule 167: NormalInterfaceDeclaration ::= Commentsopt InterfaceModifiersopt interface identifier ExtendsInterfacesopt InterfaceBody // case 167: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(5); ClassBody d = (ClassBody) btParser.getSym(6); Node n = nf.ClassDecl(pos(), a.Interface(), b.getIdentifier(), null, c, d); if (comment != null) n.setComment( comment.toString() ); btParser.setSym1(n); break; } // // Rule 168: InterfaceModifiers ::= InterfaceModifier // case 168: break; // // Rule 169: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 169: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 170: InterfaceModifier ::= public // case 170: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 171: InterfaceModifier ::= protected // case 171: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 172: InterfaceModifier ::= private // case 172: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 173: InterfaceModifier ::= abstract // case 173: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 174: InterfaceModifier ::= static // case 174: { btParser.setSym1(Flags.STATIC); break; } // // Rule 175: InterfaceModifier ::= strictfp // case 175: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 176: ExtendsInterfaces ::= extends InterfaceType // case 176: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 177: ExtendsInterfaces ::= ExtendsInterfaces COMMA InterfaceType // case 177: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 178: InterfaceBody ::= LBRACE InterfaceMemberDeclarationsopt RBRACE // case 178: { List a = (List)btParser.getSym(2); btParser.setSym1(nf.ClassBody(pos(), a)); break; } // // Rule 179: InterfaceMemberDeclarations ::= InterfaceMemberDeclaration // case 179: break; // // Rule 180: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 180: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 181: InterfaceMemberDeclaration ::= ConstantDeclaration // case 181: break; // // Rule 182: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 182: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 183: InterfaceMemberDeclaration ::= ClassDeclaration // case 183: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 184: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 184: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 185: InterfaceMemberDeclaration ::= SEMICOLON // case 185: { btParser.setSym1(Collections.EMPTY_LIST); break; } // // Rule 186: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 186: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 187: ConstantModifiers ::= ConstantModifier // case 187: break; // // Rule 188: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 188: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 189: ConstantModifier ::= public // case 189: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 190: ConstantModifier ::= static // case 190: { btParser.setSym1(Flags.STATIC); break; } // // Rule 191: ConstantModifier ::= final // case 191: { btParser.setSym1(Flags.FINAL); break; } // // Rule 192: AbstractMethodDeclaration ::= AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt SEMICOLON // case 192: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 193: AbstractMethodModifiers ::= AbstractMethodModifier // case 193: break; // // Rule 194: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 194: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 195: AbstractMethodModifier ::= public // case 195: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 196: AbstractMethodModifier ::= abstract // case 196: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 197: AnnotationTypeDeclaration ::= InterfaceModifiersopt AT interface identifier AnnotationTypeBody // case 197: bad_rule = 197; break; // // Rule 198: AnnotationTypeBody ::= LBRACE AnnotationTypeElementDeclarationsopt RBRACE // case 198: bad_rule = 198; break; // // Rule 199: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclaration // case 199: bad_rule = 199; break; // // Rule 200: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration // case 200: bad_rule = 200; break; // // Rule 201: AnnotationTypeElementDeclaration ::= AbstractMethodModifiersopt Type identifier LPAREN RPAREN DefaultValueopt SEMICOLON // case 201: bad_rule = 201; break; // // Rule 202: AnnotationTypeElementDeclaration ::= ConstantDeclaration // case 202: bad_rule = 202; break; // // Rule 203: AnnotationTypeElementDeclaration ::= ClassDeclaration // case 203: bad_rule = 203; break; // // Rule 204: AnnotationTypeElementDeclaration ::= InterfaceDeclaration // case 204: bad_rule = 204; break; // // Rule 205: AnnotationTypeElementDeclaration ::= EnumDeclaration // case 205: bad_rule = 205; break; // // Rule 206: AnnotationTypeElementDeclaration ::= AnnotationTypeDeclaration // case 206: bad_rule = 206; break; // // Rule 207: AnnotationTypeElementDeclaration ::= SEMICOLON // case 207: bad_rule = 207; break; // // Rule 208: DefaultValue ::= default ElementValue // case 208: bad_rule = 208; break; // // Rule 209: Annotations ::= Annotation // case 209: bad_rule = 209; break; // // Rule 210: Annotations ::= Annotations Annotation // case 210: bad_rule = 210; break; // // Rule 211: Annotation ::= NormalAnnotation // case 211: bad_rule = 211; break; // // Rule 212: Annotation ::= MarkerAnnotation // case 212: bad_rule = 212; break; // // Rule 213: Annotation ::= SingleElementAnnotation // case 213: bad_rule = 213; break; // // Rule 214: NormalAnnotation ::= AT TypeName LPAREN ElementValuePairsopt RPAREN // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePairs ::= ElementValuePair // case 215: bad_rule = 215; break; // // Rule 216: ElementValuePairs ::= ElementValuePairs COMMA ElementValuePair // case 216: bad_rule = 216; break; // // Rule 217: ElementValuePair ::= SimpleName EQUAL ElementValue // case 217: bad_rule = 217; break; // // Rule 218: SimpleName ::= identifier // case 218: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 219: ElementValue ::= ConditionalExpression // case 219: bad_rule = 219; break; // // Rule 220: ElementValue ::= Annotation // case 220: bad_rule = 220; break; // // Rule 221: ElementValue ::= ElementValueArrayInitializer // case 221: bad_rule = 221; break; // // Rule 222: ElementValueArrayInitializer ::= LBRACE ElementValuesopt ,opt RBRACE // case 222: bad_rule = 222; break; // // Rule 223: ElementValues ::= ElementValue // case 223: bad_rule = 223; break; // // Rule 224: ElementValues ::= ElementValues COMMA ElementValue // case 224: bad_rule = 224; break; // // Rule 225: MarkerAnnotation ::= AT TypeName // case 225: bad_rule = 225; break; // // Rule 226: SingleElementAnnotation ::= AT TypeName LPAREN ElementValue RPAREN // case 226: bad_rule = 226; break; // // Rule 227: ArrayInitializer ::= LBRACE VariableInitializersopt ,opt RBRACE // case 227: { List a = (List) btParser.getSym(2); if (a == null) btParser.setSym1(nf.ArrayInit(pos())); else btParser.setSym1(nf.ArrayInit(pos(), a)); break; } // // Rule 228: VariableInitializers ::= VariableInitializer // case 228: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 229: VariableInitializers ::= VariableInitializers COMMA VariableInitializer // case 229: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 230: Block ::= LBRACE BlockStatementsopt RBRACE // case 230: { List l = (List) btParser.getSym(2); btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 231: BlockStatements ::= BlockStatement // case 231: { List l = new TypedList(new LinkedList(), Stmt.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 232: BlockStatements ::= BlockStatements BlockStatement // case 232: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 233: BlockStatement ::= LocalVariableDeclarationStatement // case 233: break; // // Rule 234: BlockStatement ::= ClassDeclaration // case 234: { ClassDecl a = (ClassDecl) btParser.getSym(1); List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), a)); btParser.setSym1(l); break; } // // Rule 235: BlockStatement ::= Statement // case 235: { List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 236: LocalVariableDeclarationStatement ::= LocalVariableDeclaration SEMICOLON // case 236: break; // // Rule 237: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 237: { Flags flags = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); List l = new TypedList(new LinkedList(), LocalDecl.class, false); for (Iterator i = b.iterator(); i.hasNext(); ) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.LocalDecl(pos(d), flags, array(a, pos(d), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 238: Statement ::= StatementWithoutTrailingSubstatement // case 238: break; // // Rule 239: Statement ::= LabeledStatement // case 239: break; // // Rule 240: Statement ::= IfThenStatement // case 240: break; // // Rule 241: Statement ::= IfThenElseStatement // case 241: break; // // Rule 242: Statement ::= WhileStatement // case 242: break; // // Rule 243: Statement ::= ForStatement // case 243: break; // // Rule 244: StatementWithoutTrailingSubstatement ::= Block // case 244: break; // // Rule 245: StatementWithoutTrailingSubstatement ::= EmptyStatement // case 245: break; // // Rule 246: StatementWithoutTrailingSubstatement ::= ExpressionStatement // case 246: break; // // Rule 247: StatementWithoutTrailingSubstatement ::= AssertStatement // case 247: break; // // Rule 248: StatementWithoutTrailingSubstatement ::= SwitchStatement // case 248: break; // // Rule 249: StatementWithoutTrailingSubstatement ::= DoStatement // case 249: break; // // Rule 250: StatementWithoutTrailingSubstatement ::= BreakStatement // case 250: break; // // Rule 251: StatementWithoutTrailingSubstatement ::= ContinueStatement // case 251: break; // // Rule 252: StatementWithoutTrailingSubstatement ::= ReturnStatement // case 252: break; // // Rule 253: StatementWithoutTrailingSubstatement ::= SynchronizedStatement // case 253: break; // // Rule 254: StatementWithoutTrailingSubstatement ::= ThrowStatement // case 254: break; // // Rule 255: StatementWithoutTrailingSubstatement ::= TryStatement // case 255: break; // // Rule 256: StatementNoShortIf ::= StatementWithoutTrailingSubstatement // case 256: break; // // Rule 257: StatementNoShortIf ::= LabeledStatementNoShortIf // case 257: break; // // Rule 258: StatementNoShortIf ::= IfThenElseStatementNoShortIf // case 258: break; // // Rule 259: StatementNoShortIf ::= WhileStatementNoShortIf // case 259: break; // // Rule 260: StatementNoShortIf ::= ForStatementNoShortIf // case 260: break; // // Rule 261: IfThenStatement ::= if LPAREN Expression RPAREN Statement // case 261: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.If(pos(), a, b)); break; } // // Rule 262: IfThenElseStatement ::= if LPAREN Expression RPAREN StatementNoShortIf else Statement // case 262: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 263: IfThenElseStatementNoShortIf ::= if LPAREN Expression RPAREN StatementNoShortIf else StatementNoShortIf // case 263: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 264: EmptyStatement ::= SEMICOLON // case 264: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 265: LabeledStatement ::= identifier COLON Statement // case 265: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 266: LabeledStatementNoShortIf ::= identifier COLON StatementNoShortIf // case 266: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 267: ExpressionStatement ::= StatementExpression SEMICOLON // case 267: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Eval(pos(), a)); break; } // // Rule 268: StatementExpression ::= Assignment // case 268: break; // // Rule 269: StatementExpression ::= PreIncrementExpression // case 269: break; // // Rule 270: StatementExpression ::= PreDecrementExpression // case 270: break; // // Rule 271: StatementExpression ::= PostIncrementExpression // case 271: break; // // Rule 272: StatementExpression ::= PostDecrementExpression // case 272: break; // // Rule 273: StatementExpression ::= MethodInvocation // case 273: break; // // Rule 274: StatementExpression ::= ClassInstanceCreationExpression // case 274: break; // // Rule 275: AssertStatement ::= assert Expression SEMICOLON // case 275: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 276: AssertStatement ::= assert Expression COLON Expression SEMICOLON // case 276: { Expr a = (Expr) btParser.getSym(2), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Assert(pos(), a, b)); break; } // // Rule 277: SwitchStatement ::= switch LPAREN Expression RPAREN SwitchBlock // case 277: { Expr a = (Expr) btParser.getSym(3); List b = (List) btParser.getSym(5); btParser.setSym1(nf.Switch(pos(), a, b)); break; } // // Rule 278: SwitchBlock ::= LBRACE SwitchBlockStatementGroupsopt SwitchLabelsopt RBRACE // case 278: { List l = (List) btParser.getSym(2), l2 = (List) btParser.getSym(3); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 279: SwitchBlockStatementGroups ::= SwitchBlockStatementGroup // case 279: break; // // Rule 280: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 280: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 281: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 281: { List l = new TypedList(new LinkedList(), SwitchElement.class, false); List l1 = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l1); l.add(nf.SwitchBlock(pos(), l2)); btParser.setSym1(l); break; } // // Rule 282: SwitchLabels ::= SwitchLabel // case 282: { List l = new TypedList(new LinkedList(), Case.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 283: SwitchLabels ::= SwitchLabels SwitchLabel // case 283: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 284: SwitchLabel ::= case ConstantExpression COLON // case 284: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 285: SwitchLabel ::= case EnumConstant COLON // case 285: bad_rule = 285; break; // // Rule 286: SwitchLabel ::= default COLON // case 286: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 287: EnumConstant ::= identifier // case 287: bad_rule = 287; break; // // Rule 288: WhileStatement ::= while LPAREN Expression RPAREN Statement // case 288: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 289: WhileStatementNoShortIf ::= while LPAREN Expression RPAREN StatementNoShortIf // case 289: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 290: DoStatement ::= do Statement while LPAREN Expression RPAREN SEMICOLON // case 290: { Stmt a = (Stmt) btParser.getSym(2); Expr b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Do(pos(), a, b)); break; } // // Rule 291: ForStatement ::= BasicForStatement // case 291: break; // // Rule 292: ForStatement ::= EnhancedForStatement // case 292: break; // // Rule 293: BasicForStatement ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN Statement // case 293: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 294: ForStatementNoShortIf ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN StatementNoShortIf // case 294: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 295: ForInit ::= StatementExpressionList // case 295: break; // // Rule 296: ForInit ::= LocalVariableDeclaration // case 296: { List l = new TypedList(new LinkedList(), ForInit.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 297: ForUpdate ::= StatementExpressionList // case 297: break; // // Rule 298: StatementExpressionList ::= StatementExpression // case 298: { List l = new TypedList(new LinkedList(), Eval.class, false); Expr a = (Expr) btParser.getSym(1); l.add(nf.Eval(pos(), a)); btParser.setSym1(l); break; } // // Rule 299: StatementExpressionList ::= StatementExpressionList COMMA StatementExpression // case 299: { List l = (List) btParser.getSym(1); Expr a = (Expr) btParser.getSym(3); l.add(nf.Eval(pos(), a)); //btParser.setSym1(l); break; } // // Rule 300: BreakStatement ::= break identifieropt SEMICOLON // case 300: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Break(pos())); else btParser.setSym1(nf.Break(pos(), a.toString())); break; } // // Rule 301: ContinueStatement ::= continue identifieropt SEMICOLON // case 301: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Continue(pos())); else btParser.setSym1(nf.Continue(pos(), a.toString())); break; } // // Rule 302: ReturnStatement ::= return Expressionopt SEMICOLON // case 302: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 303: ThrowStatement ::= throw Expression SEMICOLON // case 303: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 304: SynchronizedStatement ::= synchronized LPAREN Expression RPAREN Block // case 304: { Expr a = (Expr) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Synchronized(pos(), a, b)); break; } // // Rule 305: TryStatement ::= try Block Catches // case 305: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Try(pos(), a, b)); break; } // // Rule 306: TryStatement ::= try Block Catchesopt Finally // case 306: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); Block c = (Block) btParser.getSym(4); btParser.setSym1(nf.Try(pos(), a, b, c)); break; } // // Rule 307: Catches ::= CatchClause // case 307: { List l = new TypedList(new LinkedList(), Catch.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 308: Catches ::= Catches CatchClause // case 308: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 309: CatchClause ::= catch LPAREN FormalParameter RPAREN Block // case 309: { Formal a = (Formal) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Catch(pos(), a, b)); break; } // // Rule 310: Finally ::= finally Block // case 310: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 311: Primary ::= PrimaryNoNewArray // case 311: break; // // Rule 312: Primary ::= ArrayCreationExpression // case 312: break; // // Rule 313: PrimaryNoNewArray ::= Literal // case 313: break; // // Rule 314: PrimaryNoNewArray ::= Type DOT class // case 314: { Object o = btParser.getSym(1); if (o instanceof Name) { Name a = (Name) o; btParser.setSym1(nf.ClassLit(pos(), a.toType())); } else if (o instanceof TypeNode) { TypeNode a = (TypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else if (o instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 315: PrimaryNoNewArray ::= void DOT class // case 315: { btParser.setSym1(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(btParser.getToken(1)), ts.Void()))); break; } // // Rule 316: PrimaryNoNewArray ::= this // case 316: { btParser.setSym1(nf.This(pos())); break; } // // Rule 317: PrimaryNoNewArray ::= ClassName DOT this // case 317: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 318: PrimaryNoNewArray ::= LPAREN Expression RPAREN // case 318: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 319: PrimaryNoNewArray ::= ClassInstanceCreationExpression // case 319: break; // // Rule 320: PrimaryNoNewArray ::= FieldAccess // case 320: break; // // Rule 321: PrimaryNoNewArray ::= MethodInvocation // case 321: break; // // Rule 322: PrimaryNoNewArray ::= ArrayAccess // case 322: break; // // Rule 323: Literal ::= IntegerLiteral // case 323: { // TODO: remove any prefix (such as 0x) polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 324: Literal ::= LongLiteral // case 324: { // TODO: remove any suffix (such as L) or prefix (such as 0x) polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 325: Literal ::= FloatingPointLiteral // case 325: { // TODO: remove any suffix (such as F) polyglot.lex.FloatLiteral a = float_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 326: Literal ::= DoubleLiteral // case 326: { // TODO: remove any suffix (such as D) polyglot.lex.DoubleLiteral a = double_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 327: Literal ::= BooleanLiteral // case 327: { polyglot.lex.BooleanLiteral a = boolean_lit(btParser.getToken(1)); btParser.setSym1(nf.BooleanLit(pos(), a.getValue().booleanValue())); break; } // // Rule 328: Literal ::= CharacterLiteral // case 328: { polyglot.lex.CharacterLiteral a = char_lit(btParser.getToken(1)); btParser.setSym1(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 329: Literal ::= StringLiteral // case 329: { String s = prsStream.getName(btParser.getToken(1)); btParser.setSym1(nf.StringLit(pos(), s.substring(1, s.length() - 2))); break; } // // Rule 330: Literal ::= null // case 330: { btParser.setSym1(nf.NullLit(pos())); break; } // // Rule 331: BooleanLiteral ::= true // case 331: break; // // Rule 332: BooleanLiteral ::= false // case 332: break; // // Rule 333: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN ClassBodyopt // case 333: {//vj assert(btParser.getSym(2) == null); TypeNode a = (TypeNode) btParser.getSym(2);//vj assert(btParser.getSym(4) == null); List b = (List) btParser.getSym(4); ClassBody c = (ClassBody) btParser.getSym(6); if (c == null) btParser.setSym1(nf.New(pos(), a, b)); else btParser.setSym1(nf.New(pos(), a, b, c)); break; } // // Rule 334: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 334: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a, b.toType(), c)); else btParser.setSym1(nf.New(pos(), a, b.toType(), c, d)); break; } // // Rule 335: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 335: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(4) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(6) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c)); else btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c, d)); break; } // // Rule 336: ArgumentList ::= Expression // case 336: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 337: ArgumentList ::= ArgumentList COMMA Expression // case 337: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 338: DimExprs ::= DimExpr // case 338: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 339: DimExprs ::= DimExprs DimExpr // case 339: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 340: DimExpr ::= LBRACKET Expression RBRACKET // case 340: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 341: Dims ::= LBRACKET RBRACKET // case 341: { btParser.setSym1(new Integer(1)); break; } // // Rule 342: Dims ::= Dims LBRACKET RBRACKET // case 342: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 343: FieldAccess ::= Primary DOT identifier // case 343: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 344: FieldAccess ::= super DOT identifier // case 344: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 345: FieldAccess ::= ClassName DOT super DOT identifier // case 345: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier())); break; } // // Rule 346: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN // case 346: { Name a = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Call(pos(), a.prefix == null ? null : a.prefix.toReceiver(), a.name, b)); break; } // // Rule 347: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN // case 347: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), a, b.getIdentifier(), c)); break; } // // Rule 348: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN // case 348: {//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken())), b.getIdentifier(), c)); break; } // // Rule 349: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN // case 349: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(5) == null); polyglot.lex.Identifier b = id(btParser.getToken(5)); List c = (List) btParser.getSym(7); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier(), c)); break; } // // Rule 350: PostfixExpression ::= Primary // case 350: break; // // Rule 351: PostfixExpression ::= ExpressionName // case 351: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 352: PostfixExpression ::= PostIncrementExpression // case 352: break; // // Rule 353: PostfixExpression ::= PostDecrementExpression // case 353: break; // // Rule 354: PostIncrementExpression ::= PostfixExpression PLUS_PLUS // case 354: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 355: PostDecrementExpression ::= PostfixExpression MINUS_MINUS // case 355: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 356: UnaryExpression ::= PreIncrementExpression // case 356: break; // // Rule 357: UnaryExpression ::= PreDecrementExpression // case 357: break; // // Rule 358: UnaryExpression ::= PLUS UnaryExpression // case 358: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 359: UnaryExpression ::= MINUS UnaryExpression // case 359: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 361: PreIncrementExpression ::= PLUS_PLUS UnaryExpression // case 361: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 362: PreDecrementExpression ::= MINUS_MINUS UnaryExpression // case 362: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 363: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 363: break; // // Rule 364: UnaryExpressionNotPlusMinus ::= TWIDDLE UnaryExpression // case 364: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 365: UnaryExpressionNotPlusMinus ::= NOT UnaryExpression // case 365: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 367: MultiplicativeExpression ::= UnaryExpression // case 367: break; // // Rule 368: MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression // case 368: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 369: MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression // case 369: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 370: MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression // case 370: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 371: AdditiveExpression ::= MultiplicativeExpression // case 371: break; // // Rule 372: AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression // case 372: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 373: AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression // case 373: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 374: ShiftExpression ::= AdditiveExpression // case 374: break; // // Rule 375: ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression // case 375: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 376: ShiftExpression ::= ShiftExpression GREATER GREATER AdditiveExpression // case 376: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.SHR, b)); break; } // // Rule 377: ShiftExpression ::= ShiftExpression GREATER GREATER GREATER AdditiveExpression // case 377: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Binary(pos(), a, Binary.USHR, b)); break; } // // Rule 378: RelationalExpression ::= ShiftExpression // case 378: break; // // Rule 379: RelationalExpression ::= RelationalExpression LESS ShiftExpression // case 379: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 380: RelationalExpression ::= RelationalExpression GREATER ShiftExpression // case 380: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 381: RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression // case 381: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 382: RelationalExpression ::= RelationalExpression GREATER EQUAL ShiftExpression // case 382: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 383: EqualityExpression ::= RelationalExpression // case 383: break; // // Rule 384: EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression // case 384: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 385: EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression // case 385: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 386: AndExpression ::= EqualityExpression // case 386: break; // // Rule 387: AndExpression ::= AndExpression AND EqualityExpression // case 387: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 388: ExclusiveOrExpression ::= AndExpression // case 388: break; // // Rule 389: ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression // case 389: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 390: InclusiveOrExpression ::= ExclusiveOrExpression // case 390: break; // // Rule 391: InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression // case 391: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 392: ConditionalAndExpression ::= InclusiveOrExpression // case 392: break; // // Rule 393: ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression // case 393: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 394: ConditionalOrExpression ::= ConditionalAndExpression // case 394: break; // // Rule 395: ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression // case 395: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 396: ConditionalExpression ::= ConditionalOrExpression // case 396: break; // // Rule 397: ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON ConditionalExpression // case 397: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3), c = (Expr) btParser.getSym(5); btParser.setSym1(nf.Conditional(pos(), a, b, c)); break; } // // Rule 398: AssignmentExpression ::= ConditionalExpression // case 398: break; // // Rule 399: AssignmentExpression ::= Assignment // case 399: break; // // Rule 400: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 400: { Expr a = (Expr) btParser.getSym(1); Assign.Operator b = (Assign.Operator) btParser.getSym(2); Expr c = (Expr) btParser.getSym(3); btParser.setSym1(nf.Assign(pos(), a, b, c)); break; } // // Rule 401: LeftHandSide ::= ExpressionName // case 401: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 402: LeftHandSide ::= FieldAccess // case 402: break; // // Rule 403: LeftHandSide ::= ArrayAccess // case 403: break; // // Rule 404: AssignmentOperator ::= EQUAL // case 404: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 405: AssignmentOperator ::= MULTIPLY_EQUAL // case 405: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 406: AssignmentOperator ::= DIVIDE_EQUAL // case 406: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 407: AssignmentOperator ::= REMAINDER_EQUAL // case 407: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= PLUS_EQUAL // case 408: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= MINUS_EQUAL // case 409: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= LEFT_SHIFT_EQUAL // case 410: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= GREATER GREATER EQUAL // case 411: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= GREATER GREATER GREATER EQUAL // case 412: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= AND_EQUAL // case 413: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 414: AssignmentOperator ::= XOR_EQUAL // case 414: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 415: AssignmentOperator ::= OR_EQUAL // case 415: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 416: Expression ::= AssignmentExpression // case 416: break; // // Rule 417: ConstantExpression ::= Expression // case 417: break; // // Rule 418: Dimsopt ::= // case 418: { btParser.setSym1(new Integer(0)); break; } // // Rule 419: Dimsopt ::= Dims // case 419: break; // // Rule 420: Catchesopt ::= // case 420: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 421: Catchesopt ::= Catches // case 421: break; // // Rule 422: identifieropt ::= // case 422: btParser.setSym1(null); break; // // Rule 423: identifieropt ::= identifier // case 423: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 424: ForUpdateopt ::= // case 424: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 425: ForUpdateopt ::= ForUpdate // case 425: break; // // Rule 426: Expressionopt ::= // case 426: btParser.setSym1(null); break; // // Rule 427: Expressionopt ::= Expression // case 427: break; // // Rule 428: ForInitopt ::= // case 428: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 429: ForInitopt ::= ForInit // case 429: break; // // Rule 430: SwitchLabelsopt ::= // case 430: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 431: SwitchLabelsopt ::= SwitchLabels // case 431: break; // // Rule 432: SwitchBlockStatementGroupsopt ::= // case 432: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 433: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 433: break; // // Rule 434: VariableModifiersopt ::= // case 434: { btParser.setSym1(Flags.NONE); break; } // // Rule 435: VariableModifiersopt ::= VariableModifiers // case 435: break; // // Rule 436: VariableInitializersopt ::= // case 436: btParser.setSym1(null); break; // // Rule 437: VariableInitializersopt ::= VariableInitializers // case 437: break; // // Rule 438: ElementValuesopt ::= // case 438: btParser.setSym1(null); break; // // Rule 439: ElementValuesopt ::= ElementValues // case 439: bad_rule = 439; break; // // Rule 440: ElementValuePairsopt ::= // case 440: btParser.setSym1(null); break; // // Rule 441: ElementValuePairsopt ::= ElementValuePairs // case 441: bad_rule = 441; break; // // Rule 442: DefaultValueopt ::= // case 442: btParser.setSym1(null); break; // // Rule 443: DefaultValueopt ::= DefaultValue // case 443: break; // // Rule 444: AnnotationTypeElementDeclarationsopt ::= // case 444: btParser.setSym1(null); break; // // Rule 445: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 445: bad_rule = 445; break; // // Rule 446: AbstractMethodModifiersopt ::= // case 446: { btParser.setSym1(Flags.NONE); break; } // // Rule 447: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 447: break; // // Rule 448: ConstantModifiersopt ::= // case 448: { btParser.setSym1(Flags.NONE); break; } // // Rule 449: ConstantModifiersopt ::= ConstantModifiers // case 449: break; // // Rule 450: InterfaceMemberDeclarationsopt ::= // case 450: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 451: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 451: break; // // Rule 452: ExtendsInterfacesopt ::= // case 452: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 453: ExtendsInterfacesopt ::= ExtendsInterfaces // case 453: break; // // Rule 454: InterfaceModifiersopt ::= // case 454: { btParser.setSym1(Flags.NONE); break; } // // Rule 455: InterfaceModifiersopt ::= InterfaceModifiers // case 455: break; // // Rule 456: ClassBodyopt ::= // case 456: btParser.setSym1(null); break; // // Rule 457: ClassBodyopt ::= ClassBody // case 457: break; // // Rule 458: Argumentsopt ::= // case 458: btParser.setSym1(null); break; // // Rule 459: Argumentsopt ::= Arguments // case 459: bad_rule = 459; break; // // Rule 460: EnumBodyDeclarationsopt ::= // case 460: btParser.setSym1(null); break; // // Rule 461: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 461: bad_rule = 461; break; // // Rule 462: ,opt ::= // case 462: btParser.setSym1(null); break; // // Rule 463: ,opt ::= COMMA // case 463: break; // // Rule 464: EnumConstantsopt ::= // case 464: btParser.setSym1(null); break; // // Rule 465: EnumConstantsopt ::= EnumConstants // case 465: bad_rule = 465; break; // // Rule 466: ArgumentListopt ::= // case 466: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 467: ArgumentListopt ::= ArgumentList // case 467: break; // // Rule 468: BlockStatementsopt ::= // case 468: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 469: BlockStatementsopt ::= BlockStatements // case 469: break; // // Rule 470: ExplicitConstructorInvocationopt ::= // case 470: btParser.setSym1(null); break; // // Rule 471: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 471: break; // // Rule 472: ConstructorModifiersopt ::= // case 472: { btParser.setSym1(Flags.NONE); break; } // // Rule 473: ConstructorModifiersopt ::= ConstructorModifiers // case 473: break; // // Rule 474: ...opt ::= // case 474: btParser.setSym1(null); break; // // Rule 475: ...opt ::= ELLIPSIS // case 475: break; // // Rule 476: FormalParameterListopt ::= // case 476: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 477: FormalParameterListopt ::= FormalParameterList // case 477: break; // // Rule 478: Throwsopt ::= // case 478: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 479: Throwsopt ::= Throws // case 479: break; // // Rule 480: MethodModifiersopt ::= // case 480: { btParser.setSym1(Flags.NONE); break; } // // Rule 481: MethodModifiersopt ::= MethodModifiers // case 481: break; // // Rule 482: FieldModifiersopt ::= // case 482: { btParser.setSym1(Flags.NONE); break; } // // Rule 483: FieldModifiersopt ::= FieldModifiers // case 483: break; // // Rule 484: ClassBodyDeclarationsopt ::= // case 484: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 485: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 485: break; // // Rule 486: Interfacesopt ::= // case 486: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 487: Interfacesopt ::= Interfaces // case 487: break; // // Rule 488: Superopt ::= // case 488: btParser.setSym1(null); break; // // Rule 489: Superopt ::= Super // case 489: break; // // Rule 490: TypeParametersopt ::= // case 490: btParser.setSym1(null); break; // // Rule 491: TypeParametersopt ::= TypeParameters // case 491: break; // // Rule 492: ClassModifiersopt ::= // case 492: { btParser.setSym1(Flags.NONE); break; } // // Rule 493: ClassModifiersopt ::= ClassModifiers // case 493: break; // // Rule 494: Annotationsopt ::= // case 494: btParser.setSym1(null); break; // // Rule 495: Annotationsopt ::= Annotations // case 495: bad_rule = 495; break; // // Rule 496: TypeDeclarationsopt ::= // case 496: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 497: TypeDeclarationsopt ::= TypeDeclarations // case 497: break; // // Rule 498: ImportDeclarationsopt ::= // case 498: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 499: ImportDeclarationsopt ::= ImportDeclarations // case 499: break; // // Rule 500: PackageDeclarationopt ::= // case 500: btParser.setSym1(null); break; // // Rule 501: PackageDeclarationopt ::= PackageDeclaration // case 501: break; // // Rule 502: WildcardBoundsOpt ::= // case 502: btParser.setSym1(null); break; // // Rule 503: WildcardBoundsOpt ::= WildcardBounds // case 503: bad_rule = 503; break; // // Rule 504: AdditionalBoundListopt ::= // case 504: btParser.setSym1(null); break; // // Rule 505: AdditionalBoundListopt ::= AdditionalBoundList // case 505: bad_rule = 505; break; // // Rule 506: TypeBoundopt ::= // case 506: btParser.setSym1(null); break; // // Rule 507: TypeBoundopt ::= TypeBound // case 507: bad_rule = 507; break; // // Rule 508: TypeArgumentsopt ::= // case 508: btParser.setSym1(null); break; // // Rule 509: TypeArgumentsopt ::= TypeArguments // case 509: bad_rule = 509; break; // // Rule 510: Commentsopt ::= // case 510: btParser.setSym1(null); break; // // Rule 511: Commentsopt ::= Comments // case 511: break; // // Rule 512: Type ::= DataType PlaceTypeSpecifieropt // case 512: { assert(btParser.getSym(2) == null); //btParser.setSym1(); break; } // // Rule 513: Type ::= nullable LESS Type GREATER // case 513: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 514: Type ::= future LESS Type GREATER // case 514: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 515: Type ::= boxed LESS Type GREATER // case 515: bad_rule = 515; break; // // Rule 516: Type ::= fun LESS Type COMMA Type GREATER // case 516: bad_rule = 516; break; // // Rule 517: DataType ::= PrimitiveType // case 517: break; // // Rule 518: DataType ::= ClassOrInterfaceType // case 518: break; // // Rule 519: DataType ::= ArrayType // case 519: break; // // Rule 520: PlaceTypeSpecifier ::= AT PlaceType // case 520: bad_rule = 520; break; // // Rule 521: PlaceType ::= place // case 521: break; // // Rule 522: PlaceType ::= activity // case 522: break; // // Rule 523: PlaceType ::= method // case 523: break; // // Rule 524: PlaceType ::= current // case 524: break; // // Rule 525: PlaceType ::= PlaceExpression // case 525: break; // // Rule 526: ClassOrInterfaceType ::= TypeName DepParametersopt // case 526: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 527: DepParameters ::= LPAREN DepParameterExpr RPAREN // case 527: break; // // Rule 528: DepParameterExpr ::= ArgumentList WhereClauseopt // case 528: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 529: DepParameterExpr ::= WhereClause // case 529: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 530: WhereClause ::= COLON Expression // case 530: break; // // Rule 532: X10ArrayType ::= Type LBRACKET DOT RBRACKET // case 532: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); btParser.setSym1(t); break; } // // Rule 533: X10ArrayType ::= Type reference LBRACKET DOT RBRACKET // case 533: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 534: X10ArrayType ::= Type value LBRACKET DOT RBRACKET // case 534: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 535: X10ArrayType ::= Type LBRACKET DepParameterExpr RBRACKET // case 535: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 536: X10ArrayType ::= Type reference LBRACKET DepParameterExpr RBRACKET // case 536: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 537: X10ArrayType ::= Type value LBRACKET DepParameterExpr RBRACKET // case 537: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 538: ObjectKind ::= value // case 538: bad_rule = 538; break; // // Rule 539: ObjectKind ::= reference // case 539: bad_rule = 539; break; // // Rule 540: MethodModifier ::= atomic // case 540: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 541: MethodModifier ::= extern // case 541: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 542: ClassDeclaration ::= ValueClassDeclaration // case 542: break; // // Rule 543: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 543: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); TypeNode c = (TypeNode) btParser.getSym(4); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 544: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 544: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(4)); TypeNode c = (TypeNode) btParser.getSym(5); List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 545: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET RBRACKET ArrayInitializer // case 545: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(6); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 1, d)); break; } // // Rule 546: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET // case 546: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, null)); break; } // // Rule 547: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET Expression // case 547: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, d)); break; } // // Rule 548: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET // case 548: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, null)); break; } // // Rule 549: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET Expression // case 549: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, d)); break; } // // Rule 550: ArrayBaseType ::= PrimitiveType // case 550: break; // // Rule 551: ArrayBaseType ::= ClassOrInterfaceType // case 551: break; // // Rule 552: ArrayAccess ::= ExpressionName LBRACKET ArgumentList RBRACKET // case 552: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), e.toExpr(), (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), e.toExpr(), b)); break; } // // Rule 553: ArrayAccess ::= PrimaryNoNewArray LBRACKET ArgumentList RBRACKET // case 553: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 554: Statement ::= NowStatement // case 554: break; // // Rule 555: Statement ::= ClockedStatement // case 555: break; // // Rule 556: Statement ::= AsyncStatement // case 556: break; // // Rule 557: Statement ::= AtomicStatement // case 557: break; // // Rule 558: Statement ::= WhenStatement // case 558: break; // // Rule 559: Statement ::= ForEachStatement // case 559: break; // // Rule 560: Statement ::= AtEachStatement // case 560: break; // // Rule 561: Statement ::= FinishStatement // case 561: break; // // Rule 562: StatementWithoutTrailingSubstatement ::= NextStatement // case 562: break; // // Rule 563: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 563: break; // // Rule 564: StatementNoShortIf ::= NowStatementNoShortIf // case 564: break; // // Rule 565: StatementNoShortIf ::= ClockedStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= AsyncStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AtomicStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= WhenStatementNoShortIf // case 568: break; // // Rule 569: StatementNoShortIf ::= ForEachStatementNoShortIf // case 569: break; // // Rule 570: StatementNoShortIf ::= AtEachStatementNoShortIf // case 570: break; // // Rule 571: StatementNoShortIf ::= FinishStatementNoShortIf // case 571: break; // // Rule 572: NowStatement ::= now LPAREN Clock RPAREN Statement // case 572: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 573: ClockedStatement ::= clocked LPAREN ClockList RPAREN Statement // case 573: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 574: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 574: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 575: AsyncStatement ::= async LPAREN here RPAREN Statement // case 575: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 576: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 576: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 577: AtomicStatement ::= atomic LPAREN here RPAREN Statement // case 577: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 578: WhenStatement ::= when LPAREN Expression RPAREN Statement // case 578: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 579: WhenStatement ::= WhenStatement or LPAREN Expression RPAREN Statement // case 579: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 580: ForEachStatement ::= foreach LPAREN FormalParameter COLON Expression RPAREN Statement // case 580: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 581: AtEachStatement ::= ateach LPAREN FormalParameter COLON Expression RPAREN Statement // case 581: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 582: EnhancedForStatement ::= for LPAREN FormalParameter COLON Expression RPAREN Statement // case 582: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 583: FinishStatement ::= finish Statement // case 583: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 584: NowStatementNoShortIf ::= now LPAREN Clock RPAREN StatementNoShortIf // case 584: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 585: ClockedStatementNoShortIf ::= clocked LPAREN ClockList RPAREN StatementNoShortIf // case 585: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 586: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 586: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 587: AsyncStatementNoShortIf ::= async LPAREN here RPAREN StatementNoShortIf // case 587: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 588: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 588: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 589: AtomicStatementNoShortIf ::= atomic LPAREN here RPAREN StatementNoShortIf // case 589: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 590: WhenStatementNoShortIf ::= when LPAREN Expression RPAREN StatementNoShortIf // case 590: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 591: WhenStatementNoShortIf ::= WhenStatement or LPAREN Expression RPAREN StatementNoShortIf // case 591: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 592: ForEachStatementNoShortIf ::= foreach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 592: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 593: AtEachStatementNoShortIf ::= ateach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 593: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 594: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 594: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 595: PlaceExpressionSingleList ::= LPAREN PlaceExpression RPAREN // case 595: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 596: PlaceExpression ::= here // case 596: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 597: PlaceExpression ::= this // case 597: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 598: PlaceExpression ::= Expression // case 598: break; // // Rule 599: PlaceExpression ::= ArrayAccess // case 599: bad_rule = 599; break; // // Rule 600: NextStatement ::= next SEMICOLON // case 600: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 601: AwaitStatement ::= await Expression SEMICOLON // case 601: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 602: ClockList ::= Clock // case 602: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 603: ClockList ::= ClockList COMMA Clock // case 603: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 604: Clock ::= identifier // case 604: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 605: CastExpression ::= LPAREN Type RPAREN UnaryExpressionNotPlusMinus // case 605: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 606: MethodInvocation ::= Primary ARROW identifier LPAREN ArgumentListopt RPAREN // case 606: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.RemoteCall(pos(), a, b.getIdentifier(), c)); break; } // // Rule 607: RelationalExpression ::= RelationalExpression instanceof Type // case 607: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 608: ExpressionName ::= here // case 608: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return nf.Here(pos); } }); break; } // // Rule 609: Primary ::= FutureExpression // case 609: break; // // Rule 610: FutureExpression ::= future PlaceExpressionSingleListopt LBRACE Expression RBRACE // case 610: { Expr e1 = (Expr) btParser.getSym(2), e2 = (Expr) btParser.getSym(4); btParser.setSym1(nf.Future(pos(), (e1 == null ? nf.Here(pos(btParser.getFirstToken())) : e1), e2)); break; } // // Rule 611: FutureExpression ::= future LPAREN here RPAREN LBRACE Expression RBRACE // case 611: { Expr e2 = (Expr) btParser.getSym(6); btParser.setSym1(nf.Future(pos(), nf.Here(pos(btParser.getFirstToken(3))), e2)); break; } // // Rule 612: FunExpression ::= fun Type LPAREN FormalParameterListopt RPAREN LBRACE Expression RBRACE // case 612: bad_rule = 612; break; // // Rule 613: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 613: bad_rule = 613; break; // // Rule 614: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 614: bad_rule = 614; break; // // Rule 615: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 615: bad_rule = 615; break; // // Rule 616: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 616: bad_rule = 616; break; // // Rule 617: MethodInvocation ::= TypeName DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 617: bad_rule = 617; break; // // Rule 618: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 618: bad_rule = 618; break; // // Rule 619: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 619: bad_rule = 619; break; // // Rule 620: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 620: bad_rule = 620; break; // // Rule 621: PlaceTypeSpecifieropt ::= // case 621: btParser.setSym1(null); break; // // Rule 622: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 622: break; // // Rule 623: DepParametersopt ::= // case 623: btParser.setSym1(null); break; // // Rule 624: DepParametersopt ::= DepParameters // case 624: break; // // Rule 625: WhereClauseopt ::= // case 625: btParser.setSym1(null); break; // // Rule 626: WhereClauseopt ::= WhereClause // case 626: break; // // Rule 627: ObjectKindopt ::= // case 627: btParser.setSym1(null); break; // // Rule 628: ObjectKindopt ::= ObjectKind // case 628: break; // // Rule 629: ArrayInitializeropt ::= // case 629: btParser.setSym1(null); break; // // Rule 630: ArrayInitializeropt ::= ArrayInitializer // case 630: break; // // Rule 631: ConcreteDistributionopt ::= // case 631: btParser.setSym1(null); break; // // Rule 632: ConcreteDistributionopt ::= ConcreteDistribution // case 632: break; // // Rule 633: PlaceExpressionSingleListopt ::= // case 633: btParser.setSym1(null); break; // // Rule 634: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 634: break; // // Rule 635: ArgumentListopt ::= // case 635: btParser.setSym1(null); break; // // Rule 636: ArgumentListopt ::= ArgumentList // case 636: break; // // Rule 637: DepParametersopt ::= // case 637: btParser.setSym1(null); break; // // Rule 638: DepParametersopt ::= DepParameters // case 638: break; // // Rule 639: Unsafeopt ::= // case 639: btParser.setSym1(null); break; // // Rule 640: Unsafeopt ::= unsafe // case 640: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken(1)))); break; } default: break; } return; }
|
1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/a0ef25c366453f5aff64a3c99c145987b17c8f23/X10Parser.java/buggy/x10.compiler/src/x10/parser/X10Parser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
2756,
493,
33,
26765,
5411,
368,
5411,
648,
404,
30,
288,
7734,
309,
261,
683,
87,
1228,
18,
588,
5677,
12,
23602,
2678,
18,
588,
1345,
12,
21,
3719,
480,
1139,
2163,
26954,
2942,
18,
56,
47,
67,
16606,
13,
7734,
288,
10792,
2332,
18,
659,
18,
8222,
2932,
2678,
7005,
310,
4932,
315,
397,
4766,
4202,
846,
87,
1228,
18,
17994,
12,
23602,
2678,
18,
588,
1345,
12,
21,
3719,
397,
4766,
4202,
315,
622,
315,
397,
4766,
4202,
846,
87,
1228,
18,
588,
1670,
12,
23602,
2678,
18,
588,
1345,
12,
21,
3719,
397,
4766,
4202,
6153,
397,
4766,
4202,
846,
87,
1228,
18,
588,
1494,
12,
23602,
2678,
18,
588,
1345,
12,
21,
3719,
397,
4766,
4202,
315,
1368,
392,
2756,
8863,
7734,
289,
7734,
898,
31,
5411,
289,
1171,
368,
5411,
368,
6781,
576,
30,
225,
14488,
559,
493,
33,
16980,
559,
5411,
368,
5411,
648,
576,
30,
7734,
898,
31,
2398,
368,
5411,
368,
6781,
890,
30,
225,
14488,
559,
493,
33,
1250,
5411,
368,
5411,
648,
890,
30,
288,
7734,
10921,
2678,
18,
542,
11901,
21,
12,
82,
74,
18,
15512,
559,
907,
12,
917,
9334,
3742,
18,
5507,
1435,
10019,
7734,
898,
31,
5411,
289,
1171,
368,
5411,
368,
6781,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
2756,
493,
33,
26765,
5411,
368,
5411,
648,
404,
30,
288,
7734,
309,
261,
683,
87,
1228,
18,
588,
5677,
12,
23602,
2678,
18,
588,
1345,
12,
21,
3719,
480,
1139,
2163,
26954,
2942,
18,
56,
47,
67,
16606,
13,
7734,
288,
10792,
2332,
18,
659,
18,
8222,
2932,
2678,
7005,
310,
4932,
315,
397,
4766,
4202,
846,
87,
1228,
18,
17994,
12,
23602,
2678,
18,
588,
1345,
12,
21,
3719,
397,
4766,
4202,
315,
622,
315,
397,
4766,
2
] |
||
validateExtensibleAPI();
|
validateEclipsePlatformFilter();
|
public void validateContent(IProgressMonitor monitor) { super.validateContent(monitor); if (fHeaders == null || getErrorCount() > 0) { return; } readBundleManifestVersion(); fHasFragment_Xml = fProject.getFile("fragment.xml").exists(); //$NON-NLS-1$ fModel = PDECore.getDefault().getModelManager() .findModel(fProject); if (fModel != null) { fHasExtensions = fModel.getPluginBase().getExtensionPoints().length > 0 || fModel.getPluginBase().getExtensions().length > 0; } // sets fPluginId if (!validateBundleSymbolicName()) { return; } validateBundleName(); validateTranslatableHeaders(); validateBundleVersion(); // sets fExtensibleApi validateExtensibleAPI(); // sets fHostBundleId validateFragmentHost(); validateBundleClasspath(); validateRequireBundle(monitor); // sets fCompatibility // sets fCompatibilityActivator validateBundleActivator(); validatePluginClass(); validateExportPackage(monitor); validateProvidePackage(monitor); validateImportPackage(monitor); validateEclipsePlatformFilter(); validateAutoStart(); validateLazyStart(); // validateNativeCode(); }
|
14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/cd1b28d402b53578beeecb1f642784dc5e14eac5/BundleErrorReporter.java/clean/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1954,
1350,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
9565,
18,
5662,
1350,
12,
10259,
1769,
202,
202,
430,
261,
74,
3121,
422,
446,
747,
7926,
1380,
1435,
405,
374,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
896,
3405,
9121,
1444,
5621,
202,
202,
74,
5582,
7456,
67,
4432,
273,
284,
4109,
18,
29925,
2932,
11956,
18,
2902,
20387,
1808,
5621,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
74,
1488,
273,
453,
1639,
4670,
18,
588,
1868,
7675,
588,
1488,
1318,
1435,
9506,
202,
18,
4720,
1488,
12,
74,
4109,
1769,
202,
202,
430,
261,
74,
1488,
480,
446,
13,
288,
1082,
202,
74,
5582,
7513,
273,
284,
1488,
18,
588,
3773,
2171,
7675,
588,
3625,
5636,
7675,
2469,
405,
374,
6862,
202,
20081,
284,
1488,
18,
588,
3773,
2171,
7675,
588,
7513,
7675,
2469,
405,
374,
31,
202,
202,
97,
202,
202,
759,
1678,
284,
3773,
548,
202,
202,
430,
16051,
5662,
3405,
10876,
12164,
461,
10756,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
5662,
3405,
461,
5621,
202,
202,
5662,
24299,
3121,
5621,
202,
202,
5662,
3405,
1444,
5621,
202,
202,
759,
1678,
284,
2482,
773,
1523,
3064,
202,
202,
5662,
2482,
773,
1523,
2557,
5621,
202,
202,
759,
1678,
284,
2594,
3405,
548,
202,
202,
5662,
7456,
2594,
5621,
202,
202,
5662,
3405,
17461,
5621,
202,
202,
5662,
8115,
3405,
12,
10259,
1769,
202,
202,
759,
1678,
284,
21633,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
1350,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
9565,
18,
5662,
1350,
12,
10259,
1769,
202,
202,
430,
261,
74,
3121,
422,
446,
747,
7926,
1380,
1435,
405,
374,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
896,
3405,
9121,
1444,
5621,
202,
202,
74,
5582,
7456,
67,
4432,
273,
284,
4109,
18,
29925,
2932,
11956,
18,
2902,
20387,
1808,
5621,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
74,
1488,
273,
453,
1639,
4670,
18,
588,
1868,
7675,
588,
1488,
1318,
1435,
9506,
202,
18,
4720,
1488,
12,
74,
4109,
1769,
202,
202,
430,
261,
74,
1488,
480,
446,
13,
288,
1082,
202,
74,
5582,
7513,
273,
2
] |
DatabaseSearchReplyMessage msg = new DatabaseSearchReplyMessage(_context); msg.setFromHash(_context.router().getRouterInfo().getIdentity().getHash());
|
DatabaseSearchReplyMessage msg = new DatabaseSearchReplyMessage(getContext()); msg.setFromHash(getContext().router().getRouterInfo().getIdentity().getHash());
|
private void sendClosest(Hash key, Set routerInfoSet, Hash toPeer, TunnelId replyTunnel) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Sending closest routers to key " + key.toBase64() + ": # peers = " + routerInfoSet.size() + " tunnel " + replyTunnel); DatabaseSearchReplyMessage msg = new DatabaseSearchReplyMessage(_context); msg.setFromHash(_context.router().getRouterInfo().getIdentity().getHash()); msg.setSearchKey(key); if (routerInfoSet.size() <= 0) { // always include something, so lets toss ourselves in there routerInfoSet.add(_context.router().getRouterInfo()); } msg.addReplies(routerInfoSet); _context.statManager().addRateData("netDb.lookupsHandled", 1, 0); sendMessage(msg, toPeer, replyTunnel); // should this go via garlic messages instead? }
|
27433 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27433/e737e5c9507ed0d463dc9e45a8f63657f466b177/HandleDatabaseLookupMessageJob.java/clean/router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
4082,
7781,
12,
2310,
498,
16,
1000,
4633,
966,
694,
16,
2474,
358,
6813,
16,
399,
8564,
548,
4332,
20329,
13,
288,
3639,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
9394,
3719,
5411,
389,
1330,
18,
4148,
2932,
16322,
9219,
28944,
358,
498,
315,
397,
498,
18,
869,
2171,
1105,
1435,
397,
6398,
468,
10082,
273,
315,
13491,
397,
4633,
966,
694,
18,
1467,
1435,
397,
315,
14825,
315,
397,
4332,
20329,
1769,
3639,
5130,
2979,
7817,
1079,
1234,
273,
394,
5130,
2979,
7817,
1079,
24899,
2472,
1769,
3639,
1234,
18,
542,
1265,
2310,
24899,
2472,
18,
10717,
7675,
588,
8259,
966,
7675,
588,
4334,
7675,
588,
2310,
10663,
3639,
1234,
18,
542,
2979,
653,
12,
856,
1769,
3639,
309,
261,
10717,
966,
694,
18,
1467,
1435,
1648,
374,
13,
288,
5411,
368,
3712,
2341,
5943,
16,
1427,
14557,
358,
1049,
19801,
316,
1915,
5411,
4633,
966,
694,
18,
1289,
24899,
2472,
18,
10717,
7675,
588,
8259,
966,
10663,
3639,
289,
3639,
1234,
18,
1289,
17647,
12,
10717,
966,
694,
1769,
3639,
389,
2472,
18,
5642,
1318,
7675,
1289,
4727,
751,
2932,
2758,
4331,
18,
8664,
87,
23186,
3113,
404,
16,
374,
1769,
3639,
15399,
12,
3576,
16,
358,
6813,
16,
4332,
20329,
1769,
368,
1410,
333,
1960,
3970,
314,
13007,
335,
2743,
3560,
35,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
3238,
918,
1366,
4082,
7781,
12,
2310,
498,
16,
1000,
4633,
966,
694,
16,
2474,
358,
6813,
16,
399,
8564,
548,
4332,
20329,
13,
288,
3639,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
9394,
3719,
5411,
389,
1330,
18,
4148,
2932,
16322,
9219,
28944,
358,
498,
315,
397,
498,
18,
869,
2171,
1105,
1435,
397,
6398,
468,
10082,
273,
315,
13491,
397,
4633,
966,
694,
18,
1467,
1435,
397,
315,
14825,
315,
397,
4332,
20329,
1769,
3639,
5130,
2979,
7817,
1079,
1234,
273,
394,
5130,
2979,
7817,
1079,
24899,
2472,
1769,
3639,
1234,
18,
542,
1265,
2310,
24899,
2472,
18,
10717,
7675,
588,
8259,
966,
7675,
588,
4334,
7675,
588,
2310,
10663,
3639,
1234,
18,
2
] |
(PsiCodeBlock) PsiTreeUtil.getParentOfType(variable, PsiCodeBlock.class);
|
PsiTreeUtil.getParentOfType(variable, PsiCodeBlock.class);
|
private static boolean isImmediatelyAssigned(PsiVariable variable) { final PsiCodeBlock containingScope = (PsiCodeBlock) PsiTreeUtil.getParentOfType(variable, PsiCodeBlock.class); if (containingScope == null) { return false; } final PsiDeclarationStatement declarationStatement = (PsiDeclarationStatement) PsiTreeUtil.getParentOfType(variable, PsiDeclarationStatement.class); if (declarationStatement == null) { return false; } PsiStatement nextStatement = null; int followingStatementNumber = 0; final PsiStatement[] statements = containingScope.getStatements(); for (int i = 0; i < statements.length - 1; i++) { if (statements[i].equals(declarationStatement)) { nextStatement = statements[i + 1]; followingStatementNumber = i + 2; } } if (nextStatement == null) { return false; } if (!(nextStatement instanceof PsiExpressionStatement)) { return false; } final PsiExpressionStatement expressionStatement = (PsiExpressionStatement) nextStatement; final PsiExpression expression = expressionStatement.getExpression(); if (expression == null) { return false; } if (!(expression instanceof PsiAssignmentExpression)) { return false; } final PsiExpression rhs = ((PsiAssignmentExpression) expression).getRExpression(); if (rhs == null) { return false; } if (!(rhs instanceof PsiReferenceExpression)) { return false; } final PsiElement referent = ((PsiReference) rhs).resolve(); if (referent == null || !referent.equals(variable)) { return false; } for (int i = followingStatementNumber; i < statements.length; i++) { if (variableIsUsedInStatement(statements[i], variable)) { return false; } } return true; }
|
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/2d46d291193579a7564649b4881c7ea8e02eda5b/UnnecessaryLocalVariableInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/UnnecessaryLocalVariableInspection.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
1170,
7101,
20363,
12,
52,
7722,
3092,
2190,
13,
288,
3639,
727,
453,
7722,
1085,
1768,
4191,
3876,
273,
7734,
453,
7722,
2471,
1304,
18,
588,
3054,
18859,
12,
6105,
16,
453,
7722,
1085,
1768,
18,
1106,
1769,
3639,
309,
261,
1213,
3280,
3876,
422,
446,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
727,
453,
7722,
6094,
3406,
8266,
3406,
273,
7734,
261,
52,
7722,
6094,
3406,
13,
453,
7722,
2471,
1304,
18,
588,
3054,
18859,
12,
6105,
16,
453,
7722,
6094,
3406,
18,
1106,
1769,
3639,
309,
261,
22448,
3406,
422,
446,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
453,
7722,
3406,
1024,
3406,
273,
446,
31,
3639,
509,
3751,
3406,
1854,
273,
374,
31,
3639,
727,
453,
7722,
3406,
8526,
6317,
273,
4191,
3876,
18,
588,
14663,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
6317,
18,
2469,
300,
404,
31,
277,
27245,
288,
5411,
309,
261,
18393,
63,
77,
8009,
14963,
12,
22448,
3406,
3719,
288,
7734,
1024,
3406,
273,
6317,
63,
77,
397,
404,
15533,
7734,
3751,
3406,
1854,
273,
277,
397,
576,
31,
5411,
289,
3639,
289,
3639,
309,
261,
4285,
3406,
422,
446,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
309,
16051,
12,
4285,
3406,
1276,
453,
7722,
2300,
3406,
3719,
288,
5411,
327,
629,
31,
3639,
289,
3639,
727,
453,
7722,
2300,
3406,
2652,
3406,
273,
261,
52,
7722,
2300,
3406,
13,
1024,
3406,
31,
3639,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
1170,
7101,
20363,
12,
52,
7722,
3092,
2190,
13,
288,
3639,
727,
453,
7722,
1085,
1768,
4191,
3876,
273,
7734,
453,
7722,
2471,
1304,
18,
588,
3054,
18859,
12,
6105,
16,
453,
7722,
1085,
1768,
18,
1106,
1769,
3639,
309,
261,
1213,
3280,
3876,
422,
446,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
727,
453,
7722,
6094,
3406,
8266,
3406,
273,
7734,
261,
52,
7722,
6094,
3406,
13,
453,
7722,
2471,
1304,
18,
588,
3054,
18859,
12,
6105,
16,
453,
7722,
6094,
3406,
18,
1106,
1769,
3639,
309,
261,
22448,
3406,
422,
446,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
453,
7722,
3406,
1024,
3406,
273,
446,
31,
3639,
509,
2
] |
public boolean isSelected(File basedir, String filename, File file) { String teststr = null; BufferedReader in = null; // throw BuildException on error validate(); if (file.isDirectory()) { return true; } if (myRegExp == null) { myRegExp = new RegularExpression(); myRegExp.setPattern(userProvidedExpression); myExpression = myRegExp.getRegexp(getProject()); } try { in = new BufferedReader(new InputStreamReader( new FileInputStream(file))); teststr = in.readLine(); while (teststr != null) { if (myExpression.matches(teststr) == true) { return true; } teststr = in.readLine(); } return false; } catch (IOException ioe) { throw new BuildException("Could not read file " + filename); } finally { try { in.close(); } catch (Exception e) { throw new BuildException("Could not close file " + filename); } } }
|
639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/f83f5c68c975f31a384cc24e94be4e5ebfa2da4d/ContainsRegexpSelector.java/clean/src/main/org/apache/tools/ant/types/selectors/ContainsRegexpSelector.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
20956,
12,
812,
15573,
16,
514,
1544,
16,
1387,
585,
13,
288,
3639,
514,
1842,
701,
273,
446,
31,
3639,
10633,
316,
273,
446,
31,
7734,
368,
604,
18463,
603,
555,
7734,
1954,
5621,
3639,
309,
261,
768,
18,
291,
2853,
10756,
288,
5411,
327,
638,
31,
3639,
289,
7734,
309,
261,
4811,
13673,
422,
446,
13,
288,
5411,
3399,
13673,
273,
394,
24544,
2300,
5621,
5411,
3399,
13673,
18,
542,
3234,
12,
1355,
19254,
2300,
1769,
5411,
3399,
2300,
273,
3399,
13673,
18,
588,
14621,
12,
588,
4109,
10663,
3639,
289,
3639,
775,
288,
2868,
316,
273,
394,
10633,
12,
2704,
15322,
12,
10792,
394,
11907,
12,
768,
3719,
1769,
21394,
1842,
701,
273,
316,
18,
896,
1670,
5621,
18701,
1323,
261,
3813,
701,
480,
446,
13,
288,
27573,
309,
261,
4811,
2300,
18,
8436,
12,
3813,
701,
13,
422,
638,
13,
288,
8227,
327,
638,
31,
5375,
289,
5375,
1842,
701,
273,
316,
18,
896,
1670,
5621,
2868,
289,
18701,
327,
629,
31,
3639,
289,
1044,
261,
14106,
10847,
13,
288,
5411,
604,
394,
18463,
2932,
4445,
486,
855,
585,
315,
397,
1544,
1769,
3639,
289,
3095,
288,
5411,
775,
288,
7734,
316,
18,
4412,
5621,
5411,
289,
1044,
261,
503,
425,
13,
288,
7734,
604,
394,
18463,
2932,
4445,
486,
1746,
585,
315,
397,
1544,
1769,
5411,
289,
3639,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
1250,
20956,
12,
812,
15573,
16,
514,
1544,
16,
1387,
585,
13,
288,
3639,
514,
1842,
701,
273,
446,
31,
3639,
10633,
316,
273,
446,
31,
7734,
368,
604,
18463,
603,
555,
7734,
1954,
5621,
3639,
309,
261,
768,
18,
291,
2853,
10756,
288,
5411,
327,
638,
31,
3639,
289,
7734,
309,
261,
4811,
13673,
422,
446,
13,
288,
5411,
3399,
13673,
273,
394,
24544,
2300,
5621,
5411,
3399,
13673,
18,
542,
3234,
12,
1355,
19254,
2300,
1769,
5411,
3399,
2300,
273,
3399,
13673,
18,
588,
14621,
12,
588,
4109,
10663,
3639,
289,
3639,
775,
288,
2868,
316,
273,
394,
10633,
12,
2704,
15322,
12,
10792,
394,
11907,
12,
768,
3719,
1769,
21394,
1842,
701,
273,
316,
2
] |
||
break;
|
continue Loop;
|
static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: for (;;) { try { int op = 0xFF & iCode[pc++]; switch (op) { // Back indent to ease imlementation reading case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); int pcNew = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pcNew >= 0) { // Has catch block doCatch = true; } } if (pcNew < 0) { pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pcNew < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; // Notify instruction observer if necessary // and point pc and pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = pcNew; continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); javaException = new JavaScriptException(value, idata.itsSourceFile, sourceLine); exceptionPC = pc - 1; if (instructionThreshold != 0) { instructionCount += pc - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getJavaCatchPC(iCode); continue Loop; } case Token.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl <= lDbl); } else { valBln = ScriptRuntime.cmp_LE(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl <= rDbl); } else { valBln = ScriptRuntime.cmp_LE(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl < lDbl); } else { valBln = ScriptRuntime.cmp_LT(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl < rDbl); } else { valBln = ScriptRuntime.cmp_LT(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IFNE : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (!valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Token.IFEQ : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Icode_IFEQ_POP : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); stack[stackTop--] = null; continue Loop; } pc += 2; break; } case Token.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_RETSUB : { int slot = (iCode[pc] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 1 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } int newPC; Object value = stack[LOCAL_SHFT + slot]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; newPC = getJavaCatchPC(iCode); } else { // Normal return from GOSUB newPC = (int)sDbl[LOCAL_SHFT + slot]; } pcPrevBranch = pc = newPC; continue Loop; } case Token.POP : stack[stackTop] = null; stackTop--; break; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case Icode_DUPSECOND : { stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stackTop++; break; } case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; break; } case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; break; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_POPV : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case Token.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case Token.NOT : { stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; break; } case Token.BINDNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case Token.SETNAME : { String name = strings[getIndex(iCode, pc)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); break; } case Token.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case Token.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case Token.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case Icode_PROPINC : case Icode_PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecr(lhs, name, scope, op == Icode_PROPINC); break; } case Icode_ELEMINC : case Icode_ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecrElem(lhs, rhs, scope, op == Icode_ELEMINC); break; } case Token.LOCAL_SAVE : { int slot = (iCode[pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; --stackTop; ++pc; break; } case Token.LOCAL_LOAD : { int slot = (iCode[pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; ++pc; break; } case Icode_CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); int count = getIndex(iCode, pc + 4); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); instructionCount = cx.instructionCount; pc += 6; break; } case Token.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, count, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case Icode_TYPEOFNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case Icode_NAME_AND_THIS : { String name = strings[getIndex(iCode, pc)]; boolean skipGetThis = (0 != iCode[pc + 2]); stackTop = do_nameAndThis(stack, stackTop, scope, name, skipGetThis); pc += 3; break; } case Token.STRING : stack[++stackTop] = strings[getIndex(iCode, pc)]; pc += 2; break; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; break; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; break; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getIndex(iCode, pc)]; pc += 2; break; case Token.NAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case Icode_NAMEINC : case Icode_NAMEDEC : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.postIncrDecr(scope, name, op == Icode_NAMEINC); pc += 2; break; } case Token.SETVAR : { int slot = (iCode[pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.GETVAR : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } ++pc; break; } case Icode_VARINC : case Icode_VARDEC : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { Object val = stack[VAR_SHFT + slot]; stack[stackTop] = val; double d; if (val == DBL_MRK) { d = sDbl[VAR_SHFT + slot]; sDbl[stackTop] = d; } else { d = ScriptRuntime.toNumber(val); } stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = (op == Icode_VARINC) ? d + 1.0 : d - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; double d = ScriptRuntime.toNumber(val); val = doubleWrap((op == Icode_VARINC) ? d + 1.0 : d - 1.0); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case Token.NULL : stack[++stackTop] = null; break; case Token.THIS : stack[++stackTop] = thisObj; break; case Token.THISFN : stack[++stackTop] = fnOrScript; break; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; break; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; break; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; break; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; break; case Token.CATCH_SCOPE : { String name = strings[getIndex(iCode, pc)]; stack[stackTop] = ScriptRuntime.newCatchScope(name, stack[stackTop]); pc += 2; break; } case Token.ENUM_INIT : { int slot = (iCode[pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.enumInit(lhs, scope); ++pc; break; } case Token.ENUM_NEXT : case Token.ENUM_ID : { int slot = (iCode[pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); ++pc; break; } case Icode_PUSH_PARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[++stackTop] = ScriptRuntime.getParent(lhs); break; } case Icode_GETPROTO : case Icode_GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_GETPROTO) { val = ScriptRuntime.getProto(lhs, scope); } else { val = ScriptRuntime.getParent(lhs, scope); } stack[stackTop] = val; break; } case Icode_SETPROTO : case Icode_SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_SETPROTO) { val = ScriptRuntime.setProto(lhs, rhs, scope); } else { val = ScriptRuntime.setParent(lhs, rhs, scope); } stack[stackTop] = val; break; } case Icode_SCOPE : stack[++stackTop] = scope; break; case Icode_CLOSURE : { int i = getIndex(iCode, pc); InterpreterData closureData = idata.itsNestedFunctions[i]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); pc += 2; break; } case Token.REGEXP : { int i = getIndex(iCode, pc); Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[i]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[i]; } stack[++stackTop] = regexp; pc += 2; break; } case Icode_LITERAL_NEW : { int i = getInt(iCode, pc); ++stackTop; stack[stackTop] = new Object[i]; sDbl[stackTop] = 0; pc += 4; break; } case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; break; } case Token.ARRAYLIT : case Token.OBJECTLIT : { int offset = getInt(iCode, pc); Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.ARRAYLIT) { int[] skipIndexces = null; if (offset >= 0) { skipIndexces = (int[])idata.literalIds[offset]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } else { Object[] ids = (Object[])idata.literalIds[offset]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } stack[stackTop] = val; pc += 4; break; } case Icode_LINE : { cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1)); } // end of interpreter switch } } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } javaException = ex; exceptionPC = pc; pc = getJavaCatchPC(iCode); continue Loop; } } cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } if (javaException != null) { if (javaException instanceof JavaScriptException) { throw (JavaScriptException)javaException; } else if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; }
|
12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/43cae3f59850b2e1bf3e15bda6d9eac95ae4284c/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701,
16717,
2083,
2295,
1162,
3651,
16,
18701,
5294,
11599,
751,
612,
396,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
309,
261,
71,
92,
18,
2761,
11599,
4368,
3748,
480,
612,
396,
18,
7462,
3748,
13,
288,
5411,
309,
261,
1968,
40,
3083,
480,
446,
13,
288,
7734,
833,
273,
30169,
1076,
12,
1968,
16,
833,
40,
3083,
16,
1501,
10544,
16,
1501,
1380,
1769,
5411,
289,
5411,
6036,
2933,
888,
273,
612,
396,
18,
7462,
2933,
31,
5411,
1033,
5198,
3748,
273,
9494,
18,
2761,
11599,
4368,
3748,
31,
5411,
9494,
18,
2761,
11599,
4368,
3748,
273,
612,
396,
18,
7462,
3748,
31,
5411,
775,
288,
7734,
327,
888,
18,
1991,
1190,
3748,
12,
350,
396,
18,
7462,
3748,
16,
9494,
16,
2295,
1162,
3651,
16,
29159,
2146,
16,
15261,
16,
833,
1769,
5411,
289,
3095,
288,
7734,
9494,
18,
2761,
11599,
4368,
3748,
273,
5198,
3748,
31,
5411,
289,
3639,
289,
3639,
727,
1033,
2383,
48,
67,
23464,
47,
273,
5294,
11599,
18,
2290,
48,
67,
23464,
47,
31,
3639,
727,
22780,
3109,
273,
22243,
18,
1336,
31,
3639,
727,
509,
8350,
67,
2664,
4464,
273,
374,
31,
3639,
727,
509,
943,
5555,
273,
612,
396,
18,
1282,
2747,
5555,
31,
3639,
727,
509,
15234,
67,
2664,
4464,
273,
8350,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701,
16717,
2083,
2295,
1162,
3651,
16,
18701,
5294,
11599,
751,
612,
396,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
309,
261,
71,
92,
18,
2761,
11599,
4368,
3748,
480,
612,
396,
18,
7462,
3748,
13,
288,
5411,
309,
261,
1968,
40,
3083,
480,
446,
13,
288,
7734,
833,
273,
30169,
1076,
12,
1968,
16,
833,
40,
3083,
16,
1501,
10544,
16,
1501,
1380,
1769,
5411,
289,
5411,
6036,
2933,
888,
273,
612,
396,
18,
7462,
2933,
31,
5411,
1033,
5198,
3748,
273,
9494,
2
] |
AST tmp1037_AST_in = (AST)_t;
|
AST tmp1036_AST_in = (AST)_t;
|
public final void disconnectstate(AST _t) throws RecognitionException { AST disconnectstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1279 = _t; AST tmp1036_AST_in = (AST)_t; match(_t,DISCONNECT); _t = _t.getFirstChild(); filenameorvalue(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOERROR_KW: { AST tmp1037_AST_in = (AST)_t; match(_t,NOERROR_KW); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t1279; _t = _t.getNextSibling(); _retTree = _t; }
|
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
9479,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
9479,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88,
31,
9506,
202,
9053,
1001,
88,
2138,
7235,
273,
389,
88,
31,
202,
202,
9053,
1853,
2163,
5718,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
13498,
11032,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
3459,
280,
1132,
24899,
88,
1769,
202,
202,
67,
88,
273,
389,
1349,
2471,
31,
202,
202,
95,
202,
202,
430,
261,
67,
88,
631,
2011,
13,
389,
88,
33,
9053,
8560,
31,
202,
202,
9610,
261,
389,
88,
18,
588,
559,
10756,
288,
202,
202,
3593,
3741,
3589,
67,
30134,
30,
202,
202,
95,
1082,
202,
9053,
1853,
2163,
6418,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
1082,
202,
1916,
24899,
88,
16,
3417,
3589,
67,
30134,
1769,
1082,
202,
67,
88,
273,
389,
88,
18,
588,
2134,
10291,
5621,
1082,
202,
8820,
31,
202,
202,
97,
202,
202,
3593,
6431,
30,
202,
202,
3593,
10950,
21054,
30,
202,
202,
95,
1082,
202,
8820,
31,
202,
202,
97,
202,
202,
1886,
30,
202,
202,
95,
1082,
202,
12849,
394,
17114,
24899,
88,
1769,
202,
202,
97,
202,
202,
97,
202,
202,
97,
202,
202,
2019,
67,
409,
24899,
88,
1769,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9479,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
9479,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
13,
67,
88,
31,
9506,
202,
9053,
1001,
88,
2138,
7235,
273,
389,
88,
31,
202,
202,
9053,
1853,
2163,
5718,
67,
9053,
67,
267,
273,
261,
9053,
13,
67,
88,
31,
202,
202,
1916,
24899,
88,
16,
13498,
11032,
1769,
202,
202,
67,
88,
273,
389,
88,
18,
588,
3759,
1763,
5621,
202,
202,
3459,
280,
1132,
24899,
88,
1769,
202,
202,
67,
88,
273,
389,
1349,
2471,
31,
202,
202,
95,
202,
202,
430,
261,
67,
88,
631,
2011,
13,
2
] |
{ if( sdw.getTypeSpecifier() instanceof IASTSimpleTypeSpecifier ) ((IASTSimpleTypeSpecifier)sdw.getTypeSpecifier()).releaseReferences( );
|
{
|
protected IASTDeclaration simpleDeclaration( SimpleDeclarationStrategy strategy, IASTScope scope, IASTTemplate ownerTemplate, CompletionKind overideKind, boolean fromCatchHandler, KeywordSetKey overrideKey) throws BacktrackException, EndOfFileException { IToken firstToken = LA(1); int firstOffset = firstToken.getOffset(); int firstLine = firstToken.getLineNumber(); char [] fn = firstToken.getFilename(); if( firstToken.getType() == IToken.tLBRACE ) throwBacktrack(firstToken.getOffset(), firstToken.getEndOffset(), firstToken.getLineNumber(), firstToken.getFilename()); DeclarationWrapper sdw = new DeclarationWrapper(scope, firstToken.getOffset(), firstToken.getLineNumber(), ownerTemplate, fn); firstToken = null; // necessary for scalability CompletionKind completionKindForDeclaration = getCompletionKindForDeclaration(scope, overideKind); setCompletionValues( scope, completionKindForDeclaration, KeywordSetKey.DECL_SPECIFIER_SEQUENCE ); declSpecifierSeq(sdw, false, strategy == SimpleDeclarationStrategy.TRY_CONSTRUCTOR, completionKindForDeclaration, overrideKey ); IASTSimpleTypeSpecifier simpleTypeSpecifier = null; if (sdw.getTypeSpecifier() == null && sdw.getSimpleType() != IASTSimpleTypeSpecifier.Type.UNSPECIFIED ) try { simpleTypeSpecifier = astFactory.createSimpleTypeSpecifier( scope, sdw.getSimpleType(), sdw.getName(), sdw.isShort(), sdw.isLong(), sdw.isSigned(), sdw.isUnsigned(), sdw.isTypeNamed(), sdw.isComplex(), sdw.isImaginary(), sdw.isGloballyQualified(), sdw.getExtensionParameters()); sdw.setTypeSpecifier( simpleTypeSpecifier); sdw.setTypeName( null ); } catch (Exception e1) { int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0 ; logException( "simpleDeclaration:createSimpleTypeSpecifier", e1 ); //$NON-NLS-1$ if( e1 instanceof ASTSemanticException && ((ASTSemanticException)e1).getProblem() != null ) throwBacktrack(((ASTSemanticException)e1).getProblem()); else throwBacktrack(firstOffset, endOffset, firstLine, fn); } try { Declarator declarator = null; if (LT(1) != IToken.tSEMI) { declarator = initDeclarator(sdw, strategy, completionKindForDeclaration, constructInitializersInDeclarations ); while (LT(1) == IToken.tCOMMA) { consume(); initDeclarator(sdw, strategy, completionKindForDeclaration, constructInitializersInDeclarations ); } } boolean hasFunctionBody = false; boolean hasFunctionTryBlock = false; boolean consumedSemi = false; switch (LT(1)) { case IToken.tSEMI : consume(IToken.tSEMI); consumedSemi = true; break; case IToken.t_try : consume( IToken.t_try ); if( LT(1) == IToken.tCOLON ) ctorInitializer( declarator ); hasFunctionTryBlock = true; declarator.setFunctionTryBlock( true ); break; case IToken.tCOLON : ctorInitializer(declarator); break; case IToken.tLBRACE: break; case IToken.tRPAREN: if( ! fromCatchHandler ) throwBacktrack(firstOffset, LA(1).getEndOffset(), LA(1).getLineNumber(), fn); break; default: throwBacktrack(firstOffset, LA(1).getEndOffset(), LA(1).getLineNumber(), fn); } if( ! consumedSemi ) { if( LT(1) == IToken.tLBRACE ) { declarator.setHasFunctionBody(true); hasFunctionBody = true; } if( hasFunctionTryBlock && ! hasFunctionBody ) throwBacktrack(firstOffset, LA(1).getEndOffset(), LA(1).getLineNumber(), fn); } int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0 ; List l = null; try { l = sdw.createASTNodes(astFactory); } catch (ASTSemanticException e) { if( e.getProblem() == null ) { IProblem p = problemFactory.createProblem( IProblem.SYNTAX_ERROR, sdw.getStartingOffset(), lastToken != null ? lastToken.getEndOffset() : 0, sdw.getStartingLine(), fn, EMPTY_STRING, false, true ); throwBacktrack( p ); } else { throwBacktrack(e.getProblem()); } } catch( Exception e ) { logException( "simpleDecl", e ); //$NON-NLS-1$ throwBacktrack(firstOffset, endOffset, firstLine, fn); } if (hasFunctionBody && l.size() != 1) { throwBacktrack(firstOffset, endOffset, firstLine, fn); //TODO Should be an IProblem } if (!l.isEmpty()) // no need to do this unless we have a declarator { if (!hasFunctionBody || fromCatchHandler) { IASTDeclaration declaration = null; for( int i = 0; i < l.size(); ++i ) { declaration = (IASTDeclaration)l.get(i); ((IASTOffsetableElement)declaration).setEndingOffsetAndLineNumber( lastToken.getEndOffset(), lastToken.getLineNumber()); declaration.acceptElement( requestor ); if( sdw.getTypeSpecifier() instanceof IASTSimpleTypeSpecifier ) ((IASTSimpleTypeSpecifier)sdw.getTypeSpecifier()).releaseReferences( ); } return declaration; } IASTDeclaration declaration = (IASTDeclaration)l.get(0); endDeclaration( declaration ); declaration.enterScope( requestor ); try { if( sdw.getTypeSpecifier() instanceof IASTSimpleTypeSpecifier ) ((IASTSimpleTypeSpecifier)sdw.getTypeSpecifier()).releaseReferences( ); if ( !( declaration instanceof IASTScope ) ) throwBacktrack(firstOffset, endOffset, firstLine, fn); handleFunctionBody((IASTScope)declaration ); ((IASTOffsetableElement)declaration).setEndingOffsetAndLineNumber( lastToken.getEndOffset(), lastToken.getLineNumber()); } finally { declaration.exitScope( requestor ); } if( hasFunctionTryBlock ) catchHandlerSequence( scope ); return declaration; } try { if( sdw.getTypeSpecifier() != null ) { IASTAbstractTypeSpecifierDeclaration declaration = astFactory.createTypeSpecDeclaration( sdw.getScope(), sdw.getTypeSpecifier(), ownerTemplate, sdw.getStartingOffset(), sdw.getStartingLine(), lastToken.getEndOffset(), lastToken.getLineNumber(), sdw.isFriend(), lastToken.getFilename()); declaration.acceptElement(requestor); return declaration; } } catch (Exception e1) { logException( "simpleDeclaration:createTypeSpecDeclaration", e1 ); //$NON-NLS-1$ throwBacktrack(firstOffset, endOffset, firstLine, fn); } return null; } catch( BacktrackException be ) { if( simpleTypeSpecifier != null ) simpleTypeSpecifier.releaseReferences(); throwBacktrack(be); return null; } catch( EndOfFileException eof ) { if( simpleTypeSpecifier != null ) simpleTypeSpecifier.releaseReferences(); throw eof; } }
|
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/bea93881a346f0fa7a7630bbec250f39d402f250/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
6094,
4143,
6094,
12,
3639,
4477,
6094,
4525,
6252,
16,
3639,
467,
9053,
3876,
2146,
16,
3639,
467,
9053,
2283,
3410,
2283,
16,
20735,
5677,
1879,
831,
5677,
16,
1250,
628,
14842,
1503,
16,
18317,
30267,
3849,
653,
13,
3639,
1216,
4297,
4101,
503,
16,
4403,
951,
812,
503,
565,
288,
377,
202,
1285,
969,
1122,
1345,
273,
2928,
12,
21,
1769,
377,
202,
474,
1122,
2335,
273,
1122,
1345,
18,
588,
2335,
5621,
377,
202,
474,
24415,
273,
1122,
1345,
18,
588,
31063,
5621,
377,
202,
3001,
5378,
2295,
273,
1122,
1345,
18,
588,
5359,
5621,
377,
202,
430,
12,
1122,
1345,
18,
588,
559,
1435,
225,
422,
467,
1345,
18,
88,
12995,
9254,
262,
604,
2711,
4101,
12,
3645,
1345,
18,
588,
2335,
9334,
1122,
1345,
18,
588,
1638,
2335,
9334,
1122,
1345,
18,
588,
31063,
9334,
1122,
1345,
18,
588,
5359,
10663,
3639,
16110,
4302,
3611,
8349,
91,
273,
5411,
394,
16110,
4302,
3611,
12,
4887,
16,
1122,
1345,
18,
588,
2335,
9334,
1122,
1345,
18,
588,
31063,
9334,
3410,
2283,
16,
2295,
1769,
3639,
1122,
1345,
273,
446,
31,
368,
4573,
364,
8292,
2967,
3639,
20735,
5677,
8364,
5677,
1290,
6094,
273,
336,
11238,
5677,
1290,
6094,
12,
4887,
16,
1879,
831,
5677,
1769,
202,
202,
542,
11238,
1972,
12,
2146,
16,
8364,
5677,
1290,
6094,
16,
18317,
30267,
18,
23956,
67,
13847,
10591,
67,
25330,
11272,
3639,
3496,
21416,
6926,
12,
6427,
91,
16,
629,
16,
6252,
422,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
6094,
4143,
6094,
12,
3639,
4477,
6094,
4525,
6252,
16,
3639,
467,
9053,
3876,
2146,
16,
3639,
467,
9053,
2283,
3410,
2283,
16,
20735,
5677,
1879,
831,
5677,
16,
1250,
628,
14842,
1503,
16,
18317,
30267,
3849,
653,
13,
3639,
1216,
4297,
4101,
503,
16,
4403,
951,
812,
503,
565,
288,
377,
202,
1285,
969,
1122,
1345,
273,
2928,
12,
21,
1769,
377,
202,
474,
1122,
2335,
273,
1122,
1345,
18,
588,
2335,
5621,
377,
202,
474,
24415,
273,
1122,
1345,
18,
588,
31063,
5621,
377,
202,
3001,
5378,
2295,
273,
1122,
1345,
18,
588,
5359,
5621,
377,
202,
430,
12,
1122,
1345,
18,
588,
559,
1435,
225,
422,
467,
1345,
18,
88,
12995,
9254,
2
] |
public InserterContext(InserterContext ctx, SimpleEventProducer producer) { this.persistentFileTracker = ctx.persistentFileTracker; this.uskManager = ctx.uskManager; this.bf = ctx.bf; this.persistentBucketFactory = ctx.persistentBucketFactory; this.random = ctx.random; this.dontCompress = ctx.dontCompress; this.splitfileAlgorithm = ctx.splitfileAlgorithm; this.consecutiveRNFsCountAsSuccess = ctx.consecutiveRNFsCountAsSuccess; this.maxInsertRetries = ctx.maxInsertRetries; this.maxSplitInsertThreads = ctx.maxSplitInsertThreads; this.eventProducer = producer; this.splitfileSegmentDataBlocks = ctx.splitfileSegmentDataBlocks; this.splitfileSegmentCheckBlocks = ctx.splitfileSegmentCheckBlocks; this.cacheLocalRequests = ctx.cacheLocalRequests;
|
public InserterContext(BucketFactory bf, BucketFactory persistentBF, PersistentFileTracker tracker, RandomSource random, int maxRetries, int rnfsToSuccess, int maxThreads, int splitfileSegmentDataBlocks, int splitfileSegmentCheckBlocks, ClientEventProducer eventProducer, boolean cacheLocalRequests, USKManager uskManager) { this.bf = bf; this.persistentFileTracker = tracker; this.persistentBucketFactory = persistentBF; this.uskManager = uskManager; this.random = random; dontCompress = false; splitfileAlgorithm = Metadata.SPLITFILE_ONION_STANDARD; this.consecutiveRNFsCountAsSuccess = rnfsToSuccess; this.maxInsertRetries = maxRetries; this.maxSplitInsertThreads = maxThreads; this.eventProducer = eventProducer; this.splitfileSegmentDataBlocks = splitfileSegmentDataBlocks; this.splitfileSegmentCheckBlocks = splitfileSegmentCheckBlocks; this.cacheLocalRequests = cacheLocalRequests;
|
public InserterContext(InserterContext ctx, SimpleEventProducer producer) { this.persistentFileTracker = ctx.persistentFileTracker; this.uskManager = ctx.uskManager; this.bf = ctx.bf; this.persistentBucketFactory = ctx.persistentBucketFactory; this.random = ctx.random; this.dontCompress = ctx.dontCompress; this.splitfileAlgorithm = ctx.splitfileAlgorithm; this.consecutiveRNFsCountAsSuccess = ctx.consecutiveRNFsCountAsSuccess; this.maxInsertRetries = ctx.maxInsertRetries; this.maxSplitInsertThreads = ctx.maxSplitInsertThreads; this.eventProducer = producer; this.splitfileSegmentDataBlocks = ctx.splitfileSegmentDataBlocks; this.splitfileSegmentCheckBlocks = ctx.splitfileSegmentCheckBlocks; this.cacheLocalRequests = ctx.cacheLocalRequests; }
|
50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/463e1c2814ef80eab9cbef79e58a1594fa8ec102/InserterContext.java/buggy/src/freenet/client/InserterContext.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
657,
550,
387,
1042,
12,
382,
550,
387,
1042,
1103,
16,
4477,
1133,
12140,
12608,
13,
288,
202,
202,
2211,
18,
19393,
812,
8135,
273,
1103,
18,
19393,
812,
8135,
31,
202,
202,
2211,
18,
407,
79,
1318,
273,
1103,
18,
407,
79,
1318,
31,
202,
202,
2211,
18,
17156,
273,
1103,
18,
17156,
31,
202,
202,
2211,
18,
19393,
4103,
1733,
273,
1103,
18,
19393,
4103,
1733,
31,
202,
202,
2211,
18,
9188,
273,
1103,
18,
9188,
31,
202,
202,
2211,
18,
72,
1580,
16552,
273,
1103,
18,
72,
1580,
16552,
31,
202,
202,
2211,
18,
4939,
768,
6801,
273,
1103,
18,
4939,
768,
6801,
31,
202,
202,
2211,
18,
591,
15655,
54,
50,
12432,
1380,
1463,
4510,
273,
1103,
18,
591,
15655,
54,
50,
12432,
1380,
1463,
4510,
31,
202,
202,
2211,
18,
1896,
4600,
13656,
273,
1103,
18,
1896,
4600,
13656,
31,
202,
202,
2211,
18,
1896,
5521,
4600,
13233,
273,
1103,
18,
1896,
5521,
4600,
13233,
31,
202,
202,
2211,
18,
2575,
12140,
273,
12608,
31,
202,
202,
2211,
18,
4939,
768,
4131,
751,
6450,
273,
1103,
18,
4939,
768,
4131,
751,
6450,
31,
202,
202,
2211,
18,
4939,
768,
4131,
1564,
6450,
273,
1103,
18,
4939,
768,
4131,
1564,
6450,
31,
202,
202,
2211,
18,
2493,
2042,
6421,
273,
1103,
18,
2493,
2042,
6421,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
657,
550,
387,
1042,
12,
382,
550,
387,
1042,
1103,
16,
4477,
1133,
12140,
12608,
13,
288,
202,
202,
2211,
18,
19393,
812,
8135,
273,
1103,
18,
19393,
812,
8135,
31,
202,
202,
2211,
18,
407,
79,
1318,
273,
1103,
18,
407,
79,
1318,
31,
202,
202,
2211,
18,
17156,
273,
1103,
18,
17156,
31,
202,
202,
2211,
18,
19393,
4103,
1733,
273,
1103,
18,
19393,
4103,
1733,
31,
202,
202,
2211,
18,
9188,
273,
1103,
18,
9188,
31,
202,
202,
2211,
18,
72,
1580,
16552,
273,
1103,
18,
72,
1580,
16552,
31,
202,
202,
2211,
18,
4939,
768,
6801,
273,
1103,
18,
4939,
768,
6801,
31,
202,
202,
2211,
18,
591,
15655,
54,
50,
12432,
2
] |
List formals = nn.formals();
|
List<Formal> formals = nn.formals();
|
public Node typeCheckOverride(Node parent, TypeChecker tc) throws SemanticException { MethodDecl nn = this; MethodDecl old = nn; // Step I. Typecheck the formal arguments. TypeChecker childtc = (TypeChecker) tc.enter(parent, nn); nn = nn.formals(nn.visitList(nn.formals(),childtc)); // Now build the new formal arg list. // TODO: Add a marker to the TypeChecker which records // whether in fact it changed the type of any formal. if (tc.hasErrors()) throw new SemanticException(); if (nn != old) { List formals = nn.formals(); //List newFormals = new ArrayList(formals.size()); List formalTypes = new ArrayList(formals.size()); Iterator it = formals.iterator(); while (it.hasNext()) { Formal n = (Formal) it.next(); Type newType = n.type().type(); //LocalInstance li = n.localInstance().type(newType); //newFormals.add(n.localInstance(li)); formalTypes.add(newType); } //nn = nn.formals(newFormals); nn.methodInstance().setFormalTypes(formalTypes); // Report.report(1, "X10MethodDecl_c: typeoverride mi= " + nn.methodInstance()); } // Step II. Check the return tpe. // Now visit the returntype to ensure that its depclause, if any is processed. // Visit the formals so that they get added to the scope .. the return type // may reference them. //TypeChecker tc1 = (TypeChecker) tc.copy(); // childtc will have a "wrong" mi pushed in, but that doesnt matter. // we simply need to push in a non-null mi here. TypeChecker childtc1 = (TypeChecker) tc.enter(parent, nn); // Add the formals to the context. nn.visitList(nn.formals(),childtc1); nn = nn.returnType((TypeNode) nn.visitChild(nn.returnType(), childtc1)); if (childtc1.hasErrors()) throw new SemanticException(); if (! nn.returnType().type().isCanonical()) { return nn; } // Update the methodInstance with the depclause-enriched returnType. nn.methodInstance().setReturnType(nn.returnType().type()); // Report.report(1, "X10MethodDecl_c: typeoverride mi= " + nn.methodInstance()); // Step III. Check the body. // We must do it with the correct mi -- the return type will be // checked by return e; statements in the body. TypeChecker childtc2 = (TypeChecker) tc.enter(parent, nn); // Add the formals to the context. nn.visitList(nn.formals(),childtc2); //Report.report(1, "X10MethodDecl_c: after visiting formals " + childtc2.context()); // Now process the body. nn = (MethodDecl) nn.body((Block) nn.visitChild(nn.body(), childtc2)); if (childtc2.hasErrors()) throw new SemanticException(); nn = (MethodDecl) childtc2.leave(parent, old, nn, childtc2); return nn; }
|
1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/f8e1720cd66996a6339b992bf154aa0d019240a3/X10MethodDecl_c.java/clean/x10.compiler/src/polyglot/ext/x10/ast/X10MethodDecl_c.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
2029,
618,
1564,
6618,
12,
907,
982,
16,
1412,
8847,
1715,
13,
1216,
24747,
503,
288,
540,
202,
1305,
3456,
7761,
273,
333,
31,
5411,
2985,
3456,
1592,
273,
7761,
31,
13491,
368,
8693,
467,
18,
1412,
1893,
326,
25739,
1775,
18,
1850,
202,
559,
8847,
1151,
5111,
273,
261,
559,
8847,
13,
1715,
18,
2328,
12,
2938,
16,
7761,
1769,
5411,
7761,
273,
7761,
18,
687,
1031,
12,
9074,
18,
11658,
682,
12,
9074,
18,
687,
1031,
9334,
3624,
5111,
10019,
5411,
368,
4494,
1361,
326,
394,
25739,
1501,
666,
18,
5411,
368,
2660,
30,
1436,
279,
5373,
358,
326,
1412,
8847,
1492,
3853,
5411,
368,
2856,
316,
5410,
518,
3550,
326,
618,
434,
1281,
25739,
18,
5411,
309,
261,
5111,
18,
5332,
4229,
10756,
604,
394,
24747,
503,
5621,
5411,
309,
261,
9074,
480,
1592,
13,
288,
2398,
202,
682,
32,
12183,
34,
646,
1031,
273,
7761,
18,
687,
1031,
5621,
2868,
202,
759,
682,
394,
1204,
1031,
273,
394,
2407,
12,
687,
1031,
18,
1467,
10663,
2398,
202,
682,
25739,
2016,
273,
394,
2407,
12,
687,
1031,
18,
1467,
10663,
2398,
202,
2398,
202,
3198,
518,
273,
646,
1031,
18,
9838,
5621,
2398,
202,
17523,
261,
305,
18,
5332,
2134,
10756,
288,
2398,
202,
202,
12183,
290,
273,
261,
12183,
13,
518,
18,
4285,
5621,
2398,
202,
202,
559,
23319,
273,
290,
18,
723,
7675,
723,
5621,
2398,
202,
202,
759,
2042,
1442,
4501,
273,
290,
18,
3729,
1442,
7675,
723,
12,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2029,
618,
1564,
6618,
12,
907,
982,
16,
1412,
8847,
1715,
13,
1216,
24747,
503,
288,
540,
202,
1305,
3456,
7761,
273,
333,
31,
5411,
2985,
3456,
1592,
273,
7761,
31,
13491,
368,
8693,
467,
18,
1412,
1893,
326,
25739,
1775,
18,
1850,
202,
559,
8847,
1151,
5111,
273,
261,
559,
8847,
13,
1715,
18,
2328,
12,
2938,
16,
7761,
1769,
5411,
7761,
273,
7761,
18,
687,
1031,
12,
9074,
18,
11658,
682,
12,
9074,
18,
687,
1031,
9334,
3624,
5111,
10019,
5411,
368,
4494,
1361,
326,
394,
25739,
1501,
666,
18,
5411,
368,
2660,
30,
1436,
279,
5373,
358,
326,
1412,
8847,
1492,
3853,
5411,
368,
2856,
316,
5410,
518,
3550,
326,
618,
434,
1281,
25739,
2
] |
CellDesign cell = row.getCell( j ); ColumnDesign column = table.getColumn( cell.getColumn( ) ); if ( column.getSuppressDuplicate( ) )
|
RowDesign row = detail.getRow( i ); for ( int j = 0; j < row.getCellCount( ); j++ )
|
public void visitTable( TableHandle handle ) { // Create Table Item TableItemDesign table = new TableItemDesign( ); table.setRepeatHeader( handle.repeatHeader( ) ); setupListingItem( table, handle ); // Handle table caption String caption = handle.getCaption( ); String captionKey = handle.getCaptionKey( ); if ( caption != null || captionKey != null ) { table.setCaption( captionKey, caption ); } // Handle table Columns SlotHandle columnSlot = handle.getColumns( ); for ( int i = 0; i < columnSlot.getCount( ); i++ ) { ColumnHandle columnHandle = (ColumnHandle) columnSlot.get( i ); apply( columnHandle ); if ( currentElement != null ) { ColumnDesign columnDesign = (ColumnDesign) currentElement; for ( int j = 0; j < columnHandle.getRepeatCount( ); j++ ) { table.addColumn( columnDesign ); } } } // Handle Table Header SlotHandle headerSlot = handle.getHeader( ); TableBandDesign header = createTableBand( headerSlot ); header.setBandType( TableBandDesign.BAND_HEADER ); table.setHeader( header ); // Handle grouping in table SlotHandle groupSlot = handle.getGroups( ); for ( int i = 0; i < groupSlot.getCount( ); i++ ) { apply( groupSlot.get( i ) ); if ( currentElement != null ) { GroupDesign group = (GroupDesign) currentElement; group.setGroupLevel( i ); table.addGroup( group ); } } // Handle detail section SlotHandle detailSlot = handle.getDetail( ); TableBandDesign detail = createTableBand( detailSlot ); detail.setBandType( TableBandDesign.BAND_DETAIL ); table.setDetail( detail ); // Handle table footer SlotHandle footerSlot = handle.getFooter( ); TableBandDesign footer = createTableBand( footerSlot ); footer.setBandType( TableBandDesign.BAND_FOOTER ); table.setFooter( footer ); new TableItemDesignLayout( ).layout( table ); //setup the supressDuplicate property of the data items in the //detail band detail = (TableBandDesign) table.getDetail( ); for ( int i = 0; i < detail.getRowCount( ); i++ ) { RowDesign row = detail.getRow(i); for (int j = 0; j < row.getCellCount( ); j++) { CellDesign cell = row.getCell( j ); ColumnDesign column = table.getColumn( cell.getColumn( ) ); if ( column.getSuppressDuplicate( ) ) { for ( int k = 0; k < cell.getContentCount( ); k++ ) { ReportItemDesign item = cell.getContent( k ); if ( item instanceof DataItemDesign ) { DataItemDesign dataItem = ( DataItemDesign )item; dataItem.setSuppressDuplicate( true ); } } } if ( !column.hasDataItemsInDetail( ) ) { for ( int k = 0; k < cell.getContentCount( ); k++ ) { ReportItemDesign item = cell.getContent( k ); if ( item instanceof DataItemDesign ) { column.setHasDataItemsInDetail( true ); break; } } } } } currentElement = table; }
|
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/aae2e17b3a4d3ea45b489ef2f0c59ab5e9576e76/EngineIRVisitor.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
1388,
12,
3555,
3259,
1640,
262,
202,
95,
202,
202,
759,
1788,
3555,
4342,
202,
202,
1388,
1180,
15478,
1014,
273,
394,
3555,
1180,
15478,
12,
11272,
202,
202,
2121,
18,
542,
16750,
1864,
12,
1640,
18,
9374,
1864,
12,
262,
11272,
202,
202,
8401,
19081,
1180,
12,
1014,
16,
1640,
11272,
202,
202,
759,
5004,
1014,
11006,
202,
202,
780,
11006,
273,
1640,
18,
588,
21158,
12,
11272,
202,
202,
780,
11006,
653,
273,
1640,
18,
588,
21158,
653,
12,
11272,
202,
202,
430,
261,
11006,
480,
446,
747,
11006,
653,
480,
446,
262,
202,
202,
95,
1082,
202,
2121,
18,
542,
21158,
12,
11006,
653,
16,
11006,
11272,
202,
202,
97,
202,
202,
759,
5004,
1014,
14962,
202,
202,
8764,
3259,
1057,
8764,
273,
1640,
18,
588,
3380,
12,
11272,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
1057,
8764,
18,
588,
1380,
12,
11272,
277,
9904,
262,
202,
202,
95,
1082,
202,
1494,
3259,
1057,
3259,
273,
261,
1494,
3259,
13,
1057,
8764,
18,
588,
12,
277,
11272,
1082,
202,
9010,
12,
1057,
3259,
11272,
1082,
202,
430,
261,
22993,
480,
446,
262,
1082,
202,
95,
9506,
202,
1494,
15478,
1057,
15478,
273,
261,
1494,
15478,
13,
22993,
31,
9506,
202,
1884,
261,
509,
525,
273,
374,
31,
525,
411,
1057,
3259,
18,
588,
16750,
1380,
12,
11272,
525,
9904,
262,
9506,
202,
95,
6862,
202,
2121,
18,
1289,
1494,
12,
1057,
15478,
11272,
9506,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
1388,
12,
3555,
3259,
1640,
262,
202,
95,
202,
202,
759,
1788,
3555,
4342,
202,
202,
1388,
1180,
15478,
1014,
273,
394,
3555,
1180,
15478,
12,
11272,
202,
202,
2121,
18,
542,
16750,
1864,
12,
1640,
18,
9374,
1864,
12,
262,
11272,
202,
202,
8401,
19081,
1180,
12,
1014,
16,
1640,
11272,
202,
202,
759,
5004,
1014,
11006,
202,
202,
780,
11006,
273,
1640,
18,
588,
21158,
12,
11272,
202,
202,
780,
11006,
653,
273,
1640,
18,
588,
21158,
653,
12,
11272,
202,
202,
430,
261,
11006,
480,
446,
747,
11006,
653,
480,
446,
262,
202,
202,
95,
1082,
202,
2121,
18,
542,
21158,
12,
11006,
653,
16,
11006,
11272,
202,
202,
97,
202,
2
] |
BugzillaQueryHit hit1Twin = new BugzillaQueryHit(taskList, "description", "P1", repositoryURL, "1", null, "status");
|
BugzillaQueryHit hit1Twin = new BugzillaQueryHit(taskList, "description", "P1", repositoryURL, "1", null, "status");
|
public void testUniqueTaskObjects() { init222(); String repositoryURL = "repositoryURL"; BugzillaQueryHit hit1 = new BugzillaQueryHit(taskList, "description", "P1", repositoryURL, "1", null, "status"); ITask task1 = hit1.getOrCreateCorrespondingTask(); assertNotNull(task1); // taskList.renameTask(task1, "testing"); // task1.setDescription("testing"); BugzillaQueryHit hit1Twin = new BugzillaQueryHit(taskList, "description", "P1", repositoryURL, "1", null, "status"); ITask task2 = hit1Twin.getOrCreateCorrespondingTask(); assertEquals(task1.getDescription(), task2.getDescription()); }
|
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/d0f62a17a841dde9896a777d14139cf82ac5bb4d/BugzillaRepositoryConnectorTest.java/clean/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
6303,
2174,
4710,
1435,
288,
202,
202,
2738,
28855,
5621,
202,
202,
780,
3352,
1785,
273,
315,
9071,
1785,
14432,
202,
202,
19865,
15990,
1138,
13616,
6800,
21,
273,
394,
16907,
15990,
1138,
13616,
12,
4146,
682,
16,
315,
3384,
3113,
315,
52,
21,
3113,
3352,
1785,
16,
315,
21,
3113,
446,
16,
315,
2327,
8863,
202,
202,
1285,
835,
1562,
21,
273,
6800,
21,
18,
588,
17717,
6217,
17863,
310,
2174,
5621,
202,
202,
11231,
5962,
12,
4146,
21,
1769,
202,
202,
759,
1562,
682,
18,
18539,
2174,
12,
4146,
21,
16,
315,
3813,
310,
8863,
202,
202,
759,
1562,
21,
18,
542,
3291,
2932,
3813,
310,
8863,
202,
202,
19865,
15990,
1138,
13616,
6800,
21,
56,
8082,
273,
394,
16907,
15990,
1138,
13616,
12,
4146,
682,
16,
315,
3384,
3113,
315,
52,
21,
3113,
3352,
1785,
16,
315,
21,
3113,
446,
16,
315,
2327,
8863,
202,
202,
1285,
835,
1562,
22,
273,
6800,
21,
56,
8082,
18,
588,
17717,
6217,
17863,
310,
2174,
5621,
202,
202,
11231,
8867,
12,
4146,
21,
18,
588,
3291,
9334,
1562,
22,
18,
588,
3291,
10663,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
6303,
2174,
4710,
1435,
288,
202,
202,
2738,
28855,
5621,
202,
202,
780,
3352,
1785,
273,
315,
9071,
1785,
14432,
202,
202,
19865,
15990,
1138,
13616,
6800,
21,
273,
394,
16907,
15990,
1138,
13616,
12,
4146,
682,
16,
315,
3384,
3113,
315,
52,
21,
3113,
3352,
1785,
16,
315,
21,
3113,
446,
16,
315,
2327,
8863,
202,
202,
1285,
835,
1562,
21,
273,
6800,
21,
18,
588,
17717,
6217,
17863,
310,
2174,
5621,
202,
202,
11231,
5962,
12,
4146,
21,
1769,
202,
202,
759,
1562,
682,
18,
18539,
2174,
12,
4146,
21,
16,
315,
3813,
310,
8863,
202,
202,
759,
1562,
21,
18,
542,
3291,
2932,
3813,
310,
8863,
202,
202,
19865,
15990,
1138,
2
] |
intf = request.getParameter("intf"); if (nodeIdString == null) { throw new MissingParameterException("intf", requiredParameters);
|
if (intf == null) { throw new MissingParameterException("intf", requiredParameters);
|
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String graphType = request.getParameter("type"); if (graphType == null) { throw new MissingParameterException("type", new String[] { "type" } ); } GraphResults graphResults = new GraphResults(); String[] reports; int nodeId; String intf; GraphModel model; String view; if ("performance".equals(graphType)) { model = m_performanceModel; view = "/performance/results.jsp"; String[] requiredParameters = new String[] { "reports", "node" }; // required parameter reports reports = request.getParameterValues("reports"); if (reports == null) { throw new MissingParameterException("reports", requiredParameters); } // required parameter node String nodeIdString = request.getParameter("node"); if (nodeIdString == null) { throw new MissingParameterException("node", requiredParameters); } try { nodeId = Integer.parseInt(nodeIdString); } catch (NumberFormatException e) { throw new ServletException("Could not parse node parameter " + "into an integer", e); } // optional parameter intf intf = request.getParameter("intf"); } else if ("response".equals(graphType)) { model = m_responseTimeModel; view = "/response/results.jsp"; String[] requiredParameters = new String[] { "reports", "node", "intf" }; // required parameter reports reports = request.getParameterValues("reports"); if (reports == null) { throw new MissingParameterException("reports", requiredParameters); } // required parameter node String nodeIdString = request.getParameter("node"); if (nodeIdString == null) { throw new MissingParameterException("node", requiredParameters); } try { nodeId = Integer.parseInt(nodeIdString); } catch (NumberFormatException e) { throw new ServletException("Could not parse node parameter " + "into an integer", e); } // required parameter intf intf = request.getParameter("intf"); if (nodeIdString == null) { throw new MissingParameterException("intf", requiredParameters); } } else { throw new ServletException("Unsupported graph type \"" + graphType + "\""); } // see if the start and end time were explicitly set as params String start = request.getParameter("start"); String end = request.getParameter("end"); String relativeTime = request.getParameter("relativetime"); if ((start == null || end == null) && relativeTime != null) { // default to the first time period RelativeTimePeriod period = m_periods[0]; for (int i = 0; i < m_periods.length; i++) { if (relativeTime.equals(m_periods[i].getId())) { period = m_periods[i]; break; } } Calendar cal = new GregorianCalendar(); end = Long.toString(cal.getTime().getTime()); cal.add(period.getOffsetField(), period.getOffsetAmount()); start = Long.toString(cal.getTime().getTime()); } if (start == null || end == null) { String startMonth = request.getParameter("startMonth"); String startDate = request.getParameter("startDate"); String startYear = request.getParameter("startYear"); String startHour = request.getParameter("startHour"); String endMonth = request.getParameter("endMonth"); String endDate = request.getParameter("endDate"); String endYear = request.getParameter("endYear"); String endHour = request.getParameter("endHour"); if (startMonth == null || startDate == null || startYear == null || startHour == null || endMonth == null || endDate == null || endYear == null || endHour == null ) { throw new MissingParameterException("startMonth", new String[] { "startMonth", "startDate", "startYear", "startHour", "endMonth", "endDate", "endYear", "endHour" } ); } Calendar startCal = Calendar.getInstance(); startCal.set( Calendar.MONTH, Integer.parseInt( startMonth )); startCal.set( Calendar.DATE, Integer.parseInt( startDate )); startCal.set( Calendar.YEAR, Integer.parseInt( startYear )); startCal.set( Calendar.HOUR_OF_DAY, Integer.parseInt( startHour )); startCal.set( Calendar.MINUTE, 0 ); startCal.set( Calendar.SECOND, 0 ); startCal.set( Calendar.MILLISECOND, 0 ); Calendar endCal = Calendar.getInstance(); endCal.set( Calendar.MONTH, Integer.parseInt( endMonth )); endCal.set( Calendar.DATE, Integer.parseInt( endDate )); endCal.set( Calendar.YEAR, Integer.parseInt( endYear )); endCal.set( Calendar.HOUR_OF_DAY, Integer.parseInt( endHour )); endCal.set( Calendar.MINUTE, 0 ); endCal.set( Calendar.SECOND, 0 ); endCal.set( Calendar.MILLISECOND, 0 ); start = Long.toString(startCal.getTime().getTime()); end = Long.toString(endCal.getTime().getTime()); } // gather information for displaying around the image Date startDate = new Date(Long.parseLong(start)); Date endDate = new Date(Long.parseLong(end)); graphResults.setModel(model); graphResults.setNodeId(nodeId); graphResults.setIntf(intf); graphResults.setReports(reports); graphResults.setStart(startDate); graphResults.setEnd(endDate); graphResults.setRelativeTime(relativeTime); graphResults.setRelativeTimePeriods(m_periods); graphResults.initializeGraphs(); request.setAttribute("results", graphResults); // forward the request for proper display RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(view); dispatcher.forward(request, response); }
|
48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/20cfe0c634effd449d70c2d4bd7addbd21c11319/GraphResultsServlet.java/buggy/src/web/src/org/opennms/web/graph/GraphResultsServlet.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
15604,
12446,
766,
13,
5411,
1216,
16517,
16,
1860,
288,
3639,
514,
2667,
559,
273,
590,
18,
588,
1662,
2932,
723,
8863,
3639,
309,
261,
4660,
559,
422,
446,
13,
288,
5411,
604,
394,
10230,
14819,
2932,
723,
3113,
4766,
7734,
394,
514,
8526,
288,
315,
723,
6,
289,
11272,
3639,
289,
3639,
5601,
3447,
2667,
3447,
273,
394,
5601,
3447,
5621,
202,
780,
8526,
10557,
31,
202,
474,
11507,
31,
202,
780,
17262,
31,
202,
4137,
1488,
938,
31,
3639,
514,
1476,
31,
3639,
309,
7566,
16092,
1359,
9654,
14963,
12,
4660,
559,
3719,
288,
202,
565,
938,
273,
312,
67,
16092,
1359,
1488,
31,
202,
565,
1476,
273,
2206,
16092,
1359,
19,
4717,
18,
24926,
14432,
202,
565,
514,
8526,
1931,
2402,
273,
394,
514,
8526,
288,
315,
20195,
3113,
315,
2159,
6,
289,
31,
202,
565,
368,
1931,
1569,
10557,
202,
565,
10557,
273,
590,
18,
588,
1662,
1972,
2932,
20195,
8863,
202,
565,
309,
261,
20195,
422,
446,
13,
288,
202,
202,
12849,
394,
10230,
14819,
2932,
20195,
3113,
6862,
1082,
565,
1931,
2402,
1769,
202,
565,
289,
202,
565,
368,
1931,
1569,
756,
202,
565,
514,
11507,
780,
273,
590,
18,
588,
1662,
2932,
2159,
8863,
202,
565,
309,
261,
2159,
548,
780,
422,
446,
13,
288,
202,
202,
12849,
394,
10230,
14819,
2932,
2159,
3113,
6862,
1082,
565,
1931,
2402,
1769,
202,
565,
289,
202,
565,
775,
288,
202,
202,
2159,
548,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23611,
12,
2940,
18572,
590,
16,
15604,
12446,
766,
13,
5411,
1216,
16517,
16,
1860,
288,
3639,
514,
2667,
559,
273,
590,
18,
588,
1662,
2932,
723,
8863,
3639,
309,
261,
4660,
559,
422,
446,
13,
288,
5411,
604,
394,
10230,
14819,
2932,
723,
3113,
4766,
7734,
394,
514,
8526,
288,
315,
723,
6,
289,
11272,
3639,
289,
3639,
5601,
3447,
2667,
3447,
273,
394,
5601,
3447,
5621,
202,
780,
8526,
10557,
31,
202,
474,
11507,
31,
202,
780,
17262,
31,
202,
4137,
1488,
938,
31,
3639,
514,
1476,
31,
3639,
309,
7566,
16092,
1359,
9654,
14963,
12,
4660,
559,
3719,
288,
202,
565,
938,
273,
312,
67,
16092,
1359,
1488,
31,
202,
565,
1476,
273,
2
] |
state.result.min = min; state.result.max = max; /* QUANT, <min>, <max>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 12;
|
/* balance '{' */
|
parseTerm(CompilerState state) { char[] src = state.cpbegin; char c = src[state.cp++]; int nDigits = 2; int parenBaseCount = state.parenCount; int num, tmp; RENode term; int termStart; int ocp = state.cp; switch (c) { /* assertions and atoms */ case '^': state.result = new RENode(REOP_BOL); state.progLength++; return true; case '$': state.result = new RENode(REOP_EOL); state.progLength++; return true; case '\\': if (state.cp < state.cpend) { c = src[state.cp++]; switch (c) { /* assertion escapes */ case 'b' : state.result = new RENode(REOP_WBDRY); state.progLength++; return true; case 'B': state.result = new RENode(REOP_WNONBDRY); state.progLength++; return true; /* Decimal escape */ case '0':/* * Under 'strict' ECMA 3, we interpret \0 as NUL and don't accept octal. * However, (XXX and since Rhino doesn't have a 'strict' mode) we'll just * behave the old way for compatibility reasons. * (see http://bugzilla.mozilla.org/show_bug.cgi?id=141078) * */ /* octal escape */ num = 0; while (state.cp < state.cpend) { c = src[state.cp]; if ((c >= '0') && (c <= '7')) { state.cp++; tmp = 8 * num + (c - '0'); if (tmp > 0377) break; num = tmp; } else break; } c = (char)(num); doFlat(state, c); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': termStart = state.cp - 1; num = getDecimalValue(c, state); /* * n > 9 and > count of parentheses, * then treat as octal instead. */ if ((num > 9) && (num > state.parenCount)) { state.cp = termStart; num = 0; while (state.cp < state.cpend) { c = src[state.cp]; if ((c >= '0') && (c <= '7')) { state.cp++; tmp = 8 * num + (c - '0'); if (tmp > 0377) break; num = tmp; } else break; } c = (char)(num); doFlat(state, c); break; } /* otherwise, it's a back-reference */ state.result = new RENode(REOP_BACKREF); state.result.parenIndex = num - 1; state.progLength += 3; break; /* Control escape */ case 'f': c = 0xC; doFlat(state, c); break; case 'n': c = 0xA; doFlat(state, c); break; case 'r': c = 0xD; doFlat(state, c); break; case 't': c = 0x9; doFlat(state, c); break; case 'v': c = 0xB; doFlat(state, c); break; /* Control letter */ case 'c': if (((state.cp + 1) < state.cpend) && Character.isLetter(src[state.cp + 1])) c = (char)(src[state.cp++] & 0x1F); else { /* back off to accepting the original '\' as a literal */ --state.cp; c = '\\'; } doFlat(state, c); break; /* UnicodeEscapeSequence */ case 'u': nDigits += 2; // fall thru... /* HexEscapeSequence */ case 'x': { int n = 0; int i; for (i = 0; (i < nDigits) && (state.cp < state.cpend); i++) { int digit; c = src[state.cp++]; if (!isHex(c)) { /* * back off to accepting the original * 'u' or 'x' as a literal */ state.cp -= (i + 2); n = src[state.cp++]; break; } n = (n << 4) | unHex(c); } c = (char)(n); } doFlat(state, c); break; /* Character class escapes */ case 'd': state.result = new RENode(REOP_DIGIT); state.progLength++; break; case 'D': state.result = new RENode(REOP_NONDIGIT); state.progLength++; break; case 's': state.result = new RENode(REOP_SPACE); state.progLength++; break; case 'S': state.result = new RENode(REOP_NONSPACE); state.progLength++; break; case 'w': state.result = new RENode(REOP_ALNUM); state.progLength++; break; case 'W': state.result = new RENode(REOP_NONALNUM); state.progLength++; break; /* IdentityEscape */ default: state.result = new RENode(REOP_FLAT); state.result.chr = c; state.result.length = 1; state.result.flatIndex = state.cp - 1; state.progLength += 3; break; } break; } else { /* a trailing '\' is an error */ reportError("msg.trail.backslash", ""); return false; } case '(': { RENode result = null; termStart = state.cp; if (state.cp + 1 < state.cpend && src[state.cp] == '?' && ((c = src[state.cp + 1]) == '=' || c == '!' || c == ':')) { state.cp += 2; if (c == '=') { result = new RENode(REOP_ASSERT); /* ASSERT, <next>, ... ASSERTTEST */ state.progLength += 4; } else if (c == '!') { result = new RENode(REOP_ASSERT_NOT); /* ASSERTNOT, <next>, ... ASSERTNOTTEST */ state.progLength += 4; } } else { result = new RENode(REOP_LPAREN); /* LPAREN, <index>, ... RPAREN, <index> */ state.progLength += 6; result.parenIndex = state.parenCount++; } ++state.parenNesting; if (!parseDisjunction(state)) return false; if (state.cp == state.cpend || src[state.cp] != ')') { reportError("msg.unterm.paren", ""); return false; } ++state.cp; --state.parenNesting; if (result != null) { result.kid = state.result; state.result = result; } break; } case ')': reportError("msg.re.unmatched.right.paren", ""); return false; case '[': state.result = new RENode(REOP_CLASS); termStart = state.cp; state.result.startIndex = termStart; while (true) { if (state.cp == state.cpend) { reportError("msg.unterm.class", ""); return false; } if (src[state.cp] == '\\') state.cp++; else { if (src[state.cp] == ']') { state.result.kidlen = state.cp - termStart; break; } } state.cp++; } state.result.index = state.classCount++; /* * Call calculateBitmapSize now as we want any errors it finds * to be reported during the parse phase, not at execution. */ if (!calculateBitmapSize(state, state.result, src, termStart, state.cp++)) return false; state.progLength += 3; /* CLASS, <index> */ break; case '.': state.result = new RENode(REOP_DOT); state.progLength++; break; case '*': case '+': case '?': reportError("msg.bad.quant", String.valueOf(src[state.cp - 1])); return false; case '{': /* Treat left-curly in a non-quantifier context as an error only * if it's followed immediately by a decimal digit. * This is an Perl extension. */ if ((state.cp != state.cpend) && isDigit(src[state.cp])) { reportError("msg.bad.quant", String.valueOf(src[state.cp - 1])); return false; } // fall thru... default: state.result = new RENode(REOP_FLAT); state.result.chr = c; state.result.length = 1; state.result.flatIndex = state.cp - 1; state.progLength += 3; break; } term = state.result; boolean hasQ = false; if (state.cp < state.cpend) { switch (src[state.cp]) { case '+': state.result = new RENode(REOP_QUANT); state.result.min = 1; state.result.max = -1; /* <PLUS>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 8; hasQ = true; break; case '*': state.result = new RENode(REOP_QUANT); state.result.min = 0; state.result.max = -1; /* <STAR>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 8; hasQ = true; break; case '?': state.result = new RENode(REOP_QUANT); state.result.min = 0; state.result.max = 1; /* <OPT>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 8; hasQ = true; break; case '{': { int min = 0; int max = -1; int errIndex = state.cp++; c = src[state.cp]; if (isDigit(c)) { ++state.cp; min = getDecimalValue(c, state); c = src[state.cp]; } else { /* For Perl etc. compatibility, if a curly is not * followed by a proper digit, back off from it * being a quantifier, and chew it up as a literal * atom next time instead. */ --state.cp; return true; } state.result = new RENode(REOP_QUANT); if ((min >> 16) != 0) { reportError("msg.overlarge.max", String.valueOf(src[state.cp])); return false; } if (c == ',') { c = src[++state.cp]; if (isDigit(c)) { ++state.cp; max = getDecimalValue(c, state); c = src[state.cp]; if ((max >> 16) != 0) { reportError("msg.overlarge.max", String.valueOf(src[state.cp])); return false; } if (min > max) { reportError("msg.max.lt.min", String.valueOf(src[state.cp])); return false; } } if (max == 0) { reportError("msg.zero.quant", String.valueOf(src[state.cp])); return false; } } else { max = min; } state.result.min = min; state.result.max = max; /* QUANT, <min>, <max>, <parencount>, <parenindex>, <next> ... <ENDCHILD> */ state.progLength += 12; if (c == '}') { hasQ = true; break; } else { reportError("msg.unterm.quant", String.valueOf(src[state.cp])); return false; } } } } if (!hasQ) return true; ++state.cp; state.result.kid = term; state.result.parenIndex = parenBaseCount; state.result.parenCount = state.parenCount - parenBaseCount; if ((state.cp < state.cpend) && (src[state.cp] == '?')) { ++state.cp; state.result.greedy = false; } else state.result.greedy = true; return true; }
|
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/497a0f766cc99c8e45495dadad51256e065545d1/NativeRegExp.java/buggy/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1109,
4065,
12,
9213,
1119,
919,
13,
565,
288,
3639,
1149,
8526,
1705,
273,
919,
18,
4057,
10086,
31,
3639,
1149,
276,
273,
1705,
63,
2019,
18,
4057,
9904,
15533,
3639,
509,
290,
9537,
273,
576,
31,
3639,
509,
22146,
2171,
1380,
273,
919,
18,
13012,
1380,
31,
3639,
509,
818,
16,
1853,
31,
3639,
2438,
907,
2481,
31,
3639,
509,
2481,
1685,
31,
3639,
509,
320,
4057,
273,
919,
18,
4057,
31,
3639,
1620,
261,
71,
13,
288,
3639,
1748,
7820,
471,
9006,
1195,
3639,
648,
10731,
4278,
5411,
919,
18,
2088,
273,
394,
2438,
907,
12,
862,
3665,
67,
38,
1741,
1769,
5411,
919,
18,
14654,
1782,
9904,
31,
5411,
327,
638,
31,
3639,
648,
3365,
4278,
5411,
919,
18,
2088,
273,
394,
2438,
907,
12,
862,
3665,
67,
5842,
1769,
5411,
919,
18,
14654,
1782,
9904,
31,
5411,
327,
638,
31,
3639,
648,
3718,
4278,
5411,
309,
261,
2019,
18,
4057,
411,
919,
18,
71,
1302,
13,
288,
7734,
276,
273,
1705,
63,
2019,
18,
4057,
9904,
15533,
7734,
1620,
261,
71,
13,
288,
7734,
1748,
11240,
23802,
1195,
7734,
648,
296,
70,
11,
294,
10792,
919,
18,
2088,
273,
394,
2438,
907,
12,
862,
3665,
67,
59,
38,
6331,
61,
1769,
10792,
919,
18,
14654,
1782,
9904,
31,
10792,
327,
638,
31,
7734,
648,
296,
38,
4278,
10792,
919,
18,
2088,
273,
394,
2438,
907,
12,
862,
3665,
67,
59,
3993,
38,
6331,
61,
1769,
10792,
919,
18,
14654,
1782,
9904,
31,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
4065,
12,
9213,
1119,
919,
13,
565,
288,
3639,
1149,
8526,
1705,
273,
919,
18,
4057,
10086,
31,
3639,
1149,
276,
273,
1705,
63,
2019,
18,
4057,
9904,
15533,
3639,
509,
290,
9537,
273,
576,
31,
3639,
509,
22146,
2171,
1380,
273,
919,
18,
13012,
1380,
31,
3639,
509,
818,
16,
1853,
31,
3639,
2438,
907,
2481,
31,
3639,
509,
2481,
1685,
31,
3639,
509,
320,
4057,
273,
919,
18,
4057,
31,
3639,
1620,
261,
71,
13,
288,
3639,
1748,
7820,
471,
9006,
1195,
3639,
648,
10731,
4278,
5411,
919,
18,
2088,
273,
394,
2438,
907,
12,
862,
3665,
67,
38,
1741,
1769,
5411,
919,
18,
14654,
1782,
9904,
31,
5411,
327,
638,
31,
3639,
648,
3365,
2
] |
public static RubyClass createRegexpClass(Ruby runtime) { RubyClass regexpClass = new RegexpDefinition(runtime).getType();
|
public static RubyClass createRegexpClass(Ruby ruby) { RubyClass regexpClass = ruby.defineClass("Regexp", ruby.getClasses().getObjectClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); regexpClass.defineConstant("IGNORECASE", RubyFixnum.newFixnum(ruby, RE_OPTION_IGNORECASE)); regexpClass.defineConstant("EXTENDED", RubyFixnum.newFixnum(ruby, RE_OPTION_EXTENDED)); regexpClass.defineConstant("MULTILINE", RubyFixnum.newFixnum(ruby, RE_OPTION_MULTILINE));
|
public static RubyClass createRegexpClass(Ruby runtime) { RubyClass regexpClass = new RegexpDefinition(runtime).getType(); regexpClass.defineConstant("IGNORECASE", RubyFixnum.newFixnum(runtime, RE_OPTION_IGNORECASE)); regexpClass.defineConstant("EXTENDED", RubyFixnum.newFixnum(runtime, RE_OPTION_EXTENDED)); regexpClass.defineConstant("MULTILINE", RubyFixnum.newFixnum(runtime, RE_OPTION_MULTILINE)); return regexpClass; }
|
47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyRegexp.java/buggy/src/org/jruby/RubyRegexp.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
14621,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
7195,
797,
273,
394,
17011,
1852,
12,
9448,
2934,
588,
559,
5621,
3639,
7195,
797,
18,
11255,
6902,
2932,
20118,
13415,
3113,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
9448,
16,
2438,
67,
7425,
67,
20118,
13415,
10019,
3639,
7195,
797,
18,
11255,
6902,
2932,
4142,
22088,
3113,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
9448,
16,
2438,
67,
7425,
67,
4142,
22088,
10019,
3639,
7195,
797,
18,
11255,
6902,
2932,
12845,
30690,
3113,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
9448,
16,
2438,
67,
7425,
67,
12845,
30690,
10019,
3639,
327,
7195,
797,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
14621,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
7195,
797,
273,
394,
17011,
1852,
12,
9448,
2934,
588,
559,
5621,
3639,
7195,
797,
18,
11255,
6902,
2932,
20118,
13415,
3113,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
9448,
16,
2438,
67,
7425,
67,
20118,
13415,
10019,
3639,
7195,
797,
18,
11255,
6902,
2932,
4142,
22088,
3113,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
9448,
16,
2438,
67,
7425,
67,
4142,
22088,
10019,
3639,
7195,
797,
18,
11255,
6902,
2932,
12845,
30690,
3113,
19817,
8585,
2107,
18,
2704,
8585,
2107,
12,
9448,
16,
2438,
67,
7425,
67,
12845,
30690,
10019,
3639,
327,
7195,
797,
31,
565,
289,
2,
-100,
-100
] |
return js_NaN_date_str;
|
return jsFunction_NaN_date_str;
|
public String jsFunction_toUTCString() { if (this.date != this.date) return js_NaN_date_str; StringBuffer result = new StringBuffer(60); String dateStr = Integer.toString(DateFromTime(this.date)); String hourStr = Integer.toString(HourFromTime(this.date)); String minStr = Integer.toString(MinFromTime(this.date)); String secStr = Integer.toString(SecFromTime(this.date)); int year = YearFromTime(this.date); String yearStr = Integer.toString(year > 0 ? year : -year); result.append(days[WeekDay(this.date)]); result.append(", "); if (dateStr.length() == 1) result.append("0"); result.append(dateStr); result.append(" "); result.append(months[MonthFromTime(this.date)]); if (year < 0) result.append(" -"); else result.append(" "); int i; for (i = yearStr.length(); i < 4; i++) result.append("0"); result.append(yearStr); if (hourStr.length() == 1) result.append(" 0"); else result.append(" "); result.append(hourStr); if (minStr.length() == 1) result.append(":0"); else result.append(":"); result.append(minStr); if (secStr.length() == 1) result.append(":0"); else result.append(":"); result.append(secStr); result.append(" GMT"); return result.toString(); }
|
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/5af1999afa2517f3fdd455bd42c304be785b5b59/NativeDate.java/buggy/src/org/mozilla/javascript/NativeDate.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
3828,
2083,
67,
869,
11471,
780,
1435,
288,
3639,
309,
261,
2211,
18,
712,
480,
333,
18,
712,
13,
5411,
327,
3828,
2083,
67,
21172,
67,
712,
67,
701,
31,
3639,
6674,
563,
273,
394,
6674,
12,
4848,
1769,
3639,
514,
1509,
1585,
273,
2144,
18,
10492,
12,
1626,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
514,
6126,
1585,
273,
2144,
18,
10492,
12,
13433,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
514,
1131,
1585,
273,
2144,
18,
10492,
12,
2930,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
514,
1428,
1585,
273,
2144,
18,
10492,
12,
2194,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
509,
3286,
273,
16666,
1265,
950,
12,
2211,
18,
712,
1769,
3639,
514,
3286,
1585,
273,
2144,
18,
10492,
12,
6874,
405,
374,
692,
3286,
294,
300,
6874,
1769,
3639,
563,
18,
6923,
12,
9810,
63,
6630,
4245,
12,
2211,
18,
712,
13,
19226,
3639,
563,
18,
6923,
2932,
16,
315,
1769,
3639,
309,
261,
712,
1585,
18,
2469,
1435,
422,
404,
13,
5411,
563,
18,
6923,
2932,
20,
8863,
3639,
563,
18,
6923,
12,
712,
1585,
1769,
3639,
563,
18,
6923,
2932,
315,
1769,
3639,
563,
18,
6923,
12,
27584,
63,
5445,
1265,
950,
12,
2211,
18,
712,
13,
19226,
3639,
309,
261,
6874,
411,
374,
13,
5411,
563,
18,
6923,
2932,
300,
8863,
3639,
469,
5411,
563,
18,
6923,
2932,
315,
1769,
3639,
509,
277,
31,
3639,
364,
261,
77,
273,
3286,
1585,
18,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
3828,
2083,
67,
869,
11471,
780,
1435,
288,
3639,
309,
261,
2211,
18,
712,
480,
333,
18,
712,
13,
5411,
327,
3828,
2083,
67,
21172,
67,
712,
67,
701,
31,
3639,
6674,
563,
273,
394,
6674,
12,
4848,
1769,
3639,
514,
1509,
1585,
273,
2144,
18,
10492,
12,
1626,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
514,
6126,
1585,
273,
2144,
18,
10492,
12,
13433,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
514,
1131,
1585,
273,
2144,
18,
10492,
12,
2930,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
514,
1428,
1585,
273,
2144,
18,
10492,
12,
2194,
1265,
950,
12,
2211,
18,
712,
10019,
3639,
509,
3286,
273,
16666,
1265,
950,
12,
2211,
2
] |
public static URL getResource(String resourceName, Class callingClass) {
|
public static URL getResource(final String resourceName, final Class callingClass) {
|
public static URL getResource(String resourceName, Class callingClass) { URL url = null; url = Thread.currentThread().getContextClassLoader().getResource(resourceName); if (url == null) { url = ClassHelper.class.getClassLoader().getResource(resourceName); } if (url == null) { url = callingClass.getClassLoader().getResource(resourceName); } return url; }
|
2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/474b57065fd42f121b8743a207c223c19f72c625/ClassHelper.java/clean/mule/src/java/org/mule/util/ClassHelper.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1976,
5070,
12,
780,
9546,
16,
1659,
4440,
797,
13,
565,
288,
3639,
1976,
880,
273,
446,
31,
3639,
880,
273,
4884,
18,
2972,
3830,
7675,
29120,
7805,
7675,
588,
1420,
12,
3146,
461,
1769,
3639,
309,
261,
718,
422,
446,
13,
288,
5411,
880,
273,
1659,
2276,
18,
1106,
18,
588,
7805,
7675,
588,
1420,
12,
3146,
461,
1769,
3639,
289,
3639,
309,
261,
718,
422,
446,
13,
288,
5411,
880,
273,
4440,
797,
18,
588,
7805,
7675,
588,
1420,
12,
3146,
461,
1769,
3639,
289,
3639,
327,
880,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1976,
5070,
12,
780,
9546,
16,
1659,
4440,
797,
13,
565,
288,
3639,
1976,
880,
273,
446,
31,
3639,
880,
273,
4884,
18,
2972,
3830,
7675,
29120,
7805,
7675,
588,
1420,
12,
3146,
461,
1769,
3639,
309,
261,
718,
422,
446,
13,
288,
5411,
880,
273,
1659,
2276,
18,
1106,
18,
588,
7805,
7675,
588,
1420,
12,
3146,
461,
1769,
3639,
289,
3639,
309,
261,
718,
422,
446,
13,
288,
5411,
880,
273,
4440,
797,
18,
588,
7805,
7675,
588,
1420,
12,
3146,
461,
1769,
3639,
289,
3639,
327,
880,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
stringBuffer.append(TEXT_399);
|
stringBuffer.append(TEXT_341);
|
public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); final GenCommonBase genElement = (GenCommonBase) ((Object[]) argument)[0];final GenChildLabelNode genChildNode = (GenChildLabelNode)genElement;GenNode genHost = genChildNode;GenNode genNode = genChildNode; /*var used by componentEditPolicy.javajetinc*/GenClass underlyingMetaClass = genHost.getDomainMetaClass();GenDiagram genDiagram = genChildNode.getDiagram();final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1];LabelModelFacet labelModelFacet = genChildNode.getLabelModelFacet();final boolean isReadOnly = genChildNode.isLabelReadOnly(); stringBuffer.append(TEXT_1); String copyrightText = genDiagram.getEditorGen().getCopyrightText();if (copyrightText != null && copyrightText.trim().length() > 0) { stringBuffer.append(TEXT_2); stringBuffer.append(copyrightText.replaceAll("\n", "\n * ")); stringBuffer.append(TEXT_3); } stringBuffer.append(TEXT_4); stringBuffer.append(TEXT_5); class FeatureGetAccessorHelper { /** * @param containerName the name of the container * @param feature the feature whose value is in interest * @param containerMetaClass the <code>GenClass</code> of the container, or <code>null</code>, if the container is declared as an <code>EObject</code>. * @param needsCastToResultType whether the cast to the result type is required (this parameter is only used if the <code>EClass</code> this feature belongs to is an external interface). */ public void appendFeatureValueGetter(String containerName, GenFeature feature, GenClass containerMetaClass, boolean needsCastToResultType) { if (feature.getGenClass().isExternalInterface()) { boolean needsCastToEObject = containerMetaClass != null && containerMetaClass.isExternalInterface(); if (needsCastToResultType) { stringBuffer.append(TEXT_6); stringBuffer.append(importManager.getImportedName(feature.isListType() ? "java.util.Collection" : feature.getTypeGenClass().getQualifiedInterfaceName())); stringBuffer.append(TEXT_7); } if (needsCastToEObject) { stringBuffer.append(TEXT_8); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_9); } stringBuffer.append(containerName); if (needsCastToEObject) { stringBuffer.append(TEXT_10); } stringBuffer.append(TEXT_11); stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_12); stringBuffer.append(feature.getFeatureAccessorName()); stringBuffer.append(TEXT_13); if (needsCastToResultType) { stringBuffer.append(TEXT_14); } } else { boolean needsCastToFeatureGenType = containerMetaClass == null || containerMetaClass.isExternalInterface(); if (needsCastToFeatureGenType) { stringBuffer.append(TEXT_15); stringBuffer.append(importManager.getImportedName(feature.getGenClass().getQualifiedInterfaceName())); stringBuffer.append(TEXT_16); } stringBuffer.append(containerName); if (needsCastToFeatureGenType) { stringBuffer.append(TEXT_17); } stringBuffer.append(TEXT_18); stringBuffer.append(feature.getGetAccessor()); stringBuffer.append(TEXT_19); } }}final FeatureGetAccessorHelper myFeatureGetAccessorHelper = new FeatureGetAccessorHelper(); stringBuffer.append(TEXT_20); importManager.emitPackageStatement(stringBuffer);importManager.registerInnerClass("TreeEditPartAdapter");importManager.addImport("org.eclipse.gef.EditPolicy");importManager.addImport("org.eclipse.gef.Request");importManager.addImport("org.eclipse.gmf.runtime.notation.View");importManager.addImport("org.eclipse.gmf.runtime.notation.NotationPackage");importManager.addImport("java.util.List");importManager.markImportLocation(stringBuffer); stringBuffer.append(TEXT_21); stringBuffer.append(genChildNode.getEditPartClassName()); stringBuffer.append(TEXT_22); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")); stringBuffer.append(TEXT_23); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); stringBuffer.append(TEXT_24); {GenCommonBase genCommonBase = genChildNode; stringBuffer.append(TEXT_25); stringBuffer.append(TEXT_26); stringBuffer.append(genCommonBase.getVisualID()); stringBuffer.append(TEXT_27); } stringBuffer.append(TEXT_28); stringBuffer.append(TEXT_29); if (!isReadOnly) { stringBuffer.append(TEXT_30); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); stringBuffer.append(TEXT_31); } stringBuffer.append(TEXT_32); stringBuffer.append(genChildNode.getEditPartClassName()); stringBuffer.append(TEXT_33); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); stringBuffer.append(TEXT_34); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); stringBuffer.append(TEXT_35); stringBuffer.append(TEXT_36); stringBuffer.append(TEXT_37); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_38); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_39); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_40); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_41); String resolvedSemanticElement = "(" + importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()) + ") getDiagramNode().getElement()"; final String primaryView = "getDiagramNode()"; if (!isReadOnly) { String editPatternCode = "EDIT_PATTERN"; //declared in labelText.javajetinc, used in directEditCommand.jetinc. stringBuffer.append(TEXT_42); stringBuffer.append(TEXT_43); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_44); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.DirectEditPolicy")); stringBuffer.append(TEXT_45); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_46); stringBuffer.append(TEXT_47); stringBuffer.append(TEXT_48); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_49); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_50); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_51); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_52); stringBuffer.append(editPatternCode); stringBuffer.append(TEXT_53); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_54); stringBuffer.append(importManager.getImportedName("java.text.ParseException")); stringBuffer.append(TEXT_55); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_56); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_57); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_58); stringBuffer.append(primaryView); stringBuffer.append(TEXT_59); if (labelModelFacet instanceof FeatureLabelModelFacet) { GenFeature featureToSet = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); EStructuralFeature ecoreFeature = featureToSet.getEcoreFeature(); stringBuffer.append(TEXT_60); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_61); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_62); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_63); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_64); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_65); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_66); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_67); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_68); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_69); stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_70); stringBuffer.append(featureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_71); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_72); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_73); if (ecoreFeature.isMany()) { stringBuffer.append(TEXT_74); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_75); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_76); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_77); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_78); stringBuffer.append(featureToSet.getAccessorName()); stringBuffer.append(TEXT_79); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_80); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_81); } else { stringBuffer.append(TEXT_82); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_83); } stringBuffer.append(TEXT_84); } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); stringBuffer.append(TEXT_85); stringBuffer.append(metaFeatures.size()); stringBuffer.append(TEXT_86); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_87); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_88); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_89); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_90); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_91); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_92); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_93); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_94); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_95); boolean haveDeclaredValues = false; for(int i = 0; i < metaFeatures.size(); i++) { GenFeature nextFeatureToSet = (GenFeature) metaFeatures.get(i); EStructuralFeature nextEcoreFeature = nextFeatureToSet.getEcoreFeature(); stringBuffer.append(TEXT_96); if (i == 0) { stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_97); } stringBuffer.append(TEXT_98); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_99); stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_100); stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_101); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_102); stringBuffer.append(i); stringBuffer.append(TEXT_103); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_104); if (nextEcoreFeature.isMany()) { stringBuffer.append(TEXT_105); if (!haveDeclaredValues) { haveDeclaredValues = true; stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_106); } stringBuffer.append(TEXT_107); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_108); stringBuffer.append(nextFeatureToSet.getAccessorName()); stringBuffer.append(TEXT_109); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_110); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_111); } else { stringBuffer.append(TEXT_112); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_113); } } stringBuffer.append(TEXT_114); } stringBuffer.append(TEXT_115); } stringBuffer.append(TEXT_116); stringBuffer.append(TEXT_117); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_118); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); stringBuffer.append(TEXT_119); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_120); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); stringBuffer.append(TEXT_121); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_122); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_123); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_124); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_125); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_126); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_127); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_128); {TypeModelFacet facet = genNode.getModelFacet();GenFeature childFeature = facet.getChildMetaFeature();GenFeature containmentFeature = facet.getContainmentMetaFeature();if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { stringBuffer.append(TEXT_129); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_130); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_131); if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_132); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_133); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_134); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_135); } else { stringBuffer.append(TEXT_136); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_137); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_138); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_139); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_140); } if (childFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_141); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_142); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_143); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_144); } else { stringBuffer.append(TEXT_145); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_146); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_147); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_148); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_149); } stringBuffer.append(TEXT_150); } else { if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_151); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_152); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_153); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_154); } else { stringBuffer.append(TEXT_155); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_156); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_157); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_158); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_159); }} stringBuffer.append(TEXT_160); } /*restrict local vars used in component edit policy*/ stringBuffer.append(TEXT_161); if (!isReadOnly) { stringBuffer.append(TEXT_162); stringBuffer.append(TEXT_163); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); stringBuffer.append(TEXT_164); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); stringBuffer.append(TEXT_165); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); stringBuffer.append(TEXT_166); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); stringBuffer.append(TEXT_167); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); stringBuffer.append(TEXT_168); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); stringBuffer.append(TEXT_169); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); stringBuffer.append(TEXT_170); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); stringBuffer.append(TEXT_171); } stringBuffer.append(TEXT_172); stringBuffer.append(TEXT_173); /*genFeature.getObjectType() throws NPE on primitive types. This is a workaround. */HashMap primitiveTypeToWrapperClassName = new HashMap();primitiveTypeToWrapperClassName.put(Boolean.TYPE, "Boolean");primitiveTypeToWrapperClassName.put(Byte.TYPE, "Byte");primitiveTypeToWrapperClassName.put(Character.TYPE, "Character");primitiveTypeToWrapperClassName.put(Double.TYPE, "Double");primitiveTypeToWrapperClassName.put(Float.TYPE, "Float");primitiveTypeToWrapperClassName.put(Integer.TYPE, "Integer");primitiveTypeToWrapperClassName.put(Long.TYPE, "Long");primitiveTypeToWrapperClassName.put(Short.TYPE, "Short");String viewPattern = null;String editPattern = null;if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet featureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; viewPattern = featureLabelModelFacet.getViewPattern(); if (viewPattern == null || viewPattern.length() == 0) { viewPattern = "{0}"; } editPattern = featureLabelModelFacet.getEditPattern(); if (editPattern == null || editPattern.length() == 0) { editPattern = "{0}"; }} else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; viewPattern = compositeFeatureLabelModelFacet.getViewPattern(); if (viewPattern == null || viewPattern.length() == 0) { StringBuffer patternBuffer = new StringBuffer(); for(int i = 0; i < compositeFeatureLabelModelFacet.getMetaFeatures().size(); i++) { patternBuffer.append("{").append(i).append("} "); } viewPattern = patternBuffer.toString().trim(); } editPattern = compositeFeatureLabelModelFacet.getEditPattern(); if (editPattern == null || editPattern.length() == 0) { StringBuffer patternBuffer = new StringBuffer(); for(int i = 0; i < compositeFeatureLabelModelFacet.getMetaFeatures().size(); i++) { patternBuffer.append("{").append(i).append("} "); } editPattern = patternBuffer.toString().trim(); }} stringBuffer.append(TEXT_174); stringBuffer.append(viewPattern); stringBuffer.append(TEXT_175); stringBuffer.append(editPattern); stringBuffer.append(TEXT_176); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_177); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_178); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_179); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_180); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_181); if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet featureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; GenFeature feature = featureLabelModelFacet.getMetaFeature(); if (!feature.isPrimitiveType()) { stringBuffer.append(TEXT_182); myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); stringBuffer.append(TEXT_183); } stringBuffer.append(TEXT_184); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_185); if (feature.isPrimitiveType()) { stringBuffer.append(TEXT_186); stringBuffer.append(primitiveTypeToWrapperClassName.get(feature.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); stringBuffer.append(TEXT_187); } myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); if (feature.isPrimitiveType()) { stringBuffer.append(TEXT_188); } stringBuffer.append(TEXT_189); } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; stringBuffer.append(TEXT_190); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_191); for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { GenFeature next = (GenFeature) it.next(); if (next.isPrimitiveType()) { stringBuffer.append(TEXT_192); stringBuffer.append(primitiveTypeToWrapperClassName.get(next.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); stringBuffer.append(TEXT_193); } myFeatureGetAccessorHelper.appendFeatureValueGetter("element", next, underlyingMetaClass, false); if (next.isPrimitiveType()) { stringBuffer.append(TEXT_194); } if (it.hasNext()) { stringBuffer.append(TEXT_195); } } stringBuffer.append(TEXT_196); } else { stringBuffer.append(TEXT_197); } stringBuffer.append(TEXT_198); stringBuffer.append(TEXT_199); boolean isFixedFontSetInFigure;{ StyleAttributes styleAttributes = (genElement.getViewmap() == null) ? null : (StyleAttributes)genElement.getViewmap().find(StyleAttributes.class); isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont();} stringBuffer.append(TEXT_200); if (!isFixedFontSetInFigure) { stringBuffer.append(TEXT_201); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_202); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_203); stringBuffer.append(primaryView); stringBuffer.append(TEXT_204); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_205); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_206); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_207); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_208); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_209); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_210); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); stringBuffer.append(TEXT_211); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_212); } stringBuffer.append(TEXT_213); if (!isFixedFontSetInFigure) { stringBuffer.append(TEXT_214); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_215); } stringBuffer.append(TEXT_216); stringBuffer.append(TEXT_217); stringBuffer.append(TEXT_218); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_219); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_220); stringBuffer.append(primaryView); stringBuffer.append(TEXT_221); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_222); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_223); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_224); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_225); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_226); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image")); stringBuffer.append(TEXT_227); if (genChildNode.isLabelElementIcon()) { stringBuffer.append(TEXT_228); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.resource.ImageDescriptor")); stringBuffer.append(TEXT_229); stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); stringBuffer.append(TEXT_230); } stringBuffer.append(TEXT_231); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.TreeEditPart")); stringBuffer.append(TEXT_232); /*@ include file="adapters/propertySource.javajetinc"*/ stringBuffer.append(TEXT_233); stringBuffer.append(TEXT_234); stringBuffer.append(TEXT_235); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_236); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_237); stringBuffer.append(TEXT_238); stringBuffer.append(TEXT_239); stringBuffer.append(importManager.getImportedName("java.util.HashMap")); stringBuffer.append(TEXT_240); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_241); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_242); stringBuffer.append(TEXT_243); stringBuffer.append(TEXT_244); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_245); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_246); stringBuffer.append(TEXT_247); stringBuffer.append(TEXT_248); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_249); if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet compositeFeatureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { GenFeature next = (GenFeature) it.next(); stringBuffer.append(TEXT_250); stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_251); stringBuffer.append(next.getFeatureAccessorName()); stringBuffer.append(TEXT_252); }} stringBuffer.append(TEXT_253); stringBuffer.append(TEXT_254); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_255); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_256); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_257); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_258); stringBuffer.append(TEXT_259); stringBuffer.append(TEXT_260); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_261); final Viewmap viewmap = genChildNode.getViewmap(); stringBuffer.append(TEXT_262); final String figureQualifiedClassName;if (viewmap instanceof ParentAssignedViewmap) { ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; figureQualifiedClassName = parentAssignedViewmap.getFigureQualifiedClassName() == null ? "org.eclipse.draw2d.IFigure" : parentAssignedViewmap.getFigureQualifiedClassName();} else if (viewmap instanceof FigureViewmap) { String figureQualifiedClassNameCandidate = ((FigureViewmap) viewmap).getFigureQualifiedClassName(); if (figureQualifiedClassNameCandidate == null || figureQualifiedClassNameCandidate.trim().length() == 0) { figureQualifiedClassName = "org.eclipse.draw2d.Label"; } else { figureQualifiedClassName = figureQualifiedClassNameCandidate; }} else if (viewmap instanceof SnippetViewmap) { figureQualifiedClassName = "org.eclipse.draw2d.IFigure";} else if (viewmap instanceof InnerClassViewmap) { figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName();} else { figureQualifiedClassName = "org.eclipse.draw2d.IFigure";}final String figureImportedName;if (viewmap instanceof InnerClassViewmap) { figureImportedName = figureQualifiedClassName; //do not import inner class} else { figureImportedName = importManager.getImportedName(figureQualifiedClassName);}if (viewmap instanceof ParentAssignedViewmap) { final ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; stringBuffer.append(TEXT_263); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); stringBuffer.append(TEXT_264); stringBuffer.append((parentAssignedViewmap.getSetterName() == null ? "setLabel" : parentAssignedViewmap.getSetterName())); stringBuffer.append(TEXT_265); } else { stringBuffer.append(TEXT_266); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_267); if (viewmap instanceof FigureViewmap) { stringBuffer.append(TEXT_268); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_269); } // instanceof FigureViewmap else if (viewmap instanceof SnippetViewmap) { stringBuffer.append(TEXT_270); stringBuffer.append(((SnippetViewmap) viewmap).getBody()); stringBuffer.append(TEXT_271); } // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter else if (viewmap instanceof InnerClassViewmap) { stringBuffer.append(TEXT_272); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_273); } stringBuffer.append(TEXT_274); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); stringBuffer.append(TEXT_275); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_276); if ("org.eclipse.draw2d.Label".equals(figureQualifiedClassName) || viewmap instanceof InnerClassViewmap) { stringBuffer.append(TEXT_277); } else { stringBuffer.append(TEXT_278); } stringBuffer.append(TEXT_279); } /*not parent-assigned*/ stringBuffer.append(TEXT_280); if (!"org.eclipse.draw2d.Label".equals(figureQualifiedClassName) && viewmap instanceof InnerClassViewmap==false) { stringBuffer.append(TEXT_281); } stringBuffer.append(TEXT_282); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); stringBuffer.append(TEXT_283); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); stringBuffer.append(TEXT_284); String labelSetterName = "setLabel"; // same assumption in NodeEditPartString labelFigureClassName = "org.eclipse.draw2d.IFigure";if (viewmap instanceof ParentAssignedViewmap) { ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; if (parentAssignedViewmap.getSetterName() != null) { labelSetterName = parentAssignedViewmap.getSetterName(); } if (parentAssignedViewmap.getFigureQualifiedClassName() != null) { labelFigureClassName = parentAssignedViewmap.getFigureQualifiedClassName(); }} // FIXME perhaps, there's no sense to have setLabel for any other viewmap than ParentAssigned? stringBuffer.append(TEXT_285); stringBuffer.append(labelSetterName); stringBuffer.append(TEXT_286); stringBuffer.append(importManager.getImportedName(labelFigureClassName)); stringBuffer.append(TEXT_287); if ("org.eclipse.draw2d.Label".equals(labelFigureClassName)) { stringBuffer.append(TEXT_288); } else { stringBuffer.append(TEXT_289); } stringBuffer.append(TEXT_290); if (viewmap instanceof InnerClassViewmap) { String classBody = ((InnerClassViewmap) viewmap).getClassBody(); stringBuffer.append(TEXT_291); stringBuffer.append(classBody); stringBuffer.append(TEXT_292); if (classBody.indexOf("DPtoLP") != -1) { stringBuffer.append(TEXT_293); } } stringBuffer.append(TEXT_294); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.tree.BaseTreeEditPart")); stringBuffer.append(TEXT_295); stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); stringBuffer.append(TEXT_296); stringBuffer.append(TEXT_297); stringBuffer.append(TEXT_298); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_299); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); stringBuffer.append(TEXT_300); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_301); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); stringBuffer.append(TEXT_302); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_303); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_304); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_305); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_306); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_307); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_308); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_309); {TypeModelFacet facet = genNode.getModelFacet();GenFeature childFeature = facet.getChildMetaFeature();GenFeature containmentFeature = facet.getContainmentMetaFeature();if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { stringBuffer.append(TEXT_310); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_311); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_312); if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_313); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_314); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_315); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_316); } else { stringBuffer.append(TEXT_317); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_318); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_319); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_320); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_321); } if (childFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_322); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_323); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_324); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_325); } else { stringBuffer.append(TEXT_326); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_327); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_328); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_329); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_330); } stringBuffer.append(TEXT_331); } else { if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_332); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_333); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_334); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_335); } else { stringBuffer.append(TEXT_336); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_337); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_338); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_339); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_340); }} stringBuffer.append(TEXT_341); } /*restrict local vars used in component edit policy*/ if (!isReadOnly) { String editPatternCode = "EDIT_PATTERN"; //declared in labelText.javajetinc, used in directEditCommand.jetinc. stringBuffer.append(TEXT_342); stringBuffer.append(TEXT_343); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_344); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.DirectEditPolicy")); stringBuffer.append(TEXT_345); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_346); stringBuffer.append(TEXT_347); stringBuffer.append(TEXT_348); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_349); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_350); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_351); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_352); stringBuffer.append(editPatternCode); stringBuffer.append(TEXT_353); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_354); stringBuffer.append(importManager.getImportedName("java.text.ParseException")); stringBuffer.append(TEXT_355); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_356); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_357); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_358); stringBuffer.append(primaryView); stringBuffer.append(TEXT_359); if (labelModelFacet instanceof FeatureLabelModelFacet) { GenFeature featureToSet = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); EStructuralFeature ecoreFeature = featureToSet.getEcoreFeature(); stringBuffer.append(TEXT_360); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_361); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_362); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_363); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_364); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_365); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_366); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_367); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_368); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_369); stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_370); stringBuffer.append(featureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_371); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_372); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_373); if (ecoreFeature.isMany()) { stringBuffer.append(TEXT_374); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_375); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_376); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_377); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_378); stringBuffer.append(featureToSet.getAccessorName()); stringBuffer.append(TEXT_379); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_380); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_381); } else { stringBuffer.append(TEXT_382); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_383); } stringBuffer.append(TEXT_384); } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); stringBuffer.append(TEXT_385); stringBuffer.append(metaFeatures.size()); stringBuffer.append(TEXT_386); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_387); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_388); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_389); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_390); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_391); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_392); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_393); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_394); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_395); boolean haveDeclaredValues = false; for(int i = 0; i < metaFeatures.size(); i++) { GenFeature nextFeatureToSet = (GenFeature) metaFeatures.get(i); EStructuralFeature nextEcoreFeature = nextFeatureToSet.getEcoreFeature(); stringBuffer.append(TEXT_396); if (i == 0) { stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_397); } stringBuffer.append(TEXT_398); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_399); stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_400); stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_401); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_402); stringBuffer.append(i); stringBuffer.append(TEXT_403); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_404); if (nextEcoreFeature.isMany()) { stringBuffer.append(TEXT_405); if (!haveDeclaredValues) { haveDeclaredValues = true; stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_406); } stringBuffer.append(TEXT_407); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_408); stringBuffer.append(nextFeatureToSet.getAccessorName()); stringBuffer.append(TEXT_409); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_410); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_411); } else { stringBuffer.append(TEXT_412); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_413); } } stringBuffer.append(TEXT_414); } stringBuffer.append(TEXT_415); } stringBuffer.append(TEXT_416); stringBuffer.append(TEXT_417); stringBuffer.append(TEXT_418); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.TreeDirectEditManager")); stringBuffer.append(TEXT_419); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); stringBuffer.append(TEXT_420); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); stringBuffer.append(TEXT_421); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.TreeDirectEditManager")); stringBuffer.append(TEXT_422); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.TreeDirectEditManager")); stringBuffer.append(TEXT_423); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); stringBuffer.append(TEXT_424); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); stringBuffer.append(TEXT_425); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); stringBuffer.append(TEXT_426); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.TreeItem")); stringBuffer.append(TEXT_427); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.TreeItem")); stringBuffer.append(TEXT_428); stringBuffer.append(TEXT_429); stringBuffer.append(TEXT_430); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_431); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_432); if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet compositeFeatureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { GenFeature next = (GenFeature) it.next(); stringBuffer.append(TEXT_433); stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_434); stringBuffer.append(next.getFeatureAccessorName()); stringBuffer.append(TEXT_435); }} stringBuffer.append(TEXT_436); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_437); stringBuffer.append(importManager.getImportedName("java.util.Collections")); stringBuffer.append(TEXT_438); importManager.emitSortedImports(); stringBuffer.append(TEXT_439); return stringBuffer.toString(); }
|
7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/de70953cec74fbba0ed0cfbed37c36c0b594b3db/ChildNodeEditPartGenerator.java/clean/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/ChildNodeEditPartGenerator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
12,
921,
1237,
13,
225,
288,
565,
727,
6674,
533,
1892,
273,
394,
6674,
5621,
565,
727,
10938,
6517,
2171,
3157,
1046,
273,
261,
7642,
6517,
2171,
13,
14015,
921,
63,
5717,
1237,
25146,
20,
15533,
6385,
10938,
1763,
2224,
907,
3157,
25550,
273,
261,
7642,
1763,
2224,
907,
13,
4507,
1046,
31,
7642,
907,
3157,
2594,
273,
3157,
25550,
31,
7642,
907,
3157,
907,
273,
3157,
25550,
31,
202,
20308,
1401,
1399,
635,
1794,
4666,
2582,
18,
6290,
78,
278,
9523,
5549,
7642,
797,
6808,
2781,
797,
273,
3157,
2594,
18,
588,
3748,
2781,
797,
5621,
7642,
14058,
1940,
3157,
14058,
1940,
273,
3157,
25550,
18,
588,
14058,
1940,
5621,
6385,
6164,
2610,
17175,
1930,
1318,
273,
261,
5010,
2610,
17175,
13,
14015,
921,
63,
5717,
1237,
25146,
21,
15533,
2224,
1488,
11137,
1433,
1488,
11137,
273,
3157,
25550,
18,
588,
2224,
1488,
11137,
5621,
6385,
1250,
26249,
273,
3157,
25550,
18,
291,
2224,
12066,
5621,
565,
533,
1892,
18,
6923,
12,
5151,
67,
21,
1769,
565,
514,
22245,
1528,
273,
3157,
14058,
1940,
18,
588,
6946,
7642,
7675,
588,
2951,
4083,
1528,
5621,
430,
261,
29187,
1528,
480,
446,
597,
22245,
1528,
18,
5290,
7675,
2469,
1435,
405,
374,
13,
288,
565,
533,
1892,
18,
6923,
12,
5151,
67,
22,
1769,
565,
533,
1892,
18,
6923,
12,
29187,
1528,
18,
2079,
1595,
31458,
82,
3113,
1548,
82,
380,
9369,
1769,
565,
533,
1892,
18,
6923,
12,
5151,
67,
23,
1769,
565,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
12,
921,
1237,
13,
225,
288,
565,
727,
6674,
533,
1892,
273,
394,
6674,
5621,
565,
727,
10938,
6517,
2171,
3157,
1046,
273,
261,
7642,
6517,
2171,
13,
14015,
921,
63,
5717,
1237,
25146,
20,
15533,
6385,
10938,
1763,
2224,
907,
3157,
25550,
273,
261,
7642,
1763,
2224,
907,
13,
4507,
1046,
31,
7642,
907,
3157,
2594,
273,
3157,
25550,
31,
7642,
907,
3157,
907,
273,
3157,
25550,
31,
202,
20308,
1401,
1399,
635,
1794,
4666,
2582,
18,
6290,
78,
278,
9523,
5549,
7642,
797,
6808,
2781,
797,
273,
3157,
2594,
18,
588,
3748,
2781,
797,
5621,
7642,
14058,
1940,
3157,
14058,
1940,
273,
3157,
25550,
18,
588,
14058,
1940,
5621,
6385,
6164,
2610,
17175,
2
] |
if (explosionESet) result.append(explosion); else result.append("<unset>");
|
if (explosionESet) result.append(explosion); else result.append("<unset>");
|
public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (explosion: "); if (explosionESet) result.append(explosion); else result.append("<unset>"); result.append(", titlePosition: "); if (titlePositionESet) result.append(titlePosition); else result.append("<unset>"); result.append(", leaderLineStyle: "); if (leaderLineStyleESet) result.append(leaderLineStyle); else result.append("<unset>"); result.append(", leaderLineLength: "); if (leaderLineLengthESet) result.append(leaderLineLength); else result.append("<unset>"); result.append(')'); return result.toString(); }
|
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/PieSeriesImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/type/impl/PieSeriesImpl.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,
261,
2749,
383,
87,
285,
30,
315,
1769,
3639,
309,
261,
2749,
383,
87,
285,
41,
694,
13,
563,
18,
6923,
12,
2749,
383,
87,
285,
1769,
469,
563,
18,
6923,
2932,
32,
18579,
2984,
1769,
3639,
563,
18,
6923,
2932,
16,
2077,
2555,
30,
315,
1769,
3639,
309,
261,
2649,
2555,
41,
694,
13,
563,
18,
6923,
12,
2649,
2555,
1769,
469,
563,
18,
6923,
2932,
32,
18579,
2984,
1769,
3639,
563,
18,
6923,
2932,
16,
10302,
1670,
2885,
30,
315,
1769,
3639,
309,
261,
27863,
1670,
2885,
41,
694,
13,
563,
18,
6923,
12,
27863,
1670,
2885,
1769,
469,
563,
18,
6923,
2932,
32,
18579,
2984,
1769,
3639,
563,
18,
6923,
2932,
16,
10302,
1670,
1782,
30,
315,
1769,
3639,
309,
261,
27863,
1670,
1782,
41,
694,
13,
563,
18,
6923,
12,
27863,
1670,
1782,
1769,
469,
563,
18,
6923,
2932,
32,
18579,
2984,
1769,
3639,
563,
18,
6923,
2668,
2506,
1769,
3639,
327,
563,
18,
10492,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,
261,
2749,
383,
87,
285,
30,
315,
1769,
3639,
309,
261,
2749,
383,
87,
285,
41,
694,
13,
563,
18,
6923,
12,
2749,
383,
87,
285,
1769,
469,
563,
18,
6923,
2932,
32,
18579,
2984,
1769,
3639,
563,
18,
6923,
2932,
16,
2077,
2555,
30,
315,
1769,
3639,
309,
261,
2649,
2555,
41,
694,
13,
563,
18,
6923,
12,
2649,
2555,
1769,
469,
563,
18,
6923,
2932,
32,
18579,
2984,
1769,
3639,
563,
18,
6923,
2932,
16,
10302,
1670,
2885,
30,
315,
1769,
3639,
2
] |
return new OutboundVariable("var " + varName + " = null;", varName);
|
return new OutboundVariable("var " + varName + "=null;", varName);
|
public OutboundVariable convertOutbound(Object object, OutboundContext converted) throws ConversionException { if (object == null) { String varName = converted.getNextVariableName(); return new OutboundVariable("var " + varName + " = null;", varName); //$NON-NLS-1$ //$NON-NLS-2$ } // Check to see if we have done this one already OutboundVariable ov = converted.get(object); if (ov != null) { // So the object as been converted already, we just need to refer to it. return new OutboundVariable("", ov.getAssignCode()); //$NON-NLS-1$ } // So we will have to create one for ourselves ov = new OutboundVariable(); String varName = converted.getNextVariableName(); ov.setAssignCode(varName); // Save this for another time so we don't recurse into it converted.put(object, ov); Converter converter = getConverter(object); if (converter == null) { log.error(Messages.getString("DefaultConverterManager.MissingConverter", object.getClass().getName())); //$NON-NLS-1$ return new OutboundVariable("var " + varName + " = null;", varName); //$NON-NLS-1$ //$NON-NLS-2$ } ov.setInitCode(converter.convertOutbound(object, ov.getAssignCode(), converted)); return ov; }
|
45384 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45384/769a5807f342d8541951d74937d724ab38fcafe0/DefaultConverterManager.java/buggy/java/uk/ltd/getahead/dwr/impl/DefaultConverterManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2976,
3653,
3092,
1765,
17873,
12,
921,
733,
16,
2976,
3653,
1042,
5970,
13,
1216,
16401,
503,
565,
288,
3639,
309,
261,
1612,
422,
446,
13,
3639,
288,
5411,
514,
13722,
273,
5970,
18,
588,
2134,
21519,
5621,
5411,
327,
394,
2976,
3653,
3092,
2932,
1401,
315,
397,
13722,
397,
29199,
2011,
31,
3113,
13722,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
4329,
3993,
17,
5106,
17,
22,
8,
3639,
289,
3639,
368,
2073,
358,
2621,
309,
732,
1240,
2731,
333,
1245,
1818,
3639,
2976,
3653,
3092,
23094,
273,
5970,
18,
588,
12,
1612,
1769,
3639,
309,
261,
1527,
480,
446,
13,
3639,
288,
5411,
368,
6155,
326,
733,
487,
2118,
5970,
1818,
16,
732,
2537,
1608,
358,
8884,
358,
518,
18,
5411,
327,
394,
2976,
3653,
3092,
2932,
3113,
23094,
18,
588,
4910,
1085,
10663,
4329,
3993,
17,
5106,
17,
21,
8,
3639,
289,
3639,
368,
6155,
732,
903,
1240,
358,
752,
1245,
364,
19801,
3639,
23094,
273,
394,
2976,
3653,
3092,
5621,
3639,
514,
13722,
273,
5970,
18,
588,
2134,
21519,
5621,
3639,
23094,
18,
542,
4910,
1085,
12,
1401,
461,
1769,
3639,
368,
7074,
333,
364,
4042,
813,
1427,
732,
2727,
1404,
11502,
1368,
518,
3639,
5970,
18,
458,
12,
1612,
16,
23094,
1769,
3639,
14768,
6027,
273,
31173,
12,
1612,
1769,
3639,
309,
261,
15747,
422,
446,
13,
3639,
288,
5411,
613,
18,
1636,
12,
5058,
18,
588,
780,
2932,
1868,
5072,
1318,
18,
4841,
5072,
3113,
733,
18,
588,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2976,
3653,
3092,
1765,
17873,
12,
921,
733,
16,
2976,
3653,
1042,
5970,
13,
1216,
16401,
503,
565,
288,
3639,
309,
261,
1612,
422,
446,
13,
3639,
288,
5411,
514,
13722,
273,
5970,
18,
588,
2134,
21519,
5621,
5411,
327,
394,
2976,
3653,
3092,
2932,
1401,
315,
397,
13722,
397,
29199,
2011,
31,
3113,
13722,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
4329,
3993,
17,
5106,
17,
22,
8,
3639,
289,
3639,
368,
2073,
358,
2621,
309,
732,
1240,
2731,
333,
1245,
1818,
3639,
2976,
3653,
3092,
23094,
273,
5970,
18,
588,
12,
1612,
1769,
3639,
309,
261,
1527,
480,
446,
13,
3639,
288,
5411,
368,
6155,
326,
733,
487,
2118,
5970,
1818,
16,
732,
2537,
2
] |
if(gcp1.bitMapX == 0) gcp1.bitMapX = 1; if(gcp1.bitMapY == 0) gcp1.bitMapY = 1;
|
public boolean importMap(){ Extractor ext; String rawFileName = new String(); FileChooser fc = new FileChooser(FileChooser.DIRECTORY_SELECT, File.getProgramDirectory()); fc.addMask("*.png"); fc.setTitle((String)lr.get(4100,"Select Directory:")); if(fc.execute() != fc.IDCANCEL){ File inDir = fc.getChosenFile(); File dir = new File(mapsPath); File mapFile; if (!dir.exists()) { dir.createDir(); } try{ //User selected a map, but maybe there are more png(s) //copy all of them! //at the same time try to find associated .map files! //These are georeference files targeted for OziExplorer. //So lets check if we have more than 1 png file: String[] files; String line = new String(); InputStream in; OutputStream out; FileReader inMap; byte[] buf; int len; String[] parts; files = inDir.list("*.png", File.LIST_FILES_ONLY); InfoBox inf = new InfoBox("Info", (String)lr.get(4109,"Loading maps...")); inf.show(); Vm.showWait(true); for(int i = 0; i<files.length;i++){ inf.setInfo((String)lr.get(4110,"Loading:")+ " " + files[i]); //Copy the file //Vm.debug("Copy: " + inDir.getFullPath() + "/" +files[i]); //Vm.debug("to: " + mapsPath + files[i]); in = new FileInputStream(inDir.getFullPath() + "/" +files[i]); out = new FileOutputStream(mapsPath + files[i]); buf = new byte[1024]; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } in.close(); out.close(); //Check for a .map file ext = new Extractor(files[i], "", ".", 0, true); rawFileName = ext.findNext(); mapFile = new File(inDir.getFullPath() + "/" + rawFileName + ".map"); if(mapFile.exists()){ GCPoint gcp1 = new GCPoint(); GCPoint gcp2 = new GCPoint(); GCPoint gcp3 = new GCPoint(); GCPoint gcp4 = new GCPoint(); GCPoint gcpG = new GCPoint(); //Vm.debug("Found file: " + inDir.getFullPath() + "/" + rawFileName + ".map"); inMap = new FileReader(inDir.getFullPath() + "/" + rawFileName + ".map"); while((line = inMap.readLine()) != null){ if(line.equals("MMPNUM,4")){ line = inMap.readLine(); parts = mString.split(line, ','); gcp1.bitMapX = Convert.toInt(parts[2]); gcp1.bitMapY = Convert.toInt(parts[3]); line = inMap.readLine(); parts = mString.split(line, ','); gcp2.bitMapX = Convert.toInt(parts[2]); gcp2.bitMapY = Convert.toInt(parts[3]); line = inMap.readLine(); parts = mString.split(line, ','); gcp3.bitMapX = Convert.toInt(parts[2]); gcp3.bitMapY = Convert.toInt(parts[3]); imageWidth = gcp3.bitMapX; imageHeight = gcp3.bitMapY; line = inMap.readLine(); parts = mString.split(line, ','); gcp4.bitMapX = Convert.toInt(parts[2]); gcp4.bitMapY = Convert.toInt(parts[3]); line = inMap.readLine(); parts = mString.split(line, ','); gcpG = new GCPoint(Convert.toDouble(parts[2]), Convert.toDouble(parts[3])); gcpG.bitMapX = gcp1.bitMapX; gcpG.bitMapY = gcp1.bitMapY; addGCP(gcpG); line = inMap.readLine(); parts = mString.split(line, ','); gcpG = new GCPoint(Convert.toDouble(parts[2]), Convert.toDouble(parts[3])); gcpG.bitMapX = gcp2.bitMapX; gcpG.bitMapY = gcp2.bitMapY; addGCP(gcpG); line = inMap.readLine(); parts = mString.split(line, ','); gcpG = new GCPoint(Convert.toDouble(parts[2]), Convert.toDouble(parts[3])); gcpG.bitMapX = gcp3.bitMapX; gcpG.bitMapY = gcp3.bitMapY; addGCP(gcpG); line = inMap.readLine(); parts = mString.split(line, ','); gcpG = new GCPoint(Convert.toDouble(parts[2]), Convert.toDouble(parts[3])); gcpG.bitMapX = gcp4.bitMapX; gcpG.bitMapY = gcp4.bitMapY; addGCP(gcpG); evalGCP(); //Vm.debug("Saving .map file to: " + mapsPath + "/" + rawFileName + ".wfl"); saveWFL(mapsPath + "/" + rawFileName + ".wfl"); } } inMap.close(); } } inf.close(0); Vm.showWait(false); return true; }catch(Exception ex){ Vm.debug("Error:" + ex.toString()); } } return false; }
|
51026 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51026/39c46900ebba19c68621cdca63912a2190b0f811/Map.java/buggy/src/CacheWolf/Map.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
60,
273,
404,
31,
309,
12,
75,
4057,
21,
18,
3682,
863,
61,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
61,
273,
404,
31,
225,
1250,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
60,
273,
404,
31,
309,
12,
75,
4057,
21,
18,
3682,
863,
61,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
61,
273,
404,
31,
225,
1930,
863,
1435,
95,
202,
202,
10958,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
60,
273,
404,
31,
309,
12,
75,
4057,
21,
18,
3682,
863,
61,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
61,
273,
404,
31,
225,
1110,
31,
202,
202,
780,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
60,
273,
404,
31,
309,
12,
75,
4057,
21,
18,
3682,
863,
61,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
61,
273,
404,
31,
225,
1831,
4771,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
60,
273,
404,
31,
309,
12,
75,
4057,
21,
18,
3682,
863,
61,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
61,
273,
404,
31,
225,
273,
430,
12,
75,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
60,
273,
404,
31,
309,
12,
75,
4057,
21,
18,
3682,
863,
61,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
61,
273,
404,
31,
225,
1250,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
60,
273,
404,
31,
309,
12,
75,
4057,
21,
18,
3682,
863,
61,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
61,
273,
404,
31,
225,
1930,
863,
1435,
95,
202,
202,
10958,
430,
12,
75,
4057,
21,
18,
3682,
863,
60,
422,
374,
13,
314,
4057,
21,
18,
3682,
863,
2
] |
|
null, "setOnblur");
|
null, "setOnblurExpr");
|
public PropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor[] result = new PropertyDescriptor[31]; try { result[0] = new PropertyDescriptor("accesskey", ELPasswordTag.class, null, "setAccesskey"); result[1] = new PropertyDescriptor("alt", ELPasswordTag.class, null, "setAlt"); result[2] = new PropertyDescriptor("altKey", ELPasswordTag.class, null, "setAltKey"); // This attribute has a non-standard mapping. result[3] = new PropertyDescriptor("disabled", ELPasswordTag.class, null, "setDisabledExpr"); // This attribute has a non-standard mapping. result[4] = new PropertyDescriptor("indexed", ELPasswordTag.class, null, "setIndexedExpr"); result[5] = new PropertyDescriptor("maxlength", ELPasswordTag.class, null, "setMaxlength"); result[6] = new PropertyDescriptor("name", ELPasswordTag.class, null, "setName"); result[7] = new PropertyDescriptor("onblur", ELPasswordTag.class, null, "setOnblur"); result[8] = new PropertyDescriptor("onchange", ELPasswordTag.class, null, "setOnchange"); result[9] = new PropertyDescriptor("onclick", ELPasswordTag.class, null, "setOnclick"); result[10] = new PropertyDescriptor("ondblclick", ELPasswordTag.class, null, "setOndblclick"); result[11] = new PropertyDescriptor("onfocus", ELPasswordTag.class, null, "setOnfocus"); result[12] = new PropertyDescriptor("onkeydown", ELPasswordTag.class, null, "setOnkeydown"); result[13] = new PropertyDescriptor("onkeypress", ELPasswordTag.class, null, "setOnkeypress"); result[14] = new PropertyDescriptor("onkeyup", ELPasswordTag.class, null, "setOnkeyup"); result[15] = new PropertyDescriptor("onmousedown", ELPasswordTag.class, null, "setOnmousedown"); result[16] = new PropertyDescriptor("onmousemove", ELPasswordTag.class, null, "setOnmousemove"); result[17] = new PropertyDescriptor("onmouseout", ELPasswordTag.class, null, "setOnmouseout"); result[18] = new PropertyDescriptor("onmouseover", ELPasswordTag.class, null, "setOnmouseover"); result[19] = new PropertyDescriptor("onmouseup", ELPasswordTag.class, null, "setOnmouseup"); result[20] = new PropertyDescriptor("property", ELPasswordTag.class, null, "setProperty"); result[21] = new PropertyDescriptor("readonly", ELPasswordTag.class, null, "setReadonlyExpr"); result[22] = new PropertyDescriptor("redisplay", ELPasswordTag.class, null, "setRedisplayExpr"); result[23] = new PropertyDescriptor("style", ELPasswordTag.class, null, "setStyle"); result[24] = new PropertyDescriptor("styleClass", ELPasswordTag.class, null, "setStyleClass"); result[25] = new PropertyDescriptor("styleId", ELPasswordTag.class, null, "setStyleId"); result[26] = new PropertyDescriptor("size", ELPasswordTag.class, null, "setSize"); result[27] = new PropertyDescriptor("tabindex", ELPasswordTag.class, null, "setTabindex"); result[28] = new PropertyDescriptor("title", ELPasswordTag.class, null, "setTitle"); result[29] = new PropertyDescriptor("titleKey", ELPasswordTag.class, null, "setTitleKey"); result[30] = new PropertyDescriptor("value", ELPasswordTag.class, null, "setValue"); } catch (IntrospectionException ex) { ex.printStackTrace(); } return (result); }
|
2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/db064e19656421b94aaf753550935d95f44bd5f9/ELPasswordTagBeanInfo.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELPasswordTagBeanInfo.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
6938,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860,
856,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
1862,
856,
8863,
5411,
563,
63,
21,
65,
273,
394,
26761,
2932,
2390,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
10655,
8863,
5411,
563,
63,
22,
65,
273,
394,
26761,
2932,
2390,
653,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
10655,
653,
8863,
5411,
368,
1220,
1566,
711,
279,
1661,
17,
10005,
2874,
18,
5411,
563,
63,
23,
65,
273,
394,
26761,
2932,
9278,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
8853,
4742,
8863,
5411,
368,
1220,
1566,
711,
279,
1661,
17,
10005,
2874,
18,
5411,
563,
63,
24,
65,
273,
394,
26761,
2932,
19626,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
15034,
4742,
8863,
5411,
563,
63,
25,
65,
273,
394,
26761,
2932,
27875,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
2747,
2469,
8863,
5411,
563,
63,
26,
65,
273,
394,
26761,
2932,
529,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
461,
8863,
5411,
563,
63,
27,
65,
273,
394,
26761,
2932,
265,
27065,
3113,
14801,
3913,
1805,
18,
1106,
16,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
6938,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
3860,
856,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
1862,
856,
8863,
5411,
563,
63,
21,
65,
273,
394,
26761,
2932,
2390,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
10655,
8863,
5411,
563,
63,
22,
65,
273,
394,
26761,
2932,
2390,
653,
3113,
14801,
3913,
1805,
18,
1106,
16,
4766,
9079,
446,
16,
315,
542,
10655,
653,
8863,
5411,
368,
1220,
1566,
711,
279,
1661,
17,
10005,
2874,
18,
5411,
563,
63,
23,
2
] |
public void setPatchName (IPatch p, String name) {
|
public void setPatchName (Patch p, String name) {
|
public void setPatchName (IPatch p, String name) { byte[] namebytes; int address = Byte.parseByte(parameter_base_address, 16); address = (address << 16) | 0x007000; int offset=YamahaMotifSysexUtility.findBaseAddressOffset(((Patch)p).sysex, address); try { namebytes=name.getBytes ("US-ASCII"); for (int i = 0; i < 10; i++) { if (i >= namebytes.length) ((Patch)p).sysex[offset + i + YamahaMotifSysexUtility.DATA_OFFSET] =(byte)' '; else ((Patch)p).sysex[offset+ i+ YamahaMotifSysexUtility.DATA_OFFSET]=namebytes[i]; } YamahaMotifSysexUtility.checksum(((Patch)p).sysex, offset); } catch (UnsupportedEncodingException e) { return; } }
|
7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/8de9e9d107eb8c0487bbadf2f24d3a5cc9bc1add/YamahaMotifSingleDriver.java/buggy/JSynthLib/synthdrivers/YamahaMotif/YamahaMotifSingleDriver.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
7332,
461,
261,
7332,
293,
16,
514,
508,
13,
288,
565,
1160,
8526,
508,
3890,
31,
565,
509,
1758,
273,
3506,
18,
2670,
3216,
12,
6775,
67,
1969,
67,
2867,
16,
2872,
1769,
565,
1758,
273,
261,
2867,
2296,
2872,
13,
571,
374,
92,
713,
27,
3784,
31,
565,
509,
1384,
33,
61,
20789,
3395,
24749,
430,
10876,
20909,
6497,
18,
4720,
2171,
1887,
2335,
12443,
12,
7332,
13,
84,
2934,
9009,
20909,
16,
1758,
1769,
565,
775,
288,
1377,
508,
3890,
33,
529,
18,
588,
2160,
7566,
3378,
17,
13756,
8863,
1377,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1728,
31,
277,
27245,
288,
202,
430,
261,
77,
1545,
508,
3890,
18,
2469,
13,
202,
225,
14015,
7332,
13,
84,
2934,
9009,
20909,
63,
3348,
397,
277,
397,
1624,
20789,
3395,
24749,
430,
10876,
20909,
6497,
18,
4883,
67,
11271,
65,
273,
12,
7229,
2506,
12386,
202,
12107,
202,
225,
14015,
7332,
13,
84,
2934,
9009,
20909,
63,
3348,
15,
277,
15,
1624,
20789,
3395,
24749,
430,
10876,
20909,
6497,
18,
4883,
67,
11271,
65,
33,
529,
3890,
63,
77,
15533,
1377,
289,
1377,
1624,
20789,
3395,
24749,
430,
10876,
20909,
6497,
18,
15149,
12443,
12,
7332,
13,
84,
2934,
9009,
20909,
16,
1384,
1769,
565,
289,
1044,
261,
8544,
13836,
425,
13,
288,
327,
31,
289,
225,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
7332,
461,
261,
7332,
293,
16,
514,
508,
13,
288,
565,
1160,
8526,
508,
3890,
31,
565,
509,
1758,
273,
3506,
18,
2670,
3216,
12,
6775,
67,
1969,
67,
2867,
16,
2872,
1769,
565,
1758,
273,
261,
2867,
2296,
2872,
13,
571,
374,
92,
713,
27,
3784,
31,
565,
509,
1384,
33,
61,
20789,
3395,
24749,
430,
10876,
20909,
6497,
18,
4720,
2171,
1887,
2335,
12443,
12,
7332,
13,
84,
2934,
9009,
20909,
16,
1758,
1769,
565,
775,
288,
1377,
508,
3890,
33,
529,
18,
588,
2160,
7566,
3378,
17,
13756,
8863,
1377,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1728,
31,
277,
27245,
288,
202,
430,
261,
77,
1545,
508,
3890,
18,
2
] |
attribute( obj, OdaDataSet.EXTENSION_ID_PROP, OdaDataSet.EXTENSION_ID_PROP );
|
attribute( obj, IOdaExtendableElementModel.EXTENSION_ID_PROP, IOdaExtendableElementModel.EXTENSION_ID_PROP );
|
public void visitOdaDataSet( OdaDataSet obj ) { writer.startElement( DesignSchemaConstants.ODA_DATA_SET_TAG ); attribute( obj, OdaDataSet.EXTENSION_ID_PROP, OdaDataSet.EXTENSION_ID_PROP ); super.visitOdaDataSet( obj ); writeStructureList( obj, DataSet.PARAMETERS_PROP ); writeStructureList( obj, DataSet.RESULT_SET_PROP ); if ( (String) obj.getLocalProperty( getModule( ), OdaDataSet.QUERY_TEXT_PROP ) != null ) { property( obj, OdaDataSet.QUERY_TEXT_PROP ); } property( obj, OdaDataSet.RESULT_SET_NAME_PROP ); writeOdaDesignerState( obj, OdaDataSet.DESIGNER_STATE_PROP ); propertyCDATA( obj, OdaDataSet.DESIGNER_VALUES_PROP ); List properties = (List) obj.getLocalProperty( getModule( ), OdaDataSet.PRIVATE_DRIVER_PROPERTIES_PROP ); writeExtendedProperties( properties, OdaDataSet.PRIVATE_DRIVER_PROPERTIES_PROP ); writeOdaExtensionProperties( obj, OdaDataSet.EXTENSION_ID_PROP ); writer.endElement( ); }
|
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/d802c33711e0d111551ae23575895cd060f085b6/ModuleWriter.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
51,
2414,
13676,
12,
531,
2414,
13676,
1081,
262,
202,
95,
202,
202,
6299,
18,
1937,
1046,
12,
29703,
3078,
2918,
18,
1212,
37,
67,
4883,
67,
4043,
67,
7927,
11272,
202,
202,
4589,
12,
1081,
16,
531,
2414,
13676,
18,
12796,
67,
734,
67,
15811,
16,
9506,
202,
51,
2414,
13676,
18,
12796,
67,
734,
67,
15811,
11272,
202,
202,
9565,
18,
11658,
51,
2414,
13676,
12,
1081,
11272,
202,
202,
2626,
6999,
682,
12,
1081,
16,
14065,
18,
20103,
67,
15811,
11272,
202,
202,
2626,
6999,
682,
12,
1081,
16,
14065,
18,
12289,
67,
4043,
67,
15811,
11272,
202,
202,
430,
261,
261,
780,
13,
1081,
18,
588,
2042,
1396,
12,
11251,
12,
262,
16,
9506,
202,
51,
2414,
13676,
18,
10753,
67,
5151,
67,
15811,
262,
480,
446,
262,
202,
202,
95,
1082,
202,
4468,
12,
1081,
16,
531,
2414,
13676,
18,
10753,
67,
5151,
67,
15811,
11272,
202,
202,
97,
202,
202,
4468,
12,
1081,
16,
531,
2414,
13676,
18,
12289,
67,
4043,
67,
1985,
67,
15811,
11272,
202,
202,
2626,
51,
2414,
15478,
264,
1119,
12,
1081,
16,
531,
2414,
13676,
18,
1639,
11260,
654,
67,
7998,
67,
15811,
11272,
202,
202,
4468,
18375,
12,
1081,
16,
531,
2414,
13676,
18,
1639,
11260,
654,
67,
16386,
67,
15811,
11272,
202,
202,
682,
1790,
273,
261,
682,
13,
1081,
18,
588,
2042,
1396,
12,
11251,
12,
262,
16,
9506,
202,
51,
2414,
13676,
18,
20055,
67,
27720,
67,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
51,
2414,
13676,
12,
531,
2414,
13676,
1081,
262,
202,
95,
202,
202,
6299,
18,
1937,
1046,
12,
29703,
3078,
2918,
18,
1212,
37,
67,
4883,
67,
4043,
67,
7927,
11272,
202,
202,
4589,
12,
1081,
16,
531,
2414,
13676,
18,
12796,
67,
734,
67,
15811,
16,
9506,
202,
51,
2414,
13676,
18,
12796,
67,
734,
67,
15811,
11272,
202,
202,
9565,
18,
11658,
51,
2414,
13676,
12,
1081,
11272,
202,
202,
2626,
6999,
682,
12,
1081,
16,
14065,
18,
20103,
67,
15811,
11272,
202,
202,
2626,
6999,
682,
12,
1081,
16,
14065,
18,
12289,
67,
4043,
67,
15811,
11272,
202,
202,
430,
261,
261,
780,
13,
1081,
18,
588,
2042,
1396,
12,
11251,
2
] |
case ( LineStyle.DOTTED ) :
|
case ( LineStyle.DOTTED ) :
|
private final void renderBorder( GC gc, Label la, int iLabelLocation, Location lo ) throws ChartException { // RENDER THE OUTLINE/BORDER final LineAttributes lia = la.getOutline( ); if ( lia != null && lia.isVisible( ) && lia.isSetStyle( ) && lia.isSetThickness( ) && lia.getColor( ) != null ) { RotatedRectangle rr = null; try { rr = Methods.computePolygon( _sxs, iLabelLocation, la, lo.getX( ), lo.getY( ) ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartDeviceSwtActivator.ID, ChartException.RENDERING, uiex ); } final int iOldLineStyle = gc.getLineStyle( ); final int iOldLineWidth = gc.getLineWidth( ); final Color cFG = (Color) _sxs.getColor( lia.getColor( ) ); gc.setForeground( cFG ); R31Enhance.setAlpha( gc, lia.getColor( ) ); int iLineStyle = SWT.LINE_SOLID; switch ( lia.getStyle( ).getValue( ) ) { case ( LineStyle.DOTTED ) : iLineStyle = SWT.LINE_DOT; break; case ( LineStyle.DASH_DOTTED ) : iLineStyle = SWT.LINE_DASHDOT; break; case ( LineStyle.DASHED ) : iLineStyle = SWT.LINE_DASH; break; } gc.setLineStyle( iLineStyle ); gc.setLineWidth( lia.getThickness( ) ); gc.drawPolygon( rr.getSwtPoints( ) ); gc.setLineStyle( iOldLineStyle ); gc.setLineWidth( iOldLineWidth ); cFG.dispose( ); } }
|
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/2b0d1a560c1bc75e00cd69bad4d0bb2a7109bc8c/SwtTextRenderer.java/clean/chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtTextRenderer.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
918,
1743,
8107,
12,
15085,
8859,
16,
5287,
7125,
16,
509,
277,
2224,
2735,
16,
1082,
202,
2735,
437,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
28332,
12786,
8210,
5997,
19,
38,
7954,
202,
202,
6385,
5377,
2498,
328,
1155,
273,
7125,
18,
588,
21805,
12,
11272,
202,
202,
430,
261,
328,
1155,
480,
446,
9506,
202,
10,
10,
328,
1155,
18,
291,
6207,
12,
262,
9506,
202,
10,
10,
328,
1155,
18,
291,
694,
2885,
12,
262,
9506,
202,
10,
10,
328,
1155,
18,
291,
694,
1315,
19517,
12,
262,
9506,
202,
10,
10,
328,
1155,
18,
588,
2957,
12,
262,
480,
446,
262,
202,
202,
95,
1082,
202,
8570,
690,
19463,
8354,
273,
446,
31,
1082,
202,
698,
1082,
202,
95,
9506,
202,
523,
273,
13063,
18,
9200,
11787,
12,
389,
87,
13713,
16,
25083,
202,
77,
2224,
2735,
16,
25083,
202,
11821,
16,
25083,
202,
383,
18,
588,
60,
12,
262,
16,
25083,
202,
383,
18,
588,
61,
12,
262,
11272,
1082,
202,
97,
1082,
202,
14683,
261,
2754,
5915,
338,
262,
1082,
202,
95,
9506,
202,
12849,
394,
14804,
503,
12,
14804,
3654,
55,
6046,
12241,
639,
18,
734,
16,
25083,
202,
7984,
503,
18,
25230,
1360,
16,
25083,
202,
4881,
338,
11272,
1082,
202,
97,
1082,
202,
6385,
509,
277,
7617,
1670,
2885,
273,
8859,
18,
588,
1670,
2885,
12,
11272,
1082,
202,
6385,
509,
277,
7617,
1670,
2384,
273,
8859,
18,
588,
1670,
2384,
12,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
1743,
8107,
12,
15085,
8859,
16,
5287,
7125,
16,
509,
277,
2224,
2735,
16,
1082,
202,
2735,
437,
262,
1216,
14804,
503,
202,
95,
202,
202,
759,
28332,
12786,
8210,
5997,
19,
38,
7954,
202,
202,
6385,
5377,
2498,
328,
1155,
273,
7125,
18,
588,
21805,
12,
11272,
202,
202,
430,
261,
328,
1155,
480,
446,
9506,
202,
10,
10,
328,
1155,
18,
291,
6207,
12,
262,
9506,
202,
10,
10,
328,
1155,
18,
291,
694,
2885,
12,
262,
9506,
202,
10,
10,
328,
1155,
18,
291,
694,
1315,
19517,
12,
262,
9506,
202,
10,
10,
328,
1155,
18,
588,
2957,
12,
262,
480,
446,
262,
202,
202,
95,
1082,
202,
8570,
690,
19463,
2
] |
if ( i==-1 || !(i!=-1 && attValue.substring(0, i).indexOf("/")!=-1) )
|
if ( i==-1 || (i!=-1 && attValue.substring(0, i).indexOf("/")!=-1) )
|
protected final void fixURL(String elementName, String attName, String qName, Attributes atts, AttributesImpl attsImpl) { if (qName.equalsIgnoreCase(elementName)) { String attValue = atts.getValue(attName); if (attValue != null) { // Assume that if attribute value exists and doesn't contain a // semicolon, or if the URL contains a semicolon and there's a // backslash before the semicolon, then it is a relative URL // (http://<something> and mailto:<something> are both valid, // absolute URLs) int i = attValue.indexOf(":"); if ( i==-1 || !(i!=-1 && attValue.substring(0, i).indexOf("/")!=-1) ) { if (attValue.startsWith("/")) { // Prepend the scheme and the host to the attribute value (HTTP) i = baseUrl.indexOf("://"); if (i != -1) attValue = baseUrl.substring(0, baseUrl.indexOf("/", i+3)).concat(attValue); } else if (attValue.trim().equals("")) attValue = baseUrl; else attValue = baseUrl.substring(0, baseUrl.lastIndexOf("/")+1).concat(attValue); if (attValue.indexOf("/../") != -1) attValue = removeUpDirs(attValue); } int index = atts.getIndex(attName); attsImpl.setAttribute(index, atts.getURI(index), atts.getLocalName(index), attName, atts.getType(index), attValue); } } }
|
24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/89ccef19988fe9c70911314d5e95976346ef6709/AbsoluteURLFilter.java/clean/source/org/jasig/portal/utils/AbsoluteURLFilter.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
918,
2917,
1785,
12,
780,
14453,
16,
514,
2403,
461,
16,
514,
22914,
16,
9055,
15687,
16,
9055,
2828,
15687,
2828,
13,
282,
288,
565,
309,
261,
85,
461,
18,
14963,
5556,
12,
2956,
461,
3719,
377,
288,
1377,
514,
2403,
620,
273,
15687,
18,
24805,
12,
4558,
461,
1769,
1377,
309,
261,
4558,
620,
480,
446,
13,
1377,
288,
3639,
368,
15983,
716,
309,
1566,
460,
1704,
471,
3302,
1404,
912,
279,
540,
368,
23682,
16,
578,
309,
326,
1976,
1914,
279,
23682,
471,
1915,
1807,
279,
3639,
368,
23253,
1865,
326,
23682,
16,
1508,
518,
353,
279,
3632,
1976,
3639,
368,
261,
2505,
2207,
32,
30289,
34,
471,
4791,
869,
22292,
30289,
34,
854,
3937,
923,
16,
3639,
368,
4967,
10414,
13,
3639,
509,
277,
273,
2403,
620,
18,
31806,
2932,
2773,
1769,
3639,
309,
261,
277,
631,
17,
21,
747,
261,
77,
5,
29711,
21,
597,
2403,
620,
18,
28023,
12,
20,
16,
277,
2934,
31806,
2932,
4898,
13,
5,
29711,
21,
13,
262,
3639,
288,
1850,
309,
261,
4558,
620,
18,
17514,
1190,
2932,
4898,
3719,
1850,
288,
5411,
368,
28466,
326,
4355,
471,
326,
1479,
358,
326,
1566,
460,
261,
3693,
13,
5411,
277,
273,
9818,
18,
31806,
2932,
2207,
8863,
5411,
309,
261,
77,
480,
300,
21,
13,
2868,
2403,
620,
273,
9818,
18,
28023,
12,
20,
16,
9818,
18,
31806,
2932,
19,
3113,
277,
15,
23,
13,
2934,
16426,
12,
4558,
620,
1769,
1850,
289,
1850,
469,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
2917,
1785,
12,
780,
14453,
16,
514,
2403,
461,
16,
514,
22914,
16,
9055,
15687,
16,
9055,
2828,
15687,
2828,
13,
282,
288,
565,
309,
261,
85,
461,
18,
14963,
5556,
12,
2956,
461,
3719,
377,
288,
1377,
514,
2403,
620,
273,
15687,
18,
24805,
12,
4558,
461,
1769,
1377,
309,
261,
4558,
620,
480,
446,
13,
1377,
288,
3639,
368,
15983,
716,
309,
1566,
460,
1704,
471,
3302,
1404,
912,
279,
540,
368,
23682,
16,
578,
309,
326,
1976,
1914,
279,
23682,
471,
1915,
1807,
279,
3639,
368,
23253,
1865,
326,
23682,
16,
1508,
518,
353,
279,
3632,
1976,
3639,
368,
261,
2505,
2207,
32,
30289,
34,
471,
4791,
869,
22292,
30289,
34,
854,
2
] |
return swapInterval.fixedInterval;
|
return BlockTransmitter.getHardBandwidthLimit();
|
public int get() { return swapInterval.fixedInterval; }
|
50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/0e73e63698410905555b43e69172b80870e39ae5/Node.java/buggy/src/freenet/node/Node.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
509,
336,
1435,
288,
25083,
202,
2463,
7720,
4006,
18,
12429,
4006,
31,
6862,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
509,
336,
1435,
288,
25083,
202,
2463,
7720,
4006,
18,
12429,
4006,
31,
6862,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (taskString == null) {
|
if (taskString == null || taskString.length() == 0) {
|
void refresh() { if (isDisposed()) { return; } progressLabel.setText(getMainTitle()); int percentDone = getPercentDone(); JobInfo[] infos = getJobInfos(); if (isRunning()) { if (progressBar == null) { if (percentDone == IProgressMonitor.UNKNOWN) { // Only do it if there is an indeterminate task // There may be no task so we don't want to create it // until we know for sure for (int i = 0; i < infos.length; i++) { if (infos[i].hasTaskInfo() && infos[i].getTaskInfo().totalWork == IProgressMonitor.UNKNOWN) { createProgressBar(SWT.INDETERMINATE); break; } } } else { createProgressBar(SWT.NONE); progressBar.setMinimum(0); progressBar.setMaximum(100); } } // Protect against bad counters if (percentDone >= 0 && percentDone <= 100 && percentDone != progressBar.getSelection()) { progressBar.setSelection(percentDone); } } else if (isCompleted()) { if (progressBar != null) { progressBar.dispose(); progressBar = null; } setLayoutsForNoProgress(); } for (int i = 0; i < infos.length; i++) { JobInfo jobInfo = infos[i]; if (jobInfo.hasTaskInfo()) { String taskString = jobInfo.getTaskInfo().getTaskName(); String subTaskString = null; Object[] jobChildren = jobInfo.getChildren(); if (jobChildren.length > 0) { subTaskString = ((JobTreeElement) jobChildren[0]) .getDisplayString(); } if (subTaskString != null) { if (taskString == null) { taskString = subTaskString; } else { taskString = NLS.bind( ProgressMessages.JobInfo_DoneNoProgressMessage, taskString, subTaskString); } } if (taskString != null) { setLinkText(infos[i].getJob(), taskString, i); } } else {// Check for the finished job state Job job = jobInfo.getJob(); if (job.getResult() != null) { IStatus result = job.getResult(); String message = EMPTY_STRING; if (result != null) { message = result.getMessage(); } setLinkText(job, message, i); } } setColor(currentIndex); } // Remove completed tasks if (infos.length < taskEntries.size()) { for (int i = infos.length; i < taskEntries.size(); i++) { ((Link) taskEntries.get(i)).dispose(); } if (infos.length > 1) taskEntries = taskEntries.subList(0, infos.length - 1); else taskEntries.clear(); } updateToolBarValues(); }
|
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d03b613a4bb62259b67d5c2f3892fe47417858c5/ProgressInfoItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
4460,
1435,
288,
202,
202,
430,
261,
291,
1669,
7423,
10756,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
8298,
2224,
18,
542,
1528,
12,
588,
6376,
4247,
10663,
202,
202,
474,
5551,
7387,
273,
22612,
2998,
7387,
5621,
202,
202,
2278,
966,
8526,
10626,
273,
13024,
7655,
5621,
202,
202,
430,
261,
291,
7051,
10756,
288,
1082,
202,
430,
261,
8298,
5190,
422,
446,
13,
288,
9506,
202,
430,
261,
8849,
7387,
422,
467,
5491,
7187,
18,
14737,
13,
288,
6862,
202,
759,
5098,
741,
518,
309,
1915,
353,
392,
1547,
4443,
340,
1562,
6862,
202,
759,
6149,
2026,
506,
1158,
1562,
1427,
732,
2727,
1404,
2545,
358,
752,
518,
6862,
202,
759,
3180,
732,
5055,
364,
3071,
6862,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
10626,
18,
2469,
31,
277,
27245,
288,
25083,
202,
430,
261,
18227,
63,
77,
8009,
5332,
2174,
966,
1435,
6862,
9506,
202,
10,
10,
10626,
63,
77,
8009,
588,
2174,
966,
7675,
4963,
2421,
422,
467,
5491,
7187,
18,
14737,
13,
288,
6862,
1082,
202,
2640,
31547,
12,
55,
8588,
18,
2356,
1584,
654,
6236,
1777,
1769,
6862,
1082,
202,
8820,
31,
25083,
202,
97,
6862,
202,
97,
9506,
202,
97,
469,
288,
6862,
202,
2640,
31547,
12,
55,
8588,
18,
9826,
1769,
6862,
202,
8298,
5190,
18,
542,
13042,
12,
20,
1769,
6862,
202,
8298,
5190,
18,
542,
13528,
12,
6625,
1769,
9506,
202,
97,
1082,
202,
97,
1082,
202,
759,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
4460,
1435,
288,
202,
202,
430,
261,
291,
1669,
7423,
10756,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
8298,
2224,
18,
542,
1528,
12,
588,
6376,
4247,
10663,
202,
202,
474,
5551,
7387,
273,
22612,
2998,
7387,
5621,
202,
202,
2278,
966,
8526,
10626,
273,
13024,
7655,
5621,
202,
202,
430,
261,
291,
7051,
10756,
288,
1082,
202,
430,
261,
8298,
5190,
422,
446,
13,
288,
9506,
202,
430,
261,
8849,
7387,
422,
467,
5491,
7187,
18,
14737,
13,
288,
6862,
202,
759,
5098,
741,
518,
309,
1915,
353,
392,
1547,
4443,
340,
1562,
6862,
202,
759,
6149,
2026,
506,
1158,
1562,
1427,
732,
2727,
1404,
2545,
358,
752,
518,
6862,
202,
759,
2
] |
protected GridBagConstraints buildConstraints(Element current) { GridBagConstraints constraints = new GridBagConstraints(); CustomInsets inset = new CustomInsets(current.getAttribute("insets")); constraints.weightx = parseWeightConstant(current.getAttribute("weightx")); constraints.weighty = parseWeightConstant(current.getAttribute("weighty")); // fill constraints.fill = parseFillConstant(current.getAttribute("fill")); constraints.gridwidth = parseGridConstant(current.getAttribute("gridwidth")); constraints.gridheight = parseGridConstant(current.getAttribute("gridheight")); constraints.insets = inset; return constraints; }
|
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/3cd6e9d81112e3ab17a910eaef36b9e56b2a8b6a/XMLPageBuilder.java/clean/grendel/sources/grendel/ui/XMLPageBuilder.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
13075,
1361,
4878,
12,
1046,
783,
13,
288,
565,
13075,
6237,
273,
394,
13075,
5621,
565,
6082,
382,
4424,
316,
542,
273,
4202,
394,
6082,
382,
4424,
12,
2972,
18,
588,
1499,
2932,
267,
4424,
7923,
1769,
565,
6237,
18,
4865,
92,
273,
4202,
1109,
6544,
6902,
12,
2972,
18,
588,
1499,
2932,
4865,
92,
7923,
1769,
3639,
6237,
18,
4865,
93,
273,
4202,
1109,
6544,
6902,
12,
2972,
18,
588,
1499,
2932,
4865,
93,
7923,
1769,
3639,
368,
3636,
565,
6237,
18,
5935,
273,
1109,
8026,
6902,
12,
2972,
18,
588,
1499,
2932,
5935,
7923,
1769,
3639,
6237,
18,
5222,
2819,
273,
4202,
1109,
6313,
6902,
12,
2972,
18,
588,
1499,
2932,
5222,
2819,
7923,
1769,
3639,
6237,
18,
5222,
4210,
273,
4202,
1109,
6313,
6902,
12,
2972,
18,
588,
1499,
2932,
5222,
4210,
7923,
1769,
3639,
6237,
18,
267,
4424,
273,
316,
542,
31,
3639,
327,
6237,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
13075,
1361,
4878,
12,
1046,
783,
13,
288,
565,
13075,
6237,
273,
394,
13075,
5621,
565,
6082,
382,
4424,
316,
542,
273,
4202,
394,
6082,
382,
4424,
12,
2972,
18,
588,
1499,
2932,
267,
4424,
7923,
1769,
565,
6237,
18,
4865,
92,
273,
4202,
1109,
6544,
6902,
12,
2972,
18,
588,
1499,
2932,
4865,
92,
7923,
1769,
3639,
6237,
18,
4865,
93,
273,
4202,
1109,
6544,
6902,
12,
2972,
18,
588,
1499,
2932,
4865,
93,
7923,
1769,
3639,
368,
3636,
565,
6237,
18,
5935,
273,
1109,
8026,
6902,
12,
2972,
18,
588,
1499,
2932,
5935,
7923,
1769,
3639,
6237,
18,
5222,
2819,
273,
4202,
1109,
6313,
6902,
12,
2972,
18,
588,
1499,
2932,
5222,
2819,
7923,
1769,
2
] |
||
public org.quickfix.field.AllocQty getAllocQty() throws FieldNotFound { org.quickfix.field.AllocQty value = new org.quickfix.field.AllocQty();
|
public quickfix.field.AllocQty getAllocQty() throws FieldNotFound { quickfix.field.AllocQty value = new quickfix.field.AllocQty();
|
public org.quickfix.field.AllocQty getAllocQty() throws FieldNotFound { org.quickfix.field.AllocQty value = new org.quickfix.field.AllocQty(); getField(value); return value; }
|
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderMultileg.java/buggy/src/java/src/quickfix/fix43/NewOrderMultileg.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
53,
4098,
336,
8763,
53,
4098,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
53,
4098,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
53,
4098,
5621,
565,
5031,
12,
1132,
1769,
327,
460,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
53,
4098,
336,
8763,
53,
4098,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
53,
4098,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
53,
4098,
5621,
565,
5031,
12,
1132,
1769,
327,
460,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
XMLUtils.stringToSAX((String) value, "", state.saxStore, false);
|
XMLUtils.stringToSAX((String) value, "", state.saxStore, false, false);
|
public ProcessorOutput createOutput(String name) { ProcessorOutput output = new ProcessorImpl.DigestTransformerOutputImpl(getClass(), name) { public void readImpl(PipelineContext pipelineContext, final ContentHandler contentHandler) { try { State state = (State) getFilledOutState(pipelineContext); state.saxStore.replay(contentHandler); } catch (SAXException e) { throw new OXFException(e); } } protected byte[] computeDigest(PipelineContext pipelineContext, DigestState digestState) { if (digestState.digest == null) { fillOutState(pipelineContext, digestState); } return digestState.digest; } protected boolean fillOutState(PipelineContext pipelineContext, DigestState digestState) { try { State state = (State) digestState; if (state.saxStore == null) { ContextConfig config = readConfig(pipelineContext); // Get value from context ExternalContext externalContext = (ExternalContext) pipelineContext.getAttribute(PipelineContext.EXTERNAL_CONTEXT); if (externalContext == null) throw new OXFException("Missing external context"); Object value = config.getContextType() == ScopeProcessorBase.REQUEST_CONTEXT ? externalContext.getRequest().getAttributesMap().get(config.getKey()) : config.getContextType() == ScopeProcessorBase.SESSION_CONTEXT ? externalContext.getSession(true).getAttributesMap().get(config.getKey()) : config.getContextType() == ScopeProcessorBase.APPLICATION_CONTEXT ? externalContext.getAttributesMap().get(config.getKey()) : null; if (value != null) { if (value instanceof ScopeStore) { // Case 1: use the stored key/validity as internal key/validity ScopeStore contextStore = (ScopeStore) value; state.saxStore = contextStore.getSaxStore(); if (!config.isTestIgnoreStoredKeyValidity()) { // Regular case state.key = contextStore.getKey(); state.validity = contextStore.getValidity(); } else { // Special test mode (will use digest) state.key = null; state.validity = null; } } else { // Case 2: "generate the validity from object" (similar to what is done in the BeanGenerator) if (value instanceof SAXStore) { state.saxStore = (SAXStore) value; } else { // Write "foreign" object to new SAX store state.saxStore = new SAXStore(); if (value instanceof org.dom4j.Document) { // dom4j document LocationSAXWriter saxWriter = new LocationSAXWriter(); saxWriter.setContentHandler(state.saxStore); saxWriter.write((org.dom4j.Document) value); } else if (value instanceof org.w3c.dom.Document) { // W3C DOM document Transformer identity = TransformerUtils.getIdentityTransformer(); identity.transform(new DOMSource((org.w3c.dom.Document) value), new SAXResult(state.saxStore)); } else if (value instanceof String) { // Consider the String containing a document to parse XMLUtils.stringToSAX((String) value, "", state.saxStore, false); } else { // Consider the object a JavaBean Mapping mapping; if (getConnectedInputs().get(INPUT_MAPPING) == null) { mapping = new Mapping(); mapping.loadMapping(new InputSource(new StringReader("<mapping/>"))); } else mapping = readMapping(pipelineContext); readBean(value, mapping, state.saxStore);// throw new OXFException("Session object " + config.getKey()// + " is of unknown type: " + value.getClass().getName()); } } } } else { // Store empty document if (nullDocumentSAXStore == null) { nullDocumentSAXStore = new SAXStore(); Transformer identity = TransformerUtils.getIdentityTransformer(); identity.transform(new DocumentSource(Dom4jUtils.NULL_DOCUMENT), new SAXResult(nullDocumentSAXStore)); } state.saxStore = nullDocumentSAXStore; } // Compute digest of the SAX Store XMLUtils.DigestContentHandler digestContentHandler = new XMLUtils.DigestContentHandler("MD5"); state.saxStore.replay(digestContentHandler); state.digest = digestContentHandler.getResult(); } return true; } catch (Exception e) { throw new OXFException(e); } } }; addOutput(OUTPUT_DATA, output); return output; }
|
52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/c92faea3770d68e915964a3102a4873b3279f0cd/ScopeGenerator.java/clean/src/java/org/orbeon/oxf/processor/scope/ScopeGenerator.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15476,
1447,
752,
1447,
12,
780,
508,
13,
288,
3639,
15476,
1447,
876,
273,
394,
15476,
2828,
18,
9568,
8319,
1447,
2828,
12,
588,
797,
9334,
508,
13,
288,
5411,
1071,
918,
855,
2828,
12,
8798,
1042,
5873,
1042,
16,
727,
3697,
1503,
913,
1503,
13,
288,
7734,
775,
288,
10792,
3287,
919,
273,
261,
1119,
13,
2812,
13148,
1182,
1119,
12,
14511,
1042,
1769,
10792,
919,
18,
87,
651,
2257,
18,
266,
1601,
12,
1745,
1503,
1769,
7734,
289,
1044,
261,
55,
2501,
503,
425,
13,
288,
10792,
604,
394,
531,
60,
42,
503,
12,
73,
1769,
7734,
289,
5411,
289,
5411,
4750,
1160,
8526,
3671,
9568,
12,
8798,
1042,
5873,
1042,
16,
15864,
1119,
5403,
1119,
13,
288,
7734,
309,
261,
10171,
1119,
18,
10171,
422,
446,
13,
288,
10792,
3636,
1182,
1119,
12,
14511,
1042,
16,
5403,
1119,
1769,
7734,
289,
7734,
327,
5403,
1119,
18,
10171,
31,
5411,
289,
5411,
4750,
1250,
3636,
1182,
1119,
12,
8798,
1042,
5873,
1042,
16,
15864,
1119,
5403,
1119,
13,
288,
7734,
775,
288,
10792,
3287,
919,
273,
261,
1119,
13,
5403,
1119,
31,
10792,
309,
261,
2019,
18,
87,
651,
2257,
422,
446,
13,
288,
13491,
1772,
809,
642,
273,
855,
809,
12,
14511,
1042,
1769,
13491,
368,
968,
460,
628,
819,
13491,
11352,
1042,
3903,
1042,
273,
261,
6841,
1042,
13,
5873,
1042,
18,
588,
1499,
12,
8798,
1042,
18,
2294,
11702,
67,
13181,
1769,
13491,
309,
261,
9375,
1042,
422,
446,
13,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15476,
1447,
752,
1447,
12,
780,
508,
13,
288,
3639,
15476,
1447,
876,
273,
394,
15476,
2828,
18,
9568,
8319,
1447,
2828,
12,
588,
797,
9334,
508,
13,
288,
5411,
1071,
918,
855,
2828,
12,
8798,
1042,
5873,
1042,
16,
727,
3697,
1503,
913,
1503,
13,
288,
7734,
775,
288,
10792,
3287,
919,
273,
261,
1119,
13,
2812,
13148,
1182,
1119,
12,
14511,
1042,
1769,
10792,
919,
18,
87,
651,
2257,
18,
266,
1601,
12,
1745,
1503,
1769,
7734,
289,
1044,
261,
55,
2501,
503,
425,
13,
288,
10792,
604,
394,
531,
60,
42,
503,
12,
73,
1769,
7734,
289,
5411,
289,
5411,
4750,
1160,
8526,
3671,
9568,
12,
8798,
1042,
5873,
1042,
16,
15864,
1119,
5403,
2
] |
private boolean xorExpressionIsPointless(PsiExpression lhs, PsiExpression rhs, PsiType expressionType) { return isZero(lhs, expressionType) || isZero(rhs, expressionType) || isAllOnes(lhs, expressionType) || isAllOnes(rhs, expressionType);
|
private boolean xorExpressionIsPointless(PsiExpression lhs, PsiExpression rhs, PsiType expressionType){ return isZero(lhs, expressionType) || isZero(rhs, expressionType) || isAllOnes(lhs, expressionType) || isAllOnes(rhs, expressionType);
|
private boolean xorExpressionIsPointless(PsiExpression lhs, PsiExpression rhs, PsiType expressionType) { return isZero(lhs, expressionType) || isZero(rhs, expressionType) || isAllOnes(lhs, expressionType) || isAllOnes(rhs, expressionType); }
|
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/e4dba42c27333ff3aa3a021da7c8754469f669b6/PointlessBitwiseExpressionInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/bitwise/PointlessBitwiseExpressionInspection.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
225,
1250,
17586,
2300,
2520,
2148,
2656,
12,
52,
7722,
2300,
8499,
16,
453,
7722,
2300,
7711,
16,
453,
7722,
559,
2652,
559,
13,
288,
3639,
327,
353,
7170,
12,
80,
4487,
16,
2652,
559,
13,
747,
353,
7170,
12,
86,
4487,
16,
2652,
559,
13,
747,
353,
1595,
1398,
281,
12,
80,
4487,
16,
2652,
559,
13,
747,
353,
1595,
1398,
281,
12,
86,
4487,
16,
2652,
559,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
225,
1250,
17586,
2300,
2520,
2148,
2656,
12,
52,
7722,
2300,
8499,
16,
453,
7722,
2300,
7711,
16,
453,
7722,
559,
2652,
559,
13,
288,
3639,
327,
353,
7170,
12,
80,
4487,
16,
2652,
559,
13,
747,
353,
7170,
12,
86,
4487,
16,
2652,
559,
13,
747,
353,
1595,
1398,
281,
12,
80,
4487,
16,
2652,
559,
13,
747,
353,
1595,
1398,
281,
12,
86,
4487,
16,
2652,
559,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
saveLine(currentLine, previousLine, c, box, minimumLineHeight,
|
saveLine(currentLine, previousLine, c, box, minimumLineHeight,
|
public static void layoutContent(LayoutContext c, Box box, List contentList) { int maxAvailableWidth = c.getExtents().width; int remainingWidth = maxAvailableWidth; int minimumLineHeight = (int)c.getCurrentStyle().getLineHeight(c); LineBox currentLine = newLine(c, null, box); LineBox previousLine = null; InlineBox currentIB = null; InlineBox previousIB = null; List elementStack = new ArrayList(); if (box instanceof AnonymousBlockBox) { List pending = ((BlockBox)box.getParent()).getPendingInlineElements(); if (pending != null) { currentIB = addNestedInlineBoxes(currentLine, pending, maxAvailableWidth); elementStack = pending; } } CalculatedStyle parentStyle = c.getCurrentStyle(); int indent = (int)parentStyle.getFloatPropertyProportionalWidth(CSSName.TEXT_INDENT, maxAvailableWidth, c); remainingWidth -= indent; currentLine.x = indent; if (! box.getStyle().isCleared()) { remainingWidth -= c.getBlockFormattingContext().getFloatDistance( c, currentLine, remainingWidth); } List pendingFloats = new ArrayList(); int pendingLeftMBP = 0; int pendingRightMBP = 0; int start = pushPseudoClasses(c, contentList); if (c.getFirstLinesTracker().hasStyles()) { c.getFirstLinesTracker().pushStyles(c); } for (int i = start; i < contentList.size(); i++) { Object o = contentList.get(i); if (o instanceof StylePush) { StylePush sp = (StylePush) o; CascadedStyle cascaded = sp.getStyle(c); c.pushStyle(cascaded); CalculatedStyle style = c.getCurrentStyle(); previousIB = currentIB; currentIB = new InlineBox(sp.getElement(), style, maxAvailableWidth); currentIB.calculateHeight(c); elementStack.add(new InlineBoxInfo(cascaded, currentIB)); if (previousIB == null) { currentLine.addChild(currentIB); } else { previousIB.addInlineChild(currentIB); } //To break the line well, assume we don't just want to paint padding on next line pendingLeftMBP += style.getLeftMarginBorderPadding(c, maxAvailableWidth); pendingRightMBP += style.getRightMarginBorderPadding(c, maxAvailableWidth); continue; } if (o instanceof StylePop) { CalculatedStyle style = c.getCurrentStyle(); int rightMBP = style.getRightMarginBorderPadding(c, maxAvailableWidth); pendingRightMBP -= rightMBP; remainingWidth -= rightMBP; elementStack.remove(elementStack.size()-1); currentIB.setEndsHere(true); previousIB = currentIB; currentIB = currentIB.getParent() instanceof LineBox ? null : (InlineBox)currentIB.getParent(); c.popStyle(); continue; } Content content = (Content) o; if (mustBeTakenOutOfFlow(content)) { processOutOfFlowContent(c, content, currentLine, remainingWidth, pendingFloats); } else if (isInlineBlock(content)) { Box inlineBlock = Boxing.layout(c, content); if (inlineBlock.getWidth() > remainingWidth && currentLine.isContainsContent()) { saveLine(currentLine, previousLine, c, box, minimumLineHeight, maxAvailableWidth, elementStack, pendingFloats); inlineBlock = Boxing.layout(c, content); previousLine = currentLine; currentLine = newLine(c, previousLine, box); currentIB = addNestedInlineBoxes(currentLine, elementStack, maxAvailableWidth); previousIB = currentIB.getParent() instanceof LineBox ? null : (InlineBox)currentIB.getParent(); remainingWidth = maxAvailableWidth; if (!box.getStyle().isCleared()) { remainingWidth -= c.getBlockFormattingContext().getFloatDistance( c, currentLine, remainingWidth); } } if (currentIB == null) { currentLine.addChild(inlineBlock); } else { currentIB.addInlineChild(inlineBlock); } currentLine.setContainsContent(true); remainingWidth -= inlineBlock.getWidth(); } else { TextContent text = (TextContent)content; LineBreakContext lbContext = new LineBreakContext(); lbContext.setMaster(TextUtil.transformText(text.getText(), c.getCurrentStyle())); do { lbContext.reset(); int fit = 0; if (lbContext.getStart() == 0) { fit += pendingLeftMBP; } if (hasTrimmableLeadingSpace(currentLine, c.getCurrentStyle(), lbContext)) { lbContext.setStart(lbContext.getStart() + 1); } InlineText inlineText = layoutText(c, remainingWidth - fit, lbContext); if (! lbContext.isUnbreakable() || (lbContext.isUnbreakable() && currentLine.isContainsContent())) { currentIB.addInlineChild(inlineText); currentLine.setContainsContent(true); lbContext.setStart(lbContext.getEnd()); remainingWidth -= inlineText.getWidth(); } if (lbContext.isNeedsNewLine()) { saveLine(currentLine, previousLine, c, box, minimumLineHeight, maxAvailableWidth, elementStack, pendingFloats); previousLine = currentLine; currentLine = newLine(c, previousLine, box); currentIB = addNestedInlineBoxes(currentLine, elementStack, maxAvailableWidth); previousIB = currentIB.getParent() instanceof LineBox ? null : (InlineBox)currentIB.getParent(); remainingWidth = maxAvailableWidth; if (!box.getStyle().isCleared()) { remainingWidth -= c.getBlockFormattingContext().getFloatDistance( c, currentLine, remainingWidth); } } } while (! lbContext.isFinished()); } } saveLine(currentLine, previousLine, c, box, minimumLineHeight, maxAvailableWidth, elementStack, pendingFloats); if (box instanceof AnonymousBlockBox) { ((BlockBox)box.getParent()).setPendingInlineElements( elementStack.size() == 0 ? null : elementStack); } // XXX what does this do? if (!c.shrinkWrap()) box.contentWidth = maxAvailableWidth; box.setHeight(currentLine.y + currentLine.getHeight()); }
|
52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/ceb21dee5f070c3ac63d70ae7b6eb22a7c0b4641/InlineBoxing.java/buggy/src/java/org/xhtmlrenderer/layout/InlineBoxing.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
3511,
1350,
12,
3744,
1042,
276,
16,
8549,
3919,
16,
987,
913,
682,
13,
288,
3639,
509,
943,
5268,
2384,
273,
276,
18,
588,
2482,
4877,
7675,
2819,
31,
3639,
509,
4463,
2384,
273,
943,
5268,
2384,
31,
7734,
509,
5224,
1670,
2686,
273,
261,
474,
13,
71,
18,
588,
3935,
2885,
7675,
588,
1670,
2686,
12,
71,
1769,
1171,
5377,
3514,
22325,
273,
8093,
12,
71,
16,
446,
16,
3919,
1769,
3639,
5377,
3514,
2416,
1670,
273,
446,
31,
7734,
16355,
3514,
783,
13450,
273,
446,
31,
3639,
16355,
3514,
2416,
13450,
273,
446,
31,
7734,
987,
930,
2624,
273,
394,
2407,
5621,
3639,
309,
261,
2147,
1276,
29775,
1768,
3514,
13,
288,
5411,
987,
4634,
273,
14015,
1768,
3514,
13,
2147,
18,
588,
3054,
1435,
2934,
588,
8579,
10870,
3471,
5621,
5411,
309,
261,
9561,
480,
446,
13,
288,
7734,
783,
13450,
273,
527,
8649,
10870,
29521,
12,
2972,
1670,
16,
4634,
16,
943,
5268,
2384,
1769,
7734,
930,
2624,
273,
4634,
31,
5411,
289,
3639,
289,
7734,
15994,
690,
2885,
982,
2885,
273,
276,
18,
588,
3935,
2885,
5621,
3639,
509,
3504,
273,
261,
474,
13,
2938,
2885,
18,
588,
4723,
1396,
626,
17564,
287,
2384,
12,
10276,
461,
18,
5151,
67,
2356,
2222,
16,
943,
5268,
2384,
16,
276,
1769,
3639,
4463,
2384,
3947,
3504,
31,
3639,
22325,
18,
92,
273,
3504,
31,
7734,
309,
16051,
3919,
18,
588,
2885,
7675,
291,
4756,
2258,
10756,
288,
5411,
4463,
2384,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
3511,
1350,
12,
3744,
1042,
276,
16,
8549,
3919,
16,
987,
913,
682,
13,
288,
3639,
509,
943,
5268,
2384,
273,
276,
18,
588,
2482,
4877,
7675,
2819,
31,
3639,
509,
4463,
2384,
273,
943,
5268,
2384,
31,
7734,
509,
5224,
1670,
2686,
273,
261,
474,
13,
71,
18,
588,
3935,
2885,
7675,
588,
1670,
2686,
12,
71,
1769,
1171,
5377,
3514,
22325,
273,
8093,
12,
71,
16,
446,
16,
3919,
1769,
3639,
5377,
3514,
2416,
1670,
273,
446,
31,
7734,
16355,
3514,
783,
13450,
273,
446,
31,
3639,
16355,
3514,
2416,
13450,
273,
446,
31,
7734,
987,
930,
2624,
273,
394,
2407,
5621,
3639,
309,
261,
2147,
1276,
29775,
1768,
3514,
13,
288,
5411,
2
] |
if (!(dm instanceof MGeneralizableElement)) return NO_PROBLEM; MGeneralizableElement ge = (MGeneralizableElement) dm; VectorSet reach = (new VectorSet(ge)).reachable(new SuperclassGen()); if (reach.contains(ge)) return PROBLEM_FOUND; return NO_PROBLEM;
|
boolean problem = NO_PROBLEM; if (ModelFacade.isAGeneralizableElement(dm)) { try { CoreHelper.getHelper().getChildren(dm); } catch (IllegalStateException ex) { problem = PROBLEM_FOUND; } } return problem;
|
public boolean predicate2(Object dm, Designer dsgr) { if (!(dm instanceof MGeneralizableElement)) return NO_PROBLEM; MGeneralizableElement ge = (MGeneralizableElement) dm; VectorSet reach = (new VectorSet(ge)).reachable(new SuperclassGen()); if (reach.contains(ge)) return PROBLEM_FOUND; return NO_PROBLEM; }
|
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/9bc2a8103355ff0c2b14c61a3df3f0113b43409d/CrCircularInheritance.java/clean/src_new/org/argouml/uml/cognitive/critics/CrCircularInheritance.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
5641,
22,
12,
921,
9113,
16,
29703,
264,
302,
1055,
86,
13,
288,
565,
309,
16051,
12,
10956,
1276,
490,
12580,
6934,
1046,
3719,
327,
3741,
67,
3373,
38,
26817,
31,
565,
490,
12580,
6934,
1046,
8244,
273,
261,
49,
12580,
6934,
1046,
13,
9113,
31,
565,
5589,
694,
9287,
273,
261,
2704,
5589,
694,
12,
908,
13,
2934,
17246,
12,
2704,
14845,
1106,
7642,
10663,
565,
309,
261,
12974,
18,
12298,
12,
908,
3719,
327,
4629,
38,
26817,
67,
9294,
31,
565,
327,
3741,
67,
3373,
38,
26817,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
5641,
22,
12,
921,
9113,
16,
29703,
264,
302,
1055,
86,
13,
288,
565,
309,
16051,
12,
10956,
1276,
490,
12580,
6934,
1046,
3719,
327,
3741,
67,
3373,
38,
26817,
31,
565,
490,
12580,
6934,
1046,
8244,
273,
261,
49,
12580,
6934,
1046,
13,
9113,
31,
565,
5589,
694,
9287,
273,
261,
2704,
5589,
694,
12,
908,
13,
2934,
17246,
12,
2704,
14845,
1106,
7642,
10663,
565,
309,
261,
12974,
18,
12298,
12,
908,
3719,
327,
4629,
38,
26817,
67,
9294,
31,
565,
327,
3741,
67,
3373,
38,
26817,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
return new DataDefinitionComposite(parent, SWT.NONE, query, null, builder, oContext);
|
return new DataDefinitionComposite(parent, SWT.NONE, query, seriesdefinition, builder, oContext);
|
public Composite getSeriesDataSheet(Composite parent, Series series, IExpressionBuilder builder, Object oContext) { Query query = null; if (series.getDataDefinition().size() > 0) { query = ((Query) series.getDataDefinition().get(0)); } else { query = QueryImpl.create(""); series.getDataDefinition().add(query); } return new DataDefinitionComposite(parent, SWT.NONE, query, null, builder, oContext); }
|
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/258bad0d502f0759055374875005f9978172c4d7/LineSeriesUIProvider.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/series/LineSeriesUIProvider.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14728,
336,
6485,
751,
8229,
12,
9400,
982,
16,
9225,
4166,
16,
467,
2300,
1263,
2089,
16,
1033,
320,
1042,
13,
565,
288,
3639,
2770,
843,
273,
446,
31,
3639,
309,
261,
10222,
18,
588,
751,
1852,
7675,
1467,
1435,
405,
374,
13,
3639,
288,
5411,
843,
273,
14015,
1138,
13,
4166,
18,
588,
751,
1852,
7675,
588,
12,
20,
10019,
3639,
289,
3639,
469,
3639,
288,
5411,
843,
273,
2770,
2828,
18,
2640,
2932,
8863,
5411,
4166,
18,
588,
751,
1852,
7675,
1289,
12,
2271,
1769,
3639,
289,
3639,
327,
394,
1910,
1852,
9400,
12,
2938,
16,
348,
8588,
18,
9826,
16,
843,
16,
4166,
6907,
16,
2089,
16,
320,
1042,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14728,
336,
6485,
751,
8229,
12,
9400,
982,
16,
9225,
4166,
16,
467,
2300,
1263,
2089,
16,
1033,
320,
1042,
13,
565,
288,
3639,
2770,
843,
273,
446,
31,
3639,
309,
261,
10222,
18,
588,
751,
1852,
7675,
1467,
1435,
405,
374,
13,
3639,
288,
5411,
843,
273,
14015,
1138,
13,
4166,
18,
588,
751,
1852,
7675,
588,
12,
20,
10019,
3639,
289,
3639,
469,
3639,
288,
5411,
843,
273,
2770,
2828,
18,
2640,
2932,
8863,
5411,
4166,
18,
588,
751,
1852,
7675,
1289,
12,
2271,
1769,
3639,
289,
3639,
327,
394,
1910,
1852,
9400,
12,
2938,
16,
348,
8588,
18,
9826,
16,
843,
16,
4166,
6907,
16,
2089,
16,
320,
1042,
1769,
565,
289,
2,
-100,
-100
] |
if (selected != null)
|
if (selected != null && selected.buffer != buffer)
|
public void setSelected() { Window selected = getSelected(); if (selected != null) selected.unselect(); frame.selectedWindow = this; Frame.selectedFrame = frame; buffer.curPosition = getCaret(); if (buffer.pointMarker.index >= 0) buffer.content.freePosition(buffer.pointMarker.index); buffer.pointMarker.index = Marker.POINT_POSITION_INDEX; Buffer.setCurrent(buffer); }
|
40769 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/40769/df6aca8c3709a8f7148d160b9bb49b44389ec103/Window.java/clean/gnu/jemacs/buffer/Window.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
23006,
1435,
225,
288,
565,
6076,
3170,
273,
16625,
5621,
565,
309,
261,
8109,
480,
446,
597,
3170,
18,
4106,
480,
1613,
13,
1377,
3170,
18,
318,
4025,
5621,
565,
2623,
18,
8109,
3829,
273,
333,
31,
565,
8058,
18,
8109,
3219,
273,
2623,
31,
565,
1613,
18,
1397,
2555,
273,
1927,
20731,
5621,
565,
309,
261,
4106,
18,
1153,
7078,
18,
1615,
1545,
374,
13,
1377,
1613,
18,
1745,
18,
9156,
2555,
12,
4106,
18,
1153,
7078,
18,
1615,
1769,
565,
1613,
18,
1153,
7078,
18,
1615,
273,
14742,
18,
8941,
67,
15258,
67,
9199,
31,
565,
3525,
18,
542,
3935,
12,
4106,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
23006,
1435,
225,
288,
565,
6076,
3170,
273,
16625,
5621,
565,
309,
261,
8109,
480,
446,
597,
3170,
18,
4106,
480,
1613,
13,
1377,
3170,
18,
318,
4025,
5621,
565,
2623,
18,
8109,
3829,
273,
333,
31,
565,
8058,
18,
8109,
3219,
273,
2623,
31,
565,
1613,
18,
1397,
2555,
273,
1927,
20731,
5621,
565,
309,
261,
4106,
18,
1153,
7078,
18,
1615,
1545,
374,
13,
1377,
1613,
18,
1745,
18,
9156,
2555,
12,
4106,
18,
1153,
7078,
18,
1615,
1769,
565,
1613,
18,
1153,
7078,
18,
1615,
273,
14742,
18,
8941,
67,
15258,
67,
9199,
31,
565,
3525,
18,
542,
3935,
12,
4106,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public void activate_object_with_id(byte[] an_Object_Id, Servant a_servant, boolean use_forwarding) throws ServantAlreadyActive, ObjectAlreadyActive, WrongPolicy
|
public void activate_object_with_id(byte[] an_Object_Id, Servant a_servant) throws ServantAlreadyActive, ObjectAlreadyActive, WrongPolicy
|
public void activate_object_with_id(byte[] an_Object_Id, Servant a_servant, boolean use_forwarding) throws ServantAlreadyActive, ObjectAlreadyActive, WrongPolicy { checkDiscarding(); required(ServantRetentionPolicyValue.RETAIN); // If the UNIQUE_ID applies, the servant being passed must not be // already active. if (applies(IdUniquenessPolicyValue.UNIQUE_ID)) { AOM.Obj sx = aom.findServant(a_servant, false); if (sx != null) throw new ServantAlreadyActive(); } AOM.Obj exists = aom.get(an_Object_Id); if (exists != null) { if (exists.servant == null) { locateServant(an_Object_Id, a_servant, exists, use_forwarding); exists.setDeactivated(false); } else if (exists.isDeactiveted()) { exists.setDeactivated(false); incarnate(exists, an_Object_Id, a_servant, use_forwarding); } else throw new ObjectAlreadyActive(); } else { ServantDelegateImpl delegate = new ServantDelegateImpl(a_servant, this, an_Object_Id); create_and_connect(an_Object_Id, a_servant._all_interfaces(this, an_Object_Id)[0], delegate); } }
|
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b53ee23d2db4d673b2dea5fee94b6bff00d241bf/gnuPOA.java/clean/core/src/classpath/gnu/gnu/CORBA/Poa/gnuPOA.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
10235,
67,
1612,
67,
1918,
67,
350,
12,
7229,
8526,
392,
67,
921,
67,
548,
16,
1275,
7445,
279,
67,
550,
7445,
16,
565,
1250,
999,
67,
11565,
310,
13,
565,
1216,
1275,
7445,
9430,
3896,
16,
1033,
9430,
3896,
16,
24668,
2582,
225,
288,
565,
866,
14185,
310,
5621,
565,
1931,
12,
827,
7445,
14688,
2582,
620,
18,
10238,
6964,
1769,
565,
368,
971,
326,
26623,
67,
734,
10294,
16,
326,
703,
7445,
3832,
2275,
1297,
486,
506,
565,
368,
1818,
2695,
18,
565,
309,
261,
438,
5259,
12,
548,
984,
18988,
15681,
2582,
620,
18,
16879,
67,
734,
3719,
1377,
288,
3639,
432,
1872,
18,
2675,
13280,
273,
279,
362,
18,
4720,
827,
7445,
12,
69,
67,
550,
7445,
16,
629,
1769,
3639,
309,
261,
30319,
480,
446,
13,
1850,
604,
394,
1275,
7445,
9430,
3896,
5621,
1377,
289,
565,
432,
1872,
18,
2675,
1704,
273,
279,
362,
18,
588,
12,
304,
67,
921,
67,
548,
1769,
565,
309,
261,
1808,
480,
446,
13,
1377,
288,
3639,
309,
261,
1808,
18,
550,
7445,
422,
446,
13,
1850,
288,
5411,
10627,
827,
7445,
12,
304,
67,
921,
67,
548,
16,
279,
67,
550,
7445,
16,
1704,
16,
999,
67,
11565,
310,
1769,
5411,
1704,
18,
542,
758,
18836,
12,
5743,
1769,
1850,
289,
3639,
469,
309,
261,
1808,
18,
291,
758,
11422,
278,
329,
10756,
1850,
288,
5411,
1704,
18,
542,
758,
18836,
12,
5743,
1769,
5411,
7290,
1303,
340,
12,
1808,
16,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
10235,
67,
1612,
67,
1918,
67,
350,
12,
7229,
8526,
392,
67,
921,
67,
548,
16,
1275,
7445,
279,
67,
550,
7445,
16,
565,
1250,
999,
67,
11565,
310,
13,
565,
1216,
1275,
7445,
9430,
3896,
16,
1033,
9430,
3896,
16,
24668,
2582,
225,
288,
565,
866,
14185,
310,
5621,
565,
1931,
12,
827,
7445,
14688,
2582,
620,
18,
10238,
6964,
1769,
565,
368,
971,
326,
26623,
67,
734,
10294,
16,
326,
703,
7445,
3832,
2275,
1297,
486,
506,
565,
368,
1818,
2695,
18,
565,
309,
261,
438,
5259,
12,
548,
984,
18988,
15681,
2582,
620,
18,
16879,
67,
734,
3719,
1377,
288,
3639,
432,
1872,
18,
2675,
13280,
273,
279,
362,
18,
4720,
827,
7445,
2
] |
} result = true;
|
public boolean lookingAtValidChar(boolean skipPastChar) throws Exception { int b0 = fMostRecentByte; if (b0 < 0x80) { // 0xxxxxxx if (b0 >= 0x20 || b0 == 0x09) { if (skipPastChar) { fCharacterCounter++; if (USE_OUT_OF_LINE_LOAD_NEXT_BYTE) { loadNextByte(); } else { fCurrentOffset++; if (USE_TRY_CATCH_FOR_LOAD_NEXT_BYTE) { fCurrentIndex++; try { fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF; } catch (ArrayIndexOutOfBoundsException ex) { slowLoadNextByte(); } } else { if (++fCurrentIndex == UTF8DataChunk.CHUNK_SIZE) slowLoadNextByte(); else fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF; } } } return true; } if (b0 == 0x0A) { if (skipPastChar) { fLinefeedCounter++; fCharacterCounter = 1; if (USE_OUT_OF_LINE_LOAD_NEXT_BYTE) { loadNextByte(); } else { fCurrentOffset++; if (USE_TRY_CATCH_FOR_LOAD_NEXT_BYTE) { fCurrentIndex++; try { fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF; } catch (ArrayIndexOutOfBoundsException ex) { slowLoadNextByte(); } } else { if (++fCurrentIndex == UTF8DataChunk.CHUNK_SIZE) slowLoadNextByte(); else fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF; } } } return true; } if (b0 == 0x0D) { if (skipPastChar) { fCarriageReturnCounter++; fCharacterCounter = 1; if (USE_OUT_OF_LINE_LOAD_NEXT_BYTE) { b0 = loadNextByte(); } else { fCurrentOffset++; if (USE_TRY_CATCH_FOR_LOAD_NEXT_BYTE) { fCurrentIndex++; try { fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF; b0 = fMostRecentByte; } catch (ArrayIndexOutOfBoundsException ex) { b0 = slowLoadNextByte(); } } else { if (++fCurrentIndex == UTF8DataChunk.CHUNK_SIZE) b0 = slowLoadNextByte(); else b0 = (fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF); } } if (b0 == 0x0A) { fLinefeedCounter++; if (USE_OUT_OF_LINE_LOAD_NEXT_BYTE) { loadNextByte(); } else { fCurrentOffset++; if (USE_TRY_CATCH_FOR_LOAD_NEXT_BYTE) { fCurrentIndex++; try { fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF; } catch (ArrayIndexOutOfBoundsException ex) { slowLoadNextByte(); } } else { if (++fCurrentIndex == UTF8DataChunk.CHUNK_SIZE) slowLoadNextByte(); else fMostRecentByte = fMostRecentData[fCurrentIndex] & 0xFF; } } } } return true; } if (b0 == 0) { if (atEOF(fCurrentOffset + 1)) { return changeReaders().lookingAtValidChar(skipPastChar); } } return false; } // // REVISIT - optimize this with in-buffer lookahead. // UTF8DataChunk saveChunk = fCurrentChunk; int saveIndex = fCurrentIndex; int saveOffset = fCurrentOffset; int b1 = loadNextByte(); if ((0xe0 & b0) == 0xc0) { // 110yyyyy 10xxxxxx (0x80 to 0x7ff) if (skipPastChar) { fCharacterCounter++; loadNextByte(); } else { fCurrentChunk = saveChunk; fCurrentIndex = saveIndex; fCurrentOffset = saveOffset; fMostRecentData = saveChunk.toByteArray(); fMostRecentByte = b0; } return true; // [#x20-#xD7FF] } int b2 = loadNextByte(); if ((0xf0 & b0) == 0xe0) { // 1110zzzz 10yyyyyy 10xxxxxx // ch = ((0x0f & b0)<<12) + ((0x3f & b1)<<6) + (0x3f & b2); // zzzz yyyy yyxx xxxx (0x800 to 0xffff) // if (!((ch >= 0xD800 && ch <= 0xDFFF) || ch >= 0xFFFE)) // if ((ch <= 0xD7FF) || (ch >= 0xE000 && ch <= 0xFFFD)) boolean result = false; if (!((b0 == 0xED && b1 >= 0xA0) || (b0 == 0xEF && b1 == 0xBF && b2 >= 0xBE))) { // [#x20-#xD7FF] | [#xE000-#xFFFD] if (skipPastChar) { fCharacterCounter++; loadNextByte(); return true; } result = true; } fCurrentChunk = saveChunk; fCurrentIndex = saveIndex; fCurrentOffset = saveOffset; fMostRecentData = saveChunk.toByteArray(); fMostRecentByte = b0; return result; } int b3 = loadNextByte(); // 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // ch = ((0x0f & b0)<<18) + ((0x3f & b1)<<12) + ((0x3f & b2)<<6) + (0x3f & b3); // u uuuu zzzz yyyy yyxx xxxx (0x10000 to 0x1ffff) // if (ch >= 0x110000) boolean result = false; if (( 0xf8 & b0 ) == 0xf0 ) { if (!(b0 > 0xF4 || (b0 == 0xF4 && b1 >= 0x90))) { // [#x10000-#x10FFFF] if (skipPastChar) { fCharacterCounter++; loadNextByte(); return true; } result = true; } fCurrentChunk = saveChunk; fCurrentIndex = saveIndex; fCurrentOffset = saveOffset; fMostRecentData = saveChunk.toByteArray(); fMostRecentByte = b0; return result; } else{ fCurrentChunk = saveChunk; fCurrentIndex = saveIndex; fCurrentOffset = saveOffset; fMostRecentData = saveChunk.toByteArray(); fMostRecentByte = b0; return result; } }
|
6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/ee1fcf74a2e0d8b4bd99619469e50d4aa75a377f/UTF8Reader.java/clean/src/org/apache/xerces/readers/UTF8Reader.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
7849,
861,
1556,
2156,
12,
6494,
2488,
52,
689,
2156,
13,
1216,
1185,
288,
3639,
509,
324,
20,
273,
284,
18714,
17076,
3216,
31,
3639,
309,
261,
70,
20,
411,
374,
92,
3672,
13,
288,
225,
368,
374,
15731,
18310,
5411,
309,
261,
70,
20,
1545,
374,
92,
3462,
747,
324,
20,
422,
374,
92,
5908,
13,
288,
7734,
309,
261,
7457,
52,
689,
2156,
13,
288,
10792,
284,
7069,
4789,
9904,
31,
10792,
309,
261,
8001,
67,
5069,
67,
3932,
67,
5997,
67,
7783,
67,
25539,
67,
15377,
13,
288,
13491,
1262,
2134,
3216,
5621,
10792,
289,
469,
288,
13491,
284,
3935,
2335,
9904,
31,
13491,
309,
261,
8001,
67,
17805,
67,
39,
5858,
67,
7473,
67,
7783,
67,
25539,
67,
15377,
13,
288,
18701,
284,
3935,
1016,
9904,
31,
18701,
775,
288,
27573,
284,
18714,
17076,
3216,
273,
284,
18714,
17076,
751,
63,
74,
3935,
1016,
65,
473,
374,
6356,
31,
18701,
289,
1044,
261,
1076,
30548,
431,
13,
288,
27573,
11816,
2563,
2134,
3216,
5621,
18701,
289,
13491,
289,
469,
288,
18701,
309,
261,
9904,
74,
3935,
1016,
422,
6380,
28,
751,
5579,
18,
26464,
67,
4574,
13,
27573,
11816,
2563,
2134,
3216,
5621,
18701,
469,
27573,
284,
18714,
17076,
3216,
273,
284,
18714,
17076,
751,
63,
74,
3935,
1016,
65,
473,
374,
6356,
31,
13491,
289,
10792,
289,
7734,
289,
7734,
327,
638,
31,
5411,
289,
5411,
309,
261,
70,
20,
422,
374,
92,
20,
37,
13,
288,
7734,
309,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7849,
861,
1556,
2156,
12,
6494,
2488,
52,
689,
2156,
13,
1216,
1185,
288,
3639,
509,
324,
20,
273,
284,
18714,
17076,
3216,
31,
3639,
309,
261,
70,
20,
411,
374,
92,
3672,
13,
288,
225,
368,
374,
15731,
18310,
5411,
309,
261,
70,
20,
1545,
374,
92,
3462,
747,
324,
20,
422,
374,
92,
5908,
13,
288,
7734,
309,
261,
7457,
52,
689,
2156,
13,
288,
10792,
284,
7069,
4789,
9904,
31,
10792,
309,
261,
8001,
67,
5069,
67,
3932,
67,
5997,
67,
7783,
67,
25539,
67,
15377,
13,
288,
13491,
1262,
2134,
3216,
5621,
10792,
289,
469,
288,
13491,
284,
3935,
2335,
9904,
31,
13491,
309,
261,
8001,
67,
17805,
67,
39,
5858,
67,
2
] |
|
page.put(PdfName.USERUNIT, new PdfNumber(writer.getUserunit())); }
|
page.put(PdfName.USERUNIT, new PdfNumber(writer.getUserunit())); }
|
public boolean newPage() throws DocumentException { lastElementType = -1; //add by Jin-Hsia Yang isNewpage = true; //end add by Jin-Hsia Yang if (writer.getDirectContent().size() == 0 && writer.getDirectContentUnder().size() == 0 && (pageEmpty || (writer != null && writer.isPaused()))) { return false; } PdfPageEvent pageEvent = writer.getPageEvent(); if (pageEvent != null) pageEvent.onEndPage(writer, this); //Added to inform any listeners that we are moving to a new page (added by David Freels) super.newPage(); // the following 2 lines were added by Pelikan Stephan imageIndentLeft = 0; imageIndentRight = 0; // we flush the arraylist with recently written lines flushLines(); // we assemble the resources of this pages pageResources.addDefaultColorDiff(writer.getDefaultColorspace()); PdfDictionary resources = pageResources.getResources(); // we make a new page and add it to the document if (writer.getPDFXConformance() != PdfWriter.PDFXNONE) { if (thisBoxSize.containsKey("art") && thisBoxSize.containsKey("trim")) throw new PdfXConformanceException("Only one of ArtBox or TrimBox can exist in the page."); if (!thisBoxSize.containsKey("art") && !thisBoxSize.containsKey("trim")) { if (thisBoxSize.containsKey("crop")) thisBoxSize.put("trim", thisBoxSize.get("crop")); else thisBoxSize.put("trim", new PdfRectangle(pageSize, pageSize.getRotation())); } } PdfPage page; int rotation = pageSize.getRotation(); page = new PdfPage(new PdfRectangle(pageSize, rotation), thisBoxSize, resources, rotation); if (writer.isTagged()) page.put(PdfName.STRUCTPARENTS, new PdfNumber(writer.getCurrentPageNumber() - 1)); // we add the transitions if (this.transition!=null) { page.put(PdfName.TRANS, this.transition.getTransitionDictionary()); transition = null; } if (this.duration>0) { page.put(PdfName.DUR,new PdfNumber(this.duration)); duration = 0; } // we add the page object additional actions if (pageAA != null) { try { page.put(PdfName.AA, writer.addToBody(pageAA).getIndirectReference()); } catch (IOException ioe) { throw new ExceptionConverter(ioe); } pageAA = null; } // we check if the userunit is defined if (writer.getUserunit() > 0f) { page.put(PdfName.USERUNIT, new PdfNumber(writer.getUserunit())); } // we add the annotations if (annotations.size() > 0) { PdfArray array = rotateAnnotations(); if (array.size() != 0) page.put(PdfName.ANNOTS, array); } // we add the thumbs if (thumb != null) { page.put(PdfName.THUMB, thumb); thumb = null; } if (!open || close) { throw new PdfException("The document isn't open."); } if (text.size() > textEmptySize) text.endText(); else text = null; writer.add(page, new PdfContents(writer.getDirectContentUnder(), graphics, text, writer.getDirectContent(), pageSize)); // we initialize the new page initPage(); //add by Jin-Hsia Yang isNewpage = false; //end add by Jin-Hsia Yang return true; }
|
6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/aae864e08892bcaa996e6e0837e49ba48452dad0/PdfDocument.java/clean/src/com/lowagie/text/pdf/PdfDocument.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
394,
1964,
1435,
1216,
4319,
503,
288,
3639,
1142,
17481,
273,
300,
21,
31,
3639,
368,
1289,
635,
804,
267,
17,
44,
87,
1155,
1624,
539,
3639,
10783,
2433,
273,
638,
31,
3639,
368,
409,
527,
635,
804,
267,
17,
44,
87,
1155,
1624,
539,
3639,
309,
261,
6299,
18,
588,
5368,
1350,
7675,
1467,
1435,
422,
374,
597,
2633,
18,
588,
5368,
1350,
14655,
7675,
1467,
1435,
422,
374,
597,
261,
2433,
1921,
747,
261,
6299,
480,
446,
597,
2633,
18,
291,
28590,
1435,
20349,
288,
5411,
327,
629,
31,
3639,
289,
3639,
9989,
1964,
1133,
1363,
1133,
273,
2633,
18,
588,
1964,
1133,
5621,
3639,
309,
261,
2433,
1133,
480,
446,
13,
5411,
1363,
1133,
18,
265,
1638,
1964,
12,
6299,
16,
333,
1769,
7734,
368,
8602,
358,
13235,
1281,
4679,
716,
732,
854,
12499,
358,
279,
394,
1363,
261,
9665,
635,
463,
842,
350,
478,
266,
10558,
13,
3639,
2240,
18,
2704,
1964,
5621,
7734,
368,
326,
3751,
576,
2362,
4591,
3096,
635,
15836,
1766,
304,
7780,
10499,
3639,
1316,
7790,
3910,
273,
374,
31,
3639,
1316,
7790,
4726,
273,
374,
31,
7734,
368,
732,
3663,
326,
526,
1098,
598,
19907,
5941,
2362,
3639,
3663,
5763,
5621,
3639,
368,
732,
19540,
326,
2703,
434,
333,
4689,
3639,
1363,
3805,
18,
1289,
1868,
2957,
5938,
12,
6299,
18,
588,
1868,
12570,
909,
10663,
7734,
9989,
10905,
2703,
273,
1363,
3805,
18,
588,
3805,
5621,
3639,
368,
732,
1221,
279,
394,
1363,
471,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
394,
1964,
1435,
1216,
4319,
503,
288,
3639,
1142,
17481,
273,
300,
21,
31,
3639,
368,
1289,
635,
804,
267,
17,
44,
87,
1155,
1624,
539,
3639,
10783,
2433,
273,
638,
31,
3639,
368,
409,
527,
635,
804,
267,
17,
44,
87,
1155,
1624,
539,
3639,
309,
261,
6299,
18,
588,
5368,
1350,
7675,
1467,
1435,
422,
374,
597,
2633,
18,
588,
5368,
1350,
14655,
7675,
1467,
1435,
422,
374,
597,
261,
2433,
1921,
747,
261,
6299,
480,
446,
597,
2633,
18,
291,
28590,
1435,
20349,
288,
5411,
327,
629,
31,
3639,
289,
3639,
9989,
1964,
1133,
1363,
1133,
273,
2633,
18,
588,
1964,
1133,
5621,
3639,
309,
261,
2433,
1133,
480,
446,
13,
5411,
1363,
2
] |
tokenConsumption: while( true ){ switch( token.getType() ){ case IToken.tCOMMA : list.addLast( param.toCharArray() ); param = new String(""); break; case IToken.tLPAREN : break; case IToken.tRPAREN : list.addLast( param.toCharArray() ); break tokenConsumption; case IToken.tSTAR: case IToken.tQUESTION: lastTokenWasWild = true; param += token.getImage(); break; default: if( !lastTokenWasWild && param.length() > 0 ) param += " "; param += token.getImage(); break; } token = scanner.nextToken();
|
if( declarations == null || ! declarations.hasNext() ) return null; IASTFunction function = (IASTFunction) declarations.next(); Iterator parameters = function.getParameters(); char [] param = null; while( parameters.hasNext() ){ param = getParamString( (IASTParameterDeclaration)parameters.next() ); list.add( param );
|
private static LinkedList scanForParameters(IScanner scanner) { LinkedList list = new LinkedList(); String param = new String(""); boolean lastTokenWasWild = false; try{ IToken token = scanner.nextToken(); tokenConsumption: while( true ){ switch( token.getType() ){ case IToken.tCOMMA : list.addLast( param.toCharArray() ); param = new String(""); break; case IToken.tLPAREN : break; case IToken.tRPAREN : list.addLast( param.toCharArray() ); break tokenConsumption; case IToken.tSTAR: case IToken.tQUESTION: lastTokenWasWild = true; param += token.getImage(); break; default: if( !lastTokenWasWild && param.length() > 0 ) param += " "; param += token.getImage(); break; } token = scanner.nextToken(); } } catch ( EndOfFile e ){ list.addLast( param.toCharArray() ); } catch( ScannerException e ){ } return list; }
|
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/ceee55836e1155fe2a56b45dafd602f35bf19ce6/CSearchPattern.java/clean/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
10688,
4135,
1290,
2402,
12,
45,
11338,
7683,
13,
288,
202,
202,
13174,
682,
666,
273,
394,
10688,
5621,
9506,
202,
780,
579,
273,
394,
514,
2932,
8863,
9506,
202,
6494,
27231,
14992,
59,
545,
273,
629,
31,
202,
202,
698,
95,
1082,
202,
1285,
969,
1147,
273,
7683,
18,
4285,
1345,
5621,
25083,
202,
2316,
11911,
375,
30,
1082,
202,
17523,
12,
638,
262,
95,
9506,
202,
9610,
12,
1147,
18,
588,
559,
1435,
262,
95,
6862,
202,
3593,
467,
1345,
18,
88,
4208,
5535,
294,
25083,
202,
1098,
18,
1289,
3024,
12,
579,
18,
869,
15936,
1435,
11272,
25083,
202,
891,
273,
394,
514,
2932,
8863,
25083,
202,
8820,
31,
6862,
6862,
1082,
202,
3593,
467,
1345,
18,
88,
48,
15111,
294,
25083,
202,
8820,
31,
6862,
6862,
1082,
202,
3593,
467,
1345,
18,
88,
54,
15111,
294,
25083,
202,
1098,
18,
1289,
3024,
12,
579,
18,
869,
15936,
1435,
11272,
25083,
202,
8820,
1147,
11911,
375,
31,
6862,
6862,
1082,
202,
3593,
467,
1345,
18,
88,
20943,
30,
6862,
202,
3593,
467,
1345,
18,
88,
4740,
1146,
30,
25083,
202,
2722,
1345,
14992,
59,
545,
273,
638,
31,
25083,
202,
891,
1011,
1147,
18,
588,
2040,
5621,
25083,
202,
8820,
31,
6862,
6862,
1082,
202,
1886,
30,
25083,
202,
430,
12,
401,
2722,
1345,
14992,
59,
545,
597,
579,
18,
2469,
1435,
405,
374,
262,
6862,
1082,
202,
891,
1011,
315,
13636,
25083,
202,
891,
1011,
1147,
18,
588,
2040,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10688,
4135,
1290,
2402,
12,
45,
11338,
7683,
13,
288,
202,
202,
13174,
682,
666,
273,
394,
10688,
5621,
9506,
202,
780,
579,
273,
394,
514,
2932,
8863,
9506,
202,
6494,
27231,
14992,
59,
545,
273,
629,
31,
202,
202,
698,
95,
1082,
202,
1285,
969,
1147,
273,
7683,
18,
4285,
1345,
5621,
25083,
202,
2316,
11911,
375,
30,
1082,
202,
17523,
12,
638,
262,
95,
9506,
202,
9610,
12,
1147,
18,
588,
559,
1435,
262,
95,
6862,
202,
3593,
467,
1345,
18,
88,
4208,
5535,
294,
25083,
202,
1098,
18,
1289,
3024,
12,
579,
18,
869,
15936,
1435,
11272,
25083,
202,
891,
273,
394,
514,
2932,
8863,
25083,
202,
8820,
31,
6862,
6862,
1082,
2
] |
System.out.println("\tcertain = " + certain);
|
public static void main(String[] args) throws FormatException, IOException { File file = args.length < 1 ? new File(System.getProperty("user.dir")).listFiles()[0] : new File(args[0]); System.out.println("File = " + file.getAbsoluteFile()); String pat = FilePattern.findPattern(file); if (pat == null) System.out.println("No pattern found."); else { System.out.println("Pattern = " + pat); FilePattern fp = new FilePattern(pat); if (fp.isValid()) { System.out.println("Pattern is valid."); String id = fp.getFiles()[0]; if (!new File(id).exists()) { System.out.println("File '" + id + "' does not exist."); } else { // read dimensional information from first file System.out.print("Reading first file "); ImageReader reader = new ImageReader(); String dimOrder = reader.getDimensionOrder(id); int sizeZ = reader.getSizeZ(id); int sizeT = reader.getSizeT(id); int sizeC = reader.getSizeC(id); boolean certain = reader.isOrderCertain(id); reader.close(); System.out.println("[done]"); System.out.println("\tdimOrder = " + dimOrder); System.out.println("\tsizeZ = " + sizeZ); System.out.println("\tsizeT = " + sizeT); System.out.println("\tsizeC = " + sizeC); System.out.println("\tcertain = " + certain); // guess axes AxisGuesser ag = new AxisGuesser(fp, dimOrder, sizeZ, sizeT, sizeC, certain); // output results String[] blocks = fp.getBlocks(); String[] prefixes = fp.getPrefixes(); int[] axes = ag.getAxisTypes(); String newOrder = ag.getAdjustedOrder(); System.out.println("Axis types:"); for (int i=0; i<blocks.length; i++) { String axis; switch (axes[i]) { case Z_AXIS: axis = "Z"; break; case T_AXIS: axis = "T"; break; case C_AXIS: axis = "C"; break; default: axis = "?"; } System.out.println("\t" + blocks[i] + "\t" + axis + " (prefix = " + prefixes[i] + ")"); } System.out.println("Adjusted dimension order = " + newOrder); } } else System.out.println("Pattern is invalid: " + fp.getErrorMessage()); } }
|
46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/58efc920cd77357b1781520801c62cc4edad94cc/AxisGuesser.java/clean/loci/formats/AxisGuesser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
4077,
503,
16,
1860,
288,
565,
1387,
585,
273,
833,
18,
2469,
411,
404,
692,
1377,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
1355,
18,
1214,
7923,
2934,
1098,
2697,
1435,
63,
20,
65,
294,
1377,
394,
1387,
12,
1968,
63,
20,
19226,
565,
2332,
18,
659,
18,
8222,
2932,
812,
273,
315,
397,
585,
18,
588,
10368,
812,
10663,
565,
514,
9670,
273,
1387,
3234,
18,
4720,
3234,
12,
768,
1769,
565,
309,
261,
16330,
422,
446,
13,
2332,
18,
659,
18,
8222,
2932,
2279,
1936,
1392,
1199,
1769,
565,
469,
288,
1377,
2332,
18,
659,
18,
8222,
2932,
3234,
273,
315,
397,
9670,
1769,
1377,
1387,
3234,
4253,
273,
394,
1387,
3234,
12,
16330,
1769,
1377,
309,
261,
7944,
18,
26810,
10756,
288,
3639,
2332,
18,
659,
18,
8222,
2932,
3234,
353,
923,
1199,
1769,
3639,
514,
612,
273,
4253,
18,
588,
2697,
1435,
63,
20,
15533,
3639,
309,
16051,
2704,
1387,
12,
350,
2934,
1808,
10756,
288,
1850,
2332,
18,
659,
18,
8222,
2932,
812,
2119,
397,
612,
397,
2491,
1552,
486,
1005,
1199,
1769,
3639,
289,
3639,
469,
288,
1850,
368,
855,
17469,
1779,
628,
1122,
585,
1850,
2332,
18,
659,
18,
1188,
2932,
15714,
1122,
585,
315,
1769,
1850,
3421,
2514,
2949,
273,
394,
3421,
2514,
5621,
1850,
514,
2464,
2448,
273,
2949,
18,
588,
8611,
2448,
12,
350,
1769,
1850,
509,
963,
62,
273,
2949,
18,
588,
1225,
62,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
4077,
503,
16,
1860,
288,
565,
1387,
585,
273,
833,
18,
2469,
411,
404,
692,
1377,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
1355,
18,
1214,
7923,
2934,
1098,
2697,
1435,
63,
20,
65,
294,
1377,
394,
1387,
12,
1968,
63,
20,
19226,
565,
2332,
18,
659,
18,
8222,
2932,
812,
273,
315,
397,
585,
18,
588,
10368,
812,
10663,
565,
514,
9670,
273,
1387,
3234,
18,
4720,
3234,
12,
768,
1769,
565,
309,
261,
16330,
422,
446,
13,
2332,
18,
659,
18,
8222,
2932,
2279,
1936,
1392,
1199,
1769,
565,
469,
288,
1377,
2332,
18,
659,
18,
8222,
2932,
3234,
273,
315,
397,
9670,
1769,
1377,
2
] |
|
(FrontEnd.PROP_SAMPLE_RATE, 16000);
|
(propertyPrefix + "sampleRate", 16000);
|
public void setProperties(SphinxProperties props) { int sampleRate = props.getInt (FrontEnd.PROP_SAMPLE_RATE, 16000); float windowSizeInMs = getSphinxProperties().getFloat (FrontEnd.PROP_WINDOW_SIZE_MS, 25.625F); float windowShiftInMs = getSphinxProperties().getFloat (FrontEnd.PROP_WINDOW_SHIFT_MS, 10.0F); windowSize = Util.getSamplesPerWindow(sampleRate, windowSizeInMs); windowShift = Util.getSamplesPerShift(sampleRate, windowShiftInMs); }
|
52185 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52185/9c35c918eb75ae0459cd4469c20599988ba60200/Windower.java/buggy/edu/cmu/sphinx/frontend/Windower.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23126,
12,
55,
15922,
2297,
3458,
13,
288,
3639,
509,
27505,
273,
3458,
18,
588,
1702,
202,
565,
261,
4468,
2244,
397,
315,
6358,
4727,
3113,
2872,
3784,
1769,
3639,
1431,
27064,
382,
6947,
273,
1322,
15922,
2297,
7675,
588,
4723,
5411,
261,
9580,
1638,
18,
15811,
67,
23407,
67,
4574,
67,
3537,
16,
6969,
18,
26,
2947,
42,
1769,
3639,
1431,
2742,
10544,
382,
6947,
273,
1322,
15922,
2297,
7675,
588,
4723,
5411,
261,
9580,
1638,
18,
15811,
67,
23407,
67,
23191,
67,
3537,
16,
1728,
18,
20,
42,
1769,
3639,
27064,
273,
3564,
18,
588,
13239,
2173,
3829,
12,
6358,
4727,
16,
27064,
382,
6947,
1769,
3639,
2742,
10544,
273,
3564,
18,
588,
13239,
2173,
10544,
12,
6358,
4727,
16,
2742,
10544,
382,
6947,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23126,
12,
55,
15922,
2297,
3458,
13,
288,
3639,
509,
27505,
273,
3458,
18,
588,
1702,
202,
565,
261,
4468,
2244,
397,
315,
6358,
4727,
3113,
2872,
3784,
1769,
3639,
1431,
27064,
382,
6947,
273,
1322,
15922,
2297,
7675,
588,
4723,
5411,
261,
9580,
1638,
18,
15811,
67,
23407,
67,
4574,
67,
3537,
16,
6969,
18,
26,
2947,
42,
1769,
3639,
1431,
2742,
10544,
382,
6947,
273,
1322,
15922,
2297,
7675,
588,
4723,
5411,
261,
9580,
1638,
18,
15811,
67,
23407,
67,
23191,
67,
3537,
16,
1728,
18,
20,
42,
1769,
3639,
27064,
273,
3564,
18,
588,
13239,
2173,
3829,
12,
6358,
4727,
16,
27064,
382,
6947,
1769,
3639,
2742,
10544,
273,
3564,
18,
588,
13239,
2
] |
imcode.server.user.User user ;
|
imcode.server.user.UserDomainObject user ;
|
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String host = req.getHeader("Host") ; IMCServiceInterface imcref = IMCServiceRMI.getIMCServiceInterface(req) ; String start_url = imcref.getStartUrl() ; String image_url = imcref.getImageUrl() ; File image_path = Utility.getDomainPrefPath( "image_path",host ) ; imcode.server.user.User user ; String htmlStr = "" ; int meta_id ; int img_no ; res.setContentType("text/html"); PrintWriter out = res.getWriter(); String tmp = (req.getParameter("img_no") != null)?req.getParameter("img_no"):req.getParameter("img") ; img_no = Integer.parseInt(tmp) ; tmp = req.getParameter("meta_id") ; meta_id = Integer.parseInt(tmp) ; String label = req.getParameter("label") ; if (label == null) { label = "" ; } // Check if ChangeImage is invoked by ImageBrowse, hence containing // an image filename as option value (M. Wallin) String img_preset = (req.getParameter("imglist") == null)?"":java.net.URLDecoder.decode(req.getParameter("imglist")); // Get the session HttpSession session = req.getSession(true); // Does the session indicate this user already logged in? Object done = session.getAttribute("logon.isDone"); // marker object user = (imcode.server.user.User)done ; if (done == null) { // No logon.isDone means he hasn't logged in. // Save the request URL as the true target and redirect to the login page. String scheme = req.getScheme(); String serverName = req.getServerName(); int p = req.getServerPort(); String port = (p == 80) ? "" : ":" + p; res.sendRedirect(scheme + "://" + serverName + port + start_url) ; return ; } // Check if user has write rights if ( !imcref.checkDocAdminRights( meta_id, user) ) { log("User "+user.getUserId()+" was denied access to meta_id "+meta_id+" and was sent to "+start_url) ; String scheme = req.getScheme() ; String serverName = req.getServerName() ; int p = req.getServerPort() ; String port = ( p == 80 ) ? "" : ":" + p ; res.sendRedirect( scheme + "://" + serverName + port + start_url ) ; return ; } //*lets get the root_dir_name that we need later on String root_dir_name = image_path.getName(); //*lets get the dirlist, and add the rootdir to it List imageFolders = GetImages.getImageFolders(image_path, true) ; imageFolders.add(0,image_path); //ok we have the list, now lets setup the option list to send to browser StringBuffer folderOptions = new StringBuffer(); Iterator iter = imageFolders.iterator(); while (iter.hasNext()){ File fileObj = (File) iter.next(); String optionValue, optionName; //OBS! we only allowe on directory down from imageRoot, //so the current "directory" or the "parent" must be equal to root_dir_name //lets start and see if the parent is root_dir if ( root_dir_name.equals(fileObj.getParentFile().getName()) ){ optionValue = HTMLConv.toHTML("\\"+fileObj.getName()); optionName = HTMLConv.toHTML(" \\"+fileObj.getName()); }else if( root_dir_name.equals(fileObj.getName()) ){ optionValue = ""; optionName = HTMLConv.toHTML(fileObj.getName()); }else{ continue; } folderOptions.append("<option value=\"" + optionValue + "\">" + optionName + "</option>\r\n"); }//end while loop session.setAttribute("imageFolderOptionList",folderOptions.toString()); String sqlStr = "select image_name,imgurl,width,height,border,v_space,h_space,target,target_name,align,alt_text,low_scr,linkurl from images where meta_id = "+meta_id+" and name = "+img_no ; String[] sql = imcref.sqlQuery(sqlStr) ; Vector vec = new Vector () ; String imageName = ("".equals(img_preset)&&sql.length>0?sql[1]:img_preset); // selected OPTION or "" //**************************************************************** ImageFileMetaData image = new ImageFileMetaData(new File(image_path,imageName)) ; int width = image.getWidth() ; int height = image.getHeight() ; //**************************************************************** imageName = imageName ; if ( sql.length > 0 ) { int current_width = 0 ; try { current_width = Integer.parseInt(img_preset.equals("")?sql[2]:"" + width) ; } catch ( NumberFormatException ex ) { } int current_height = 0 ; try { current_height = Integer.parseInt(img_preset.equals("")?sql[3]:"" + height) ; } catch ( NumberFormatException ex ) { } int aspect = 0 ; if (current_width * current_height != 0) { aspect = 100 * current_width / current_height ; } String keepAspect = "checked" ; if (width * height != 0 && aspect != (100 * width / height)) { keepAspect = "" ; } vec.add("#imgName#") ; vec.add(sql[0]) ; vec.add("#imgRef#") ; vec.add(imageName); vec.add("#imgWidth#") ; vec.add(current_width!=0?""+current_width:""+width); vec.add("#origW#"); // original imageWidth vec.add("" + width); vec.add("#imgHeight#") ; vec.add(current_height!=0?""+current_height:""+height); vec.add("#origH#"); vec.add("" + height); // original imageHeight vec.add("#keep_aspect#") ; vec.add(keepAspect) ; vec.add("#imgBorder#") ; vec.add(sql[4]) ; vec.add("#imgVerticalSpace#") ; vec.add(sql[5]) ; vec.add("#imgHorizontalSpace#") ; vec.add(sql[6]) ; if ( "_top".equals(sql[7]) ) { vec.add("#target_name#") ; vec.add("") ; vec.add("#top_checked#") ; } else if ( "_self".equals(sql[7]) ) { vec.add("#target_name#") ; vec.add("") ; vec.add("#self_checked#") ; } else if ( "_blank".equals(sql[7]) ) { vec.add("#target_name#") ; vec.add("") ; vec.add("#blank_checked#") ; } else if ( "_parent".equals(sql[7]) ) { vec.add("#target_name#") ; vec.add("") ; vec.add("#blank_checked#") ; } else { vec.add("#target_name#") ; vec.add(sql[8]) ; vec.add("#other_checked#") ; } vec.add("selected") ; if ( "baseline".equals(sql[9]) ) { vec.add("#baseline_selected#") ; } else if ( "top".equals(sql[9]) ) { vec.add("#top_selected#") ; } else if ( "middle".equals(sql[9]) ) { vec.add("#middle_selected#") ; } else if ( "bottom".equals(sql[9]) ) { vec.add("#bottom_selected#") ; } else if ( "texttop".equals(sql[9]) ) { vec.add("#texttop_selected#") ; } else if ( "absmiddle".equals(sql[9]) ) { vec.add("#absmiddle_selected#") ; } else if ( "absbottom".equals(sql[9]) ) { vec.add("#absbottom_selected#") ; } else if ( "left".equals(sql[9]) ) { vec.add("#left_selected#") ; } else if ( "right".equals(sql[9]) ) { vec.add("#right_selected#") ; } else { vec.add("#none_selected#") ; } vec.add("selected") ; vec.add("#imgAltText#") ; vec.add(sql[10]) ; vec.add("#imgLowScr#") ; vec.add(sql[11]) ; vec.add("#imgRefLink#") ; vec.add(sql[12]) ; } else { vec.add("#imgName#") ; vec.add("") ; vec.add("#imgRef#") ; vec.add(imageName); vec.add("#imgWidth#") ; vec.add("" + width) ; vec.add("#imgHeight#") ; vec.add("" + height) ; vec.add("#origW#"); vec.add("" + width); vec.add("#origH#"); vec.add("" + height); vec.add("#imgBorder#") ; vec.add("0") ; vec.add("#imgVerticalSpace#") ; vec.add("0") ; vec.add("#imgHorizontalSpace#") ; vec.add("0") ; vec.add("#target_name#") ; vec.add("") ; vec.add("#self_checked#") ; vec.add("selected") ; vec.add("#top_selected#") ; vec.add("selected") ; vec.add("#imgAltText#") ; vec.add("") ; vec.add("#imgLowScr#") ; vec.add("") ; vec.add("#imgRefLink#") ; vec.add("") ; } vec.add("#imgUrl#") ; vec.add(image_url) ; vec.add("#getMetaId#") ; vec.add(String.valueOf(meta_id)) ; vec.add("#img_no#") ; vec.add(String.valueOf(img_no)) ; vec.add("#folders#"); vec.add(folderOptions.toString()); vec.add("#label#") ; vec.add(label) ; String lang_prefix = user.getLangPrefix() ; htmlStr = imcref.parseDoc(vec,"change_img.html", lang_prefix) ; out.print(htmlStr) ; }
|
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/aac0c3f1fbded79e44eeb9b126b31959f0f22c1d/ChangeImage.java/clean/servlets/ChangeImage.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
288,
202,
780,
1479,
1082,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
3445,
39,
18348,
709,
71,
1734,
273,
6246,
39,
1179,
54,
7492,
18,
588,
3445,
39,
18348,
12,
3658,
13,
274,
202,
780,
787,
67,
718,
202,
33,
709,
71,
1734,
18,
588,
1685,
1489,
1435,
274,
202,
780,
1316,
67,
718,
7734,
273,
709,
71,
1734,
18,
588,
2040,
1489,
1435,
274,
202,
812,
1316,
67,
803,
9079,
273,
13134,
18,
588,
3748,
23218,
743,
12,
315,
2730,
67,
803,
3113,
2564,
262,
274,
202,
381,
710,
18,
3567,
18,
1355,
18,
1299,
729,
274,
202,
780,
1729,
1585,
273,
1408,
274,
202,
474,
2191,
67,
350,
274,
202,
474,
3774,
67,
2135,
274,
202,
455,
18,
542,
8046,
2932,
955,
19,
2620,
8863,
202,
5108,
2289,
596,
273,
400,
18,
588,
2289,
5621,
202,
780,
1853,
273,
261,
3658,
18,
588,
1662,
2932,
6081,
67,
2135,
7923,
480,
446,
9945,
3658,
18,
588,
1662,
2932,
6081,
67,
2135,
6,
4672,
3658,
18,
588,
1662,
2932,
6081,
7923,
274,
202,
6081,
67,
2135,
273,
2144,
18,
2670,
1702,
12,
5645,
13,
274,
202,
5645,
273,
1111,
18,
588,
1662,
2932,
3901,
67,
350,
7923,
274,
202,
3901,
67,
350,
273,
2144,
18,
2670,
1702,
12,
5645,
13,
274,
202,
780,
1433,
273,
1111,
18,
588,
1662,
2932,
1925,
7923,
274,
202,
430,
261,
1925,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
288,
202,
780,
1479,
1082,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
3445,
39,
18348,
709,
71,
1734,
273,
6246,
39,
1179,
54,
7492,
18,
588,
3445,
39,
18348,
12,
3658,
13,
274,
202,
780,
787,
67,
718,
202,
33,
709,
71,
1734,
18,
588,
1685,
1489,
1435,
274,
202,
780,
1316,
67,
718,
7734,
273,
709,
71,
1734,
18,
588,
2040,
1489,
1435,
274,
202,
812,
1316,
67,
803,
9079,
273,
13134,
18,
588,
3748,
23218,
743,
12,
315,
2730,
67,
803,
3113,
2564,
262,
274,
202,
381,
710,
18,
3567,
18,
1355,
18,
1299,
729,
274,
202,
2
] |
done=false; retval=doExecute(timeout); if(retval == false && log.isTraceEnabled()) log.trace("call did not execute correctly, request is " + toString()); done=true; return retval;
|
try { done=false; boolean retval=doExecute(timeout); if(retval == false && log.isTraceEnabled()) log.trace("call did not execute correctly, request is " + this.toString()); return retval; } finally { done=true; }
|
public boolean execute() { boolean retval; if(corr == null && transport == null) { if(log.isErrorEnabled()) log.error("both corr and transport are null, cannot send group request"); return false; } done=false; retval=doExecute(timeout); if(retval == false && log.isTraceEnabled()) log.trace("call did not execute correctly, request is " + toString()); done=true; return retval; }
|
51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/f7da463d4c6a37b84dbe0d60aea3bd86713917a3/GroupRequest.java/clean/src/org/jgroups/blocks/GroupRequest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1836,
1435,
288,
3639,
1250,
5221,
31,
3639,
309,
12,
17515,
422,
446,
597,
4736,
422,
446,
13,
288,
5411,
309,
12,
1330,
18,
291,
668,
1526,
10756,
613,
18,
1636,
2932,
18237,
19480,
471,
4736,
854,
446,
16,
2780,
1366,
1041,
590,
8863,
5411,
327,
629,
31,
3639,
289,
3639,
2731,
33,
5743,
31,
3639,
5221,
33,
2896,
5289,
12,
4538,
1769,
3639,
309,
12,
18341,
422,
629,
597,
613,
18,
291,
3448,
1526,
10756,
5411,
613,
18,
5129,
2932,
1991,
5061,
486,
1836,
8783,
16,
590,
353,
315,
397,
1762,
10663,
3639,
2731,
33,
3767,
31,
3639,
327,
5221,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1836,
1435,
288,
3639,
1250,
5221,
31,
3639,
309,
12,
17515,
422,
446,
597,
4736,
422,
446,
13,
288,
5411,
309,
12,
1330,
18,
291,
668,
1526,
10756,
613,
18,
1636,
2932,
18237,
19480,
471,
4736,
854,
446,
16,
2780,
1366,
1041,
590,
8863,
5411,
327,
629,
31,
3639,
289,
3639,
2731,
33,
5743,
31,
3639,
5221,
33,
2896,
5289,
12,
4538,
1769,
3639,
309,
12,
18341,
422,
629,
597,
613,
18,
291,
3448,
1526,
10756,
5411,
613,
18,
5129,
2932,
1991,
5061,
486,
1836,
8783,
16,
590,
353,
315,
397,
1762,
10663,
3639,
2731,
33,
3767,
31,
3639,
327,
5221,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
List taRecords = getSectionTeachingAssistants(sectionUuid); for(Iterator iter = taRecords.iterator(); iter.hasNext();) { ParticipationRecord record = (ParticipationRecord)iter.next(); if(record.getUser().getUserUuid().equals(userId)) { if(log.isDebugEnabled()) log.debug("Not adding a TA record for " + userId + "... already a TA in section " + sectionUuid); } }
|
public Object doInHibernate(Session session) throws HibernateException { CourseSection section = getSection(sectionUuid, session); User user = userDirectory.getUser(userId); // TODO Make sure they are not already a TA in this section TeachingAssistantRecordImpl ta = new TeachingAssistantRecordImpl(section, user); ta.setUuid(uuidManager.createUuid()); session.save(ta); return ta; }
|
2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/12db0efcf0f25da06b44df28af8d1e5d1728f40c/SectionManagerHibernateImpl.java/buggy/sections/sections-app/src/java/org/sakaiproject/tool/section/manager/SectionManagerHibernateImpl.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
987,
13561,
6499,
273,
22103,
56,
13798,
310,
2610,
376,
4388,
12,
3464,
5897,
1769,
364,
12,
3198,
1400,
273,
13561,
6499,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
6393,
24629,
367,
2115,
1409,
273,
261,
1988,
24629,
367,
2115,
13,
2165,
18,
4285,
5621,
309,
12,
3366,
18,
588,
1299,
7675,
588,
1299,
5897,
7675,
14963,
12,
18991,
3719,
288,
309,
12,
1330,
18,
291,
2829,
1526,
10756,
613,
18,
4148,
2932,
1248,
6534,
279,
399,
37,
1409,
364,
315,
397,
6249,
397,
31305,
1818,
279,
399,
37,
316,
2442,
315,
397,
2442,
5897,
1769,
289,
289,
987,
13561,
6499,
273,
22103,
56,
13798,
310,
2610,
376,
4388,
12,
3464,
5897,
1769,
364,
12,
3198,
1400,
273,
13561,
6499,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
6393,
24629,
367,
2115,
1409,
273,
261,
1988,
24629,
367,
2115,
13,
2165,
18,
4285,
5621,
309,
12,
3366,
18,
588,
1299,
7675,
588,
1299,
5897,
7675,
14963,
12,
18991,
3719,
288,
309,
12,
1330,
18,
291,
2829,
1526,
10756,
613,
18,
4148,
2932,
1248,
6534,
279,
399,
37,
1409,
364,
315,
397,
6249,
397,
31305,
1818,
279,
399,
37,
316,
2442,
315,
397,
2442,
5897,
1769,
289,
289,
987,
13561,
6499,
273,
22103,
56,
13798,
310,
2610,
376,
4388,
12,
3464,
5897,
1769,
364,
12,
3198,
1400,
273,
13561,
6499,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
6393,
24629,
367,
2115,
1409,
273,
261,
1988,
24629,
367,
2115,
13,
2165,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
987,
13561,
6499,
273,
22103,
56,
13798,
310,
2610,
376,
4388,
12,
3464,
5897,
1769,
364,
12,
3198,
1400,
273,
13561,
6499,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
6393,
24629,
367,
2115,
1409,
273,
261,
1988,
24629,
367,
2115,
13,
2165,
18,
4285,
5621,
309,
12,
3366,
18,
588,
1299,
7675,
588,
1299,
5897,
7675,
14963,
12,
18991,
3719,
288,
309,
12,
1330,
18,
291,
2829,
1526,
10756,
613,
18,
4148,
2932,
1248,
6534,
279,
399,
37,
1409,
364,
315,
397,
6249,
397,
31305,
1818,
279,
399,
37,
316,
2442,
315,
397,
2442,
5897,
1769,
289,
289,
987,
13561,
6499,
273,
22103,
56,
13798,
310,
2610,
376,
4388,
12,
3464,
5897,
1769,
364,
12,
3198,
2
] |
|
if (paramValue != null && paramValue.trim().length() <= 0 && !parameter.allowBlank() && parameter.getDataType().equalsIgnoreCase( DesignChoiceConstants.PARAM_TYPE_STRING)) {
|
if ( paramValue != null && paramValue.trim( ).length( ) <= 0 && !parameter.allowBlank( ) && parameter.getDataType( ).equalsIgnoreCase( DesignChoiceConstants.PARAM_TYPE_STRING ) ) {
|
public boolean isMissingParameter() { boolean missingParameter = false; ModuleHandle model = SessionHandleAdapter.getInstance() .getReportDesignHandle(); HashMap params = (HashMap) this.getConfigVars(); List parameters = model.getFlattenParameters(); if (parameters != null) { for (int i = 0; i < parameters.size(); i++) { if (parameters.get(i) instanceof ScalarParameterHandle) { ScalarParameterHandle parameter = ((ScalarParameterHandle) parameters .get(i)); if (parameter.isHidden()) { continue; } String paramValue = null; if (params != null && params.containsKey(parameter.getName())) { Object curVal = params.get(parameter.getName()); if (curVal != null) paramValue = curVal.toString(); } else { paramValue = parameter.getDefaultValue(); } if (paramValue == null && !parameter.allowNull()) { missingParameter = true; break; } if (paramValue != null && paramValue.trim().length() <= 0 && !parameter.allowBlank() && parameter.getDataType().equalsIgnoreCase( DesignChoiceConstants.PARAM_TYPE_STRING)) { missingParameter = true; break; } } } } return missingParameter; }
|
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e1379dc44d22afdeafb3e66d4b2a9adc8b7f4f7a/ReportPreviewFormPage.java/clean/UI/org.eclipse.birt.report.designer.ui.preview/src/org/eclipse/birt/report/designer/ui/preview/editors/ReportPreviewFormPage.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
4841,
1662,
1435,
288,
202,
202,
6494,
3315,
1662,
273,
629,
31,
202,
202,
3120,
3259,
938,
273,
3877,
3259,
4216,
18,
588,
1442,
1435,
9506,
202,
18,
588,
4820,
15478,
3259,
5621,
202,
202,
8658,
859,
273,
261,
8658,
13,
333,
18,
588,
809,
5555,
5621,
202,
202,
682,
1472,
273,
938,
18,
588,
20237,
2402,
5621,
202,
202,
430,
261,
3977,
480,
446,
13,
288,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
1472,
18,
1467,
5621,
277,
27245,
288,
9506,
202,
430,
261,
3977,
18,
588,
12,
77,
13,
1276,
15791,
1662,
3259,
13,
288,
6862,
202,
13639,
1662,
3259,
1569,
273,
14015,
13639,
1662,
3259,
13,
1472,
6862,
1082,
202,
18,
588,
12,
77,
10019,
6862,
202,
430,
261,
6775,
18,
291,
9345,
10756,
288,
25083,
202,
17143,
31,
6862,
202,
97,
6862,
202,
780,
20250,
273,
446,
31,
6862,
202,
430,
261,
2010,
480,
446,
6862,
1082,
202,
10,
10,
859,
18,
12298,
653,
12,
6775,
18,
17994,
1435,
3719,
288,
25083,
202,
921,
662,
3053,
273,
859,
18,
588,
12,
6775,
18,
17994,
10663,
25083,
202,
430,
261,
1397,
3053,
480,
446,
13,
6862,
1082,
202,
891,
620,
273,
662,
3053,
18,
10492,
5621,
6862,
202,
97,
469,
288,
25083,
202,
891,
620,
273,
1569,
18,
588,
15646,
5621,
6862,
202,
97,
6862,
202,
430,
261,
891,
620,
422,
446,
597,
401,
6775,
18,
5965,
2041,
10756,
288,
25083,
202,
7337,
1662,
273,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
4841,
1662,
1435,
288,
202,
202,
6494,
3315,
1662,
273,
629,
31,
202,
202,
3120,
3259,
938,
273,
3877,
3259,
4216,
18,
588,
1442,
1435,
9506,
202,
18,
588,
4820,
15478,
3259,
5621,
202,
202,
8658,
859,
273,
261,
8658,
13,
333,
18,
588,
809,
5555,
5621,
202,
202,
682,
1472,
273,
938,
18,
588,
20237,
2402,
5621,
202,
202,
430,
261,
3977,
480,
446,
13,
288,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
1472,
18,
1467,
5621,
277,
27245,
288,
9506,
202,
430,
261,
3977,
18,
588,
12,
77,
13,
1276,
15791,
1662,
3259,
13,
288,
6862,
202,
13639,
1662,
3259,
1569,
273,
14015,
13639,
1662,
3259,
13,
1472,
2
] |
new FreeCallInvalidEv(cause, this).dispatch(); this.getListenerMgr().removeAll(); GenericProvider prov = this.getGenProvider(); prov.getRaw().releaseCallId(this.getCallID()); prov.getCallMgr().removeCall(this);
|
this.getGenProvider().dispatch(new FreeCallInvalidEv(cause, this));
|
void toInvalid(int cause) { // unHook any connections Iterator conns = this.connections.values().iterator(); while (conns.hasNext()) { ((FreeConnection)conns.next()).toDisconnected(cause); } // set state this.setState(Call.INVALID); // notify any listeners right away without the GenericProvider's dispatcher // so that we won't run into race conditions where the Listener set is being // iterated over while removeAll() is being performed on it (throwing // a ConcurrentModificationException). // Thanks to Ulf Licht for finding this. new FreeCallInvalidEv(cause, this).dispatch(); // unregister any remaining listeners this.getListenerMgr().removeAll(); // tell the raw TelephonyProvider that it may now recycle the CallId GenericProvider prov = this.getGenProvider(); prov.getRaw().releaseCallId(this.getCallID()); // remove from framework prov.getCallMgr().removeCall(this);}
|
49033 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49033/693c8dc36a5e4ebd07a639f0ff68a53194e94c27/FreeCall.java/clean/src/src/net/sourceforge/gjtapi/FreeCall.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
358,
1941,
12,
474,
4620,
13,
288,
202,
759,
640,
5394,
1281,
5921,
202,
3198,
18976,
273,
333,
18,
13313,
18,
2372,
7675,
9838,
5621,
202,
17523,
261,
591,
2387,
18,
5332,
2134,
10756,
288,
202,
202,
12443,
9194,
1952,
13,
591,
2387,
18,
4285,
1435,
2934,
869,
26303,
12,
2700,
1769,
202,
97,
202,
759,
444,
919,
202,
2211,
18,
542,
1119,
12,
1477,
18,
9347,
1769,
202,
759,
5066,
1281,
4679,
2145,
10804,
2887,
326,
7928,
2249,
1807,
7393,
202,
759,
1427,
716,
732,
8462,
1404,
1086,
1368,
17996,
4636,
1625,
326,
10652,
444,
353,
3832,
202,
759,
29873,
1879,
1323,
12787,
1435,
353,
3832,
9591,
603,
518,
261,
12849,
310,
202,
759,
279,
15242,
13467,
503,
2934,
202,
759,
935,
19965,
358,
587,
20850,
511,
335,
647,
364,
13727,
333,
18,
202,
2704,
15217,
1477,
1941,
20861,
12,
2700,
16,
333,
2934,
10739,
5621,
202,
759,
10232,
1281,
4463,
4679,
202,
2211,
18,
588,
2223,
9455,
7675,
4479,
1595,
5621,
202,
759,
9276,
326,
1831,
399,
6516,
20086,
2249,
716,
518,
2026,
2037,
23493,
326,
3049,
548,
202,
7014,
2249,
17197,
273,
333,
18,
588,
7642,
2249,
5621,
202,
25529,
18,
588,
4809,
7675,
9340,
1477,
548,
12,
2211,
18,
588,
1477,
734,
10663,
202,
759,
1206,
628,
8257,
202,
25529,
18,
588,
1477,
9455,
7675,
4479,
1477,
12,
2211,
1769,
97,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
358,
1941,
12,
474,
4620,
13,
288,
202,
759,
640,
5394,
1281,
5921,
202,
3198,
18976,
273,
333,
18,
13313,
18,
2372,
7675,
9838,
5621,
202,
17523,
261,
591,
2387,
18,
5332,
2134,
10756,
288,
202,
202,
12443,
9194,
1952,
13,
591,
2387,
18,
4285,
1435,
2934,
869,
26303,
12,
2700,
1769,
202,
97,
202,
759,
444,
919,
202,
2211,
18,
542,
1119,
12,
1477,
18,
9347,
1769,
202,
759,
5066,
1281,
4679,
2145,
10804,
2887,
326,
7928,
2249,
1807,
7393,
202,
759,
1427,
716,
732,
8462,
1404,
1086,
1368,
17996,
4636,
1625,
326,
10652,
444,
353,
3832,
202,
759,
29873,
1879,
1323,
12787,
1435,
353,
3832,
9591,
603,
518,
261,
12849,
310,
202,
759,
279,
15242,
13467,
2
] |
m.setup((FigNode) _content, _content.getOwner(), bx, by, reverse);
|
m.setup((FigNode) getContent(), getContent().getOwner(), bx, by, reverse);
|
public void dragHandle(int mX, int mY, int anX, int anY, Handle hand) { if (hand.index < 10) { setPaintButtons(false); super.dragHandle(mX, mY, anX, anY, hand); return; } int cx = _content.getX(), cy = _content.getY(); int cw = _content.getWidth(), ch = _content.getHeight(); int newX = cx, newY = cy, newW = cw, newH = ch; Dimension minSize = _content.getMinimumSize(); int minWidth = minSize.width, minHeight = minSize.height; Object edgeType = null; Object nodeType = Model.getMetaTypes().getUMLClass(); int bx = mX, by = mY; boolean reverse = false; switch (hand.index) { case 10: //add superclass edgeType = Model.getMetaTypes().getGeneralization(); by = cy; bx = cx + cw / 2; break; case 11: //add subclass edgeType = Model.getMetaTypes().getGeneralization(); reverse = true; by = cy + ch; bx = cx + cw / 2; break; case 12: //add assoc edgeType = Model.getMetaTypes().getAssociation(); by = cy + ch / 2; bx = cx + cw; break; case 13: // add assoc edgeType = Model.getMetaTypes().getAssociation(); reverse = true; by = cy + ch / 2; bx = cx; break; case 14: // selfassociation // do not want to drag this break; default: LOG.warn("invalid handle number"); break; } if (edgeType != null && nodeType != null) { Editor ce = Globals.curEditor(); ModeCreateEdgeAndNode m = new ModeCreateEdgeAndNode(ce, edgeType, nodeType, useComposite); m.setup((FigNode) _content, _content.getOwner(), bx, by, reverse); ce.pushMode(m); } }
|
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/55b1a2bf9e5a1ff91e4f97c63ed8d76eb2a68f27/SelectionClass.java/clean/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionClass.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
8823,
3259,
12,
474,
312,
60,
16,
509,
312,
61,
16,
509,
392,
60,
16,
509,
392,
61,
16,
5004,
948,
13,
288,
3639,
309,
261,
2349,
18,
1615,
411,
1728,
13,
288,
5411,
444,
12699,
14388,
12,
5743,
1769,
5411,
2240,
18,
15997,
3259,
12,
81,
60,
16,
312,
61,
16,
392,
60,
16,
392,
61,
16,
948,
1769,
5411,
327,
31,
3639,
289,
3639,
509,
9494,
273,
389,
1745,
18,
588,
60,
9334,
6143,
273,
389,
1745,
18,
588,
61,
5621,
3639,
509,
14098,
273,
389,
1745,
18,
588,
2384,
9334,
462,
273,
389,
1745,
18,
588,
2686,
5621,
3639,
509,
394,
60,
273,
9494,
16,
394,
61,
273,
6143,
16,
394,
59,
273,
14098,
16,
394,
44,
273,
462,
31,
3639,
13037,
29343,
273,
389,
1745,
18,
588,
13042,
1225,
5621,
3639,
509,
1131,
2384,
273,
29343,
18,
2819,
16,
1131,
2686,
273,
29343,
18,
4210,
31,
3639,
1033,
3591,
559,
273,
446,
31,
3639,
1033,
9507,
273,
3164,
18,
588,
2781,
2016,
7675,
588,
57,
1495,
797,
5621,
3639,
509,
24356,
273,
312,
60,
16,
635,
273,
312,
61,
31,
3639,
1250,
4219,
273,
629,
31,
3639,
1620,
261,
2349,
18,
1615,
13,
288,
3639,
648,
1728,
30,
368,
1289,
12098,
5411,
3591,
559,
273,
3164,
18,
588,
2781,
2016,
7675,
588,
12580,
1588,
5621,
5411,
635,
273,
6143,
31,
5411,
24356,
273,
9494,
397,
14098,
342,
576,
31,
5411,
898,
31,
3639,
648,
4648,
30,
368,
1289,
10177,
5411,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8823,
3259,
12,
474,
312,
60,
16,
509,
312,
61,
16,
509,
392,
60,
16,
509,
392,
61,
16,
5004,
948,
13,
288,
3639,
309,
261,
2349,
18,
1615,
411,
1728,
13,
288,
5411,
444,
12699,
14388,
12,
5743,
1769,
5411,
2240,
18,
15997,
3259,
12,
81,
60,
16,
312,
61,
16,
392,
60,
16,
392,
61,
16,
948,
1769,
5411,
327,
31,
3639,
289,
3639,
509,
9494,
273,
389,
1745,
18,
588,
60,
9334,
6143,
273,
389,
1745,
18,
588,
61,
5621,
3639,
509,
14098,
273,
389,
1745,
18,
588,
2384,
9334,
462,
273,
389,
1745,
18,
588,
2686,
5621,
3639,
509,
394,
60,
273,
9494,
16,
394,
61,
273,
6143,
16,
394,
59,
273,
2
] |
if (v != null) { sb.append(eng.getPropertyName(i)); sb.append(": "); sb.append(v); if (isImportant(i)) { sb.append(" !important"); } sb.append(";\n"); }
|
if (v == null) continue; sb.append(eng.getPropertyName(i)); sb.append(": "); sb.append(v); if (isImportant(i)) sb.append(" !important"); sb.append(";\n");
|
public String toString(CSSEngine eng) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < values.length; i++) { Value v = values[i]; if (v != null) { sb.append(eng.getPropertyName(i)); sb.append(": "); sb.append(v); if (isImportant(i)) { sb.append(" !important"); } sb.append(";\n"); } } return sb.toString(); }
|
45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/1400bf64fd115d900b6f146057cbff15e0cf8380/StyleMap.java/clean/sources/org/apache/batik/css/engine/StyleMap.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
12,
10276,
4410,
24691,
13,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
924,
18,
2469,
31,
277,
27245,
288,
5411,
1445,
331,
273,
924,
63,
77,
15533,
5411,
309,
261,
90,
480,
446,
13,
288,
7734,
2393,
18,
6923,
12,
24688,
18,
588,
13073,
12,
77,
10019,
7734,
2393,
18,
6923,
2932,
30,
315,
1769,
7734,
2393,
18,
6923,
12,
90,
1769,
7734,
309,
261,
291,
5010,
970,
12,
77,
3719,
288,
10792,
2393,
18,
6923,
2932,
401,
23221,
8863,
7734,
289,
7734,
2393,
18,
6923,
2932,
9747,
82,
8863,
5411,
289,
3639,
289,
3639,
327,
2393,
18,
10492,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
12,
10276,
4410,
24691,
13,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
924,
18,
2469,
31,
277,
27245,
288,
5411,
1445,
331,
273,
924,
63,
77,
15533,
5411,
309,
261,
90,
480,
446,
13,
288,
7734,
2393,
18,
6923,
12,
24688,
18,
588,
13073,
12,
77,
10019,
7734,
2393,
18,
6923,
2932,
30,
315,
1769,
7734,
2393,
18,
6923,
12,
90,
1769,
7734,
309,
261,
291,
5010,
970,
12,
77,
3719,
288,
10792,
2393,
18,
6923,
2932,
401,
23221,
8863,
7734,
289,
7734,
2393,
18,
6923,
2932,
9747,
82,
8863,
5411,
289,
3639,
289,
3639,
327,
2393,
18,
10492,
5621,
565,
289,
2,
-100,
-100
] |
} }
|
protected void scan(final FJTask waitingFor) { FJTask task = null; // to delay lowering priority until first failure to steal boolean lowered = false; /* Circularly traverse from a random start index. This differs slightly from cilk version that uses a random index for each attempted steal. Exhaustive scanning might impede analytic tractablity of the scheduling policy, but makes it much easier to deal with startup and shutdown. */ FJTaskRunner[] ts = group.getArray(); int idx = victimRNG.nextInt(ts.length); for (int i = 0; i < ts.length; ++i) { FJTaskRunner t = ts[idx]; if (++idx >= ts.length) idx = 0; // circularly traverse if (t != null && t != this) { if (waitingFor != null && waitingFor.isDone()) { break; } else { if (COLLECT_STATS) ++scans; task = t.take(); if (task != null) { if (COLLECT_STATS) ++steals; break; } else if (isInterrupted()) { break; } else if (!lowered) { // if this is first fail, lower priority lowered = true; setPriority(scanPriority); } else { // otherwise we are at low priority; just yield yield(); } } } } if (task == null) { if (COLLECT_STATS) ++scans; task = group.pollEntryQueue(); if (COLLECT_STATS) if (task != null) ++steals; } if (lowered) setPriority(runPriority); if (task != null && !task.isDone()) { if (COLLECT_STATS) ++runs; task.run(); task.setDone(); } }
|
4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/a6a25004fd5e24a1bc5f053aa539d01dc2553fbf/FJTaskRunner.java/clean/src/java/org/logicalcobwebs/concurrent/FJTaskRunner.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
4135,
12,
6385,
478,
46,
2174,
7336,
1290,
13,
288,
565,
478,
46,
2174,
1562,
273,
446,
31,
565,
368,
358,
4624,
2612,
310,
4394,
3180,
1122,
5166,
358,
18654,
287,
565,
1250,
2612,
329,
273,
629,
31,
3639,
1748,
1377,
13246,
9559,
715,
10080,
628,
279,
2744,
787,
770,
18,
2398,
1220,
21944,
21980,
628,
276,
330,
79,
1177,
716,
4692,
279,
2744,
770,
1377,
364,
1517,
18121,
18654,
287,
18,
1377,
1312,
3395,
641,
688,
21138,
4825,
709,
347,
323,
392,
7834,
335,
1284,
299,
9237,
560,
434,
4202,
326,
21895,
3329,
16,
1496,
7297,
518,
9816,
15857,
358,
10490,
598,
1377,
11850,
471,
5731,
18,
565,
1195,
3639,
478,
46,
2174,
9709,
8526,
3742,
273,
1041,
18,
588,
1076,
5621,
565,
509,
2067,
273,
28873,
381,
54,
4960,
18,
4285,
1702,
12,
3428,
18,
2469,
1769,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
3742,
18,
2469,
31,
965,
77,
13,
288,
5411,
478,
46,
2174,
9709,
268,
273,
3742,
63,
3465,
15533,
1377,
309,
261,
9904,
3465,
1545,
3742,
18,
2469,
13,
2067,
273,
374,
31,
368,
15302,
715,
10080,
5411,
309,
261,
88,
480,
446,
597,
268,
480,
333,
13,
288,
7734,
309,
261,
20241,
1290,
480,
446,
597,
7336,
1290,
18,
291,
7387,
10756,
288,
1850,
898,
31,
3639,
289,
3639,
469,
288,
1850,
309,
261,
4935,
3918,
67,
31983,
13,
965,
1017,
634,
31,
1850,
1562,
273,
268,
18,
22188,
5621,
1850,
309,
261,
4146,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4135,
12,
6385,
478,
46,
2174,
7336,
1290,
13,
288,
565,
478,
46,
2174,
1562,
273,
446,
31,
565,
368,
358,
4624,
2612,
310,
4394,
3180,
1122,
5166,
358,
18654,
287,
565,
1250,
2612,
329,
273,
629,
31,
3639,
1748,
1377,
13246,
9559,
715,
10080,
628,
279,
2744,
787,
770,
18,
2398,
1220,
21944,
21980,
628,
276,
330,
79,
1177,
716,
4692,
279,
2744,
770,
1377,
364,
1517,
18121,
18654,
287,
18,
1377,
1312,
3395,
641,
688,
21138,
4825,
709,
347,
323,
392,
7834,
335,
1284,
299,
9237,
560,
434,
4202,
326,
21895,
3329,
16,
1496,
7297,
518,
9816,
15857,
358,
10490,
598,
1377,
11850,
471,
5731,
18,
565,
1195,
3639,
478,
46,
2174,
9709,
8526,
2
] |
|
public RdpBookmark(Bookmark parent) { setId(parent.getId()); setName(parent.getName()); setApplicationName(parent.getApplicationName()); setTarget(parent.getTarget());
|
public RdpBookmark(){ super(); setTarget("");
|
public RdpBookmark(Bookmark parent) { setId(parent.getId()); setName(parent.getName()); setApplicationName(parent.getApplicationName()); setTarget(parent.getTarget()); }
|
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/9a94495fca812f32ad8e7fc204cb50b733da206a/RdpBookmark.java/buggy/tran/portal/main/com/metavize/tran/portal/rdp/RdpBookmark.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
534,
9295,
22966,
12,
22966,
982,
13,
565,
288,
3639,
10446,
12,
2938,
18,
26321,
10663,
3639,
6788,
12,
2938,
18,
17994,
10663,
3639,
444,
3208,
461,
12,
2938,
18,
588,
3208,
461,
10663,
3639,
18367,
12,
2938,
18,
588,
2326,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
534,
9295,
22966,
12,
22966,
982,
13,
565,
288,
3639,
10446,
12,
2938,
18,
26321,
10663,
3639,
6788,
12,
2938,
18,
17994,
10663,
3639,
444,
3208,
461,
12,
2938,
18,
588,
3208,
461,
10663,
3639,
18367,
12,
2938,
18,
588,
2326,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (accessibleContext == null) accessibleContext = new AccessibleBox();
|
public AccessibleContext getAccessibleContext() { // if (accessibleContext == null) // accessibleContext = new AccessibleBox(); return accessibleContext; }
|
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/Box.java/buggy/core/src/classpath/javax/javax/swing/Box.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
1071,
5016,
1523,
1042,
336,
10451,
1042,
1435,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
288,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
368,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
225,
309,
261,
26037,
1042,
422,
446,
13,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
368,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
225,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
327,
12718,
1042,
31,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
289,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
1071,
5016,
1523,
1042,
336,
10451,
1042,
1435,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
288,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
368,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
309,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
5016,
1523,
3514,
5621,
225,
309,
261,
26037,
1042,
422,
446,
13,
430,
261,
26037,
1042,
422,
446,
13,
12718,
1042,
273,
394,
2
] |
|
String owner = cr.readClass( off, buf);
|
String o = cr.readClass( off, buf);
|
protected Attribute read (ClassReader cr, int off, int len, char[] buf, int codeOff, Label[] labels) { // CONSTANT_Class_info String owner = cr.readClass( off, buf); // CONSTANT_NameAndType_info (skip CONSTANT_NameAndType tag) int index = cr.getItem(cr.readUnsignedShort(off + 2)); String name = cr.readUTF8(index, buf); String desc = cr.readUTF8(index + 2, buf); return new EnclosingMethodAttribute( owner, name, desc); }
|
2697 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2697/ef0669610899566ad370003b23451c29a594fbf9/EnclosingMethodAttribute.java/clean/asm/src/org/objectweb/asm/attrs/EnclosingMethodAttribute.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
3601,
855,
261,
797,
2514,
4422,
16,
509,
3397,
16,
18701,
509,
562,
16,
1149,
8526,
1681,
16,
509,
981,
7210,
16,
5287,
8526,
3249,
13,
288,
565,
368,
24023,
67,
797,
67,
1376,
565,
514,
320,
273,
4422,
18,
896,
797,
12,
3397,
16,
1681,
1769,
565,
368,
24023,
67,
31925,
559,
67,
1376,
261,
7457,
24023,
67,
31925,
559,
1047,
13,
565,
509,
770,
273,
4422,
18,
588,
1180,
12,
3353,
18,
896,
13290,
4897,
12,
3674,
397,
576,
10019,
565,
514,
508,
273,
4422,
18,
896,
5159,
28,
12,
1615,
16,
1681,
1769,
565,
514,
3044,
273,
4422,
18,
896,
5159,
28,
12,
1615,
397,
576,
16,
1681,
1769,
565,
327,
394,
1374,
19506,
1305,
1499,
12,
3410,
16,
508,
16,
3044,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
3601,
855,
261,
797,
2514,
4422,
16,
509,
3397,
16,
18701,
509,
562,
16,
1149,
8526,
1681,
16,
509,
981,
7210,
16,
5287,
8526,
3249,
13,
288,
565,
368,
24023,
67,
797,
67,
1376,
565,
514,
320,
273,
4422,
18,
896,
797,
12,
3397,
16,
1681,
1769,
565,
368,
24023,
67,
31925,
559,
67,
1376,
261,
7457,
24023,
67,
31925,
559,
1047,
13,
565,
509,
770,
273,
4422,
18,
588,
1180,
12,
3353,
18,
896,
13290,
4897,
12,
3674,
397,
576,
10019,
565,
514,
508,
273,
4422,
18,
896,
5159,
28,
12,
1615,
16,
1681,
1769,
565,
514,
3044,
273,
4422,
18,
896,
5159,
28,
12,
1615,
397,
576,
16,
1681,
1769,
565,
327,
394,
1374,
19506,
2
] |
} catch (InterruptedException ex) {
|
} catch(InterruptedException ex) {
|
private void startProcessingThreads() { m_upProcessingThread = new Thread(new Runnable() { public void run() { Event event = null; while (true) { try { event = (Event) m_upQueue.take(); m_upLatch.passThrough(); handleUp(event); } catch (InterruptedException ex) { //this is ok. } } } }); m_upProcessingThread.setName("MessageDispatcher up processing thread"); m_upProcessingThread.setDaemon(true); m_upProcessingThread.start(); }
|
51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/595c1743692efa6e4226a77afcc832561ea81eb9/MessageDispatcher.java/buggy/src/org/jgroups/blocks/MessageDispatcher.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
787,
7798,
13233,
1435,
288,
5411,
312,
67,
416,
7798,
3830,
273,
394,
4884,
12,
2704,
10254,
1435,
288,
7734,
1071,
918,
1086,
1435,
288,
10792,
2587,
871,
273,
446,
31,
10792,
1323,
261,
3767,
13,
288,
13491,
775,
288,
18701,
871,
273,
261,
1133,
13,
312,
67,
416,
3183,
18,
22188,
5621,
18701,
312,
67,
416,
23463,
18,
5466,
14287,
5621,
18701,
1640,
1211,
12,
2575,
1769,
13491,
289,
1044,
12,
24485,
503,
431,
13,
288,
18701,
368,
2211,
353,
1529,
18,
13491,
289,
10792,
289,
7734,
289,
5411,
15549,
5411,
312,
67,
416,
7798,
3830,
18,
542,
461,
2932,
1079,
6681,
731,
4929,
2650,
8863,
5411,
312,
67,
416,
7798,
3830,
18,
542,
12858,
12,
3767,
1769,
5411,
312,
67,
416,
7798,
3830,
18,
1937,
5621,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3238,
918,
787,
7798,
13233,
1435,
288,
5411,
312,
67,
416,
7798,
3830,
273,
394,
4884,
12,
2704,
10254,
1435,
288,
7734,
1071,
918,
1086,
1435,
288,
10792,
2587,
871,
273,
446,
31,
10792,
1323,
261,
3767,
13,
288,
13491,
775,
288,
18701,
871,
273,
261,
1133,
13,
312,
67,
416,
3183,
18,
22188,
5621,
18701,
312,
67,
416,
23463,
18,
5466,
14287,
5621,
18701,
1640,
1211,
12,
2575,
1769,
13491,
289,
1044,
12,
24485,
503,
431,
13,
288,
18701,
368,
2211,
353,
1529,
18,
13491,
289,
10792,
289,
7734,
289,
5411,
15549,
5411,
312,
67,
416,
7798,
3830,
18,
542,
461,
2932,
1079,
6681,
731,
4929,
2650,
8863,
5411,
312,
67,
416,
7798,
3830,
18,
542,
12858,
2
] |
myResult = Formatter.getInstance().createSpaceProperty(0, 0, lf, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_DECLARATIONS);
|
myResult = Formatter.getInstance() .createSpaceProperty(0, 0, lf, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_DECLARATIONS);
|
public void visitFile(PsiFile file) { if (myRole1 == ChildRole.PACKAGE_STATEMENT) { int lf = mySettings.BLANK_LINES_AFTER_PACKAGE + 1; myResult = Formatter.getInstance().createSpaceProperty(0, 0, lf, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_DECLARATIONS); } else if (myRole2 == ChildRole.PACKAGE_STATEMENT) { int lf = mySettings.BLANK_LINES_BEFORE_PACKAGE + 1; myResult = Formatter.getInstance().createSpaceProperty(0, 0, lf, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_DECLARATIONS); } else if (myRole1 == ChildRole.IMPORT_LIST) { int lf = mySettings.BLANK_LINES_AFTER_IMPORTS + 1; myResult = Formatter.getInstance().createSpaceProperty(0, 0, lf, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_DECLARATIONS); } else if (myRole2 == ChildRole.IMPORT_LIST) { int lf = mySettings.BLANK_LINES_BEFORE_IMPORTS + 1; myResult = Formatter.getInstance().createSpaceProperty(0, 0, lf, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_DECLARATIONS); } else if (myRole2 == ChildRole.CLASS) { int lf = mySettings.BLANK_LINES_AROUND_CLASS + 1; myResult = Formatter.getInstance().createSpaceProperty(0, 0, lf, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_DECLARATIONS); } }
|
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/1533398430214d8ae562ff3d8dcc5898351f8c45/JavaSpacePropertyProcessor.java/buggy/source/com/intellij/psi/formatter/java/JavaSpacePropertyProcessor.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3757,
812,
12,
52,
7722,
812,
585,
13,
288,
565,
309,
261,
4811,
2996,
21,
422,
7451,
2996,
18,
19077,
67,
28411,
13,
288,
1377,
509,
18594,
273,
3399,
2628,
18,
38,
24307,
67,
5997,
55,
67,
18249,
67,
19077,
397,
404,
31,
1377,
3399,
1253,
273,
14924,
18,
588,
1442,
1435,
263,
2640,
3819,
1396,
12,
20,
16,
374,
16,
18594,
16,
3399,
2628,
18,
6859,
10541,
67,
5997,
67,
27960,
55,
16,
3399,
2628,
18,
6859,
10541,
67,
38,
24307,
67,
5997,
55,
67,
706,
67,
23956,
985,
15297,
1769,
565,
289,
565,
469,
309,
261,
4811,
2996,
22,
422,
7451,
2996,
18,
19077,
67,
28411,
13,
288,
1377,
509,
18594,
273,
3399,
2628,
18,
38,
24307,
67,
5997,
55,
67,
19152,
67,
19077,
397,
404,
31,
1377,
3399,
1253,
273,
14924,
18,
588,
1442,
1435,
263,
2640,
3819,
1396,
12,
20,
16,
374,
16,
18594,
16,
3399,
2628,
18,
6859,
10541,
67,
5997,
67,
27960,
55,
16,
3399,
2628,
18,
6859,
10541,
67,
38,
24307,
67,
5997,
55,
67,
706,
67,
23956,
985,
15297,
1769,
565,
289,
565,
469,
309,
261,
4811,
2996,
21,
422,
7451,
2996,
18,
20445,
67,
7085,
13,
288,
1377,
509,
18594,
273,
3399,
2628,
18,
38,
24307,
67,
5997,
55,
67,
18249,
67,
20445,
55,
397,
404,
31,
1377,
3399,
1253,
273,
14924,
18,
588,
1442,
1435,
263,
2640,
3819,
1396,
12,
20,
16,
374,
16,
18594,
16,
3399,
2628,
18,
6859,
10541,
67,
5997,
67,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3757,
812,
12,
52,
7722,
812,
585,
13,
288,
565,
309,
261,
4811,
2996,
21,
422,
7451,
2996,
18,
19077,
67,
28411,
13,
288,
1377,
509,
18594,
273,
3399,
2628,
18,
38,
24307,
67,
5997,
55,
67,
18249,
67,
19077,
397,
404,
31,
1377,
3399,
1253,
273,
14924,
18,
588,
1442,
1435,
263,
2640,
3819,
1396,
12,
20,
16,
374,
16,
18594,
16,
3399,
2628,
18,
6859,
10541,
67,
5997,
67,
27960,
55,
16,
3399,
2628,
18,
6859,
10541,
67,
38,
24307,
67,
5997,
55,
67,
706,
67,
23956,
985,
15297,
1769,
565,
289,
565,
469,
309,
261,
4811,
2996,
22,
422,
7451,
2996,
18,
19077,
67,
28411,
13,
288,
1377,
509,
18594,
273,
3399,
2628,
2
] |
putString(BUILD_TARGET_AUTO, target);
|
putString(IMakeBuilderInfo.BUILD_TARGET_AUTO, null); putString(BuildInfoFactory.BUILD_TARGET_AUTO, target);
|
public void setAutoBuildTarget(String target) throws CoreException { putString(BUILD_TARGET_AUTO, target); }
|
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/ddbea8806c78a43cddb9312e08767dfa65e795c4/BuildInfoFactory.java/clean/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
21780,
3116,
2326,
12,
780,
1018,
13,
1216,
30015,
288,
1082,
202,
458,
780,
12,
20215,
67,
16374,
67,
18909,
16,
1018,
1769,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3196,
202,
482,
918,
21780,
3116,
2326,
12,
780,
1018,
13,
1216,
30015,
288,
1082,
202,
458,
780,
12,
20215,
67,
16374,
67,
18909,
16,
1018,
1769,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
IASTExpression.Kind.UNARY_PLUS_CASTEXPRESSION, consume());
|
IASTExpression.Kind.UNARY_PLUS_CASTEXPRESSION);
|
protected IASTExpression unaryExpression( IASTScope scope ) throws Backtrack { switch (LT(1)) { case IToken.tSTAR : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_STAR_CASTEXPRESSION, consume()); case IToken.tAMPER : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_AMPSND_CASTEXPRESSION, consume()); case IToken.tPLUS : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_PLUS_CASTEXPRESSION, consume()); case IToken.tMINUS : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_MINUS_CASTEXPRESSION, consume()); case IToken.tNOT : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_NOT_CASTEXPRESSION, consume()); case IToken.tCOMPL : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_TILDE_CASTEXPRESSION, consume()); case IToken.tINCR : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_INCREMENT, consume()); case IToken.tDECR : return unaryOperatorCastExpression(scope, IASTExpression.Kind.UNARY_DECREMENT, consume()); case IToken.t_sizeof : consume(IToken.t_sizeof); IToken mark = LA(1); ITokenDuple d = null; IASTExpression unaryExpression = null; if (LT(1) == IToken.tLPAREN) { try { consume(IToken.tLPAREN); d = typeId(); consume(IToken.tRPAREN); } catch (Backtrack bt) { backup(mark); unaryExpression = unaryExpression(scope); } } else { unaryExpression = unaryExpression(scope); } if (d != null & unaryExpression == null) try { return astFactory.createExpression( scope, IASTExpression.Kind.UNARY_SIZEOF_TYPEID, null, null, null, d, "", null); } catch (ASTSemanticException e) { failParse(); throw backtrack; } else if (unaryExpression != null && d == null) try { return astFactory.createExpression( scope, IASTExpression.Kind.UNARY_SIZEOF_UNARYEXPRESSION, unaryExpression, null, null, null, "", null); } catch (ASTSemanticException e1) { failParse(); throw backtrack; } else throw backtrack; case IToken.t_new : return newExpression(scope); case IToken.t_delete : return deleteExpression(scope); case IToken.tCOLONCOLON : switch (LT(2)) { case IToken.t_new : return newExpression(scope); case IToken.t_delete : return deleteExpression(scope); default : return postfixExpression(scope); } default : return postfixExpression(scope); } }
|
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/61976f1b510d44f0e8c9463f6618a68c2fee60fe/Parser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
2300,
19017,
2300,
12,
467,
9053,
3876,
2146,
262,
3639,
1216,
4297,
4101,
565,
288,
3639,
1620,
261,
12050,
12,
21,
3719,
3639,
288,
5411,
648,
467,
1345,
18,
88,
20943,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
20943,
67,
21871,
19111,
16,
10792,
7865,
10663,
5411,
648,
467,
1345,
18,
88,
2192,
3194,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
2192,
5857,
2908,
67,
21871,
19111,
16,
10792,
7865,
10663,
5411,
648,
467,
1345,
18,
88,
6253,
3378,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
6253,
3378,
67,
21871,
19111,
16,
10792,
7865,
10663,
5411,
648,
467,
1345,
18,
88,
6236,
3378,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
6236,
3378,
67,
21871,
19111,
16,
10792,
7865,
10663,
5411,
648,
467,
1345,
18,
88,
4400,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
4400,
67,
21871,
19111,
16,
10792,
7865,
10663,
5411,
648,
467,
1345,
18,
88,
4208,
6253,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
56,
2627,
1639,
67,
21871,
19111,
16,
10792,
7865,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
2300,
19017,
2300,
12,
467,
9053,
3876,
2146,
262,
3639,
1216,
4297,
4101,
565,
288,
3639,
1620,
261,
12050,
12,
21,
3719,
3639,
288,
5411,
648,
467,
1345,
18,
88,
20943,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
20943,
67,
21871,
19111,
16,
10792,
7865,
10663,
5411,
648,
467,
1345,
18,
88,
2192,
3194,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
10792,
467,
9053,
2300,
18,
5677,
18,
2124,
6043,
67,
2192,
5857,
2908,
67,
21871,
19111,
16,
10792,
7865,
10663,
5411,
648,
467,
1345,
18,
88,
6253,
3378,
294,
7734,
327,
19017,
5592,
9735,
2300,
12,
4887,
16,
2
] |
if (cause instanceof MethodInvocationException)
|
if (cause instanceof MethodInvocationException)
|
protected void error(HttpServletRequest request, HttpServletResponse response, Exception e) throws ServletException { try { // get a velocity context Context ctx = createContext(request, response); Throwable cause = e; // if it's an MIE, i want the real cause and stack trace! if (cause instanceof MethodInvocationException) { // put the invocation exception in the context ctx.put(KEY_ERROR_INVOCATION_EXCEPTION, e); // get the real cause cause = ((MethodInvocationException)e).getWrappedThrowable(); } // add the cause to the context ctx.put(KEY_ERROR_CAUSE, cause); // grab the cause's stack trace and put it in the context StringWriter sw = new StringWriter(); cause.printStackTrace(new java.io.PrintWriter(sw)); ctx.put(KEY_ERROR_STACKTRACE, sw.toString()); // retrieve and render the error template Template et = getTemplate(errorTemplate); mergeTemplate(et, ctx, response); } catch (Exception e2) { // d'oh! log this velocity.error("VelocityLayoutServlet: " + " Error during error template rendering - " + e2); // then punt the original to a higher authority super.error(request, response, e); } }
|
52538 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52538/b42c23a0eb3b4663a69304b938b98019a6cff8be/VelocityLayoutServlet.java/buggy/src/java/org/apache/velocity/tools/view/servlet/VelocityLayoutServlet.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
555,
12,
2940,
18572,
590,
16,
12900,
12446,
766,
16,
12900,
1185,
425,
13,
3639,
1216,
16517,
377,
288,
3639,
775,
540,
288,
5411,
368,
336,
279,
14767,
819,
5411,
1772,
1103,
273,
752,
1042,
12,
2293,
16,
766,
1769,
5411,
4206,
4620,
273,
425,
31,
5411,
368,
309,
518,
1807,
392,
490,
8732,
16,
277,
2545,
326,
2863,
4620,
471,
2110,
2606,
5,
5411,
309,
261,
2700,
1276,
2985,
9267,
503,
13,
2398,
288,
7734,
368,
1378,
326,
9495,
1520,
316,
326,
819,
7734,
1103,
18,
458,
12,
3297,
67,
3589,
67,
706,
16169,
8506,
67,
12658,
16,
425,
1769,
7734,
368,
336,
326,
2863,
4620,
7734,
4620,
273,
14015,
1305,
9267,
503,
13,
73,
2934,
588,
17665,
15155,
5621,
5411,
289,
5411,
368,
527,
326,
4620,
358,
326,
819,
5411,
1103,
18,
458,
12,
3297,
67,
3589,
67,
3587,
8001,
16,
4620,
1769,
18701,
368,
11086,
326,
4620,
1807,
2110,
2606,
471,
1378,
518,
316,
326,
819,
5411,
17436,
1352,
273,
394,
17436,
5621,
5411,
4620,
18,
1188,
6332,
12,
2704,
2252,
18,
1594,
18,
5108,
2289,
12,
5328,
10019,
5411,
1103,
18,
458,
12,
3297,
67,
3589,
67,
21971,
23827,
16,
1352,
18,
10492,
10663,
5411,
368,
4614,
471,
1743,
326,
555,
1542,
5411,
5035,
3393,
273,
10646,
12,
1636,
2283,
1769,
5411,
2691,
2283,
12,
278,
16,
1103,
16,
766,
1769,
3639,
289,
540,
1044,
261,
503,
425,
22,
13,
540,
288,
5411,
368,
302,
11,
16699,
5,
613,
333,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
555,
12,
2940,
18572,
590,
16,
12900,
12446,
766,
16,
12900,
1185,
425,
13,
3639,
1216,
16517,
377,
288,
3639,
775,
540,
288,
5411,
368,
336,
279,
14767,
819,
5411,
1772,
1103,
273,
752,
1042,
12,
2293,
16,
766,
1769,
5411,
4206,
4620,
273,
425,
31,
5411,
368,
309,
518,
1807,
392,
490,
8732,
16,
277,
2545,
326,
2863,
4620,
471,
2110,
2606,
5,
5411,
309,
261,
2700,
1276,
2985,
9267,
503,
13,
2398,
288,
7734,
368,
1378,
326,
9495,
1520,
316,
326,
819,
7734,
1103,
18,
458,
12,
3297,
67,
3589,
67,
706,
16169,
8506,
67,
12658,
16,
425,
1769,
7734,
368,
336,
326,
2863,
4620,
7734,
4620,
273,
14015,
1305,
9267,
503,
13,
73,
2
] |
public Property(ProvidedService ps, PropertyMetadata pm) {
|
public Property(ProvidedService ps, String name, String field, String type, String value, Element manipulation) {
|
public Property(ProvidedService ps, PropertyMetadata pm) { m_providedService = ps; m_metadata = pm; // Fix the type of the property if null if (pm.getType() == null) { // If the type is not found, it is a dynamic property Element manipulation = m_providedService.getComponentManager().getComponentMetatada().getMetadata().getElements("Manipulation")[0]; String type = null; String field = m_metadata.getField(); for (int i = 0; i < manipulation.getElements("Field").length; i++) { if (field.equals(manipulation.getElements("Field")[i].getAttribute("name"))) { type = manipulation.getElements("Field")[i].getAttribute("type"); break; } } pm.setType(type); } if (pm.getValue() != null) { setValue(pm.getValue()); } }
|
45948 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45948/d229001e440fb0347d56e6cc3a6e65308dcdb431/Property.java/buggy/ipojo/src/main/java/org/apache/felix/ipojo/handlers/providedservice/Property.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4276,
12,
19254,
1179,
4250,
16,
514,
508,
16,
514,
652,
16,
514,
618,
16,
514,
460,
16,
3010,
27029,
13,
288,
3639,
312,
67,
29206,
1179,
273,
4250,
31,
3639,
312,
67,
4165,
273,
7430,
31,
3639,
368,
12139,
326,
618,
434,
326,
1272,
309,
446,
3639,
309,
261,
7755,
18,
588,
559,
1435,
422,
446,
13,
288,
5411,
368,
971,
326,
618,
353,
486,
1392,
16,
518,
353,
279,
5976,
1272,
5411,
3010,
27029,
273,
312,
67,
29206,
1179,
18,
588,
1841,
1318,
7675,
588,
1841,
12244,
270,
16524,
7675,
588,
2277,
7675,
588,
3471,
2932,
19308,
6234,
7923,
63,
20,
15533,
5411,
514,
618,
273,
446,
31,
5411,
514,
652,
273,
312,
67,
4165,
18,
588,
974,
5621,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
27029,
18,
588,
3471,
2932,
974,
20387,
2469,
31,
277,
27245,
288,
7734,
309,
261,
1518,
18,
14963,
12,
4728,
625,
6234,
18,
588,
3471,
2932,
974,
7923,
63,
77,
8009,
588,
1499,
2932,
529,
6,
20349,
288,
10792,
618,
273,
27029,
18,
588,
3471,
2932,
974,
7923,
63,
77,
8009,
588,
1499,
2932,
723,
8863,
10792,
898,
31,
7734,
289,
5411,
289,
5411,
7430,
18,
542,
559,
12,
723,
1769,
3639,
289,
3639,
309,
261,
7755,
18,
24805,
1435,
480,
446,
13,
288,
5524,
12,
7755,
18,
24805,
10663,
289,
565,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4276,
12,
19254,
1179,
4250,
16,
514,
508,
16,
514,
652,
16,
514,
618,
16,
514,
460,
16,
3010,
27029,
13,
288,
3639,
312,
67,
29206,
1179,
273,
4250,
31,
3639,
312,
67,
4165,
273,
7430,
31,
3639,
368,
12139,
326,
618,
434,
326,
1272,
309,
446,
3639,
309,
261,
7755,
18,
588,
559,
1435,
422,
446,
13,
288,
5411,
368,
971,
326,
618,
353,
486,
1392,
16,
518,
353,
279,
5976,
1272,
5411,
3010,
27029,
273,
312,
67,
29206,
1179,
18,
588,
1841,
1318,
7675,
588,
1841,
12244,
270,
16524,
7675,
588,
2277,
7675,
588,
3471,
2932,
19308,
6234,
7923,
63,
20,
15533,
5411,
514,
618,
273,
446,
31,
5411,
514,
652,
273,
312,
67,
4165,
2
] |
IContributionItem result = parentMgr.remove(id); if (result != null) itemRemoved(result); return result; }
|
IContributionItem result = parentMgr.remove(id); if (result != null) itemRemoved(result); return result; }
|
public IContributionItem remove(String id) { IContributionItem result = parentMgr.remove(id); if (result != null) itemRemoved(result); return result;}
|
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/5ddde0e384bac44f41aeb754525f7bdab6a04e11/SubContributionManager.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/action/SubContributionManager.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
467,
442,
4027,
1180,
1206,
12,
780,
612,
13,
288,
202,
45,
442,
4027,
1180,
563,
273,
982,
9455,
18,
4479,
12,
350,
1769,
202,
430,
261,
2088,
480,
446,
13,
202,
202,
1726,
10026,
12,
2088,
1769,
202,
2463,
563,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
467,
442,
4027,
1180,
1206,
12,
780,
612,
13,
288,
202,
45,
442,
4027,
1180,
563,
273,
982,
9455,
18,
4479,
12,
350,
1769,
202,
430,
261,
2088,
480,
446,
13,
202,
202,
1726,
10026,
12,
2088,
1769,
202,
2463,
563,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
assertHasValue(ret, filename);
|
attachment = (Object[]) ret[0]; assertEquals("attach.txt", attachment[0]); assertEquals("newdescription", attachment[1]); assertEquals(7, attachment[2]); assertEquals(username, attachment[4]); bytes = (byte[]) call("ticket.getAttachment", id, filename); data = new String(bytes); assertEquals("newdata", data);
|
public void testAttachment() throws XmlRpcException, IOException { int id = createTicket("summary", "description", new Hashtable()); String filename = (String) call("ticket.putAttachment", id, "attach.txt", "data".getBytes(), true); // the returned filename may differ, since another ticket may have an // attachment named "attach.txt" // assertEquals("attach.txt", filename); Object[] ret = (Object[]) call("ticket.listAttachments", id); assertEquals(1, ret.length); assertHasValue(ret, filename); byte[] bytes = (byte[]) call("ticket.getAttachment", id, filename); String data = new String(bytes); assertEquals("data", data); String filename2 = (String) call("ticket.putAttachment", id, filename, "data".getBytes(), true); assertEquals(filename, filename2); ret = (Object[]) call("ticket.listAttachments", id); assertEquals(1, ret.length); assertHasValue(ret, filename); String filename3 = (String) call("ticket.putAttachment", id, "attach.txt", "data".getBytes(), false); assertFalse("attach.txt".equals(filename3)); ret = (Object[]) call("ticket.listAttachments", id); assertEquals(2, ret.length); assertHasValue(ret, filename); assertHasValue(ret, filename3); }
|
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/f4de37db7b6c84008daa5d21a45328f003449dab/TracXmlRpcTest.java/buggy/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
6803,
1435,
1216,
5714,
11647,
503,
16,
1860,
288,
202,
202,
474,
612,
273,
752,
13614,
2932,
7687,
3113,
315,
3384,
3113,
394,
18559,
10663,
202,
202,
780,
1544,
273,
261,
780,
13,
745,
2932,
16282,
18,
458,
6803,
3113,
612,
16,
315,
7331,
18,
5830,
3113,
315,
892,
9654,
588,
2160,
9334,
638,
1769,
202,
202,
759,
326,
2106,
1544,
2026,
15221,
16,
3241,
4042,
9322,
2026,
1240,
392,
202,
202,
759,
6042,
4141,
315,
7331,
18,
5830,
6,
202,
202,
759,
1815,
8867,
2932,
7331,
18,
5830,
3113,
1544,
1769,
202,
202,
921,
8526,
325,
273,
261,
921,
63,
5717,
745,
2932,
16282,
18,
1098,
12961,
3113,
612,
1769,
202,
202,
11231,
8867,
12,
21,
16,
325,
18,
2469,
1769,
202,
202,
11231,
5582,
620,
12,
1349,
16,
1544,
1769,
202,
202,
7229,
8526,
1731,
273,
261,
7229,
63,
5717,
745,
2932,
16282,
18,
588,
6803,
3113,
612,
16,
1544,
1769,
202,
202,
780,
501,
273,
394,
514,
12,
3890,
1769,
202,
202,
11231,
8867,
2932,
892,
3113,
501,
1769,
202,
202,
780,
1544,
22,
273,
261,
780,
13,
745,
2932,
16282,
18,
458,
6803,
3113,
612,
16,
1544,
16,
315,
892,
9654,
588,
2160,
9334,
638,
1769,
202,
202,
11231,
8867,
12,
3459,
16,
1544,
22,
1769,
202,
202,
1349,
273,
261,
921,
63,
5717,
745,
2932,
16282,
18,
1098,
12961,
3113,
612,
1769,
202,
202,
11231,
8867,
12,
21,
16,
325,
18,
2469,
1769,
202,
202,
11231,
5582,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6803,
1435,
1216,
5714,
11647,
503,
16,
1860,
288,
202,
202,
474,
612,
273,
752,
13614,
2932,
7687,
3113,
315,
3384,
3113,
394,
18559,
10663,
202,
202,
780,
1544,
273,
261,
780,
13,
745,
2932,
16282,
18,
458,
6803,
3113,
612,
16,
315,
7331,
18,
5830,
3113,
315,
892,
9654,
588,
2160,
9334,
638,
1769,
202,
202,
759,
326,
2106,
1544,
2026,
15221,
16,
3241,
4042,
9322,
2026,
1240,
392,
202,
202,
759,
6042,
4141,
315,
7331,
18,
5830,
6,
202,
202,
759,
1815,
8867,
2932,
7331,
18,
5830,
3113,
1544,
1769,
202,
202,
921,
8526,
325,
273,
261,
921,
63,
5717,
745,
2932,
16282,
18,
1098,
12961,
3113,
612,
1769,
202,
202,
11231,
2
] |
private static void setDefaultQueryOptions() { // get the preferences store for the bugzilla preferences IPreferenceStore prefs = BugzillaPlugin.getDefault().getPreferenceStore(); // get the default status values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.STATUS_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_STATUS_VALUES)); // get the default preselected status values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.PRESELECTED_STATUS_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_PRESELECTED_STATUS_VALUES)); // get the default resolution values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.RESOLUTION_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_RESOLUTION_VALUES)); // get the default severity values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.SEVERITY_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_SEVERITY_VALUES)); // get the default priority values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.PRIORITY_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_PRIORITY_VALUES)); // get the default hardware values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.HARDWARE_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_HARDWARE_VALUES)); // get the default os values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.OS_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_OS_VALUES)); // get the default product values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.PRODUCT_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_PRODUCT_VALUES)); // get the default component values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.COMPONENT_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_COMPONENT_VALUES)); // get the default version values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.VERSION_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_VERSION_VALUES)); // get the default target values from the store and set them as the default options prefs.setDefault(IBugzillaConstants.TARGET_VALUES, queryOptionsToString(IBugzillaConstants.DEFAULT_TARGET_VALUES)); }
|
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,
1152,
225,
760,
225,
918,
225,
9277,
1138,
1320,
1435,
225,
288,
202,
202,
759,
225,
336,
225,
326,
225,
12750,
225,
1707,
225,
364,
225,
326,
225,
7934,
15990,
225,
12750,
202,
202,
45,
9624,
2257,
225,
15503,
225,
273,
225,
16907,
15990,
3773,
18,
588,
1868,
7675,
588,
9624,
2257,
5621,
202,
202,
759,
225,
336,
225,
326,
225,
805,
225,
1267,
225,
924,
225,
628,
225,
326,
225,
1707,
225,
471,
225,
444,
225,
2182,
225,
487,
225,
326,
225,
805,
225,
702,
202,
202,
1484,
2556,
18,
542,
1868,
12,
13450,
637,
15990,
2918,
18,
8608,
67,
16386,
16,
1082,
202,
2271,
1320,
5808,
12,
13450,
637,
15990,
2918,
18,
5280,
67,
8608,
67,
16386,
10019,
202,
202,
759,
225,
336,
225,
326,
225,
805,
225,
4075,
292,
828,
225,
1267,
225,
924,
225,
628,
225,
326,
225,
1707,
225,
471,
225,
444,
225,
2182,
225,
487,
225,
326,
225,
805,
225,
702,
202,
202,
1484,
2556,
18,
542,
1868,
12,
13450,
637,
15990,
2918,
18,
3670,
4803,
2056,
67,
8608,
67,
16386,
16,
1082,
202,
2271,
1320,
5808,
12,
13450,
637,
15990,
2918,
18,
5280,
67,
3670,
4803,
2056,
67,
8608,
67,
16386,
10019,
202,
202,
759,
225,
336,
225,
326,
225,
805,
225,
7861,
225,
924,
225,
628,
225,
326,
225,
1707,
225,
471,
225,
444,
225,
2182,
225,
487,
225,
326,
225,
805,
225,
702,
202,
202,
1484,
2556,
18,
542,
1868,
12,
13450,
637,
15990,
2918,
18,
2
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
760,
225,
918,
225,
9277,
1138,
1320,
1435,
225,
288,
202,
202,
759,
225,
336,
225,
326,
225,
12750,
225,
1707,
225,
364,
225,
326,
225,
7934,
15990,
225,
12750,
202,
202,
45,
9624,
2257,
225,
15503,
225,
273,
225,
16907,
15990,
3773,
18,
588,
1868,
7675,
588,
9624,
2257,
5621,
202,
202,
759,
225,
336,
225,
326,
225,
805,
225,
1267,
225,
924,
225,
628,
225,
326,
225,
1707,
225,
471,
225,
444,
225,
2182,
225,
487,
225,
326,
225,
805,
225,
702,
202,
202,
1484,
2556,
18,
542,
1868,
12,
13450,
637,
15990,
2918,
18,
8608,
67,
16386,
16,
1082,
202,
2271,
1320,
5808,
12,
13450,
637,
15990,
2918,
18,
5280,
67,
8608,
2
] |
||
boolean synPredMatched651 = false; if ((((LA(1) >= LITERAL_child && LA(1) <= 114)))) { int _m651 = mark(); synPredMatched651 = true;
|
boolean synPredMatched152 = false; if ((((LA(1) >= LITERAL_child && LA(1) <= 116)))) { int _m152 = mark(); synPredMatched152 = true;
|
public final void forwardOrReverseStep() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST forwardOrReverseStep_AST = null; boolean synPredMatched651 = false; if ((((LA(1) >= LITERAL_child && LA(1) <= 114)))) { int _m651 = mark(); synPredMatched651 = true; inputState.guessing++; try { { forwardAxisSpecifier(); match(COLON); } } catch (RecognitionException pe) { synPredMatched651 = false; } rewind(_m651); inputState.guessing--; } if ( synPredMatched651 ) { forwardAxis(); astFactory.addASTChild(currentAST, returnAST); nodeTest(); astFactory.addASTChild(currentAST, returnAST); forwardOrReverseStep_AST = (AST)currentAST.root; } else { boolean synPredMatched653 = false; if ((((LA(1) >= LITERAL_parent && LA(1) <= 118)))) { int _m653 = mark(); synPredMatched653 = true; inputState.guessing++; try { { reverseAxisSpecifier(); match(COLON); } } catch (RecognitionException pe) { synPredMatched653 = false; } rewind(_m653); inputState.guessing--; } if ( synPredMatched653 ) { reverseAxis(); astFactory.addASTChild(currentAST, returnAST); nodeTest(); astFactory.addASTChild(currentAST, returnAST); forwardOrReverseStep_AST = (AST)currentAST.root; } else if ((_tokenSet_6.member(LA(1)))) { abbrevStep(); astFactory.addASTChild(currentAST, returnAST); forwardOrReverseStep_AST = (AST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = forwardOrReverseStep_AST; }
|
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/722cca774247887cf67fef993c71f848a05e075f/XPathParser2.java/clean/src/org/exist/parser/XPathParser2.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
5104,
1162,
12650,
4160,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
9053,
5104,
1162,
12650,
4160,
67,
9053,
273,
446,
31,
9506,
202,
6494,
6194,
10391,
15400,
9222,
21,
273,
629,
31,
202,
202,
430,
261,
12443,
12,
2534,
12,
21,
13,
1545,
511,
18454,
67,
3624,
597,
2928,
12,
21,
13,
1648,
21284,
3719,
3719,
288,
1082,
202,
474,
389,
81,
9222,
21,
273,
2267,
5621,
1082,
202,
11982,
10391,
15400,
9222,
21,
273,
638,
31,
1082,
202,
2630,
1119,
18,
20885,
310,
9904,
31,
1082,
202,
698,
288,
9506,
202,
95,
9506,
202,
11565,
6558,
21416,
5621,
9506,
202,
1916,
12,
4935,
673,
1769,
9506,
202,
97,
1082,
202,
97,
1082,
202,
14683,
261,
5650,
7909,
503,
2804,
13,
288,
9506,
202,
11982,
10391,
15400,
9222,
21,
273,
629,
31,
1082,
202,
97,
1082,
202,
266,
10094,
24899,
81,
9222,
21,
1769,
1082,
202,
2630,
1119,
18,
20885,
310,
413,
31,
202,
202,
97,
202,
202,
430,
261,
6194,
10391,
15400,
9222,
21,
262,
288,
1082,
202,
11565,
6558,
5621,
1082,
202,
689,
1733,
18,
1289,
9053,
1763,
12,
2972,
9053,
16,
327,
9053,
1769,
1082,
202,
2159,
4709,
5621,
1082,
202,
689,
1733,
18,
1289,
9053,
1763,
12,
2972,
9053,
16,
327,
9053,
1769,
1082,
202,
11565,
1162,
12650,
4160,
67,
9053,
273,
261,
9053,
13,
2972,
9053,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5104,
1162,
12650,
4160,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
9053,
5104,
1162,
12650,
4160,
67,
9053,
273,
446,
31,
9506,
202,
6494,
6194,
10391,
15400,
9222,
21,
273,
629,
31,
202,
202,
430,
261,
12443,
12,
2534,
12,
21,
13,
1545,
511,
18454,
67,
3624,
597,
2928,
12,
21,
13,
1648,
21284,
3719,
3719,
288,
1082,
202,
474,
389,
81,
9222,
21,
273,
2267,
5621,
1082,
202,
11982,
10391,
15400,
9222,
21,
273,
638,
31,
1082,
202,
2630,
1119,
18,
20885,
310,
9904,
31,
1082,
202,
698,
288,
9506,
202,
95,
2
] |
PsiDocumentManager documentManager = PsiDocumentManager.getInstance(whitespace.getProject()); documentManager.commitDocument(documentManager.getDocument(whitespace.getContainingFile()));
|
documentManager.commitDocument(document);
|
private static void fixupWhiteSpace(final PsiWhiteSpace whitespace) { if (whitespace == null) return; PsiElement element1 = whitespace.getPrevSibling(); PsiElement element2 = whitespace.getNextSibling(); if (element2 == null || element1 == null) return; String ws = CodeEditUtil.getStringWhiteSpaceBetweenTokens(whitespace.getNode(), element2.getNode(), StdLanguages.JAVA); LeafElement node = Factory.createSingleLeafElement(TokenType.WHITE_SPACE, ws.toCharArray(), 0, ws.length(), SharedImplUtil.findCharTableByTree(whitespace.getNode()), whitespace.getManager()); whitespace.getParent().getNode().replaceChild(whitespace.getNode(), node); PsiDocumentManager documentManager = PsiDocumentManager.getInstance(whitespace.getProject()); documentManager.commitDocument(documentManager.getDocument(whitespace.getContainingFile())); }
|
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/e5b21fa0c53fdf94b6ae09bd28b584b1da81d1ed/DeclarationMover.java/buggy/source/com/intellij/openapi/editor/actions/moveUpDown/DeclarationMover.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
2917,
416,
23108,
12,
6385,
453,
7722,
23108,
7983,
13,
288,
565,
309,
261,
18777,
422,
446,
13,
327,
31,
565,
453,
7722,
1046,
930,
21,
273,
7983,
18,
588,
9958,
10291,
5621,
565,
453,
7722,
1046,
930,
22,
273,
7983,
18,
588,
2134,
10291,
5621,
565,
309,
261,
2956,
22,
422,
446,
747,
930,
21,
422,
446,
13,
327,
31,
565,
514,
4945,
273,
3356,
4666,
1304,
18,
588,
780,
23108,
11831,
5157,
12,
18777,
18,
588,
907,
9334,
930,
22,
18,
588,
907,
9334,
6276,
12912,
18,
27264,
1769,
565,
23383,
1046,
756,
273,
7822,
18,
2640,
5281,
9858,
1046,
12,
28675,
18,
16861,
67,
6616,
16,
4945,
18,
869,
15936,
9334,
374,
16,
4945,
18,
2469,
9334,
10314,
2828,
1304,
18,
4720,
2156,
1388,
858,
2471,
12,
18777,
18,
588,
907,
1435,
3631,
7983,
18,
588,
1318,
10663,
565,
7983,
18,
588,
3054,
7675,
588,
907,
7675,
2079,
1763,
12,
18777,
18,
588,
907,
9334,
756,
1769,
565,
453,
7722,
2519,
1318,
1668,
1318,
273,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
18777,
18,
588,
4109,
10663,
565,
1668,
1318,
18,
7371,
2519,
12,
5457,
1318,
18,
588,
2519,
12,
18777,
18,
588,
24344,
812,
1435,
10019,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
2917,
416,
23108,
12,
6385,
453,
7722,
23108,
7983,
13,
288,
565,
309,
261,
18777,
422,
446,
13,
327,
31,
565,
453,
7722,
1046,
930,
21,
273,
7983,
18,
588,
9958,
10291,
5621,
565,
453,
7722,
1046,
930,
22,
273,
7983,
18,
588,
2134,
10291,
5621,
565,
309,
261,
2956,
22,
422,
446,
747,
930,
21,
422,
446,
13,
327,
31,
565,
514,
4945,
273,
3356,
4666,
1304,
18,
588,
780,
23108,
11831,
5157,
12,
18777,
18,
588,
907,
9334,
930,
22,
18,
588,
907,
9334,
6276,
12912,
18,
27264,
1769,
565,
23383,
1046,
756,
273,
7822,
18,
2640,
5281,
9858,
1046,
12,
28675,
18,
16861,
67,
6616,
16,
4945,
18,
869,
15936,
9334,
374,
2
] |
if(indexType != Type.ITEM) {
|
if(!hasMixedContent && indexType != Type.ITEM) {
|
protected Sequence quickNodeSetCompare(Sequence contextSequence) throws XPathException { // if the context sequence hasn't changed we can return a cached result if(cached != null && cached.isValid(contextSequence)) {// LOG.debug("Returning cached result for " + pprint()); return cached.getResult(); } // evaluate left expression NodeSet nodes = (NodeSet) getLeft().eval(contextSequence); if(nodes.getLength() < 2) // fall back to nodeSetCompare if we just have to check a single node return nodeSetCompare(nodes, contextSequence); // evaluate right expression Sequence rightSeq = getRight().eval(contextSequence); if (rightSeq.getLength() > 1) // fall back to nodeSetCompare return nodeSetCompare(nodes, contextSequence); // get the type of a possible index int indexType = nodes.getIndexType(); DocumentSet docs = nodes.getDocumentSet(); NodeSet result = null; if(indexType != Type.ITEM) { // we have a range index defined on the nodes in this sequence Item key = rightSeq.itemAt(0); if(truncation != Constants.TRUNC_NONE) { // truncation is only possible on strings key = key.convertTo(Type.STRING); } else if(key.getType() != indexType) { // index type doesn't match. If index and argument have a numeric type, // we convert to the type of the index if(Type.subTypeOf(indexType, Type.NUMBER) && Type.subTypeOf(key.getType(), Type.NUMBER)) key = key.convertTo(indexType); } // if key does not implement Indexable, we can't use the index if(key instanceof Indexable && Type.subTypeOf(key.getType(), indexType)) { if(truncation != Constants.TRUNC_NONE) { try { result = context.getBroker().getValueIndex().match(docs, nodes, getComparisonString(rightSeq).replace('%', '*'), DBBroker.MATCH_WILDCARDS); } catch (EXistException e) { throw new XPathException(getASTNode(), e.getMessage(), e); } } else { LOG.debug("Using value index for key: " + key.getStringValue()); result = context.getBroker().getValueIndex().find(relation, docs, nodes, (Indexable)key); } } else return nodeSetCompare(nodes, contextSequence); } else if (relation == Constants.EQ && nodes.hasTextIndex()) { // we can use the fulltext index String cmp = getComparisonString(rightSeq); if(cmp.length() < NativeTextEngine.MAX_WORD_LENGTH) nodes = useFulltextIndex(cmp, nodes, docs); // now compare the input node set to the search expression result = context.getBroker().getNodesEqualTo(nodes, docs, relation, cmp, getCollator(contextSequence)); } else if(Type.subTypeOf(rightSeq.getItemType(), Type.STRING) || rightSeq.getItemType() == Type.ATOMIC) { // no usable index found. Fall back to a sequential scan of the nodes result = context.getBroker().getNodesEqualTo(nodes, docs, relation, getComparisonString(rightSeq), getCollator(contextSequence)); } else { // no usable index found. Fall back to nodeSetCompare return nodeSetCompare(nodes, contextSequence); } // can this result be cached? Don't cache if the result depends on local variables. boolean canCache = contextSequence instanceof NodeSet && (getRight().getDependencies() & Dependency.LOCAL_VARS) == 0 && (getLeft().getDependencies() & Dependency.LOCAL_VARS) == 0; if(canCache) cached = new CachedResult((NodeSet)contextSequence, result); return result; }
|
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/fc995ec0356b880c0f1167497625f824be9461d7/GeneralComparison.java/buggy/src/org/exist/xquery/GeneralComparison.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8370,
9549,
907,
694,
8583,
12,
4021,
819,
4021,
13,
202,
202,
15069,
10172,
503,
288,
202,
202,
759,
309,
326,
819,
3102,
13342,
1404,
3550,
732,
848,
327,
279,
3472,
563,
202,
202,
430,
12,
7097,
480,
446,
597,
3472,
18,
26810,
12,
2472,
4021,
3719,
288,
759,
1082,
202,
4842,
18,
4148,
2932,
28365,
3472,
563,
364,
315,
397,
18771,
10663,
1082,
202,
2463,
3472,
18,
588,
1253,
5621,
202,
202,
97,
202,
202,
759,
202,
21024,
2002,
2652,
202,
202,
907,
694,
2199,
273,
261,
907,
694,
13,
15930,
7675,
8622,
12,
2472,
4021,
1769,
9506,
202,
430,
12,
4690,
18,
588,
1782,
1435,
411,
576,
13,
1082,
202,
759,
4159,
1473,
358,
756,
694,
8583,
309,
732,
2537,
1240,
358,
866,
279,
2202,
756,
1082,
202,
2463,
756,
694,
8583,
12,
4690,
16,
819,
4021,
1769,
9506,
202,
759,
5956,
2145,
2652,
202,
202,
4021,
2145,
6926,
273,
16609,
7675,
8622,
12,
2472,
4021,
1769,
202,
202,
430,
261,
4083,
6926,
18,
588,
1782,
1435,
405,
404,
13,
1082,
202,
759,
4159,
1473,
358,
756,
694,
8583,
1082,
202,
2463,
756,
694,
8583,
12,
4690,
16,
819,
4021,
1769,
9506,
202,
759,
336,
326,
618,
434,
279,
3323,
770,
202,
202,
474,
16488,
273,
2199,
18,
588,
1016,
559,
5621,
9506,
202,
2519,
694,
3270,
273,
2199,
18,
588,
2519,
694,
5621,
202,
202,
907,
694,
563,
273,
446,
31,
9506,
565,
309,
12,
1615,
559,
480,
1412,
18,
12674,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8370,
9549,
907,
694,
8583,
12,
4021,
819,
4021,
13,
202,
202,
15069,
10172,
503,
288,
202,
202,
759,
309,
326,
819,
3102,
13342,
1404,
3550,
732,
848,
327,
279,
3472,
563,
202,
202,
430,
12,
7097,
480,
446,
597,
3472,
18,
26810,
12,
2472,
4021,
3719,
288,
759,
1082,
202,
4842,
18,
4148,
2932,
28365,
3472,
563,
364,
315,
397,
18771,
10663,
1082,
202,
2463,
3472,
18,
588,
1253,
5621,
202,
202,
97,
202,
202,
759,
202,
21024,
2002,
2652,
202,
202,
907,
694,
2199,
273,
261,
907,
694,
13,
15930,
7675,
8622,
12,
2472,
4021,
1769,
9506,
202,
430,
12,
4690,
18,
588,
1782,
1435,
411,
576,
13,
1082,
202,
759,
4159,
1473,
358,
2
] |
if (c == C_STAR) { buffer.append('?'); return start; } if (c == '+') { buffer.append("? extends "); return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer); } else if (c == '-') { buffer.append("? super "); return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer); } else { return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer);
|
switch(c) { case C_STAR : buffer.append('?'); return start; case '+' : buffer.append("? extends "); return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer); case '-' : buffer.append("? super "); return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer); default : return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer);
|
private static int appendTypeArgumentSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) { // need a minimum 1 char if (start >= string.length) { throw new IllegalArgumentException(); } char c = string[start]; if (c == C_STAR) { buffer.append('?'); return start; } if (c == '+') { buffer.append("? extends "); //$NON-NLS-1$ return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer); } else if (c == '-') { buffer.append("? super "); //$NON-NLS-1$ return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer); } else { return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer); }}
|
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/9ba8652d2cebf2117416af5e39a70e172556117b/Signature.java/buggy/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java
|
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
760,
509,
714,
559,
1379,
5374,
12,
3001,
8526,
533,
16,
509,
787,
16,
1250,
7418,
5628,
1164,
559,
1557,
16,
6674,
1613,
13,
288,
202,
759,
1608,
279,
5224,
404,
1149,
202,
430,
261,
1937,
1545,
533,
18,
2469,
13,
288,
202,
202,
12849,
394,
2754,
5621,
202,
97,
202,
3001,
276,
273,
533,
63,
1937,
15533,
202,
430,
261,
71,
422,
385,
67,
20943,
13,
288,
202,
202,
4106,
18,
6923,
2668,
4899,
1769,
202,
202,
2463,
787,
31,
202,
97,
202,
430,
261,
71,
422,
15126,
6134,
288,
202,
202,
4106,
18,
6923,
2932,
35,
3231,
315,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
2463,
714,
559,
5374,
12,
1080,
16,
787,
397,
404,
16,
7418,
5628,
1164,
559,
1557,
16,
1613,
1769,
202,
97,
469,
309,
261,
71,
422,
4014,
13,
288,
202,
202,
4106,
18,
6923,
2932,
35,
2240,
315,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
2463,
714,
559,
5374,
12,
1080,
16,
787,
397,
404,
16,
7418,
5628,
1164,
559,
1557,
16,
1613,
1769,
202,
97,
469,
288,
202,
202,
2463,
714,
559,
5374,
12,
1080,
16,
787,
16,
7418,
5628,
1164,
559,
1557,
16,
1613,
1769,
202,
9090,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] |
[
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
760,
509,
714,
559,
1379,
5374,
12,
3001,
8526,
533,
16,
509,
787,
16,
1250,
7418,
5628,
1164,
559,
1557,
16,
6674,
1613,
13,
288,
202,
759,
1608,
279,
5224,
404,
1149,
202,
430,
261,
1937,
1545,
533,
18,
2469,
13,
288,
202,
202,
12849,
394,
2754,
5621,
202,
97,
202,
3001,
276,
273,
533,
63,
1937,
15533,
202,
430,
261,
71,
422,
385,
67,
20943,
13,
288,
202,
202,
4106,
18,
6923,
2668,
4899,
1769,
202,
202,
2463,
787,
31,
202,
97,
202,
430,
261,
71,
422,
15126,
6134,
288,
202,
202,
4106,
18,
6923,
2932,
35,
3231,
315,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
2463,
714,
559,
5374,
12,
1080,
16,
787,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.