rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if(exc instanceof EcmaError) { | if (exc instanceof EcmaError) { | public void run() { Context cx = Context.enter(); DebuggableEngine engine = cx.getDebuggableEngine(); engine.setBreakNextLine(true); try { cx.evaluateReader(scope, new FileReader(fileName), fileName, 1, null); } catch(Exception exc) { String msg = exc.getMessage(); if(exc instanceof EcmaError) { EcmaError err = (EcmaError)exc; msg = err.getSourceName() + ", line " + err.getLineNumber() + ": " + msg; } MessageDialogWrapper.showMessageDialog(db, msg, "Run", JOptionPane.ERROR_MESSAGE); } finally { cx.exit(); } } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/b9766e81693411fa600b26b9a0763dcf621b2770/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
1772,
9494,
273,
1772,
18,
2328,
5621,
3639,
4015,
8455,
4410,
4073,
273,
9494,
18,
588,
2829,
8455,
4410,
5621,
3639,
4073,
18,
542,
7634,
2134,
1670,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
1772,
9494,
273,
1772,
18,
2328,
5621,
3639,
4015,
8455,
4410,
4073,
273,
9494,
18,
588,
2829,
8455,
4410,
5621,
3639,
4073,
18,
542,
7634,
2134,
1670,
1... |
previousAfter = previous.getStyle().getCalculatedStyle().getIdent( | previous.getStyle().getCalculatedStyle().getIdent( | public void markRun(int offset, BlockBox previous, BlockBox current) { RelayoutData previousData = get(offset-1); RelayoutData currentData = get(offset); IdentValue previousAfter = previousAfter = previous.getStyle().getCalculatedStyle().getIdent( CSSName.PAGE_BREAK_AFTER); IdentValue currentBefore = current.getStyle().getCalculatedStyle().getIdent( CSSName.PAGE_BREAK_BEFORE); if ( (previousAfter == IdentValue.AVOID && currentBefore == IdentValue.AUTO) || (previousAfter == IdentValue.AUTO && currentBefore == IdentValue.AVOID) || (previousAfter == IdentValue.AVOID && currentBefore == IdentValue.AVOID)) { if (! previousData.isInRun()) { previousData.setStartsRun(true); } previousData.setInRun(true); currentData.setInRun(true); if (offset == _hints.size() - 1) { currentData.setEndsRun(true); } } else { if (previousData.isInRun()) { previousData.setEndsRun(true); } } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/374d17ea4f8f5f5914c5c65d8a4c5a5ce9f4749d/BlockBoxing.java/clean/src/java/org/xhtmlrenderer/layout/BlockBoxing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2267,
1997,
12,
474,
1384,
16,
3914,
3514,
2416,
16,
3914,
3514,
783,
13,
288,
5411,
4275,
2012,
751,
2416,
751,
273,
336,
12,
3348,
17,
21,
1769,
5411,
4275,
2012,
751,
3068... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2267,
1997,
12,
474,
1384,
16,
3914,
3514,
2416,
16,
3914,
3514,
783,
13,
288,
5411,
4275,
2012,
751,
2416,
751,
273,
336,
12,
3348,
17,
21,
1769,
5411,
4275,
2012,
751,
3068... |
AST tmp1992_AST_in = (AST)_t; | AST tmp1995_AST_in = (AST)_t; | public final void systemhandlename(AST _t) throws RecognitionException { AST systemhandlename_AST_in = (_t == ASTNULL) ? null : (AST)_t; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case AAMEMORY: { AST tmp1967_AST_in = (AST)_t; match(_t,AAMEMORY); _t = _t.getNextSibling(); break; } case ACTIVEWINDOW: { AST tmp1968_AST_in = (AST)_t; match(_t,ACTIVEWINDOW); _t = _t.getNextSibling(); break; } case AUDITCONTROL: { AST tmp1969_AST_in = (AST)_t; match(_t,AUDITCONTROL); _t = _t.getNextSibling(); break; } case AUDITPOLICY: { AST tmp1970_AST_in = (AST)_t; match(_t,AUDITPOLICY); _t = _t.getNextSibling(); break; } case CLIPBOARD: { AST tmp1971_AST_in = (AST)_t; match(_t,CLIPBOARD); _t = _t.getNextSibling(); break; } case CODEBASELOCATOR: { AST tmp1972_AST_in = (AST)_t; match(_t,CODEBASELOCATOR); _t = _t.getNextSibling(); break; } case COLORTABLE: { AST tmp1973_AST_in = (AST)_t; match(_t,COLORTABLE); _t = _t.getNextSibling(); break; } case COMPILER: { AST tmp1974_AST_in = (AST)_t; match(_t,COMPILER); _t = _t.getNextSibling(); break; } case COMSELF: { AST tmp1975_AST_in = (AST)_t; match(_t,COMSELF); _t = _t.getNextSibling(); break; } case CURRENTWINDOW: { AST tmp1976_AST_in = (AST)_t; match(_t,CURRENTWINDOW); _t = _t.getNextSibling(); break; } case DEBUGGER: { AST tmp1977_AST_in = (AST)_t; match(_t,DEBUGGER); _t = _t.getNextSibling(); break; } case DEFAULTWINDOW: { AST tmp1978_AST_in = (AST)_t; match(_t,DEFAULTWINDOW); _t = _t.getNextSibling(); break; } case ERRORSTATUS: { AST tmp1979_AST_in = (AST)_t; match(_t,ERRORSTATUS); _t = _t.getNextSibling(); break; } case FILEINFORMATION: { AST tmp1980_AST_in = (AST)_t; match(_t,FILEINFORMATION); _t = _t.getNextSibling(); break; } case FOCUS: { AST tmp1981_AST_in = (AST)_t; match(_t,FOCUS); _t = _t.getNextSibling(); break; } case FONTTABLE: { AST tmp1982_AST_in = (AST)_t; match(_t,FONTTABLE); _t = _t.getNextSibling(); break; } case LASTEVENT: { AST tmp1983_AST_in = (AST)_t; match(_t,LASTEVENT); _t = _t.getNextSibling(); break; } case LOGMANAGER: { AST tmp1984_AST_in = (AST)_t; match(_t,LOGMANAGER); _t = _t.getNextSibling(); break; } case MOUSE: { AST tmp1985_AST_in = (AST)_t; match(_t,MOUSE); _t = _t.getNextSibling(); break; } case PROFILER: { AST tmp1986_AST_in = (AST)_t; match(_t,PROFILER); _t = _t.getNextSibling(); break; } case RCODEINFORMATION: { AST tmp1987_AST_in = (AST)_t; match(_t,RCODEINFORMATION); _t = _t.getNextSibling(); break; } case SECURITYPOLICY: { AST tmp1988_AST_in = (AST)_t; match(_t,SECURITYPOLICY); _t = _t.getNextSibling(); break; } case SELF: { AST tmp1989_AST_in = (AST)_t; match(_t,SELF); _t = _t.getNextSibling(); break; } case SESSION: { AST tmp1990_AST_in = (AST)_t; match(_t,SESSION); _t = _t.getNextSibling(); break; } case SOURCEPROCEDURE: { AST tmp1991_AST_in = (AST)_t; match(_t,SOURCEPROCEDURE); _t = _t.getNextSibling(); break; } case SUPER: { AST tmp1992_AST_in = (AST)_t; match(_t,SUPER); _t = _t.getNextSibling(); break; } case TARGETPROCEDURE: { AST tmp1993_AST_in = (AST)_t; match(_t,TARGETPROCEDURE); _t = _t.getNextSibling(); break; } case TEXTCURSOR: { AST tmp1994_AST_in = (AST)_t; match(_t,TEXTCURSOR); _t = _t.getNextSibling(); break; } case THISOBJECT: { AST tmp1995_AST_in = (AST)_t; match(_t,THISOBJECT); _t = _t.getNextSibling(); break; } case THISPROCEDURE: { AST tmp1996_AST_in = (AST)_t; match(_t,THISPROCEDURE); _t = _t.getNextSibling(); break; } case WEBCONTEXT: { AST tmp1997_AST_in = (AST)_t; match(_t,WEBCONTEXT); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _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,
2619,
2349,
14724,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
2349,
14724,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2619,
2349,
14724,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
2349,
14724,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
... |
return dstFile; | return new BooleanWrapper(true); | private File sendFile(FileTransferService ftsRemote, File srcFile, File dstFile) throws IOException { long init=System.currentTimeMillis(); long numBlocks=0; FileBlock fileBlock = new FileBlock(srcFile.getAbsolutePath()); fileBlock.setDstFilename(dstFile.getAbsolutePath()); Boolean[] sent_blocks = new Boolean[DEFAULT_MAX_SIMULTANEOUS_BLOCKS]; while (fileBlock.hasNextBlock()) { int i; //Exceptions can happen here for (i = 0; (i < sent_blocks.length) && fileBlock.hasNextBlock(); i++) { fileBlock.loadNexBlock(); numBlocks++; ftsRemote.saveFileBlock(fileBlock); //remote (async) invocation (not yet since it's void an throws Exception) } //Wait for exceptions here } if(logger.isDebugEnabled()){ long fin=System.currentTimeMillis(); long delta = (fin-init); logger.debug("File sent using "+numBlocks+" blocks, in: "+ delta + "[ms]"); } //TODO Here We could register this FTS AO into a Node or RunTime pool for reuse! return dstFile; } | 50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/efad12ff223250b786d8e78eee36a4cdbeaad898/FileTransferService.java/clean/src/org/objectweb/proactive/core/filetransfer/FileTransferService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1387,
1366,
812,
12,
812,
5912,
1179,
284,
3428,
5169,
16,
1387,
24672,
16,
3639,
1387,
3046,
812,
13,
1216,
1860,
288,
377,
202,
377,
202,
5748,
1208,
33,
3163,
18,
2972,
28512,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1387,
1366,
812,
12,
812,
5912,
1179,
284,
3428,
5169,
16,
1387,
24672,
16,
3639,
1387,
3046,
812,
13,
1216,
1860,
288,
377,
202,
377,
202,
5748,
1208,
33,
3163,
18,
2972,
28512,
... |
out.println("window.parent.dwrHandleResponse(\"" + eq.getId() + "\", reply);"); | out.println("window.parent.DWREngine.handleResponse(\"" + eq.getId() + "\", reply);"); | protected void doExec(HttpServletRequest req, HttpServletResponse resp) { ExecuteQuery eq = new ExecuteQuery(req, creatorManager, converterManager); try { Object reply = eq.execute(); OutboundVariable ss = converterManager.convertOutbound(reply); PrintWriter out = resp.getWriter(); Log.info("Returning: id[" + eq.getId() + "] init[" + ss.getInitCode() + "] assign[" + ss.getAssignCode() + "] xml[" + eq.isXmlMode() + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ LocalUtil.addNoCacheHeaders(resp); if (eq.isXmlMode()) { resp.setContentType(MIME_XML); out.println(ss.getInitCode()); out.println("var reply = " + ss.getAssignCode() + ";"); //$NON-NLS-1$ //$NON-NLS-2$ out.println("dwrHandleResponse(\"" + eq.getId() + "\", reply);"); //$NON-NLS-1$ //$NON-NLS-2$ } else { resp.setContentType(MIME_HTML); out.println("<script type='text/javascript'>"); //$NON-NLS-1$ out.println(ss.getInitCode()); out.println("var reply = " + ss.getAssignCode() + ";"); //$NON-NLS-1$ //$NON-NLS-2$ out.println("window.parent.dwrHandleResponse(\"" + eq.getId() + "\", reply);"); //$NON-NLS-1$ //$NON-NLS-2$ out.println("</script>"); //$NON-NLS-1$ } out.flush(); } catch (Throwable ex) { Log.warn("Erroring: id[" + eq.getId() + "] message[" + ex.getMessage() + "]", ex); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ try { PrintWriter out = resp.getWriter(); String output = StringEscapeUtils.escapeJavaScript(ex.getMessage()); if (eq.isXmlMode()) { resp.setContentType(MIME_XML); out.println("dwrHandleError(\"" + eq.getId() + "\", \"" + output + "\");"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } else { resp.setContentType(MIME_HTML); out.println("<script type='text/javascript'>"); //$NON-NLS-1$ out.println("window.parent.dwrHandleError(\"" + eq.getId() + "\", '" + output + "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ out.println("</script>"); //$NON-NLS-1$ } out.flush(); } catch (IOException ex2) { Log.error("IO error: " + eq.getId(), ex2); //$NON-NLS-1$ return; } } } | 45384 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45384/1c2e43c84790bfe925e41713280232cd61fc9288/DWRServlet.java/clean/java/uk/ltd/getahead/dwr/DWRServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
1905,
12,
2940,
18572,
1111,
16,
12446,
1718,
13,
565,
288,
3639,
7903,
1138,
7555,
273,
394,
7903,
1138,
12,
3658,
16,
11784,
1318,
16,
6027,
1318,
1769,
3639,
775,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
1905,
12,
2940,
18572,
1111,
16,
12446,
1718,
13,
565,
288,
3639,
7903,
1138,
7555,
273,
394,
7903,
1138,
12,
3658,
16,
11784,
1318,
16,
6027,
1318,
1769,
3639,
775,
3639,... |
boolean wasChanged = false; | boolean changed = false; | public boolean sync() throws IOException { if (getType() == Aggregation.Type.UNION) return false; // see if we need to recheck if (recheck == null) return false; Date now = new Date(); Date lastCheckedDate = new Date(lastChecked); Date need = recheck.add(lastCheckedDate); if (now.before(need)) return false; // ok were gonna recheck lastChecked = System.currentTimeMillis(); // rescan ArrayList newDatasets = new ArrayList(); scan(newDatasets, null); // replace with previous datasets if they exist boolean wasChanged = false; for (int i = 0; i < newDatasets.size(); i++) { Dataset newDataset = (Dataset) newDatasets.get(i); int index = nestedDatasets.indexOf(newDataset); if (index >= 0) { newDatasets.set(i, nestedDatasets.get(index)); logger.debug("Agg.sync oldDataset= {}", newDataset.location); } else { wasChanged = true; logger.debug("Agg.sync newDataset= {}", newDataset.location); } } // see if anything is changed if (!wasChanged) return false; // recreate the list of datasets nestedDatasets = new ArrayList(); nestedDatasets.addAll(explicitDatasets); nestedDatasets.addAll(newDatasets); buildCoords( null); // chose a new typical dataset if (typical != null) { typical.close(); typical = null; typicalDataset = null; } //ncd.empty(); // rebuild the metadata if (getType() == Aggregation.Type.JOIN_NEW) aggNewDimension( false, ncd, null); else if (getType() == Aggregation.Type.JOIN_EXISTING) aggExistingDimension( false, ncd, null); else if (getType() == Aggregation.Type.FORECAST_MODEL) aggExistingDimension( false, ncd, null); ncd.finish(); return true; } | 50426 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50426/b0404daf12e2383fdcab31178ed65cf88b9c105e/Aggregation.java/buggy/cdm/src/main/java/ucar/nc2/ncml/Aggregation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
3792,
1435,
1216,
1860,
288,
565,
309,
261,
588,
559,
1435,
422,
21100,
18,
559,
18,
2124,
1146,
13,
1377,
327,
629,
31,
565,
368,
2621,
309,
732,
1608,
358,
283,
1893,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
3792,
1435,
1216,
1860,
288,
565,
309,
261,
588,
559,
1435,
422,
21100,
18,
559,
18,
2124,
1146,
13,
1377,
327,
629,
31,
565,
368,
2621,
309,
732,
1608,
358,
283,
1893,
565,... |
if (true) { | if (false) { | public static Test suite() { if (true) { return new Suite(ASTConverter15Test.class); } TestSuite suite = new Suite(ASTConverter15Test.class.getName()); suite.addTest(new ASTConverter15Test("test0138")); return suite; } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/7d5a60efabb391d97858c488686ccdd01da96842/ASTConverter15Test.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
7766,
11371,
1435,
288,
202,
202,
430,
261,
3767,
13,
288,
1082,
202,
2463,
394,
348,
9519,
12,
9053,
5072,
3600,
4709,
18,
1106,
1769,
202,
202,
97,
202,
202,
4709,
1358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
7766,
11371,
1435,
288,
202,
202,
430,
261,
3767,
13,
288,
1082,
202,
2463,
394,
348,
9519,
12,
9053,
5072,
3600,
4709,
18,
1106,
1769,
202,
202,
97,
202,
202,
4709,
1358... |
if (((org.postgresql.jdbc1.AbstractJdbc1Connection)con).haveMinimumServerVersion("7.3")) { | if (TestUtil.haveMinimumServerVersion(con,"7.3")) { | public void testPreparedStatementsWithBinds() throws Exception { PreparedStatement pstmt = con.prepareStatement("SELECT * FROM testsps WHERE id = ? or id = ?"); ((PGStatement)pstmt).setUseServerPrepare(true); if (((org.postgresql.jdbc1.AbstractJdbc1Connection)con).haveMinimumServerVersion("7.3")) { assertTrue(((PGStatement)pstmt).isUseServerPrepare()); } else { assertTrue(!((PGStatement)pstmt).isUseServerPrepare()); } //Test that basic functionality works //bind different datatypes pstmt.setInt(1,2); pstmt.setString(2,"2"); ResultSet rs = pstmt.executeQuery(); assertTrue(rs.next()); assertEquals(2, rs.getInt(1)); rs.close(); //Verify that subsequent calls still work rs = pstmt.executeQuery(); assertTrue(rs.next()); assertEquals(2, rs.getInt(1)); rs.close(); pstmt.close(); } | 46409 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46409/7c553901d7ab010ad1cb5bf44f9ca2fdae83909a/ServerPreparedStmtTest.java/clean/src/interfaces/jdbc/org/postgresql/test/jdbc2/ServerPreparedStmtTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
15464,
14663,
1190,
17856,
1435,
1216,
1185,
202,
95,
202,
202,
29325,
293,
10589,
273,
356,
18,
9366,
3406,
2932,
4803,
380,
4571,
7434,
1121,
4852,
612,
273,
692,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
15464,
14663,
1190,
17856,
1435,
1216,
1185,
202,
95,
202,
202,
29325,
293,
10589,
273,
356,
18,
9366,
3406,
2932,
4803,
380,
4571,
7434,
1121,
4852,
612,
273,
692,
5... |
QName qn = QName.parse(context, t.getText()); int code = Type.getType(qn); | QName qn= QName.parse(context, t.getText()); int code= Type.getType(qn); | public final void sequenceType(AST _t, SequenceType type ) throws RecognitionException, XPathException { AST sequenceType_AST_in = (AST)_t; AST t = null; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ATOMIC_TYPE: { AST __t229 = _t; t = _t==ASTNULL ? null :(AST)_t; match(_t,ATOMIC_TYPE); _t = _t.getFirstChild(); QName qn = QName.parse(context, t.getText()); int code = Type.getType(qn); type.setPrimaryType(code); _t = __t229; _t = _t.getNextSibling(); break; } case LITERAL_empty: { AST __t230 = _t; AST tmp26_AST_in = (AST)_t; match(_t,LITERAL_empty); _t = _t.getFirstChild(); type.setPrimaryType(Type.EMPTY); type.setCardinality(Cardinality.EMPTY); _t = __t230; _t = _t.getNextSibling(); break; } case LITERAL_item: { AST __t231 = _t; AST tmp27_AST_in = (AST)_t; match(_t,LITERAL_item); _t = _t.getFirstChild(); type.setPrimaryType(Type.ITEM); _t = __t231; _t = _t.getNextSibling(); break; } case LITERAL_node: { AST __t232 = _t; AST tmp28_AST_in = (AST)_t; match(_t,LITERAL_node); _t = _t.getFirstChild(); type.setPrimaryType(Type.NODE); _t = __t232; _t = _t.getNextSibling(); break; } case LITERAL_element: { AST __t233 = _t; AST tmp29_AST_in = (AST)_t; match(_t,LITERAL_element); _t = _t.getFirstChild(); type.setPrimaryType(Type.ELEMENT); _t = __t233; _t = _t.getNextSibling(); break; } case LITERAL_attribute: { AST __t234 = _t; AST tmp30_AST_in = (AST)_t; match(_t,LITERAL_attribute); _t = _t.getFirstChild(); type.setPrimaryType(Type.ATTRIBUTE); _t = __t234; _t = _t.getNextSibling(); break; } case LITERAL_text: { AST __t235 = _t; AST tmp31_AST_in = (AST)_t; match(_t,LITERAL_text); _t = _t.getFirstChild(); type.setPrimaryType(Type.ITEM); _t = __t235; _t = _t.getNextSibling(); break; } case 110: { AST __t236 = _t; AST tmp32_AST_in = (AST)_t; match(_t,110); _t = _t.getFirstChild(); type.setPrimaryType(Type.PROCESSING_INSTRUCTION); _t = __t236; _t = _t.getNextSibling(); break; } case LITERAL_comment: { AST __t237 = _t; AST tmp33_AST_in = (AST)_t; match(_t,LITERAL_comment); _t = _t.getFirstChild(); type.setPrimaryType(Type.COMMENT); _t = __t237; _t = _t.getNextSibling(); break; } case 111: { AST __t238 = _t; AST tmp34_AST_in = (AST)_t; match(_t,111); _t = _t.getFirstChild(); type.setPrimaryType(Type.DOCUMENT); _t = __t238; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STAR: { AST tmp35_AST_in = (AST)_t; match(_t,STAR); _t = _t.getNextSibling(); type.setCardinality(Cardinality.ZERO_OR_MORE); break; } case PLUS: { AST tmp36_AST_in = (AST)_t; match(_t,PLUS); _t = _t.getNextSibling(); type.setCardinality(Cardinality.ONE_OR_MORE); break; } case QUESTION: { AST tmp37_AST_in = (AST)_t; match(_t,QUESTION); _t = _t.getNextSibling(); type.setCardinality(Cardinality.ZERO_OR_ONE); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _retTree = _t; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/be23536931f66ed6f552941df1c272ed48eeb933/XPathTreeParser2.java/clean/src/org/exist/parser/XPathTreeParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3102,
559,
12,
9053,
389,
88,
16,
202,
202,
4021,
559,
618,
202,
13,
1216,
9539,
16,
10172,
503,
288,
9506,
202,
9053,
3102,
559,
67,
9053,
67,
267,
273,
261,
9053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3102,
559,
12,
9053,
389,
88,
16,
202,
202,
4021,
559,
618,
202,
13,
1216,
9539,
16,
10172,
503,
288,
9506,
202,
9053,
3102,
559,
67,
9053,
67,
267,
273,
261,
9053... |
String currentValue = (String)values.elementAt(currentIndex); | String currentValue = (String) values.elementAt(currentIndex); | public void addContinuation(String line) { String currentValue = (String)values.elementAt(currentIndex); setValue(currentValue + line.substring(1)); } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/0dab862ee09d706c3f373fc18bedbf17caf427b9/Manifest.java/clean/src/main/org/apache/tools/ant/taskdefs/Manifest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
527,
660,
23946,
12,
780,
980,
13,
288,
5411,
514,
14794,
273,
261,
780,
13,
924,
18,
2956,
861,
12,
2972,
1016,
1769,
5411,
5524,
12,
2972,
620,
397,
980,
18,
28023,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
527,
660,
23946,
12,
780,
980,
13,
288,
5411,
514,
14794,
273,
261,
780,
13,
924,
18,
2956,
861,
12,
2972,
1016,
1769,
5411,
5524,
12,
2972,
620,
397,
980,
18,
28023,
12,
2... |
private static RepositoryCleanerConfiguration buildConfig( String configPath ) throws IOException { Properties props = new Properties(); FileInputStream input = null; try { input = new FileInputStream( configPath ); props.load( input ); } finally { IOUtil.close( input ); } RepositoryCleanerConfiguration config = new RepositoryCleanerConfiguration(); config.setSourceRepositoryPath( props.getProperty( "sourceRepositoryPath" ) ); config.setSourceRepositoryLayout( props.getProperty( "sourceRepositoryLayout", "legacy" ) ); config.setTargetRepositoryPath( props.getProperty( "targetRepositoryPath" ) ); config.setTargetRepositoryLayout( props.getProperty( "targetRepositoryLayout", "default" ) ); config.setReportsPath( props.getProperty( "reportsPath" ) ); config.setBlacklistedPatterns( props.getProperty( "blacklistedPatterns" ) ); config.setReportOnly( Boolean.valueOf( props.getProperty( "reportOnly" ) ).booleanValue() ); config.setMailErrorReport( Boolean.valueOf( props.getProperty( "errorReport.mailOnError", "false" ) ) .booleanValue() ); config.setErrorReportFromAddress( props.getProperty( "errorReport.fromAddress" ) ); config.setErrorReportFromName( props.getProperty( "errorReport.fromName" ) ); config.setErrorReportSubject( props.getProperty( "errorReport.subject" ) ); config.setErrorReportToAddress( props.getProperty( "errorReport.toAddress" ) ); config.setErrorReportToName( props.getProperty( "errorReport.toName" ) ); config.setErrorReportLink( props.getProperty( "errorReport.link" ) ); return config; } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/0db2b646d23049f80b0beb13c4c45740172fcab7/Main.java/buggy/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
6281,
7605,
264,
1750,
1361,
809,
12,
514,
16012,
262,
3639,
1216,
1860,
565,
288,
3639,
6183,
3458,
273,
394,
6183,
5621,
3639,
11907,
810,
273,
446,
31,
3639,
775,
3639,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
6281,
7605,
264,
1750,
1361,
809,
12,
514,
16012,
262,
3639,
1216,
1860,
565,
288,
3639,
6183,
3458,
273,
394,
6183,
5621,
3639,
11907,
810,
273,
446,
31,
3639,
775,
3639,
288,... | ||
} catch (CoreException e){ | } catch (CoreException e) { | private void doOpenClass() { String name = fClassEntry.getText().getText(); name = trimNonAlphaChars(name); IProject project = getPage().getPDEEditor().getCommonProject(); String path = name.replace('.', '/') + ".java"; try { if (project.hasNature(JavaCore.NATURE_ID)){ IJavaProject javaProject = JavaCore.create(project); IJavaElement result = javaProject.findElement(new Path(path)); JavaUI.openInEditor(result); } else { IResource resource = project.findMember(new Path(path)); if (resource!=null && resource instanceof IFile){ IWorkbenchPage page = PDEPlugin.getActivePage(); IDE.openEditor(page, (IFile)resource, true); } } } catch (PartInitException e) { PDEPlugin.logException(e); } catch (JavaModelException e) { // nothing Display.getCurrent().beep(); } catch (CoreException e){ PDEPlugin.logException(e); } } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/1dbb0b54c530f703f5b13713faab970d4b145c96/GeneralInfoSection.java/clean/ui/org.eclipse.pde.ui/src_Forms/org/eclipse/pde/internal/ui/neweditor/plugin/GeneralInfoSection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
3678,
797,
1435,
288,
202,
202,
780,
508,
273,
284,
797,
1622,
18,
588,
1528,
7675,
588,
1528,
5621,
202,
202,
529,
273,
2209,
3989,
9690,
7803,
12,
529,
1769,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
3678,
797,
1435,
288,
202,
202,
780,
508,
273,
284,
797,
1622,
18,
588,
1528,
7675,
588,
1528,
5621,
202,
202,
529,
273,
2209,
3989,
9690,
7803,
12,
529,
1769,
202,... |
BitstreamFormat unknown = findUnknown(bfContext); if (unknown.getID() != getID()) | BitstreamFormat unknown = null;; try { unknown = findUnknown(bfContext); } catch (IllegalStateException e) { } if (unknown == null || unknown.getID() != getID()) { | public void setShortDescription(String s) throws SQLException { // You can not reset the unknown's registry's name BitstreamFormat unknown = findUnknown(bfContext); if (unknown.getID() != getID()) bfRow.setColumn("short_description", s); } | 47292 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47292/b1f9fd2d4f8f5a194f5770c224795f089f004bd4/BitstreamFormat.java/buggy/dspace/src/org/dspace/content/BitstreamFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4897,
3291,
12,
780,
272,
13,
4202,
1216,
6483,
565,
288,
3639,
368,
4554,
848,
486,
2715,
326,
5917,
1807,
4023,
1807,
508,
3639,
6539,
3256,
1630,
5917,
273,
1104,
4874,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4897,
3291,
12,
780,
272,
13,
4202,
1216,
6483,
565,
288,
3639,
368,
4554,
848,
486,
2715,
326,
5917,
1807,
4023,
1807,
508,
3639,
6539,
3256,
1630,
5917,
273,
1104,
4874,... |
{ super.display(id); removeAll(); m_actionLabel.setText(id.getName() + " battle"); add(m_actionLabel); Iterator iter = battles.iterator(); while(iter.hasNext() ) { Action action = new FightBattleAction((Territory) iter.next(), false); add(new JButton(action)); } iter = bombing.iterator(); while(iter.hasNext() ) { Action action = new FightBattleAction((Territory) iter.next(), true); add(new JButton(action)); } SwingUtilities.invokeLater(REFRESH); } | { super.display(id); removeAll(); m_actionLabel.setText(id.getName() + " battle"); add(m_actionLabel); Iterator iter = battles.iterator(); while(iter.hasNext() ) { Action action = new FightBattleAction((Territory) iter.next(), false); add(new JButton(action)); } iter = bombing.iterator(); while(iter.hasNext() ) { Action action = new FightBattleAction((Territory) iter.next(), true); add(new JButton(action)); } SwingUtilities.invokeLater(REFRESH); } | public void display(PlayerID id, Collection battles, Collection bombing) { super.display(id); removeAll(); m_actionLabel.setText(id.getName() + " battle"); add(m_actionLabel); Iterator iter = battles.iterator(); while(iter.hasNext() ) { Action action = new FightBattleAction((Territory) iter.next(), false); add(new JButton(action)); } iter = bombing.iterator(); while(iter.hasNext() ) { Action action = new FightBattleAction((Territory) iter.next(), true); add(new JButton(action)); } SwingUtilities.invokeLater(REFRESH); } | 8909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8909/7323d27dff023d9995ebfe7fc40938462adf250b/BattlePanel.java/buggy/triplea/src/games/strategy/triplea/ui/BattlePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2562,
12,
12148,
734,
612,
16,
2200,
324,
4558,
1040,
16,
2200,
324,
16659,
310,
13,
202,
95,
202,
202,
9565,
18,
5417,
12,
350,
1769,
202,
202,
4479,
1595,
5621,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2562,
12,
12148,
734,
612,
16,
2200,
324,
4558,
1040,
16,
2200,
324,
16659,
310,
13,
202,
95,
202,
202,
9565,
18,
5417,
12,
350,
1769,
202,
202,
4479,
1595,
5621,
202,
... |
UCDProperty up = UnifiedBinaryProperty.make(i, Default.ucd); | UCDProperty up = UnifiedBinaryProperty.make(i, Default.ucd()); | public static void generateVerticalSlice(int startEnum, int endEnum, int headerChoice, String directory, String file) throws IOException { Default.setUCD(); String newFile = directory + file + getFileSuffix(true); PrintWriter output = Utility.openPrintWriter(newFile, Utility.LATIN1_UNIX); String[] batName = {""}; String mostRecent = generateBat(directory, file, getFileSuffix(true), batName); doHeader(file + getFileSuffix(false), output, headerChoice); int last = -1; for (int i = startEnum; i < endEnum; ++i) { UCDProperty up = UnifiedBinaryProperty.make(i, Default.ucd); if (up == null) continue; if (up.skipInDerivedListing()) continue; /* if (i == DECOMPOSITION_TYPE || i == NUMERIC_TYPE || i == (BINARY_PROPERTIES | Non_break) || i == (BINARY_PROPERTIES | CaseFoldTurkishI) || i == (HANGUL_SYLLABLE_TYPE | NA) || i == (JOINING_TYPE | JT_U) || i == (JOINING_GROUP | NO_SHAPING) ) continue; // skip zero case */ /*if (skipSpecial == SKIP_SPECIAL && i >= (BINARY_PROPERTIES | CompositionExclusion) && i < (AGE + NEXT_ENUM)) continue; */ if ((last & 0xFF00) != (i & 0xFF00) && (i <= BINARY_PROPERTIES || i >= SCRIPT)) { output.println(); output.println(HORIZONTAL_LINE); output.println("# " + up.getHeader()); output.println(HORIZONTAL_LINE); output.println(); System.out.println(); System.out.println(up.getHeader()); last = i; } else { output.println(HORIZONTAL_LINE); output.println(); } System.out.print("."); if (DEBUG) System.out.println(i); new MyPropertyLister(Default.ucd, i, output).print(); output.flush(); } if (endEnum == LIMIT_ENUM) { output.println(); output.println(HORIZONTAL_LINE); output.println("# Numeric Values (from UnicodeData.txt, field 6/7/8)"); output.println(HORIZONTAL_LINE); output.println(); System.out.println(); System.out.println("@NUMERIC VALUES"); Set numericValueSet = new TreeSet(); for (int i = 0; i < 0x10FFFF; ++i) { double nv = Default.ucd.getNumericValue(i); if (Double.isNaN(nv)) continue; numericValueSet.add(new Double(nv)); } Iterator it = numericValueSet.iterator(); while(it.hasNext()) { new MyFloatLister(Default.ucd, ((Double)it.next()).doubleValue(), output).print(); output.println(); System.out.print("."); } output.flush(); } output.close(); //System.out.println("HERE"); Utility.renameIdentical(mostRecent, Utility.getOutputName(newFile), batName[0]); System.out.println(); } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/d1ef79fafdbbeaaf4dcbaa9d3c534754c217d955/GenerateData.java/buggy/tools/unicodetools/com/ibm/text/UCD/GenerateData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2103,
15704,
5959,
12,
474,
787,
3572,
16,
509,
679,
3572,
16,
5411,
509,
1446,
10538,
16,
514,
1867,
16,
514,
585,
13,
1216,
1860,
288,
3639,
2989,
18,
542,
57,
10160,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
15704,
5959,
12,
474,
787,
3572,
16,
509,
679,
3572,
16,
5411,
509,
1446,
10538,
16,
514,
1867,
16,
514,
585,
13,
1216,
1860,
288,
3639,
2989,
18,
542,
57,
10160,
... |
assertNotNull("Second generated certificate is null", crl); | assertNotNull("Second generated CRL is null", crl); | public void testEngineGenerateCRL() { X509CertFactoryImpl certFactory = new X509CertFactoryImpl(); CRL crl; // DER encoded crt generation testing ByteArrayInputStream bais = new ByteArrayInputStream( CertFactoryTestData.getCRLEncoding()); try { crl = certFactory.engineGenerateCRL(bais); assertNotNull("First generated certificate is null", crl); crl = certFactory.engineGenerateCRL(bais); assertNotNull("Second generated certificate is null", crl); } catch (CRLException e) { e.printStackTrace(); fail("Unexpected CRLException: " + e.getMessage()); } try { certFactory.engineGenerateCRL(bais); fail("Expected CRLException was not thrown."); } catch (CRLException e) { } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/0678f9f6d7203547829010d9918a41bfa0487c22/X509CertFactoryImplTest.java/buggy/modules/security/src/test/java/common/org/apache/harmony/security/provider/cert/X509CertFactoryImplTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4410,
4625,
29524,
1435,
288,
3639,
1139,
5995,
5461,
1733,
2828,
3320,
1733,
273,
394,
1139,
5995,
5461,
1733,
2828,
5621,
3639,
26526,
18789,
31,
7734,
368,
21801,
3749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4410,
4625,
29524,
1435,
288,
3639,
1139,
5995,
5461,
1733,
2828,
3320,
1733,
273,
394,
1139,
5995,
5461,
1733,
2828,
5621,
3639,
26526,
18789,
31,
7734,
368,
21801,
3749,
... |
return super.typeCheck(tc); | X10New_c result = (X10New_c) super.typeCheck(tc); result = result.adjustCI(tc); return result; | public Node typeCheck(TypeChecker tc) throws SemanticException { X10New_c n = this; X10NodeFactory xnf = (X10NodeFactory) tc.nodeFactory(); X10TypeSystem xts = (X10TypeSystem) tc.typeSystem(); TypeNode oType = n.objectType(); String opName = null; if (n.body != null && n.qualifier == null && oType instanceof CanonicalTypeNode) { ClassType type = oType.type().toClass(); ClassType outer = null; if (type.isNested() && (outer = type.container().toClass()) != null && xts.isX10Array(outer)) { opName = type.name(); } } if (opName != null) { // Special array operations Position nPos = oType.position(); if (opName.equals("pointwiseOp")) { List members = n.body.members(); MethodDecl apply = n.findMethod1Arg("apply", members); MethodInstance mi = apply.methodInstance(); TypeNode appResultType = apply.returnType(); List formals = apply.formals(); assert (!formals.isEmpty()); List l1 = TypedList.copy(formals, X10Formal.class, false); X10Formal firstArg = (X10Formal) formals.get(0); Position pos = firstArg.position(); LocalInstance li = firstArg.localInstance(); li = li.flags(Flags.FINAL).type(mi.returnType()).name("_"); l1.add(((X10Formal) xnf.Formal(pos, Flags.FINAL, appResultType, "_").localInstance(li)).localInstances(X10Formal_c.NO_LOCALS)); ReferenceType tOperatorPointwise = xts.OperatorPointwise(); List l2 = TypedList.copy(mi.formalTypes(), Type.class, false); l2.add(mi.returnType()); mi = mi.container(tOperatorPointwise).formalTypes(l2); MethodDecl decl = apply.formals(l1).methodInstance(mi); // new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt List classDecl = new TypedList(new LinkedList(), MethodDecl.class, false); for (int i = 0; i < members.size(); i++) { Object m = members.get(i); if (m != apply) classDecl.add(m); else classDecl.add(decl); } CanonicalTypeNode t = xnf.CanonicalTypeNode(nPos, tOperatorPointwise); ParsedClassType anon = n.anonType(); // FIXME: this is probably breaking some assumptions in the typesystem anon.superType(tOperatorPointwise); return n.objectType(t).body(n.body().members(classDecl)).typeCheckOverride(null, tc); } else if (opName.equals("binaryOp")) { TypeNode t = xnf.CanonicalTypeNode(nPos, xts.OperatorBinary()); return n.objectType(t).typeCheckOverride(null, tc); } else if (opName.equals("unaryOp")) { TypeNode t = xnf.CanonicalTypeNode(nPos, xts.OperatorUnary()); return n.objectType(t).typeCheckOverride(null, tc); } } return super.typeCheck(tc); } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/f8e1720cd66996a6339b992bf154aa0d019240a3/X10New_c.java/buggy/x10.compiler/src/polyglot/ext/x10/ast/X10New_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
618,
1564,
12,
559,
8847,
1715,
13,
1216,
24747,
503,
288,
202,
202,
60,
2163,
1908,
67,
71,
290,
273,
333,
31,
202,
202,
60,
2163,
907,
1733,
619,
82,
74,
273,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
618,
1564,
12,
559,
8847,
1715,
13,
1216,
24747,
503,
288,
202,
202,
60,
2163,
1908,
67,
71,
290,
273,
333,
31,
202,
202,
60,
2163,
907,
1733,
619,
82,
74,
273,
261,
... |
if ( compareDates(date, fEnumeration[count]) == EQUAL ) { | if ( compareDates(date, fEnumeration[count], false) == EQUAL ) { | protected void validateDate (int[] date, String content) throws InvalidDatatypeValueException{ if ( this.fBaseValidator != null ) {//validate against parent type if any if ( (fFacetsDefined & DatatypeValidator.FACET_PATTERN ) != 0 ) { if ( fRegex == null || fRegex.matches( content) == false ) throw new InvalidDatatypeValueException("Value'"+content+ "' does not match regular expression facet " + fRegex.getPattern() ); } //validate against base type ((DateTimeValidator)this.fBaseValidator).validateDate( date, content); if ( (fFacetsDefined & DatatypeValidator.FACET_ENUMERATION ) != 0 ) { int count=0; boolean valid = false; while ( count < fEnumSize ) { if ( compareDates(date, fEnumeration[count]) == EQUAL ) { valid = true; break; } count++; } if ( !valid ) { throw new InvalidDatatypeValueException("Value'"+content+ "' does not match enumeration values" ); } } // REVISIT: output values for facets in error message short c; if ( fMinInclusive != null ) { c = compareDates(date, fMinInclusive); if ( c == LESS_THAN || c == INDETERMINATE ) { throw new InvalidDatatypeValueException("Value '"+content+ "' is less than minInclusive: " +dateToString(fMinInclusive) ); } } if ( fMinExclusive != null ) { if ( compareDates(date, fMinExclusive) != GREATER_THAN ) { throw new InvalidDatatypeValueException("Value '"+content+ "' is less than or equal to minExclusive: " +dateToString(fMinExclusive)); } } if ( fMaxInclusive != null ) { c = compareDates(date, fMaxInclusive ); if ( c == GREATER_THAN || c == INDETERMINATE ) { throw new InvalidDatatypeValueException("Value '"+content+ "' is greater than maxInclusive: " +dateToString(fMaxInclusive) ); } } if ( fMaxExclusive != null ) { if ( compareDates(date, fMaxExclusive ) != LESS_THAN ) { throw new InvalidDatatypeValueException("Value '"+content+ "' is greater than or equal to maxExlusive: " +dateToString(fMaxExclusive) ); } } } else { return; } } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/f515eacdd7ba17e3601eb920f65eec089bf3b251/DateTimeValidator.java/clean/src/org/apache/xerces/validators/datatype/DateTimeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1954,
1626,
261,
474,
8526,
1509,
16,
514,
913,
13,
1216,
1962,
20228,
9738,
95,
3639,
309,
261,
333,
18,
74,
2171,
5126,
480,
446,
262,
288,
759,
5662,
5314,
982,
618,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1954,
1626,
261,
474,
8526,
1509,
16,
514,
913,
13,
1216,
1962,
20228,
9738,
95,
3639,
309,
261,
333,
18,
74,
2171,
5126,
480,
446,
262,
288,
759,
5662,
5314,
982,
618,
309,
... |
LinkedHashMap attlist = (LinkedHashMap) doctype.attlists.get(elementName); if (attlist == null) { attlist = new LinkedHashMap(); doctype.attlists.put(elementName, attlist); } if (attlist.containsKey(name)) { return; } | private void readDefault(String elementName, String name, String type, String enumeration) throws IOException, XMLStreamException { int valueType = ATTRIBUTE_DEFAULT_SPECIFIED; int flags = LIT_ATTRIBUTE; String value = null, defaultType = null; boolean saved = expandPE; if (!"CDATA".equals(type)) flags |= LIT_NORMALIZE; expandPE = false; if (tryRead('#')) { if (tryRead("FIXED")) { defaultType = "#FIXED"; valueType = ATTRIBUTE_DEFAULT_FIXED; requireWhitespace(); value = readLiteral(flags); } else if (tryRead("REQUIRED")) { defaultType = "#REQUIRED"; valueType = ATTRIBUTE_DEFAULT_REQUIRED; } else if (tryRead("IMPLIED")) { defaultType = "#IMPLIED"; valueType = ATTRIBUTE_DEFAULT_IMPLIED; } else error("illegal keyword for attribute default value"); } else value = readLiteral(flags); expandPE = saved; /*if ("ENUMERATION".equals(type)) type = enumer; else if ("NOTATION".equals(type)) type = "NOTATION " + enumer;*/ // Register attribute def LinkedHashMap attlist = (LinkedHashMap) doctype.attlists.get(elementName); if (attlist == null) { attlist = new LinkedHashMap(); doctype.attlists.put(elementName, attlist); } if (attlist.containsKey(name)) { return; } AttributeDecl attribute = new AttributeDecl(type, value, valueType, enumeration); attlist.put(name, attribute); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/d04bf782436cf12e5688a7b0f991513dc042ba74/XMLParser.java/buggy/gnu/xml/stream/XMLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
855,
1868,
12,
780,
14453,
16,
514,
508,
16,
21821,
514,
618,
16,
514,
16836,
13,
565,
1216,
1860,
16,
21526,
225,
288,
565,
509,
13692,
273,
15941,
67,
5280,
67,
13847,
1351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
855,
1868,
12,
780,
14453,
16,
514,
508,
16,
21821,
514,
618,
16,
514,
16836,
13,
565,
1216,
1860,
16,
21526,
225,
288,
565,
509,
13692,
273,
15941,
67,
5280,
67,
13847,
1351... | |
process.getRequestsManager().myInvalidRequestors.remove(breakpoint); process.getRequestsManager().deleteRequest(breakpoint); | public void action(DebugProcessImpl process) { process.getRequestsManager().myInvalidRequestors.remove(breakpoint); process.getRequestsManager().deleteRequest(breakpoint); breakpoint.createRequest(process); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/b560e9e99a52f886dbe82c42baf7d7d07264fa73/RequestManagerImpl.java/clean/debugger/impl/com/intellij/debugger/engine/requests/RequestManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1301,
12,
2829,
2227,
2828,
1207,
13,
225,
288,
3639,
1207,
18,
588,
6421,
1318,
7675,
4811,
1941,
691,
1383,
18,
4479,
12,
8820,
1153,
1769,
3639,
1207,
18,
588,
6421,
1318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1301,
12,
2829,
2227,
2828,
1207,
13,
225,
288,
3639,
1207,
18,
588,
6421,
1318,
7675,
4811,
1941,
691,
1383,
18,
4479,
12,
8820,
1153,
1769,
3639,
1207,
18,
588,
6421,
1318,
... | |
StyleHandle style1Handle = style1.handle( design ); Iterator highlightHandles = style1Handle.highlightRulesIterator( ); | Iterator highlightHandles = style1.highlightRulesIterator( ); | public void testParse( ) throws SemanticException { StyleElement myStyle = design.findStyle( "My Style" ); //$NON-NLS-1$ assertNotNull( myStyle ); fontHandle = myStyle.getHandle( design ).getFontProperty( ); // tests with the font name as CSS-compatible string. assertEquals( DesignChoiceConstants.FONT_FAMILY_CURSIVE, fontHandle .getStringValue( ) ); //$NON-NLS-1$ // tests with the font as a display string. ThreadResources.setLocale( TEST_LOCALE ); //$NON-NLS-1$ assertEquals( "\u8fde\u4f53", fontHandle.getDisplayValue( ) ); //$NON-NLS-1$ assertEquals( DesignChoiceConstants.FONT_FAMILY_CURSIVE, fontHandle .getStringValue( ) ); ThreadResources.setLocale( ULocale.ENGLISH ); assertEquals( "Cursive", fontHandle //$NON-NLS-1$ .getDisplayValue( ) ); // tests with the font entry at a given position, should be null. Style style1 = (Style) design.findStyle( "Style1" ); //$NON-NLS-1$ assertNotNull( style1 ); fontHandle = style1.getHandle( design ).getFontProperty( ); // tests with the font entry at a given position. assertEquals( "Time New Roman, Arial", fontHandle.getStringValue( ) ); //$NON-NLS-1$ String[] names = fontHandle.getFontFamilies( ); assertEquals( "Time New Roman", names[0] ); //$NON-NLS-1$ assertEquals( "Arial", names[1] ); //$NON-NLS-1$ // tests sets/gets CSS constant names. fontHandle.setValue( DesignChoiceConstants.FONT_FAMILY_SANS_SERIF ); assertEquals( DesignChoiceConstants.FONT_FAMILY_SANS_SERIF, fontHandle .getStringValue( ) ); // read a font handle from a structure like highlight. StyleHandle style1Handle = style1.handle( design ); Iterator highlightHandles = style1Handle.highlightRulesIterator( ); assertNotNull( highlightHandles ); HighlightRuleHandle highlightHandle = (HighlightRuleHandle) highlightHandles .next( ); assertNotNull( highlightHandle ); // no font family has been defined for style1, the value should be null. FontHandle fontHandle = highlightHandle.getFontFamilyHandle( ); assertNotNull( fontHandle ); assertNull( fontHandle.getStringValue( ) ); //$NON-NLS-1$ assertNull( fontHandle.getFontFamilies( ) ); //$NON-NLS-1$ Style style2 = (Style) design.findStyle( "Style2" ); //$NON-NLS-1$ assertNotNull( style2 ); // font handle with a default value. fontHandle = null; fontHandle = style2.getHandle( design ).getFontProperty( ); assertNotNull( fontHandle ); // tests with the font entry at a given position. names = fontHandle.getFontFamilies( ); assertEquals( 1, names.length ); assertEquals( "serif", names[0] ); //$NON-NLS-1$ // tests with the font weight. StyleHandle style2Handle = style2.handle( design ); assertNotNull( style2Handle ); assertEquals( DesignChoiceConstants.FONT_WEIGHT_LIGHTER, style2Handle .getFontWeight( ) ); style2Handle.setFontWeight( DesignChoiceConstants.FONT_WEIGHT_100 ); assertEquals( DesignChoiceConstants.FONT_WEIGHT_100, style2Handle .getFontWeight( ) ); try { style2Handle.setFontWeight( "450" ); //$NON-NLS-1$ fail( ); } catch ( PropertyValueException e ) { assertEquals( e.getErrorCode( ), PropertyValueException.DESIGN_EXCEPTION_CHOICE_NOT_FOUND ); } // read a font handle from a structure like highlight. highlightHandles = style2Handle.highlightRulesIterator( ); assertNotNull( highlightHandles ); highlightHandle = (HighlightRuleHandle) highlightHandles.next( ); assertNotNull( highlightHandle ); fontHandle = highlightHandle.getFontFamilyHandle( ); assertEquals( "Arial", fontHandle.getStringValue( ) ); //$NON-NLS-1$ assertEquals( "Arial", fontHandle.getDisplayValue( ) ); //$NON-NLS-1$ // no second highlight rule, must be null. highlightHandle = (HighlightRuleHandle) highlightHandles.next( ); assertNull( highlightHandle ); // finds a design element that do not support font family property. OdaDataSource dataSource = (OdaDataSource) design .findDataSource( "myDataSource" ); //$NON-NLS-1$ assertNotNull( dataSource ); // font handle must be null. fontHandle = dataSource.getHandle( design ).getFontProperty( ); assertNull( fontHandle ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/de4e32d64d24337e8801521456bb895f21408aa9/FontHandleTest.java/clean/model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/FontHandleTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3201,
12,
262,
1216,
24747,
503,
202,
95,
202,
202,
2885,
1046,
3399,
2885,
273,
8281,
18,
4720,
2885,
12,
315,
12062,
9767,
6,
11272,
4329,
3993,
17,
5106,
17,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3201,
12,
262,
1216,
24747,
503,
202,
95,
202,
202,
2885,
1046,
3399,
2885,
273,
8281,
18,
4720,
2885,
12,
315,
12062,
9767,
6,
11272,
4329,
3993,
17,
5106,
17,
21,... |
public org.quickfix.field.EncodedIssuer getEncodedIssuer() throws FieldNotFound { org.quickfix.field.EncodedIssuer value = new org.quickfix.field.EncodedIssuer(); | public quickfix.field.EncodedIssuer getEncodedIssuer() throws FieldNotFound { quickfix.field.EncodedIssuer value = new quickfix.field.EncodedIssuer(); | public org.quickfix.field.EncodedIssuer getEncodedIssuer() throws FieldNotFound { org.quickfix.field.EncodedIssuer value = new org.quickfix.field.EncodedIssuer(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/CollateralResponse.java/clean/src/java/src/quickfix/fix44/CollateralResponse.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
28799,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
460,
273,
394,
2358,
18,
19525,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
28799,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
16667,
460,
273,
394,
2358,
18,
19525,
9... |
throws XMLDBException { XQueryService service = getXQueryService(collection); Source source = new StringSource(xquery); return service.execute(source); } | throws XMLDBException { XQueryService service = getXQueryService(collection); Source source = new StringSource(xquery); return service.execute(source); } | public static ResourceSet xquery(Collection collection, String xquery) throws XMLDBException { XQueryService service = getXQueryService(collection); Source source = new StringSource(xquery); return service.execute(source); } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ddb39e0c7d3412864c22f67055cf8d1183ff3519/DBUtils.java/clean/src/org/exist/xmldb/test/concurrent/DBUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2591,
694,
619,
2271,
12,
2532,
1849,
16,
514,
619,
2271,
13,
202,
15069,
26014,
503,
202,
95,
202,
202,
60,
1138,
1179,
1156,
273,
6538,
1138,
1179,
12,
5548,
1769,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2591,
694,
619,
2271,
12,
2532,
1849,
16,
514,
619,
2271,
13,
202,
15069,
26014,
503,
202,
95,
202,
202,
60,
1138,
1179,
1156,
273,
6538,
1138,
1179,
12,
5548,
1769,
202,... |
buffer.append('{'); buffer.append(argumentNumbers[i]); buffer.append('}'); handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); continue; } Format format = formats[i]; if (format == null || arg == null) { if (arg instanceof Number) { | buffer.append('{'); buffer.append(argumentNumbers[i]); buffer.append('}'); handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); continue; } Format format = formats[i]; if (format == null || arg == null) { if (arg instanceof Number) { | private StringBuffer formatImpl(Object[] objects, StringBuffer buffer, FieldPosition position, Vector<FieldContainer> fields) { FieldPosition passedField = new FieldPosition(0); for (int i = 0; i <= maxOffset; i++) { buffer.append(strings[i]); int begin = buffer.length(); Object arg; if (objects != null && argumentNumbers[i] < objects.length) { arg = objects[argumentNumbers[i]]; } else { buffer.append('{'); buffer.append(argumentNumbers[i]); buffer.append('}'); handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); continue; } Format format = formats[i]; if (format == null || arg == null) { if (arg instanceof Number) { format = NumberFormat.getInstance(); } else if (arg instanceof Date) { format = DateFormat.getInstance(); } else { buffer.append(arg); handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); continue; } } if (format instanceof ChoiceFormat) { String result = format.format(arg); MessageFormat mf = new MessageFormat(result); mf.setLocale(locale); mf.format(objects, buffer, passedField); handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); handleformat(format, arg, begin, fields); } else { format.format(arg, buffer, passedField); handleArgumentField(begin, buffer.length(), argumentNumbers[i], position, fields); handleformat(format, arg, begin, fields); } } if (maxOffset + 1 < strings.length) { buffer.append(strings[maxOffset + 1]); } return buffer; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/019def355790934e1681619028e65dda09efed65/MessageFormat.java/clean/modules/text/src/main/java/java/text/MessageFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
6674,
740,
2828,
12,
921,
8526,
2184,
16,
6674,
1613,
16,
1082,
202,
974,
2555,
1754,
16,
5589,
32,
974,
2170,
34,
1466,
13,
288,
202,
202,
974,
2555,
2275,
974,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
6674,
740,
2828,
12,
921,
8526,
2184,
16,
6674,
1613,
16,
1082,
202,
974,
2555,
1754,
16,
5589,
32,
974,
2170,
34,
1466,
13,
288,
202,
202,
974,
2555,
2275,
974,
273,
394,
... |
dX += dSeparatorThickness; | public void renderLegend( IPrimitiveRenderer ipr, Legend lg, Map htRenderers ) throws ChartException { if ( !lg.isVisible( ) ) // CHECK VISIBILITY { return; } renderBlock( ipr, lg, StructureSource.createLegend( lg ) ); final IDisplayServer xs = getDevice( ).getDisplayServer( ); final double dScale = getDeviceScale( ); Bounds bo = lg.getBounds( ).scaledInstance( dScale ); Size sz = null; /* --- Start bound computing --- */ // TODO Refactoring: create function double dX, dY; if ( lg.getPosition( ) != Position.INSIDE_LITERAL ) { try { sz = lg.getPreferredSize( xs, cm, rtc ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } sz.scale( dScale ); // validate legend size, restrict within the bounds. // TODO this is requried due to the 1/3 size constraints policy in // layoutManager, // should use better solution. if ( sz.getWidth( ) > bo.getWidth( ) ) { sz.setWidth( bo.getWidth( ) ); } if ( sz.getHeight( ) > bo.getHeight( ) ) { sz.setHeight( bo.getHeight( ) ); } // USE ANCHOR IN POSITIONING THE LEGEND CLIENT AREA WITHIN THE BLOCK // SLACK SPACE dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = 0; if ( lg.isSetAnchor( ) ) { int iAnchor = lg.getAnchor( ).getValue( ); // swap west/east if ( isRightToLeft( ) ) { if ( iAnchor == Anchor.EAST ) { iAnchor = Anchor.WEST; } else if ( iAnchor == Anchor.NORTH_EAST ) { iAnchor = Anchor.NORTH_WEST; } else if ( iAnchor == Anchor.SOUTH_EAST ) { iAnchor = Anchor.SOUTH_WEST; } else if ( iAnchor == Anchor.WEST ) { iAnchor = Anchor.EAST; } else if ( iAnchor == Anchor.NORTH_WEST ) { iAnchor = Anchor.NORTH_EAST; } else if ( iAnchor == Anchor.SOUTH_WEST ) { iAnchor = Anchor.SOUTH_EAST; } } switch ( iAnchor ) { case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : dY = bo.getTop( ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : dY = bo.getTop( ) + bo.getHeight( ) - sz.getHeight( ); break; default : // CENTERED dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; break; } switch ( iAnchor ) { case Anchor.WEST : case Anchor.NORTH_WEST : case Anchor.SOUTH_WEST : dX = bo.getLeft( ); break; case Anchor.EAST : case Anchor.SOUTH_EAST : case Anchor.NORTH_EAST : dX = bo.getLeft( ) + bo.getWidth( ) - sz.getWidth( ); break; default : // CENTERED dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; break; } } else { dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; } } else { // USE PREVIOUSLY COMPUTED POSITION IN THE GENERATOR FOR LEGEND // 'INSIDE' PLOT dX = bo.getLeft( ); dY = bo.getTop( ); sz = SizeImpl.create( bo.getWidth( ), bo.getHeight( ) ); } // get cached legend info. final LegendLayoutHints lilh = rtc.getLegendLayoutHints( ); // consider legend title size. Label lgTitle = lg.getTitle( ); double lgTitleWidth = 0, lgTitleHeight = 0; double yOffset = 0, xOffset = 0, wOffset = 0, hOffset = 0; final boolean bRenderLegendTitle = lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ); int iTitlePos = Position.ABOVE; if ( bRenderLegendTitle ) { lgTitle = LabelImpl.copyInstance( lgTitle ); // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); if ( lilh != null ) { // use cached value Size titleSize = lilh.getTitleSize( ); lgTitleWidth = titleSize.getWidth( ); lgTitleHeight = titleSize.getHeight( ); } else { BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } lgTitleWidth = bb.getWidth( ); lgTitleHeight = bb.getHeight( ); } iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } switch ( iTitlePos ) { case Position.ABOVE : yOffset = lgTitleHeight; hOffset = -yOffset; break; case Position.BELOW : hOffset = -lgTitleHeight; break; case Position.LEFT : xOffset = lgTitleWidth; wOffset = -xOffset; break; case Position.RIGHT : wOffset = -lgTitleWidth; break; } } // RENDER THE LEGEND CLIENT AREA final ClientArea ca = lg.getClientArea( ); final Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); LineAttributes lia = ca.getOutline( ); bo = BoundsImpl.create( dX, dY, sz.getWidth( ), sz.getHeight( ) ); bo = bo.adjustedInstance( lgIns ); dX = bo.getLeft( ); dY = bo.getTop( ); // Adjust bounds. bo.delta( xOffset, yOffset, wOffset, hOffset ); dX = bo.getLeft( ); dY = bo.getTop( ); /* --- End of bounds computing --- */ final double dBaseX = dX; final double dBaseY = dY; final RectangleRenderEvent rre = (RectangleRenderEvent) ( (EventObjectCache) ir ).getEventObject( StructureSource.createLegend( lg ), RectangleRenderEvent.class ); // render client area shadow. if ( ca.getShadowColor( ) != null ) { rre.setBounds( bo.translateInstance( 3, 3 ) ); rre.setBackground( ca.getShadowColor( ) ); ipr.fillRectangle( rre ); } // render client area rre.setBounds( bo ); rre.setOutline( lia ); rre.setBackground( ca.getBackground( ) ); ipr.fillRectangle( rre ); ipr.drawRectangle( rre ); lia = LineAttributesImpl.copyInstance( lia ); lia.setVisible( true ); // SEPARATOR LINES MUST BE VISIBLE LineAttributes liSep = lg.getSeparator( ) == null ? lia : lg.getSeparator( ); final SeriesDefinition[] seda = cm.getSeriesForLegend( ); // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation o = lg.getOrientation( ); final Direction d = lg.getDirection( ); final Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); final double maxWrappingSize = lg.getWrappingSize( ) * dScale; final double dItemHeight = itm.getFullHeight( ); final double dHorizontalSpacing = 4; final double dVerticalSpacing = 4; double dSeparatorThickness = lia.getThickness( ); Insets insCA = ca.getInsets( ).scaledInstance( dScale ); Series seBase; List al; LegendItemRenderingHints lirh; Palette pa; int iPaletteCount; EList elPaletteEntries; Fill fPaletteEntry; final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); // Get available maximum block width/height. Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); double dMaxX = boFull.getLeft( ) + boFull.getWidth( ) - ins.getRight( ) - lgIns.getRight( ); double dMaxY = boFull.getTop( ) + boFull.getHeight( ) - ins.getBottom( ) - lgIns.getBottom( ); // Calculate if minSlice applicable. String sMinSliceLabel = null; boolean bMinSliceApplied = false; if ( lilh != null ) { // use cached value. sMinSliceLabel = lilh.getMinSliceText( ); bMinSliceApplied = lilh.isMinSliceApplied( ); } else { boolean bMinSliceDefined = false; double dMinSlice = 0; boolean bPercentageMinSlice = false; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); dMinSlice = ( (ChartWithoutAxes) cm ).getMinSlice( ); bPercentageMinSlice = ( (ChartWithoutAxes) cm ).isMinSlicePercent( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { if ( !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( ); DataSetIterator dsiOrtho = null; double dCurrentMinSlice = 0; for ( int i = 0; i < sdOrtho.length && !bMinSliceApplied; i++ ) { try { dsiOrtho = new DataSetIterator( ( (Series) sdOrtho[i].getRunTimeSeries( ) .get( 0 ) ).getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } // TODO Check dataset type, throw exception or ignore?. if ( bPercentageMinSlice ) { double total = 0; while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { total += ( (Number) obj ).doubleValue( ); } } dsiOrtho.reset( ); dCurrentMinSlice = total * dMinSlice / 100d; } else { dCurrentMinSlice = dMinSlice; } while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { double val = ( (Number) obj ).doubleValue( ); if ( val < dCurrentMinSlice ) { bMinSliceApplied = true; break; } } } } } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( o.getValue( ) == Orientation.VERTICAL ) { double dXOffset = 0, dMaxW = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // 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( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // 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 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; Map columnCache = searchMaxColumnWidth( liha ); for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. // render legend item. dY += insCA.getTop( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += itm.getFullHeight( ) + insCA.getBottom( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dY += insCA.getTop( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += itm.getFullHeight( ) + insCA.getBottom( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dY += insCA.getTop( ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.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. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxW = 0; al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { dY += insCA.getTop( ); seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.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. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING // + // MAX ITEM WIDTH + RIGHT INSETS dXOffset += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dX += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dY = bo.getTop( ); // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, bo.getHeight( ), Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } else if ( o.getValue( ) == Orientation.HORIZONTAL ) { double dYOffset = 0, dMaxH = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // 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( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // 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 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; double dFullWidth = 0; dY += insCA.getTop( ); while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. dX += insCA.getLeft( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dX += insCA.getLeft( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxH = 0; dY += insCA.getTop( ); dX = bo.getLeft( ) + insCA.getLeft( ); al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.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. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ); } dYOffset += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dY += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dX = bo.getLeft( ) + insCA.getLeft( ); // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; dX += insCA.getLeft( ); dY += insCA.getTop( ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.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. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dFWidth + insCA.getRight( ); } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, dMaxH, Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.orientation", //$NON-NLS-1$ new Object[]{ o.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } // Render legend title if defined. if ( bRenderLegendTitle ) { double lX = bo.getLeft( ); double lY = bo.getTop( ); switch ( iTitlePos ) { case Position.ABOVE : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) - lgTitleHeight; break; case Position.BELOW : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) + bo.getHeight( ); break; case Position.LEFT : lX = bo.getLeft( ) - lgTitleWidth; lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; case Position.RIGHT : lX = bo.getLeft( ) + bo.getWidth( ); lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; } final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ir ).getEventObject( WrappedStructureSource.createLegendTitle( lg, lgTitle ), TextRenderEvent.class ); tre.setBlockBounds( BoundsImpl.create( lX, lY, lgTitleWidth, lgTitleHeight ) ); TextAlignment ta = TextAlignmentImpl.create( ); ta.setHorizontalAlignment( HorizontalAlignment.CENTER_LITERAL ); ta.setVerticalAlignment( VerticalAlignment.CENTER_LITERAL ); tre.setBlockAlignment( ta ); tre.setLabel( lgTitle ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } itm.dispose( ); // DISPOSE RESOURCES AFTER USE } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/bdbe857d641e2e27600409e7bb20f1950ed1536b/BaseRenderer.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/BaseRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1743,
16812,
12,
467,
9840,
6747,
277,
683,
16,
17167,
409,
15266,
16,
1635,
14049,
3420,
414,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
23623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1743,
16812,
12,
467,
9840,
6747,
277,
683,
16,
17167,
409,
15266,
16,
1635,
14049,
3420,
414,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
23623,
... | |
+ "[\"" + ( (ParameterHandle) model ).getName( ) + "\"]"; | + "[\"" + ( (ParameterHandle) model ).getQualifiedName( ) + "\"]"; | public static String getExpression( Object model ) { if ( model instanceof ParameterHandle ) { return IReportElementConstants.PARAMETER_PREFIX + "[\"" + ( (ParameterHandle) model ).getName( ) + "\"]"; //$NON-NLS-1$ //$NON-NLS-2$ } if ( model instanceof DataSetItemModel ) { String colName = ( (DataSetItemModel) model ).getAlias( ); if ( colName == null || colName.trim( ).length( ) == 0 ) { colName = ( (DataSetItemModel) model ).getName( ); } return getColumnExpression( colName ); } return null; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/54a65dd73bba1effaa68099dfb54509007fcdc8b/DEUtil.java/clean/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
16183,
12,
1033,
938,
262,
202,
95,
202,
202,
430,
261,
938,
1276,
5498,
3259,
262,
202,
202,
95,
1082,
202,
2463,
467,
4820,
1046,
2918,
18,
9819,
67,
6307,
6862,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
16183,
12,
1033,
938,
262,
202,
95,
202,
202,
430,
261,
938,
1276,
5498,
3259,
262,
202,
202,
95,
1082,
202,
2463,
467,
4820,
1046,
2918,
18,
9819,
67,
6307,
6862,
... |
allFileContent = static_changeSQLServerTimestampType( allFileContent ); | commands = changeSQLSpecificDateTimeDataType( commands ); | private void executeCommandsFromFile( int databaseServer, String fileName ) throws Exception { Connection conn = getConnectionPool( databaseServer ); File sqlScriptingFile = new File( FILE_PATH + fileName ); String allFileContent = static_readFile( sqlScriptingFile ); if( databaseServer == SQL_SERVER ) { allFileContent = static_changeSQLServerTimestampType( allFileContent ); } String[] result = static_getAllCommands( allFileContent ); String[] dropCommands = result; executeCommands( conn, dropCommands ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/eee5f812aa4dcd453253b5f6f14669525b2936bc/DatabaseAcessor.java/clean/server/src/imcode/server/db/DatabaseAcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1836,
9127,
13087,
12,
509,
2063,
2081,
16,
514,
3968,
262,
1216,
1185,
288,
3639,
4050,
1487,
273,
6742,
2864,
12,
2063,
2081,
11272,
3639,
1387,
1847,
3651,
310,
812,
273,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
9127,
13087,
12,
509,
2063,
2081,
16,
514,
3968,
262,
1216,
1185,
288,
3639,
4050,
1487,
273,
6742,
2864,
12,
2063,
2081,
11272,
3639,
1387,
1847,
3651,
310,
812,
273,
39... |
} ok = evaluateCommandResult(finished,currentOutput); commandPostExec(finished,currentOutput); mCurrentSubCommand = mCommandNone; return(ok); | } ok = evaluateCommandResult(finished, currentOutput); commandPostExec(finished, currentOutput); mCurrentSubCommand = mCommandNone; return (ok); | private boolean waitForCommandToFinish() { char[] buf = new char[1024]; int count; int finished; StringBuffer debugOutput = new StringBuffer(); String currentOutput; boolean ok; if( isTerminated(mCurrentCommandDest) ) return(false); System.out.println("---Waiting for Command ("+mCurrentCommand+"--"+mCurrentSubCommand+") to finish----------------------------"); while(true) { count = -1; try{ count = mDebugOut.read(buf); }catch (IOException e) { abortSession(); throw new RuntimeException("Terminating Debug Session due to IO-Error !");} if(count > 0) debugOutput.append(buf,0,count); currentOutput = debugOutput.toString(); //System.out.println("\nCurrent DEBUGOUTPUT:\n"+currentOutput+"\n"); if( hasSessionTerminated(currentOutput) ) { finished = mSessionTerminated; break;} else if(hasCommandTerminated(currentOutput)) { finished = mCommandFinished; break;} else if( count < 0) { finished = mSessionTerminated; break;} } if( finished == mSessionTerminated) { abortSession(); return(false); } System.out.println("!!!!!!!!!!!!!!!!!!Command ("+mCurrentCommand+"--"+mCurrentSubCommand+") finished!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); if ( isStepCommand(mCurrentCommand) && ! isSubCommand() ) { IP_Position endIP = getCurrent_IP_Position(); while( (finished!=mSessionTerminated) && mStartIP.equals(endIP)) { startSubCommand(mCurrentCommand | mCommandModifierSkipEvaluateCommandResult,null,false); endIP = getCurrent_IP_Position(); } currentOutput = debugOutput.toString(); } if ( isRunCommand(mCurrentCommand) && (mCurrentCommand != mCommandStepInto) && ! isSubCommand() ) { while( (finished!=mSessionTerminated) && ! isBreakPointReached() && !isRunCommand(mCurrentCommand)) { insertPendingBreakpoints(); startSubCommand(mCurrentCommand | mCommandModifierSkipEvaluateCommandResult,null,false); } currentOutput = debugOutput.toString(); } ok = evaluateCommandResult(finished,currentOutput); commandPostExec(finished,currentOutput); mCurrentSubCommand = mCommandNone; return(ok); } | 48756 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48756/4179c9f6d0a36bc8b8ca5cdef30d4178930114cd/PerlDB.java/buggy/org.epic.debug/src/org/epic/debug/PerlDB.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
10712,
2189,
774,
11641,
1435,
202,
95,
202,
202,
3001,
8526,
1681,
273,
394,
1149,
63,
2163,
3247,
15533,
202,
202,
474,
1056,
31,
202,
202,
474,
6708,
31,
202,
202,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
10712,
2189,
774,
11641,
1435,
202,
95,
202,
202,
3001,
8526,
1681,
273,
394,
1149,
63,
2163,
3247,
15533,
202,
202,
474,
1056,
31,
202,
202,
474,
6708,
31,
202,
202,
7... |
this( parentShell ); this.errorList = list; this.level = level; | super( parentShell ); | public CssErrDialog( Shell parentShell , List list, int level) { this( parentShell ); this.errorList = list; this.level = level; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/6f5ee0811cf7eef3b71737863003811c024cb934/CssErrDialog.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/CssErrDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19127,
2524,
6353,
12,
19433,
982,
13220,
269,
987,
666,
16,
509,
1801,
13,
202,
95,
202,
202,
2211,
12,
982,
13220,
11272,
9506,
202,
2211,
18,
1636,
682,
273,
666,
31,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19127,
2524,
6353,
12,
19433,
982,
13220,
269,
987,
666,
16,
509,
1801,
13,
202,
95,
202,
202,
2211,
12,
982,
13220,
11272,
9506,
202,
2211,
18,
1636,
682,
273,
666,
31,
202,
... |
Log.log(Log.DEBUG,VFSFile.class,"findCompletion(" + path + "," + complete + "," + dirsOnly + ")"); | for(int i = start; i < end; i++) { VFSFile file = files[i]; String matchAgainst = (MiscUtilities.isAbsolutePath(str) ? file.getPath() : file.getName()); | public static String findCompletion(String path, String complete, VFSBrowser browser, boolean dirsOnly) { Log.log(Log.DEBUG,VFSFile.class,"findCompletion(" + path + "," + complete + "," + dirsOnly + ")"); if(complete.equals("~")) return System.getProperty("user.home"); else if(complete.equals("-")) return browser.getView().getBuffer().getDirectory(); if(MiscUtilities.isAbsolutePath(complete)) { if(MiscUtilities.isURL(complete)) return complete; else path = "roots:"; } VFS vfs = VFSManager.getVFSForPath(path); if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) == 0) return null; Object session = vfs.createVFSSession(path,browser); if(session == null) return null; try { VFSFile[] files = vfs._listFiles(session,path,browser); int index = findCompletion(files,0,files.length,complete,dirsOnly); if(index != -1) return files[index].path; } catch(IOException e) { VFSManager.error(e,path,browser); } finally { try { vfs._endVFSSession(session,browser); } catch(IOException e) { VFSManager.error(e,path,browser); } } return null; } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/34d18dab440fe873cdfa28f8c99c04546e378016/VFSFile.java/buggy/org/gjt/sp/jedit/io/VFSFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
1104,
11238,
12,
780,
589,
16,
514,
3912,
16,
202,
202,
58,
4931,
9132,
4748,
16,
1250,
7717,
3386,
13,
202,
95,
202,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
1104,
11238,
12,
780,
589,
16,
514,
3912,
16,
202,
202,
58,
4931,
9132,
4748,
16,
1250,
7717,
3386,
13,
202,
95,
202,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
... |
static public GrendelToolBar MergeToolBars(GrendelToolBar aBar1, GrendelToolBar aBar2) { GrendelToolBar res = new GrendelToolBar(); res.setLayout(new ToolBarLayout()); Component barArray1[] = aBar1.getComponents(); Component barArray2[] = aBar2.getComponents(); int count1 = aBar1.getComponentCount(); int count2 = aBar2.getComponentCount(); int i = 0, j = 0, k, l; if (DEBUG) { System.out.println("count1 = " + count1 + "; count2 = " + count2); } while (i < count1) { JButton button1 = (JButton) barArray1[i]; if (j < count2) { JButton button2 = (JButton) barArray2[j]; if (button1.getActionCommand().equals(button2.getActionCommand())) { res.add(button1); i++; j++; } else { boolean merge = false; for (k = j; k < count2; k++) { button2 = (JButton) barArray2[k]; if (button1.getActionCommand().equals(button2.getActionCommand())) { merge = true; while (j < k) { JButton button3 = (JButton) barArray2[j]; res.add(button3); j++; } break; } } if (merge) { res.add(button1); j++; } else { res.add(button1); } i++; } } else { res.add(button1); i++; } } while (j < count2) { JButton button2 = null; if (barArray2[j] != null) { button2 = (JButton) barArray2[j]; } if (button2 != null) { res.add(button2); } j++; } return res; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/3cd6e9d81112e3ab17a910eaef36b9e56b2a8b6a/Util.java/clean/grendel/sources/grendel/ui/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
1071,
611,
1187,
3771,
6364,
5190,
8964,
6364,
5190,
87,
12,
43,
1187,
3771,
6364,
5190,
279,
5190,
21,
16,
611,
1187,
3771,
6364,
5190,
279,
5190,
22,
13,
288,
565,
611,
1187,
377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
1071,
611,
1187,
3771,
6364,
5190,
8964,
6364,
5190,
87,
12,
43,
1187,
3771,
6364,
5190,
279,
5190,
21,
16,
611,
1187,
3771,
6364,
5190,
279,
5190,
22,
13,
288,
565,
611,
1187,
377... | ||
_project.delete(false/*deleteContent*/, true/*force*/, null/*monitor*/); | public static void delete (IProject _project, CommandLine _commandLine) throws Exception { ProjectUtils.assertExists(_project); for (Iterator ii = managers.keySet().iterator(); ii.hasNext();){ String nature = (String)ii.next(); if(_project.hasNature(nature)){ ProjectManager manager = ProjectManagement.getProjectManager(nature); manager.delete(_project, _commandLine); } } _project.delete(false/*deleteContent*/, true/*force*/, null/*monitor*/); } | 46034 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46034/7267561a7ad5fca5691decf4db0acae38d7ba750/ProjectManagement.java/buggy/src/java/org/eclim/project/ProjectManagement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1430,
261,
45,
4109,
389,
4406,
16,
15893,
389,
3076,
1670,
13,
565,
1216,
1185,
225,
288,
565,
5420,
1989,
18,
11231,
4002,
24899,
4406,
1769,
565,
364,
261,
3198,
6072,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1430,
261,
45,
4109,
389,
4406,
16,
15893,
389,
3076,
1670,
13,
565,
1216,
1185,
225,
288,
565,
5420,
1989,
18,
11231,
4002,
24899,
4406,
1769,
565,
364,
261,
3198,
6072,
... | |
return obj == null ? null : obj.toString(); | String result = null; if (obj != null) { if (!(obj instanceof Date)) { throw new ConversionException("Expected object of type java.sql.Date, but instead received " + obj.getClass().getName()); } result = obj.toString(); } return result; | public String convertToString(Object obj, int sqlTypeCode) throws ConversionException { return obj == null ? null : obj.toString(); } | 1224 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1224/42e00e0db032c26feccf274f7a7f399c554872aa/DateConverter.java/buggy/src/java/org/apache/ddlutils/io/converters/DateConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1765,
5808,
12,
921,
1081,
16,
509,
1847,
15460,
13,
1216,
16401,
503,
565,
288,
3639,
514,
563,
273,
446,
31,
225,
309,
261,
2603,
480,
446,
13,
288,
309,
16051,
12,
2603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1765,
5808,
12,
921,
1081,
16,
509,
1847,
15460,
13,
1216,
16401,
503,
565,
288,
3639,
514,
563,
273,
446,
31,
225,
309,
261,
2603,
480,
446,
13,
288,
309,
16051,
12,
2603,
... |
public static void fill(Address dst, byte pattern, int cnt) { | public static void fill(Address dst, byte pattern, Extent cnt) { | public static void fill(Address dst, byte pattern, int cnt) { VM_SysCall.sysFill(dst, pattern, cnt); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/511bde1d92a455acafb864be1f3383b0a2d5c0e0/VM_Memory.java/buggy/rvm/src/vm/runtime/VM_Memory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
3636,
12,
1887,
3046,
16,
1160,
1936,
16,
6419,
319,
7599,
13,
288,
565,
8251,
67,
12712,
1477,
18,
9499,
8026,
12,
11057,
16,
1936,
16,
7599,
1769,
225,
289,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
3636,
12,
1887,
3046,
16,
1160,
1936,
16,
6419,
319,
7599,
13,
288,
565,
8251,
67,
12712,
1477,
18,
9499,
8026,
12,
11057,
16,
1936,
16,
7599,
1769,
225,
289,
2,
-100,
... |
public org.quickfix.field.LegProduct getLegProduct() throws FieldNotFound { org.quickfix.field.LegProduct value = new org.quickfix.field.LegProduct(); | public quickfix.field.LegProduct getLegProduct() throws FieldNotFound { quickfix.field.LegProduct value = new quickfix.field.LegProduct(); | public org.quickfix.field.LegProduct getLegProduct() throws FieldNotFound { org.quickfix.field.LegProduct value = new org.quickfix.field.LegProduct(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/Quote.java/buggy/src/java/src/quickfix/fix44/Quote.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
4133,
336,
8329,
4133,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
4133,
460,
273,
394,
2358,
18,
19525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
4133,
336,
8329,
4133,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
4133,
460,
273,
394,
2358,
18,
19525,
... |
/*switch(style_recherche.getSelectedIndex()){ | switch(style_recherche.getSelectedIndex()){ | public void actionPerformed(ActionEvent e) { Object source = e.getSource(); int ligneSelect = table.getSelectedRow(); if(ligneSelect != -1){ //On cherche la ligne rellement slectionne (au cas o un tri ait t lanc) ligneActive = sorter.modelIndex(ligneSelect); // Action lie au bouton de modification d'un utilisateur if(source==ajout_exp){ // On rcupre les donnes de la ligne du tableau Vector cVect = (Vector) modeleTab.getRow(ligneActive); Personne p = new Personne(cVect); fenetre1.modifier_info_personne(p,1); } // Suppression d'un utilisateur else if(source==ajout_dest){ Vector cVect = (Vector) modeleTab.getRow(ligneActive); Personne p = new Personne(cVect); fenetre1.modifier_info_personne(p,2); } } if (source == rechercher) { //AccesBDDPersonne recherche = new AccesBDDPersonne(); //table.removeAll(); System.out.println(sorter.getRowCount()); for(int i=0 ;i <sorter.getRowCount();i++) { modeleTab.removeRow(sorter.getRowCount()- i -1); modeleTab.fireTableDataChanged(); System.out.println(i); table.updateUI(); } /*switch(style_recherche.getSelectedIndex()){ case 0: try{ //On rcupre les utilisateurs de la base de donnes et on les affiche Vector listePersonnes = tablePersonnes.lister(); for(int i=0;i<listePersonnes.size();i++){ donnees.addElement(((Personne)listePersonnes.get(i)).toVector()); } } catch(SQLException e1){ System.out.println(e1.getMessage()); } break; case 1: try{ //On rcupre les utilisateurs de la base de donnes et on les affiche Vector listePersonnes = tablePersonnes.rechercher(tablePersonnes.NOM,donnees_recherche.getText()); for(int i=0;i<listePersonnes.size();i++){ //donnees.addElement(((Personne)listePersonnes.get(i)).toVector()); ajouterPers((Personne)listePersonnes.get(i)); } } catch(SQLException e2){ System.out.println(e2.getMessage()); } break; case 2: break; case 3: break; }*/ } if(source==fermer){ dispose(); } } | 56849 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56849/36a3012e609444f70280bbeb22c89b9fd8271fae/Entree_select_personne.java/clean/trunk/ihm/entree/Entree_select_personne.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
202,
95,
202,
202,
921,
1084,
273,
425,
18,
588,
1830,
5621,
202,
202,
474,
328,
724,
73,
3391,
273,
1014,
18,
588,
7416,
1999,
5621,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
202,
95,
202,
202,
921,
1084,
273,
425,
18,
588,
1830,
5621,
202,
202,
474,
328,
724,
73,
3391,
273,
1014,
18,
588,
7416,
1999,
5621,
95... |
/*} catch (Exception excptn) { excptn.printStackTrace(getErrorStream());*/ } finally { | } finally { | public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSafeLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().rbClone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); String last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); self.evalNode(ruby.getParserHelper().getEvalTree()); /*} catch (Exception excptn) { excptn.printStackTrace(getErrorStream());*/ } finally { ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); } /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/8140cac1b7c2375c549787852e38fa6c52b199df/RubyRuntime.java/clean/org/jruby/runtime/RubyRuntime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1262,
3651,
12,
54,
10340,
780,
31008,
16,
19817,
780,
1084,
16,
1250,
2193,
13,
288,
3639,
19817,
921,
365,
273,
22155,
18,
588,
54,
10340,
3401,
10084,
5621,
3639,
385,
1957,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
3651,
12,
54,
10340,
780,
31008,
16,
19817,
780,
1084,
16,
1250,
2193,
13,
288,
3639,
19817,
921,
365,
273,
22155,
18,
588,
54,
10340,
3401,
10084,
5621,
3639,
385,
1957,... |
.getActiveBindingsFor("command2")); | .getActiveBindingsFor(binding2.getParameterizedCommand())); | public final void testRemoveBindings() throws NotDefinedException { // GENERAL SET-UP final Context context = contextManager.getContext("na"); context.define("name", "description", null); final Scheme scheme = bindingManager.getScheme("na"); scheme.define("name", "description", null); bindingManager.setActiveScheme(scheme); final Set activeContextIds = new HashSet(); activeContextIds.add("na"); contextManager.setActiveContextIds(activeContextIds); // ADD SOME BINDINGS final Binding binding1 = new TestBinding("command1", "na", "na", null, null, Binding.SYSTEM); bindingManager.addBinding(binding1); final Binding binding2 = new TestBinding("command2", "na", "na", "zh", null, Binding.SYSTEM); bindingManager.addBinding(binding2); final Binding binding3 = new TestBinding("command3", "na", "na", null, "gtk", Binding.SYSTEM); bindingManager.addBinding(binding3); final Binding binding4 = new TestBinding("command4", "na", "na", null, "gtk", Binding.USER); bindingManager.addBinding(binding4); final Binding binding5 = new TestBinding("command5", "na", "na", "zh", "gtk", Binding.USER); bindingManager.addBinding(binding5); assertNotNull("There should be three active bindings", bindingManager .getActiveBindingsFor("command1")); assertNotNull("There should be three active bindings", bindingManager .getActiveBindingsFor("command2")); assertNotNull("There should be three active bindings", bindingManager .getActiveBindingsFor("command4")); // REMOVE SOME BINDINGS bindingManager.removeBindings(TestBinding.TRIGGER_SEQUENCE, "na", "na", "zh", "gtk", null, Binding.USER); assertEquals("There should be four bindings left", 4, bindingManager .getBindings().length); assertNotNull("There should be four active bindings", bindingManager .getActiveBindingsFor("command1")); assertNotNull("There should be four active bindings", bindingManager .getActiveBindingsFor("command2")); assertNotNull("There should be four active bindings", bindingManager .getActiveBindingsFor("command3")); assertNotNull("There should be four active bindings", bindingManager .getActiveBindingsFor("command4")); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e61bf96d546738a5dfebc5feb8c2bcbe110e4371/BindingManagerTest.java/clean/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingManagerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1842,
3288,
10497,
1435,
1216,
2288,
8116,
503,
288,
202,
202,
759,
13679,
1013,
7855,
17,
3079,
202,
202,
6385,
1772,
819,
273,
819,
1318,
18,
29120,
2932,
6582,
8863... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
3288,
10497,
1435,
1216,
2288,
8116,
503,
288,
202,
202,
759,
13679,
1013,
7855,
17,
3079,
202,
202,
6385,
1772,
819,
273,
819,
1318,
18,
29120,
2932,
6582,
8863... |
generateClassCodeForVersions("Message", new String[] {XSLPARAM_SERIAL_UID}, new String[] {SERIAL_UID_STR}); | generateClassCodeForVersions("Message", new String[] { XSLPARAM_SERIAL_UID }, new String[] { SERIAL_UID_STR }); | private void generateMessageBaseClasses() throws TransformerConfigurationException, FileNotFoundException, ParserConfigurationException, SAXException, IOException, TransformerFactoryConfigurationError, TransformerException { generateClassCodeForVersions("Message", new String[] {XSLPARAM_SERIAL_UID}, new String[] {SERIAL_UID_STR}); } | 6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/70625fa143b22c1f66c3e1b614fcb0ebd9bc964f/JavaCodeGenerator.java/clean/src/quickfix/codegen/JavaCodeGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1079,
2171,
4818,
1435,
1216,
11519,
10737,
16,
5411,
13707,
16,
6783,
10737,
16,
14366,
16,
1860,
16,
5411,
11519,
1733,
1750,
668,
16,
21684,
288,
3639,
2103,
797,
1085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1079,
2171,
4818,
1435,
1216,
11519,
10737,
16,
5411,
13707,
16,
6783,
10737,
16,
14366,
16,
1860,
16,
5411,
11519,
1733,
1750,
668,
16,
21684,
288,
3639,
2103,
797,
1085,
... |
private void checkNodeDir(File directory, Integer nodeId, InetAddress primary, int interval, Date date, Map thresholdMap, Events events) throws IllegalArgumentException { | private void checkNodeDir(File directory, Integer nodeId, InetAddress primary, int interval, int range, Date date, Map thresholdMap, Events events) throws IllegalArgumentException { | private void checkNodeDir(File directory, Integer nodeId, InetAddress primary, int interval, Date date, Map thresholdMap, Events events) throws IllegalArgumentException { Category log = ThreadCategory.getInstance(getClass()); // Sanity Check if (directory == null || nodeId == null || primary == null || date == null || thresholdMap == null || events == null) { throw new IllegalArgumentException("Null parameters not permitted."); } if (log.isDebugEnabled()) log.debug("checkNodeDir: threshold checking node dir: " + directory.getAbsolutePath()); // Iterate over directory contents and threshold // check any RRD files which represent datasources // in the threshold maps. // File[] files = directory.listFiles(RrdFileConstants.RRD_FILENAME_FILTER); if (files == null) return; for (int i = 0; i < files.length; i++) { // File name has format: <datsource><extension> // Must strip off extension portion. String filename = files[i].getName(); String datasource = filename.substring(0, filename.indexOf(RrdUtils.get_extension())); // Lookup the ThresholdEntity object corresponding // to this datasource. // ThresholdEntity threshold = (ThresholdEntity) thresholdMap.get(datasource); if (threshold != null) { // Use RRD JNI interface to "fetch" value of the // datasource from the RRD file // Double dsValue = null; try { dsValue = RrdUtils.fetchLastValue(files[i].getAbsolutePath(), interval); } catch (NumberFormatException nfe) { log.warn("Unable to convert retrieved value for datasource '" + datasource + "' to a double, skipping evaluation."); } catch (RrdException e) { log.error("An error occurred retriving the last value for datasource '" + datasource + "'", e); } if (dsValue != null && !dsValue.isNaN()) { // Evaluate the threshold // // ThresholdEntity.evaluate() returns an integer value // which indicates which threshold values were // triggered and require an event to be generated (if any). // int result = threshold.evaluate(dsValue.doubleValue()); if (result != ThresholdEntity.NONE_TRIGGERED) { if (result == ThresholdEntity.HIGH_AND_LOW_TRIGGERED || result == ThresholdEntity.HIGH_TRIGGERED) { events.addEvent(createEvent(nodeId, primary, null, dsValue.doubleValue(), threshold.getHighThreshold(), EventConstants.HIGH_THRESHOLD_EVENT_UEI, date)); } if (result == ThresholdEntity.HIGH_AND_LOW_TRIGGERED || result == ThresholdEntity.LOW_TRIGGERED) { events.addEvent(createEvent(nodeId, primary, null, dsValue.doubleValue(), threshold.getLowThreshold(), EventConstants.LOW_THRESHOLD_EVENT_UEI, date)); } if (result == ThresholdEntity.HIGH_AND_LOW_REARMED || result == ThresholdEntity.HIGH_REARMED) { events.addEvent(createEvent(nodeId, primary, null, dsValue.doubleValue(), threshold.getHighThreshold(), EventConstants.HIGH_THRESHOLD_REARM_EVENT_UEI, date)); } if (result == ThresholdEntity.HIGH_AND_LOW_REARMED || result == ThresholdEntity.LOW_REARMED) { events.addEvent(createEvent(nodeId, primary, null, dsValue.doubleValue(), threshold.getLowThreshold(), EventConstants.LOW_THRESHOLD_REARM_EVENT_UEI, date)); } } } } } } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/07a7353dcb047b34d91730d300899c5e7d3ddc6e/JMXThresholder.java/clean/src/services/org/opennms/netmgt/threshd/JMXThresholder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
907,
1621,
12,
812,
1867,
16,
2144,
11507,
16,
14218,
3354,
16,
509,
3673,
16,
509,
1048,
16,
225,
2167,
1509,
16,
1635,
5573,
863,
16,
9043,
2641,
13,
1216,
2754,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
907,
1621,
12,
812,
1867,
16,
2144,
11507,
16,
14218,
3354,
16,
509,
3673,
16,
509,
1048,
16,
225,
2167,
1509,
16,
1635,
5573,
863,
16,
9043,
2641,
13,
1216,
2754,
288,
... |
priorityButtonGroup.add(lowPriorityButton); | private void initComponents() {//GEN-BEGIN:initComponents java.awt.GridBagConstraints gridBagConstraints; priorityButtonGroup = new javax.swing.ButtonGroup(); consoleSplitter = new javax.swing.JSplitPane(); viewPanel = new javax.swing.JPanel(); emptyPanel = new javax.swing.JPanel(); reportPanel = new javax.swing.JPanel(); editProjectPanel = new javax.swing.JPanel(); jarFileLabel = new javax.swing.JLabel(); jarNameTextField = new javax.swing.JTextField(); addJarButton = new javax.swing.JButton(); jarFileListLabel = new javax.swing.JLabel(); sourceDirLabel = new javax.swing.JLabel(); srcDirTextField = new javax.swing.JTextField(); addSourceDirButton = new javax.swing.JButton(); sourceDirListLabel = new javax.swing.JLabel(); removeJarButton = new javax.swing.JButton(); removeSrcDirButton = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); browseJarButton = new javax.swing.JButton(); browseSrcDirButton = new javax.swing.JButton(); editProjectLabel = new javax.swing.JLabel(); jSeparator2 = new javax.swing.JSeparator(); findBugsButton = new javax.swing.JButton(); jSeparator4 = new javax.swing.JSeparator(); jarFileListScrollPane = new javax.swing.JScrollPane(); jarFileList = new javax.swing.JList(); sourceDirListScrollPane = new javax.swing.JScrollPane(); sourceDirList = new javax.swing.JList(); classpathEntryLabel = new javax.swing.JLabel(); classpathEntryListLabel = new javax.swing.JLabel(); classpathEntryTextField = new javax.swing.JTextField(); browseClasspathEntryButton = new javax.swing.JButton(); addClasspathEntryButton = new javax.swing.JButton(); removeClasspathEntryButton = new javax.swing.JButton(); classpathEntryListScrollPane = new javax.swing.JScrollPane(); classpathEntryList = new javax.swing.JList(); jSeparator5 = new javax.swing.JSeparator(); sourceUpButton = new javax.swing.JButton(); sourceDownButton = new javax.swing.JButton(); classpathUpButton = new javax.swing.JButton(); classpathDownButton = new javax.swing.JButton(); bugTreePanel = new javax.swing.JPanel(); bugTreeBugDetailsSplitter = new javax.swing.JSplitPane(); groupByTabbedPane = new javax.swing.JTabbedPane(); byClassScrollPane = new javax.swing.JScrollPane(); byClassBugTree = new javax.swing.JTree(); byPackageScrollPane = new javax.swing.JScrollPane(); byPackageBugTree = new javax.swing.JTree(); byBugTypeScrollPane = new javax.swing.JScrollPane(); byBugTypeBugTree = new javax.swing.JTree(); bySummary = new javax.swing.JScrollPane(); bugSummaryEditorPane = new javax.swing.JEditorPane(); bugDetailsTabbedPane = new javax.swing.JTabbedPane(); bugDescriptionScrollPane = new javax.swing.JScrollPane(); bugDescriptionEditorPane = new javax.swing.JEditorPane(); sourceTextAreaScrollPane = new javax.swing.JScrollPane(); sourceTextArea = new javax.swing.JTextArea(); annotationTextAreaScrollPane = new javax.swing.JScrollPane(); annotationTextArea = new javax.swing.JTextArea(); consoleScrollPane = new javax.swing.JScrollPane(); consoleMessageArea = new javax.swing.JTextArea(); urlLabel = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); logoLabel = new javax.swing.JLabel(); growBoxSpacer = new javax.swing.JLabel(); theMenuBar = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); newProjectItem = new javax.swing.JMenuItem(); openProjectItem = new javax.swing.JMenuItem(); recentProjectsMenu = new javax.swing.JMenu(); jSeparator9 = new javax.swing.JSeparator(); closeProjectItem = new javax.swing.JMenuItem(); saveProjectItem = new javax.swing.JMenuItem(); saveProjectAsItem = new javax.swing.JMenuItem(); reloadProjectItem = new javax.swing.JMenuItem(); jSeparator3 = new javax.swing.JSeparator(); loadBugsItem = new javax.swing.JMenuItem(); saveBugsItem = new javax.swing.JMenuItem(); jSeparator6 = new javax.swing.JSeparator(); exitItem = new javax.swing.JMenuItem(); editMenu = new javax.swing.JMenu(); cutItem = new javax.swing.JMenuItem(); copyItem = new javax.swing.JMenuItem(); pasteItem = new javax.swing.JMenuItem(); jSeparator10 = new javax.swing.JSeparator(); selectAllItem = new javax.swing.JMenuItem(); viewMenu = new javax.swing.JMenu(); viewConsoleItem = new javax.swing.JCheckBoxMenuItem(); viewBugDetailsItem = new javax.swing.JCheckBoxMenuItem(); fullDescriptionsItem = new javax.swing.JCheckBoxMenuItem(); jSeparator7 = new javax.swing.JSeparator(); filterWarningsMenu = new javax.swing.JMenu(); expPriorityButton = new javax.swing.JRadioButtonMenuItem(); lowPriorityButton = new javax.swing.JRadioButtonMenuItem(); mediumPriorityButton = new javax.swing.JRadioButtonMenuItem(); highPriorityButton = new javax.swing.JRadioButtonMenuItem(); jSeparator11 = new javax.swing.JSeparator(); jSeparator8 = new javax.swing.JSeparator(); viewProjectItem = new javax.swing.JRadioButtonMenuItem(); viewBugsItem = new javax.swing.JRadioButtonMenuItem(); settingsMenu = new javax.swing.JMenu(); configureDetectorsItem = new javax.swing.JMenuItem(); helpMenu = new javax.swing.JMenu(); aboutItem = new javax.swing.JMenuItem(); getContentPane().setLayout(new java.awt.GridBagLayout()); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); consoleSplitter.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); consoleSplitter.setResizeWeight(1.0); consoleSplitter.setOneTouchExpandable(true); consoleSplitter.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { consoleSplitterPropertyChange(evt); } }); viewPanel.setLayout(new java.awt.CardLayout()); viewPanel.add(emptyPanel, "EmptyPanel"); viewPanel.add(reportPanel, "ReportPanel"); editProjectPanel.setLayout(new java.awt.GridBagLayout()); jarFileLabel.setFont(new java.awt.Font("Dialog", 0, 12)); jarFileLabel.setText("Archive or directory:"); jarFileLabel.setText(L10N.getLocalString("dlg.jarfile_lbl", "Archive or Directory:")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(jarFileLabel, gridBagConstraints); jarNameTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jarNameTextFieldActionPerformed(evt); } }); jarNameTextField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0); editProjectPanel.add(jarNameTextField, gridBagConstraints); addJarButton.setFont(new java.awt.Font("Dialog", 0, 12)); addJarButton.setText("Add"); addJarButton.setMaximumSize(new java.awt.Dimension(90, 25)); addJarButton.setMinimumSize(new java.awt.Dimension(90, 25)); addJarButton.setPreferredSize(new java.awt.Dimension(90, 25)); addJarButton.setText(L10N.getLocalString("dlg.add_btn", "Add")); addJarButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addJarButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(addJarButton, gridBagConstraints); jarFileListLabel.setFont(new java.awt.Font("Dialog", 0, 12)); jarFileListLabel.setText("Archives/directories:"); jarFileListLabel.setText(L10N.getLocalString("dlg.jarlist_lbl", "Archives/Directories:")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(jarFileListLabel, gridBagConstraints); sourceDirLabel.setFont(new java.awt.Font("Dialog", 0, 12)); sourceDirLabel.setText("Source directory:"); sourceDirLabel.setText(L10N.getLocalString("dlg.srcfile_lbl", "Source directory:")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(sourceDirLabel, gridBagConstraints); srcDirTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { srcDirTextFieldActionPerformed(evt); } }); srcDirTextField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 8; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0); editProjectPanel.add(srcDirTextField, gridBagConstraints); addSourceDirButton.setFont(new java.awt.Font("Dialog", 0, 12)); addSourceDirButton.setText("Add"); addSourceDirButton.setMaximumSize(new java.awt.Dimension(90, 25)); addSourceDirButton.setMinimumSize(new java.awt.Dimension(90, 25)); addSourceDirButton.setPreferredSize(new java.awt.Dimension(90, 25)); addSourceDirButton.setText(L10N.getLocalString("dlg.add_btn", "Add")); addSourceDirButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addSourceDirButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 8; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(addSourceDirButton, gridBagConstraints); sourceDirListLabel.setFont(new java.awt.Font("Dialog", 0, 12)); sourceDirListLabel.setText("Source directories:"); sourceDirListLabel.setText(L10N.getLocalString("dlg.srclist_lbl", "Source directories:")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 9; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(sourceDirListLabel, gridBagConstraints); removeJarButton.setFont(new java.awt.Font("Dialog", 0, 12)); removeJarButton.setText("Remove"); removeJarButton.setMaximumSize(new java.awt.Dimension(90, 25)); removeJarButton.setMinimumSize(new java.awt.Dimension(90, 25)); removeJarButton.setPreferredSize(new java.awt.Dimension(90, 25)); removeJarButton.setText(L10N.getLocalString("dlg.remove_btn", "Remove")); removeJarButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeJarButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(removeJarButton, gridBagConstraints); removeSrcDirButton.setFont(new java.awt.Font("Dialog", 0, 12)); removeSrcDirButton.setText("Remove"); removeSrcDirButton.setMaximumSize(new java.awt.Dimension(90, 25)); removeSrcDirButton.setMinimumSize(new java.awt.Dimension(90, 25)); removeSrcDirButton.setPreferredSize(new java.awt.Dimension(90, 25)); removeSrcDirButton.setText(L10N.getLocalString("dlg.remove_btn", "Remove")); removeSrcDirButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeSrcDirButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 9; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(removeSrcDirButton, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); editProjectPanel.add(jSeparator1, gridBagConstraints); browseJarButton.setFont(new java.awt.Font("Dialog", 0, 12)); browseJarButton.setText("Browse"); browseJarButton.setMaximumSize(new java.awt.Dimension(90, 25)); browseJarButton.setMinimumSize(new java.awt.Dimension(90, 25)); browseJarButton.setPreferredSize(new java.awt.Dimension(90, 25)); browseJarButton.setText(L10N.getLocalString("dlg.browse_btn", "Browse")); browseJarButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseJarButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(browseJarButton, gridBagConstraints); browseSrcDirButton.setFont(new java.awt.Font("Dialog", 0, 12)); browseSrcDirButton.setText("Browse"); browseSrcDirButton.setMaximumSize(new java.awt.Dimension(90, 25)); browseSrcDirButton.setMinimumSize(new java.awt.Dimension(90, 25)); browseSrcDirButton.setPreferredSize(new java.awt.Dimension(90, 25)); browseSrcDirButton.setText(L10N.getLocalString("dlg.browse_btn", "Browse")); browseSrcDirButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseSrcDirButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 8; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(browseSrcDirButton, gridBagConstraints); editProjectLabel.setBackground(new java.awt.Color(0, 0, 204)); editProjectLabel.setFont(new java.awt.Font("Dialog", 1, 24)); editProjectLabel.setForeground(new java.awt.Color(255, 255, 255)); editProjectLabel.setText("Project"); editProjectLabel.setOpaque(true); editProjectLabel.setText(L10N.getLocalString("dlg.project_lbl", "Project")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; editProjectPanel.add(editProjectLabel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); editProjectPanel.add(jSeparator2, gridBagConstraints); findBugsButton.setMnemonic('B'); findBugsButton.setText("Find Bugs!"); findBugsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { findBugsButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 21; gridBagConstraints.gridwidth = 4; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); editProjectPanel.add(findBugsButton, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 14; gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); editProjectPanel.add(jSeparator4, gridBagConstraints); jarFileListScrollPane.setPreferredSize(new java.awt.Dimension(259, 1)); jarFileList.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED)); jarFileList.setFont(new java.awt.Font("Dialog", 0, 12)); disableEditKeyBindings(jarFileList); jarFileList.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); jarFileListScrollPane.setViewportView(jarFileList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 0.4; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(jarFileListScrollPane, gridBagConstraints); sourceDirListScrollPane.setPreferredSize(new java.awt.Dimension(259, 1)); sourceDirList.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED)); sourceDirList.setFont(new java.awt.Font("Dialog", 0, 12)); disableEditKeyBindings(sourceDirList); sourceDirList.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); sourceDirListScrollPane.setViewportView(sourceDirList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 9; gridBagConstraints.gridwidth = 2; gridBagConstraints.gridheight = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 0.1; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(sourceDirListScrollPane, gridBagConstraints); classpathEntryLabel.setFont(new java.awt.Font("Dialog", 0, 12)); classpathEntryLabel.setText("Classpath entry:"); classpathEntryLabel.setText(L10N.getLocalString("dlg.classpathfile_lbl", "Classpath entry:")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 15; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 3); editProjectPanel.add(classpathEntryLabel, gridBagConstraints); classpathEntryListLabel.setFont(new java.awt.Font("Dialog", 0, 12)); classpathEntryListLabel.setText("Classpath entries:"); classpathEntryListLabel.setText(L10N.getLocalString("dlg.classpathlist_lbl", "Classpath entries:")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 16; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 3); editProjectPanel.add(classpathEntryListLabel, gridBagConstraints); classpathEntryTextField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 15; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0); editProjectPanel.add(classpathEntryTextField, gridBagConstraints); browseClasspathEntryButton.setFont(new java.awt.Font("Dialog", 0, 12)); browseClasspathEntryButton.setText("Browse"); browseClasspathEntryButton.setMaximumSize(new java.awt.Dimension(90, 25)); browseClasspathEntryButton.setMinimumSize(new java.awt.Dimension(90, 25)); browseClasspathEntryButton.setPreferredSize(new java.awt.Dimension(90, 25)); browseClasspathEntryButton.setText(L10N.getLocalString("dlg.browse_btn", "Browse")); browseClasspathEntryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseClasspathEntryButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 15; editProjectPanel.add(browseClasspathEntryButton, gridBagConstraints); addClasspathEntryButton.setFont(new java.awt.Font("Dialog", 0, 12)); addClasspathEntryButton.setText("Add"); addClasspathEntryButton.setMaximumSize(new java.awt.Dimension(90, 25)); addClasspathEntryButton.setMinimumSize(new java.awt.Dimension(90, 25)); addClasspathEntryButton.setPreferredSize(new java.awt.Dimension(90, 25)); addClasspathEntryButton.setText(L10N.getLocalString("dlg.add_btn", "Add")); addClasspathEntryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addClasspathEntryButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 15; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0); editProjectPanel.add(addClasspathEntryButton, gridBagConstraints); removeClasspathEntryButton.setFont(new java.awt.Font("Dialog", 0, 12)); removeClasspathEntryButton.setText("Remove"); removeClasspathEntryButton.setMaximumSize(new java.awt.Dimension(90, 25)); removeClasspathEntryButton.setMinimumSize(new java.awt.Dimension(90, 25)); removeClasspathEntryButton.setPreferredSize(new java.awt.Dimension(90, 25)); removeClasspathEntryButton.setText(L10N.getLocalString("dlg.remove_btn", "Remove")); removeClasspathEntryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeClasspathEntryButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 16; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0); editProjectPanel.add(removeClasspathEntryButton, gridBagConstraints); classpathEntryListScrollPane.setPreferredSize(new java.awt.Dimension(259, 1)); classpathEntryList.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED)); classpathEntryList.setFont(new java.awt.Font("Dialog", 0, 12)); disableEditKeyBindings(classpathEntryList); classpathEntryList.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); classpathEntryListScrollPane.setViewportView(classpathEntryList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 16; gridBagConstraints.gridwidth = 2; gridBagConstraints.gridheight = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 0.1; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); editProjectPanel.add(classpathEntryListScrollPane, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 20; gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 0); editProjectPanel.add(jSeparator5, gridBagConstraints); sourceUpButton.setFont(new java.awt.Font("Dialog", 0, 12)); sourceUpButton.setText("Up"); sourceUpButton.setMaximumSize(new java.awt.Dimension(90, 25)); sourceUpButton.setMinimumSize(new java.awt.Dimension(90, 25)); sourceUpButton.setPreferredSize(new java.awt.Dimension(90, 25)); sourceUpButton.setText(L10N.getLocalString("dlg.up_btn", "Up")); sourceUpButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sourceUpButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 10; gridBagConstraints.weighty = 0.2; editProjectPanel.add(sourceUpButton, gridBagConstraints); sourceDownButton.setFont(new java.awt.Font("Dialog", 0, 12)); sourceDownButton.setText("Down"); sourceDownButton.setMaximumSize(new java.awt.Dimension(90, 25)); sourceDownButton.setMinimumSize(new java.awt.Dimension(90, 25)); sourceDownButton.setPreferredSize(new java.awt.Dimension(90, 25)); sourceDownButton.setText(L10N.getLocalString("dlg.down_btn", "Down")); sourceDownButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sourceDownButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridy = 11; editProjectPanel.add(sourceDownButton, gridBagConstraints); classpathUpButton.setFont(new java.awt.Font("Dialog", 0, 12)); classpathUpButton.setText("Up"); classpathUpButton.setMaximumSize(new java.awt.Dimension(90, 25)); classpathUpButton.setMinimumSize(new java.awt.Dimension(90, 25)); classpathUpButton.setPreferredSize(new java.awt.Dimension(90, 25)); classpathUpButton.setText(L10N.getLocalString("dlg.up_btn", "Up")); classpathUpButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { classpathUpButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 17; gridBagConstraints.weighty = 0.2; editProjectPanel.add(classpathUpButton, gridBagConstraints); classpathDownButton.setFont(new java.awt.Font("Dialog", 0, 12)); classpathDownButton.setText("Down"); classpathDownButton.setMaximumSize(new java.awt.Dimension(90, 25)); classpathDownButton.setMinimumSize(new java.awt.Dimension(90, 25)); classpathDownButton.setPreferredSize(new java.awt.Dimension(90, 25)); classpathDownButton.setText(L10N.getLocalString("dlg.down_btn", "Down")); classpathDownButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { classpathDownButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 18; editProjectPanel.add(classpathDownButton, gridBagConstraints); viewPanel.add(editProjectPanel, "EditProjectPanel"); bugTreePanel.setLayout(new java.awt.GridBagLayout()); bugTreeBugDetailsSplitter.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); bugTreeBugDetailsSplitter.setResizeWeight(1.0); bugTreeBugDetailsSplitter.setOneTouchExpandable(true); bugTreeBugDetailsSplitter.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { bugTreeBugDetailsSplitterPropertyChange(evt); } }); byClassBugTree.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); byClassScrollPane.setViewportView(byClassBugTree); groupByTabbedPane.addTab("By Class", byClassScrollPane); byPackageBugTree.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); byPackageScrollPane.setViewportView(byPackageBugTree); groupByTabbedPane.addTab("By Package", byPackageScrollPane); byBugTypeBugTree.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); byBugTypeScrollPane.setViewportView(byBugTypeBugTree); groupByTabbedPane.addTab("By Bug Type", byBugTypeScrollPane); bugSummaryEditorPane.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); bySummary.setViewportView(bugSummaryEditorPane); groupByTabbedPane.addTab("Summary", bySummary); bugTreeBugDetailsSplitter.setTopComponent(groupByTabbedPane); bugDescriptionEditorPane.setEditable(false); bugDescriptionEditorPane.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); bugDescriptionScrollPane.setViewportView(bugDescriptionEditorPane); bugDetailsTabbedPane.addTab("Details", bugDescriptionScrollPane); sourceTextAreaScrollPane.setMinimumSize(new java.awt.Dimension(22, 180)); sourceTextAreaScrollPane.setPreferredSize(new java.awt.Dimension(0, 100)); sourceTextArea.setEditable(false); sourceTextArea.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 12)); sourceTextArea.setEnabled(false); sourceTextArea.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); sourceTextAreaScrollPane.setViewportView(sourceTextArea); bugDetailsTabbedPane.addTab("Source code", sourceTextAreaScrollPane); annotationTextArea.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); annotationTextAreaScrollPane.setViewportView(annotationTextArea); bugDetailsTabbedPane.addTab("Annotations", annotationTextAreaScrollPane); bugTreeBugDetailsSplitter.setBottomComponent(bugDetailsTabbedPane); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; bugTreePanel.add(bugTreeBugDetailsSplitter, gridBagConstraints); viewPanel.add(bugTreePanel, "BugTree"); consoleSplitter.setTopComponent(viewPanel); { equalizeControls( new JComponent[] { addJarButton, addSourceDirButton, addClasspathEntryButton, removeJarButton, removeSrcDirButton, removeClasspathEntryButton, browseJarButton, browseSrcDirButton, browseClasspathEntryButton, sourceUpButton, sourceDownButton, classpathUpButton, classpathDownButton }); groupByTabbedPane.setTitleAt(0, L10N.getLocalString( "dlg.byclass_tab", "By Class")); groupByTabbedPane.setTitleAt(1, L10N.getLocalString( "dlg.bypackage_tab", "By Package")); groupByTabbedPane.setTitleAt(2, L10N.getLocalString( "dlg.bybugtype_tab", "By Bug Type")); groupByTabbedPane.setTitleAt(3, L10N.getLocalString( "dlg.summary_tab", "Summary")); bugDetailsTabbedPane.setTitleAt(0, L10N.getLocalString( "dlg.details_tab", "Details")); bugDetailsTabbedPane.setTitleAt(1, L10N.getLocalString( "dlg.sourcecode_tab", "Source Code")); bugDetailsTabbedPane.setTitleAt(2, L10N.getLocalString( "dlg.annotations_tab", "Annotations")); } consoleScrollPane.setMinimumSize(new java.awt.Dimension(22, 100)); consoleScrollPane.setPreferredSize(new java.awt.Dimension(0, 100)); consoleMessageArea.setBackground(new java.awt.Color(204, 204, 204)); consoleMessageArea.setEditable(false); consoleMessageArea.setFont(new java.awt.Font("Lucida Sans Typewriter", 0, 12)); consoleMessageArea.setMinimumSize(new java.awt.Dimension(0, 0)); consoleMessageArea.setAutoscrolls(false); consoleMessageArea.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { focusGainedHandler(evt); } }); consoleScrollPane.setViewportView(consoleMessageArea); consoleSplitter.setBottomComponent(consoleScrollPane); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; getContentPane().add(consoleSplitter, gridBagConstraints); urlLabel.setFont(new java.awt.Font("Dialog", 0, 12)); urlLabel.setText("FindBugs - http://findbugs.sourceforge.net/"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 0); getContentPane().add(urlLabel, gridBagConstraints); jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.X_AXIS)); jPanel1.add(logoLabel); growBoxSpacer.setMaximumSize(new java.awt.Dimension(16, 16)); jPanel1.add(growBoxSpacer); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST; gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 2); getContentPane().add(jPanel1, gridBagConstraints); theMenuBar.setFont(new java.awt.Font("Dialog", 0, 12)); fileMenu.setText("File"); fileMenu.setFont(new java.awt.Font("Dialog", 0, 12)); localiseButton(fileMenu, "menu.file_menu", "&File", true); fileMenu.addMenuListener(new javax.swing.event.MenuListener() { public void menuCanceled(javax.swing.event.MenuEvent evt) { } public void menuDeselected(javax.swing.event.MenuEvent evt) { } public void menuSelected(javax.swing.event.MenuEvent evt) { fileMenuMenuSelected(evt); } }); newProjectItem.setFont(new java.awt.Font("Dialog", 0, 12)); newProjectItem.setText("New Project"); localiseButton(newProjectItem, "menu.new_item", "&New Project", true); newProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newProjectItemActionPerformed(evt); } }); fileMenu.add(newProjectItem); openProjectItem.setFont(new java.awt.Font("Dialog", 0, 12)); openProjectItem.setText("Open Project..."); localiseButton(openProjectItem, "menu.open_item", "&Open Project", true); openProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openProjectItemActionPerformed(evt); } }); fileMenu.add(openProjectItem); recentProjectsMenu.setText("Recent Projects"); recentProjectsMenu.setFont(new java.awt.Font("Dialog", 0, 12)); localiseButton(recentProjectsMenu, "menu.recent_menu", "R&ecent Projects", true); rebuildRecentProjectsMenu(); fileMenu.add(recentProjectsMenu); fileMenu.add(jSeparator9); closeProjectItem.setFont(new java.awt.Font("Dialog", 0, 12)); closeProjectItem.setText("Close Project"); localiseButton(closeProjectItem, "menu.close_item", "&Close", true); closeProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeProjectItemActionPerformed(evt); } }); fileMenu.add(closeProjectItem); saveProjectItem.setFont(new java.awt.Font("Dialog", 0, 12)); saveProjectItem.setText("Save Project"); localiseButton(saveProjectItem, "menu.save_item", "&Save Project", true); saveProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveProjectItemActionPerformed(evt); } }); fileMenu.add(saveProjectItem); saveProjectAsItem.setFont(new java.awt.Font("Dialog", 0, 12)); saveProjectAsItem.setText("Save Project As..."); localiseButton(saveProjectAsItem, "menu.saveas_item", "Save Project &As...", true); saveProjectAsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveProjectAsItemActionPerformed(evt); } }); fileMenu.add(saveProjectAsItem); reloadProjectItem.setFont(new java.awt.Font("Dialog", 0, 12)); reloadProjectItem.setText("Reload Project"); localiseButton(reloadProjectItem, "menu.reload_item", "&Reload Project", true); reloadProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { reloadProjectItemActionPerformed(evt); } }); fileMenu.add(reloadProjectItem); fileMenu.add(jSeparator3); loadBugsItem.setFont(new java.awt.Font("Dialog", 0, 12)); loadBugsItem.setText("Load Bugs..."); localiseButton(loadBugsItem, "menu.loadbugs_item", "&Load Bugs...", true); loadBugsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadBugsItemActionPerformed(evt); } }); fileMenu.add(loadBugsItem); saveBugsItem.setFont(new java.awt.Font("Dialog", 0, 12)); saveBugsItem.setText("Save Bugs"); localiseButton(saveBugsItem, "menu.savebugs_item", "Save &Bugs...", true); saveBugsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveBugsItemActionPerformed(evt); } }); fileMenu.add(saveBugsItem); fileMenu.add(jSeparator6); exitItem.setFont(new java.awt.Font("Dialog", 0, 12)); exitItem.setText("Exit"); localiseButton(exitItem, "menu.exit_item", "E&xit", true); exitItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitItemActionPerformed(evt); } }); fileMenu.add(exitItem); theMenuBar.add(fileMenu); editMenu.setText("Edit"); editMenu.setFont(new java.awt.Font("Dialog", 0, 12)); editMenu.setEnabled(false); localiseButton(editMenu, "menu.edit_menu", "&Edit", true); cutItem.setFont(new java.awt.Font("Dialog", 0, 12)); cutItem.setText("Cut"); localiseButton(cutItem, "menu.cut_item", "Cut", true); cutItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cutActionPerformed(evt); } }); editMenu.add(cutItem); copyItem.setFont(new java.awt.Font("Dialog", 0, 12)); copyItem.setText("Copy"); localiseButton(copyItem, "menu.copy_item", "Copy", true); copyItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { copyActionPerformed(evt); } }); editMenu.add(copyItem); pasteItem.setFont(new java.awt.Font("Dialog", 0, 12)); pasteItem.setText("Paste"); localiseButton(pasteItem, "menu.paste_item", "Paste", true); pasteItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pasteActionPerformed(evt); } }); editMenu.add(pasteItem); editMenu.add(jSeparator10); selectAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); selectAllItem.setFont(new java.awt.Font("Dialog", 0, 12)); selectAllItem.setText("Select All"); localiseButton(selectAllItem, "menu.selectall_item", "Select &All", true); selectAllItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selectAllActionPerformed(evt); } }); editMenu.add(selectAllItem); theMenuBar.add(editMenu); viewMenu.setText("View"); viewMenu.setFont(new java.awt.Font("Dialog", 0, 12)); localiseButton(viewMenu, "menu.view_menu", "&View", true); viewMenu.addMenuListener(new javax.swing.event.MenuListener() { public void menuCanceled(javax.swing.event.MenuEvent evt) { } public void menuDeselected(javax.swing.event.MenuEvent evt) { } public void menuSelected(javax.swing.event.MenuEvent evt) { viewMenuMenuSelected(evt); } }); viewConsoleItem.setFont(new java.awt.Font("Dialog", 0, 12)); viewConsoleItem.setText("Console"); localiseButton(viewConsoleItem, "menu.console_item", "&Console", true); viewConsoleItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewConsoleItemActionPerformed(evt); } }); viewMenu.add(viewConsoleItem); viewBugDetailsItem.setFont(new java.awt.Font("Dialog", 0, 12)); viewBugDetailsItem.setSelected(true); viewBugDetailsItem.setText("Bug Details"); localiseButton(viewBugDetailsItem, "menu.bugdetails_item", "Bug &Details", true); viewBugDetailsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewBugDetailsItemActionPerformed(evt); } }); viewMenu.add(viewBugDetailsItem); fullDescriptionsItem.setFont(new java.awt.Font("Dialog", 0, 12)); fullDescriptionsItem.setSelected(true); fullDescriptionsItem.setText("Full Descriptions"); localiseButton(fullDescriptionsItem, "menu.fulldescriptions_item", "&Full Descriptions", true); fullDescriptionsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fullDescriptionsItemActionPerformed(evt); } }); viewMenu.add(fullDescriptionsItem); viewMenu.add(jSeparator7); filterWarningsMenu.setText("Filter Warnings"); filterWarningsMenu.setFont(new java.awt.Font("Dialog", 0, 12)); localiseButton(filterWarningsMenu, "menu.filterwarnings_menu", "Filter &Warnings", true); priorityButtonGroup.add(expPriorityButton); expPriorityButton.setFont(new java.awt.Font("Dialog", 0, 12)); expPriorityButton.setText("Experimental Priority"); localiseButton(expPriorityButton, "menu.exppriority_item", "&Experimental Priority", true); expPriorityButton.setSelected(getPriorityThreshold() == Detector.EXP_PRIORITY); expPriorityButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { expPriorityButtonActionPerformed(evt); } }); filterWarningsMenu.add(expPriorityButton); priorityButtonGroup.add(lowPriorityButton); lowPriorityButton.setFont(new java.awt.Font("Dialog", 0, 12)); lowPriorityButton.setText("Low Priority"); localiseButton(lowPriorityButton, "menu.lowpriority_item", "&Low Priority", true); lowPriorityButton.setSelected(getPriorityThreshold() == Detector.LOW_PRIORITY); lowPriorityButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { lowPriorityButtonActionPerformed(evt); } }); filterWarningsMenu.add(lowPriorityButton); priorityButtonGroup.add(mediumPriorityButton); mediumPriorityButton.setFont(new java.awt.Font("Dialog", 0, 12)); mediumPriorityButton.setText("Medium Priority"); localiseButton(mediumPriorityButton, "menu.mediumpriority_item", "&Medium Priority", true); mediumPriorityButton.setSelected(getPriorityThreshold() == Detector.NORMAL_PRIORITY); mediumPriorityButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { mediumPriorityButtonActionPerformed(evt); } }); filterWarningsMenu.add(mediumPriorityButton); priorityButtonGroup.add(highPriorityButton); highPriorityButton.setFont(new java.awt.Font("Dialog", 0, 12)); highPriorityButton.setText("High Priority"); localiseButton(highPriorityButton, "menu.highpriority_item", "&High Priority", true); highPriorityButton.setSelected(getPriorityThreshold() == Detector.HIGH_PRIORITY); highPriorityButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { highPriorityButtonActionPerformed(evt); } }); filterWarningsMenu.add(highPriorityButton); filterWarningsMenu.add(jSeparator11); viewMenu.add(filterWarningsMenu); ButtonGroup bg = new ButtonGroup(); bg.add(expPriorityButton); bg.add(lowPriorityButton); bg.add(mediumPriorityButton); bg.add(highPriorityButton); viewMenu.add(jSeparator8); viewProjectItem.setFont(new java.awt.Font("Dialog", 0, 12)); viewProjectItem.setText("View Project Details"); viewProjectItem.setEnabled(false); localiseButton(viewProjectItem, "menu.viewprojectdetails_item", "View Project Details", true); viewProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewProjectItemActionPerformed(evt); } }); viewMenu.add(viewProjectItem); viewBugsItem.setFont(new java.awt.Font("Dialog", 0, 12)); viewBugsItem.setText("View Bugs"); viewBugsItem.setEnabled(false); localiseButton(viewBugsItem, "menu.viewbugs_item", "View Bugs", true); viewBugsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewBugsItemActionPerformed(evt); } }); viewMenu.add(viewBugsItem); theMenuBar.add(viewMenu); settingsMenu.setText("Settings"); settingsMenu.setFont(new java.awt.Font("Dialog", 0, 12)); localiseButton(settingsMenu, "menu.settings_menu", "&Settings", true); configureDetectorsItem.setFont(new java.awt.Font("Dialog", 0, 12)); configureDetectorsItem.setText("Configure Detectors..."); localiseButton(configureDetectorsItem, "menu.configure_item", "&Configure detectors", true); configureDetectorsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { configureDetectorsItemActionPerformed(evt); } }); settingsMenu.add(configureDetectorsItem); theMenuBar.add(settingsMenu); helpMenu.setText("Help"); helpMenu.setFont(new java.awt.Font("Dialog", 0, 12)); localiseButton(helpMenu, "menu.help_menu", "&Help", true); aboutItem.setFont(new java.awt.Font("Dialog", 0, 12)); aboutItem.setText("About..."); localiseButton(aboutItem, "menu.about_item", "&About", true); aboutItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { aboutItemActionPerformed(evt); } }); helpMenu.add(aboutItem); theMenuBar.add(helpMenu); setJMenuBar(theMenuBar); pack(); }//GEN-END:initComponents | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/b5b66f340641a18e96bc54721f8a36111ce5632d/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
759,
16652,
17,
16061,
30,
2738,
7171,
3639,
2252,
18,
2219,
88,
18,
6313,
6852,
8747,
31,
3639,
4394,
3616,
1114,
273,
394,
6863,
18,
5328,
310,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
759,
16652,
17,
16061,
30,
2738,
7171,
3639,
2252,
18,
2219,
88,
18,
6313,
6852,
8747,
31,
3639,
4394,
3616,
1114,
273,
394,
6863,
18,
5328,
310,
18,
3... | |
NodeAddress localAddress = grid.getLocalAddress(); | public void onMembershipChange(Set joined, Set left) { NodeAddress localAddress = grid.getLocalAddress(); membershipMutex.acquire(); try { log.info("--- NODE " + localAddress + " MEMBERSHIP CHANGE #" + numberOfMembershipChanges + " ---"); for (Iterator iterator = joined.iterator(); iterator.hasNext();) { NodeAddress address = (NodeAddress) iterator.next(); if (nodeExists(address)) { log.info("Node list already contains " + address); } else { // Don't make up a new status for the local node. If the // address is mine, then use my own status. NodeStatus node = (address.equals(localAddress)) ? grid.getLocalStatus() : new NodeStatusImpl(address); putNode(address, node, null); log.info("Node " + node + " added."); } } // for for (Iterator iterator = left.iterator(); iterator.hasNext();) { NodeAddress address = (NodeAddress) iterator.next(); if (nodeExists(address)) { removeNode(address); } else { log.info("Address " + address + " not found."); } } // for numberOfMembershipChanges++; membershipChanged.signal(); // Signal on the condition that the membership has changed. } finally { releaseMutex(); } } | 11642 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11642/ac35cc7c8079dc9df5d317718b24447b42881ccc/Membership.java/buggy/trunk/jegrid/src/org/jegrid/impl/Membership.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
603,
13447,
3043,
12,
694,
12114,
16,
1000,
2002,
13,
565,
288,
9079,
12459,
11433,
18,
1077,
1039,
5621,
3639,
775,
3639,
288,
5411,
613,
18,
1376,
2932,
6062,
11922,
315,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
13447,
3043,
12,
694,
12114,
16,
1000,
2002,
13,
565,
288,
9079,
12459,
11433,
18,
1077,
1039,
5621,
3639,
775,
3639,
288,
5411,
613,
18,
1376,
2932,
6062,
11922,
315,
397... | |
public void run() { setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); } }); | public void run() { setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); } }); | public String isValid(final Object value) { if (value instanceof String) { final EObject element = getParserElement(); final IParser parser = getParser(); try { IParserEditStatus valid = (IParserEditStatus) getEditingDomain() .runExclusive(new RunnableWithResult.Impl() { public void run() { setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value)); } }); return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage(); } catch (InterruptedException ie) { ie.printStackTrace(); } } // shouldn't get here return null; } | 56962 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56962/816096641504ba96db7bef449fe01a4b67ff0d37/CallOperationActionNameEditPart.java/buggy/plugins/org.eclipse.uml2.diagram.activity/src/org/eclipse/uml2/diagram/activity/edit/parts/CallOperationActionNameEditPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
514,
4908,
12,
6385,
1033,
460,
13,
288,
9506,
202,
430,
261,
1132,
1276,
514,
13,
288,
6862,
202,
6385,
8091,
930,
273,
20804,
1046,
5621,
6862,
202,
6385,
467,
2678,
2082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
514,
4908,
12,
6385,
1033,
460,
13,
288,
9506,
202,
430,
261,
1132,
1276,
514,
13,
288,
6862,
202,
6385,
8091,
930,
273,
20804,
1046,
5621,
6862,
202,
6385,
467,
2678,
2082,
... |
public XMLMenuBuilder(Class ref, UIAction[] actionList) { button_group = new Hashtable(); actions = new Hashtable(); this.ref = ref; if (actionList != null) { for (int i = 0; i < actionList.length; i++) { actions.put(actionList[i].getName(), actionList[i]); } } | public XMLMenuBuilder(Event[] aListener) { mListener = aListener; mIDs = new HashMap<String, JComponent>(); | public XMLMenuBuilder(Class ref, UIAction[] actionList) { button_group = new Hashtable(); actions = new Hashtable(); this.ref = ref; if (actionList != null) { for (int i = 0; i < actionList.length; i++) { actions.put(actionList[i].getName(), actionList[i]); } } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/3cd6e9d81112e3ab17a910eaef36b9e56b2a8b6a/XMLMenuBuilder.java/buggy/grendel/sources/grendel/ui/XMLMenuBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3167,
4599,
1263,
12,
797,
1278,
16,
6484,
1803,
8526,
1301,
682,
13,
288,
565,
3568,
67,
1655,
273,
394,
18559,
5621,
565,
4209,
273,
394,
18559,
5621,
565,
333,
18,
1734,
273,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3167,
4599,
1263,
12,
797,
1278,
16,
6484,
1803,
8526,
1301,
682,
13,
288,
565,
3568,
67,
1655,
273,
394,
18559,
5621,
565,
4209,
273,
394,
18559,
5621,
565,
333,
18,
1734,
273,
1... |
return taskId; | list.add(taskId); | public synchronized String pollForTaskWithClosedJob(String taskTracker) { TreeSet taskIds = (TreeSet) trackerToTaskMap.get(taskTracker); if (taskIds != null) { for (Iterator it = taskIds.iterator(); it.hasNext(); ) { String taskId = (String) it.next(); TaskInProgress tip = (TaskInProgress) taskidToTIPMap.get(taskId); if (tip.shouldCloseForClosedJob(taskId)) { // // This is how the JobTracker ends a task at the TaskTracker. // It may be successfully completed, or may be killed in // mid-execution. // return taskId; } } } return null; } | 55137 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55137/60d3b572473ce256966117ae094b5eb605c3fb4a/JobTracker.java/buggy/src/java/org/apache/hadoop/mapred/JobTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
514,
7672,
1290,
2174,
1190,
7395,
2278,
12,
780,
1562,
8135,
13,
288,
3639,
19461,
1562,
2673,
273,
261,
2471,
694,
13,
9745,
774,
2174,
863,
18,
588,
12,
4146,
8135,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
514,
7672,
1290,
2174,
1190,
7395,
2278,
12,
780,
1562,
8135,
13,
288,
3639,
19461,
1562,
2673,
273,
261,
2471,
694,
13,
9745,
774,
2174,
863,
18,
588,
12,
4146,
8135,
1769,
... |
i = trailingIdx; if (optInTimePeriod > 1) { while (i < startIdx) periodTotal += inReal[i++]; } outIdx = 0; do { periodTotal += inReal[i++]; tempReal = periodTotal; periodTotal -= inReal[trailingIdx++]; outReal[outIdx++] = tempReal / optInTimePeriod; } while (i <= endIdx); | TA_RetCode INT_SMA(int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { double periodTotal, tempReal; int i, outIdx, trailingIdx, lookbackTotal; lookbackTotal = (optInTimePeriod - 1); if (startIdx < lookbackTotal) startIdx = lookbackTotal; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } periodTotal = 0; trailingIdx = startIdx - lookbackTotal; i = trailingIdx; if (optInTimePeriod > 1) { while (i < startIdx) periodTotal += inReal[i++]; } outIdx = 0; do { periodTotal += inReal[i++]; tempReal = periodTotal; periodTotal -= inReal[trailingIdx++]; outReal[outIdx++] = tempReal / optInTimePeriod; } while (i <= endIdx); outNbElement.value = outIdx; outBegIdx.value = startIdx; return TA_RetCode.TA_SUCCESS; } | 2365 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2365/8c26ea7a2c59f9148f3db0db7ab39ed48689e601/Core.java/buggy/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
9833,
67,
7055,
1085,
6137,
67,
55,
5535,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
6955,
63,
6487,
1082,
202,
474,
2153,
382,
26540,
16,
490,
4522,
596,
24059,
4223,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
9833,
67,
7055,
1085,
6137,
67,
55,
5535,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
6955,
63,
6487,
1082,
202,
474,
2153,
382,
26540,
16,
490,
4522,
596,
24059,
4223,
16,
... | |
JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); | JOptionPane.showMessageDialog( parent, LangTool.getString("em.confirmationMessage") + " " + (String) toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); | private void sendIt (Frame parent, SendEMail sem) { if (parent == null) parent = new JFrame(); try { if (sem.send()) { JOptionPane.showMessageDialog(parent, LangTool.getString("em.confirmationMessage") + " " + (String)toAddress.getSelectedItem(), LangTool.getString("em.titleConfirmation"), JOptionPane.INFORMATION_MESSAGE); if (session != null) { config.setProperty("emailTo", getToTokens(config.getStringProperty("emailTo"), toAddress)); config.saveSessionProps(); setToCombo(config.getStringProperty("emailTo"),toAddress); } } } catch (IOException ioe) { System.out.println(ioe.getMessage()); } catch (Exception ex) { System.out.println(ex.getMessage()); } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SendEMailDialog.java/clean/tn5250j/src/org/tn5250j/mailtools/SendEMailDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
1366,
7193,
261,
3219,
982,
16,
2479,
3375,
671,
6111,
13,
288,
1377,
309,
261,
2938,
422,
446,
13,
540,
982,
273,
394,
804,
3219,
5621,
1377,
775,
288,
540,
309,
261,
12000,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
1366,
7193,
261,
3219,
982,
16,
2479,
3375,
671,
6111,
13,
288,
1377,
309,
261,
2938,
422,
446,
13,
540,
982,
273,
394,
804,
3219,
5621,
1377,
775,
288,
540,
309,
261,
12000,... |
String message; if (e.getMessage() == null) { message = WorkbenchMessages.ErrorClosingNoArg; } else { message = NLS.bind(WorkbenchMessages.ErrorClosingOneArg, e.getMessage() ); } | String message; if (e.getMessage() == null) { message = WorkbenchMessages.ErrorClosingNoArg; } else { message = NLS.bind( WorkbenchMessages.ErrorClosingOneArg, e .getMessage()); } | public void handleException(Throwable e) { String message; if (e.getMessage() == null) { message = WorkbenchMessages.ErrorClosingNoArg; } else { message = NLS.bind(WorkbenchMessages.ErrorClosingOneArg, e.getMessage() ); } if (!MessageDialog.openQuestion(null, WorkbenchMessages.Error, message)) { isClosing = false; } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/9337b828e86179850647141c34d497be28275ed2/Workbench.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
20879,
12,
15155,
425,
13,
288,
10792,
514,
883,
31,
10792,
309,
261,
73,
18,
24906,
1435,
422,
446,
13,
288,
13491,
883,
273,
4147,
22144,
5058,
18,
668,
15745,
2279,
4117,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
20879,
12,
15155,
425,
13,
288,
10792,
514,
883,
31,
10792,
309,
261,
73,
18,
24906,
1435,
422,
446,
13,
288,
13491,
883,
273,
4147,
22144,
5058,
18,
668,
15745,
2279,
4117,
... |
FindPath.find(n1,n2); | public static void detectConstraints( streamit.scheduler2.iriter.Iterator topStreamIter, SIRPortal portals[]) { if (ClusterBackend.debugPrint) System.out.println("Number of portals is: "+portals.length); for (int t = 0; t < portals.length; t++) { SIRPortalSender senders[] = portals[t].getSenders(); SIRStream receivers[] = portals[t].getReceivers(); HashSet visited_senders = new HashSet(); int min_latency = 0; boolean any_latency_found = false; if (ClusterBackend.debugPrint) System.out.println("\n Portal: "+portals[t]); for (int i = 0; i < senders.length; i++) { SIRStream sender = senders[i].getStream(); if (!visited_senders.contains(sender)) { if (ClusterBackend.debugPrint) System.out.print(" sender: ("+sender+")"); try { int id = NodeEnumerator.getSIROperatorId(sender); if (ClusterBackend.debugPrint) System.out.print(" ID:"+id); } catch (Exception ex) { } if (ClusterBackend.debugPrint) System.out.println(); visited_senders.add(sender); for (int y = i; y < senders.length; y++) { if (senders[y].getStream().equals(sender)) { int this_max = 0; SIRLatency latency = senders[y].getLatency(); // we are interested in the least of the // upper bounds. in each case we will send // the message with as large latency // as possible. this_max = MaxLatency(latency); if (ClusterBackend.debugPrint) System.out.println(" detect Latency: "+ this_max); if (!any_latency_found) { min_latency = this_max; any_latency_found = true; } if (this_max < min_latency) { min_latency = this_max; } } } if (ClusterBackend.debugPrint) System.out.println(" minimum Latency: " + min_latency); } } for (int i = 0; i < receivers.length; i++) { SIRStream receiver = receivers[i]; try { int id = NodeEnumerator.getSIROperatorId(receiver); if (ClusterBackend.debugPrint) System.out.println(" receiver: (" + receiver + ") ID:" + id); } catch (Exception ex) { if (ClusterBackend.debugPrint) System.out.println(" receiver: (" + receiver + ") ID: NOT FOUND"); } } if (ClusterBackend.debugPrint) System.out.println(); Iterator senders_i = visited_senders.iterator(); while (senders_i.hasNext()) { SIRStream sender = (SIRStream)senders_i.next(); HashSet constraints = new HashSet(); boolean upstream = false; for (int i2 = 0; i2 < receivers.length; i2++) { SIRStream receiver = receivers[i2]; if (ClusterBackend.debugPrint) System.out.println(" sender: " + sender + " receiver: " + receiver); SIRFilter f1 = (SIRFilter)sender; SIRFilter f2 = (SIRFilter)receiver; int n1 = NodeEnumerator.getSIROperatorId(f1); int n2 = NodeEnumerator.getSIROperatorId(f2); FindPath.find(n1,n2); streamit.scheduler2.constrained.Scheduler cscheduler2 = streamit.scheduler2.constrained.Scheduler. create(topStreamIter); streamit.scheduler2.iriter.Iterator iter1 = IterFactory.createFactory().createIter(f1); streamit.scheduler2.iriter.Iterator iter2 = IterFactory.createFactory().createIter(f2); streamit.scheduler2.SDEPData sdep2; try { sdep2 = cscheduler2.computeSDEP(iter1, iter2); // message is being sent downstream Vector v = new Vector(); v.add(f1); v.add(f2); messageDirectionDownstream.put(v, new Boolean(true)); if (ClusterBackend.debugPrint) System.out.println("sender: "+f1+" receiver: "+f2); upstream = false; } catch (streamit.scheduler2.constrained. NoPathException ex) { try { sdep2 = cscheduler2.computeSDEP(iter2, iter1); Vector v = new Vector(); v.add(f1); v.add(f2); messageDirectionDownstream.put(v, new Boolean(false)); if (ClusterBackend.debugPrint) System.out.println("sender: "+f1+" receiver: "+f2); // message is being sent upstream upstream = true; } catch (streamit.scheduler2.constrained. NoPathException ex2) { // no path between source and dest has been found AssertedClass.ASSERT(cscheduler2, false, "no path found between source and destination of message"); // never executed continue; } } if (ClusterBackend.debugPrint) { System.out.println(" Upstream Init Phases: " + sdep2.getNumSrcInitPhases()); System.out.println(" Downstr. Init Phases: " + sdep2.getNumDstInitPhases()); System.out.println(" Upstream Steady Phases: " + sdep2.getNumSrcSteadyPhases()); System.out.println(" Downstr. Steady Phases: " + sdep2.getNumDstSteadyPhases()); } int upstreamSteady = sdep2.getNumSrcSteadyPhases(); int downstreamSteady = sdep2.getNumDstSteadyPhases(); for (int t2 = 0; t2 < 20; t2++) { int phase = sdep2.getSrcPhase4DstPhase(t2); int phaserev = sdep2.getDstPhase4SrcPhase(t2); if (ClusterBackend.debugPrint) System.out.println(" sdep ["+t2+"] = "+phase+ " reverse_sdep["+t2+"] = "+phaserev); } // take care of negative latency downstream messages if (min_latency < 0 && !upstream) { int last_dep; int iter; // add receiver to set of restricted filters restrictedExecutionFilters.add(receiver); for (iter = 1;; iter++) { last_dep = sdep2.getDstPhase4SrcPhase(iter); if (last_dep > 1) break; } if (ClusterBackend.debugPrint) System.out.println("iter: " + iter + " last_dep: " + last_dep); int init = (iter-1)-min_latency-1; LatencyConstraint constraint = new LatencyConstraint(init, upstreamSteady, downstreamSteady, (SIRFilter)receiver); // add constraint to the senders // list of constraints constraints.add(constraint); last_dep = 0; for (int inc = 0; inc < upstreamSteady; inc++) { int current = sdep2.getDstPhase4SrcPhase(iter+inc)-1; if (current > last_dep) { if (ClusterBackend.debugPrint) System.out.println("Can exec "+current +" at source iteration nr. " +(init+inc) +" array:"+current); constraint.setDependencyData(inc, current); last_dep = current; } else { if (ClusterBackend.debugPrint) System.out.println("Can not advance dest. at source iteration nr. " +(init+inc)+" array:0"); constraint.setDependencyData(inc, 0); } } constraint.output(); } // take care of upstream messages if (upstream && any_latency_found && min_latency < 0) { AssertedClass.ASSERT(topStreamIter, false, "Error: an upstream message is being sent with a negative latency."); } if (upstream && any_latency_found && min_latency > 0) { int init_credit; int iter = 1; // add receiver to set of restricted filters restrictedExecutionFilters.add(receiver); init_credit = sdep2.getSrcPhase4DstPhase(1 + min_latency) - 1; //setInitCredit((SIRFilter)receiver, init_credit); if (ClusterBackend.debugPrint) System.out.println("Init credit: "+init_credit); if (init_credit < sdep2.getSrcPhase4DstPhase(iter)) { // a deadlock if (ClusterBackend.debugPrint) System.out.println("WARNING === possible deadlock ==="); } LatencyConstraint constraint = new LatencyConstraint(init_credit, downstreamSteady, upstreamSteady, (SIRFilter)receiver); constraints.add(constraint); int credit_sent = init_credit; for (int offset = 0; offset < downstreamSteady; offset++) { int credit = sdep2.getSrcPhase4DstPhase(offset + 2 + min_latency)- 1; if (credit > credit_sent) { constraint.setDependencyData(offset, credit); if (ClusterBackend.debugPrint) System.out.println("At end of iter: " +(offset+1) +" can send credit: " +credit); } else { constraint.setDependencyData(offset, 0); if (ClusterBackend.debugPrint) System.out.println("At end of iter: " +(offset+1) +" no additional credit."); } credit_sent = credit; } constraint.output(); } // for loop closes if (ClusterBackend.debugPrint) System.out.println(); } outgoingLatencyConstraints.put(sender, constraints); } if (ClusterBackend.debugPrint) System.out.println(); } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/335c42ea8dfd5044ffb020dba7d3f90249d99479/LatencyConstraints.java/buggy/streams/src/at/dms/kjc/cluster/LatencyConstraints.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
5966,
4878,
12,
29159,
1407,
305,
18,
19972,
22,
18,
481,
2165,
18,
3198,
1760,
1228,
2360,
16,
29159,
5705,
54,
24395,
1756,
1031,
63,
5717,
288,
3639,
309,
261,
3629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5966,
4878,
12,
29159,
1407,
305,
18,
19972,
22,
18,
481,
2165,
18,
3198,
1760,
1228,
2360,
16,
29159,
5705,
54,
24395,
1756,
1031,
63,
5717,
288,
3639,
309,
261,
3629,
... | |
return post; | return _post; | public PostTable getPostTable() { return post; } | 2880 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2880/9cc444f1c307250e98a52c5068737946a157f4af/OTFont.java/buggy/src/net/java/dev/typecast/ot/OTFont.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5616,
1388,
14150,
1388,
1435,
288,
3639,
327,
389,
2767,
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,... | [
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,
377,
1071,
5616,
1388,
14150,
1388,
1435,
288,
3639,
327,
389,
2767,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return new TableLayoutInfo(columnWidthResolver.resolve( tableWidth, parentMaxWidth - marginWidth )); | return new TableLayoutInfo( handleColummVisibity( columnWidthResolver.resolve( tableWidth, parentMaxWidth - marginWidth ) ) ); | private TableLayoutInfo resolveTableLayoutInfo(TableArea area) { assert(parent!=null); int avaWidth = parent.getMaxAvaWidth( ) - parent.getCurrentIP( ); int parentMaxWidth = parent.getMaxAvaWidth( ); IStyle style = area.getStyle( ); validateBoxProperty( style ); int marginWidth = getDimensionValue( style .getProperty( StyleConstants.STYLE_MARGIN_LEFT ) ) + getDimensionValue( style .getProperty( StyleConstants.STYLE_MARGIN_RIGHT ) ); int specifiedWidth = getDimensionValue( tableContent.getWidth( ), parentMaxWidth ); if(specifiedWidth + marginWidth > parentMaxWidth) { specifiedWidth = 0; } boolean isInline = PropertyUtil.isInlineElement( content ); if ( specifiedWidth == 0 ) { if(isInline) { if ( avaWidth - marginWidth > parentMaxWidth / 4 ) { tableWidth = avaWidth - marginWidth; } else { tableWidth = parentMaxWidth - marginWidth; } } else { tableWidth = avaWidth - marginWidth; } return new TableLayoutInfo(columnWidthResolver.resolve( tableWidth, tableWidth )); } else { if ( !isInline ) { tableWidth = Math.min( specifiedWidth, avaWidth - marginWidth ); return new TableLayoutInfo(columnWidthResolver.resolve( tableWidth, avaWidth - marginWidth )); } else { tableWidth = Math.min( specifiedWidth, parentMaxWidth - marginWidth ); return new TableLayoutInfo(columnWidthResolver.resolve( tableWidth, parentMaxWidth - marginWidth )); } } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/7ed22fff465f0a50978a06defbc3569031f205c8/PDFTableLM.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFTableLM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3555,
3744,
966,
2245,
1388,
3744,
966,
12,
1388,
5484,
5091,
13,
202,
95,
202,
202,
11231,
12,
2938,
5,
33,
2011,
1769,
202,
202,
474,
1712,
69,
2384,
273,
982,
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,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3555,
3744,
966,
2245,
1388,
3744,
966,
12,
1388,
5484,
5091,
13,
202,
95,
202,
202,
11231,
12,
2938,
5,
33,
2011,
1769,
202,
202,
474,
1712,
69,
2384,
273,
982,
18,
588,
2... |
return network.equals(maskIP(org.xbill.DNS.Address.getByName(name), netmask)); | return network.equals(maskIP(org.apache.james.dnsserver.DNSServer.getByName(name), netmask)); | public boolean contains(final String name) throws java.net.UnknownHostException { return network.equals(maskIP(org.xbill.DNS.Address.getByName(name), netmask)); } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/60fbef73abe9e5c3005cec33f4db92649bd28f64/NetMatcher.java/clean/branches/branch_2_1_fcs/src/java/org/apache/james/util/NetMatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1914,
12,
6385,
514,
508,
13,
1216,
2252,
18,
2758,
18,
4874,
29776,
565,
288,
3639,
327,
2483,
18,
14963,
12,
4455,
2579,
12,
3341,
18,
19211,
18,
78,
753,
18,
14926,
3567,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
1250,
1914,
12,
6385,
514,
508,
13,
1216,
2252,
18,
2758,
18,
4874,
29776,
565,
288,
3639,
327,
2483,
18,
14963,
12,
4455,
2579,
12,
3341,
18,
19211,
18,
78,
753,
18,
14926,
3567,... |
} else { if (checked) { | } else { if ( checked ) { | private void handleCheckStateChanged(IPluginModelBase model, boolean checked) { if (model.getUnderlyingResource() == null) { if (checked) { fNumExternalChecked += 1; } else { fNumExternalChecked -= 1; } } else { if (checked) { fNumWorkspaceChecked += 1; } else { fNumWorkspaceChecked -= 1; } } adjustGroupState(); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/9fa0c0ee6086d66a8596c81c9364b34027ca1e98/ReportAdvancedLauncherTab.java/buggy/UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/ui/launching/ReportAdvancedLauncherTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1640,
1564,
1119,
5033,
12,
45,
3773,
1488,
2171,
938,
16,
1250,
5950,
13,
288,
202,
202,
430,
261,
2284,
18,
588,
14655,
6291,
1420,
1435,
422,
446,
13,
288,
1082,
202,
430,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1640,
1564,
1119,
5033,
12,
45,
3773,
1488,
2171,
938,
16,
1250,
5950,
13,
288,
202,
202,
430,
261,
2284,
18,
588,
14655,
6291,
1420,
1435,
422,
446,
13,
288,
1082,
202,
430,... |
defaultLocation = buildURL(new File(System.getProperty(PROP_USER_HOME), "user").getAbsolutePath(), true); | defaultLocation = buildURL(new File(FrameworkProperties.getProperty(PROP_USER_HOME), "user").getAbsolutePath(), true); | public static void initializeLocations() { // do install location initialization first since others may depend on it // assumes that the property is already set installLocation = buildLocation(PROP_INSTALL_AREA, null, null, true); Location temp = buildLocation(PROP_USER_AREA_DEFAULT, null, "", false); //$NON-NLS-1$ URL defaultLocation = temp == null ? null : temp.getURL(); if (defaultLocation == null) defaultLocation = buildURL(new File(System.getProperty(PROP_USER_HOME), "user").getAbsolutePath(), true); //$NON-NLS-1$ userLocation = buildLocation(PROP_USER_AREA, defaultLocation, "", false); //$NON-NLS-1$ temp = buildLocation(PROP_INSTANCE_AREA_DEFAULT, null, "", false); //$NON-NLS-1$ defaultLocation = temp == null ? null : temp.getURL(); if (defaultLocation == null) defaultLocation = buildURL(new File(System.getProperty(PROP_USER_DIR), "workspace").getAbsolutePath(), true); //$NON-NLS-1$ instanceLocation = buildLocation(PROP_INSTANCE_AREA, defaultLocation, "", false); //$NON-NLS-1$ mungeConfigurationLocation(); // compute a default but it is very unlikely to be used since main will have computed everything temp = buildLocation(PROP_CONFIG_AREA_DEFAULT, null, "", false); //$NON-NLS-1$ defaultLocation = temp == null ? null : temp.getURL(); if (defaultLocation == null) defaultLocation = buildURL(computeDefaultConfigurationLocation(), true); configurationLocation = buildLocation(PROP_CONFIG_AREA, defaultLocation, "", false); //$NON-NLS-1$ // get the parent location based on the system property. This will have been set on the // way in either by the caller/user or by main. There will be no parent location if we are not // cascaded. URL parentLocation = computeSharedConfigurationLocation(); if (parentLocation != null && !parentLocation.equals(configurationLocation.getURL())) { Location parent = new BasicLocation(null, parentLocation, true); ((BasicLocation) configurationLocation).setParent(parent); } initializeDerivedConfigurationLocations(); } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/795e339493dd76d146d62fd4fd2526e831c650bd/LocationManager.java/buggy/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
4046,
10985,
1435,
288,
202,
202,
759,
741,
3799,
2117,
10313,
1122,
3241,
10654,
2026,
2447,
603,
518,
202,
202,
759,
13041,
716,
326,
1272,
353,
1818,
444,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
4046,
10985,
1435,
288,
202,
202,
759,
741,
3799,
2117,
10313,
1122,
3241,
10654,
2026,
2447,
603,
518,
202,
202,
759,
13041,
716,
326,
1272,
353,
1818,
444,
202,
202,... |
return errorInfo.isNil() ? runtime.getNil() : errorInfo.callMethod(errorInfo.getRuntime().getCurrentContext(), "backtrace"); | IRubyObject backtrace = errorInfo.isNil() ? runtime.getNil() : errorInfo.callMethod(errorInfo.getRuntime().getCurrentContext(), "backtrace"); if (!(backtrace instanceof RubyArray)) { backtrace = runtime.getNil(); } return backtrace; | public IRubyObject get() { IRubyObject errorInfo = runtime.getGlobalVariables().get("$!"); return errorInfo.isNil() ? runtime.getNil() : errorInfo.callMethod(errorInfo.getRuntime().getCurrentContext(), "backtrace"); } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/fe628a940467ceda783730ea34173dec3d365fa4/RubyGlobal.java/clean/src/org/jruby/RubyGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
15908,
10340,
921,
336,
1435,
288,
5411,
15908,
10340,
921,
23280,
273,
3099,
18,
588,
5160,
6158,
7675,
588,
2932,
8,
4442,
1769,
5411,
15908,
10340,
921,
13902,
273,
23280,
18,
291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15908,
10340,
921,
336,
1435,
288,
5411,
15908,
10340,
921,
23280,
273,
3099,
18,
588,
5160,
6158,
7675,
588,
2932,
8,
4442,
1769,
5411,
15908,
10340,
921,
13902,
273,
23280,
18,
291,... |
RubyString.newString(runtime, marshaled)); | runtime.newString(marshaled)); | private IRubyObject userUnmarshal() throws IOException { String className = unmarshalObject().asSymbol(); String marshaled = unmarshalString(); RubyModule classInstance = runtime.getModule(className); IRubyObject result = classInstance.callMethod( "_load", RubyString.newString(runtime, marshaled)); registerLinkTarget(result); return result; } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/870e1da9b41bfdbae259e1fc5f18fc8b76686998/UnmarshalStream.java/clean/src/org/jruby/runtime/marshal/UnmarshalStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
729,
9593,
1435,
1216,
1860,
288,
3639,
514,
2658,
273,
11401,
921,
7675,
345,
5335,
5621,
3639,
514,
27957,
273,
11401,
780,
5621,
3639,
19817,
3120,
667,
1442,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
729,
9593,
1435,
1216,
1860,
288,
3639,
514,
2658,
273,
11401,
921,
7675,
345,
5335,
5621,
3639,
514,
27957,
273,
11401,
780,
5621,
3639,
19817,
3120,
667,
1442,
27... |
List children = new ArrayList(); children.add(EcoreElementTypes.EEnum_2007); return children; | List types = new ArrayList(); types.add(EcoreElementTypes.EEnum_2007); return types; | public List getTypesForPopupBar(IAdaptable host) { Object editPart = host.getAdapter(IGraphicalEditPart.class); if (editPart instanceof EClassEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EAttribute_2001); children.add(EcoreElementTypes.EOperation_2002); children.add(EcoreElementTypes.EAnnotation_2003); return children; } if (editPart instanceof EPackage2EditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EClass_2004); children.add(EcoreElementTypes.EPackage_2005); children.add(EcoreElementTypes.EDataType_2006); children.add(EcoreElementTypes.EEnum_2007); children.add(EcoreElementTypes.EAnnotation_2008); return children; } if (editPart instanceof EAnnotation3EditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EStringToStringMapEntry_2009); return children; } if (editPart instanceof EDataType2EditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EAnnotation_2010); return children; } if (editPart instanceof EEnum2EditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EEnumLiteral_2011); children.add(EcoreElementTypes.EAnnotation_2012); return children; } if (editPart instanceof EClass_attributesEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EAttribute_2001); return children; } if (editPart instanceof EClass_operationsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EOperation_2002); return children; } if (editPart instanceof EClass_classannotationsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EAnnotation_2003); return children; } if (editPart instanceof EPackage_classesEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EClass_2004); return children; } if (editPart instanceof EPackage_packagesEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EPackage_2005); return children; } if (editPart instanceof EPackage_datatypesEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EDataType_2006); return children; } if (editPart instanceof EPackage_enumsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EEnum_2007); return children; } if (editPart instanceof EPackage_packageannotationsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EAnnotation_2008); return children; } if (editPart instanceof EAnnotation_detailsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EStringToStringMapEntry_2009); return children; } if (editPart instanceof EDataType_datatypeannotationsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EAnnotation_2010); return children; } if (editPart instanceof EEnum_literalsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EEnumLiteral_2011); return children; } if (editPart instanceof EEnum_enumannotationsEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EAnnotation_2012); return children; } if (editPart instanceof EPackageEditPart) { List children = new ArrayList(); children.add(EcoreElementTypes.EClass_1001); children.add(EcoreElementTypes.EPackage_1002); children.add(EcoreElementTypes.EAnnotation_1003); children.add(EcoreElementTypes.EDataType_1004); children.add(EcoreElementTypes.EEnum_1005); return children; } return Collections.EMPTY_LIST; } | 7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/79c7b0fc69c2bf26895f5be319f9bd8a536a6311/EcoreModelingAssistantProvider.java/clean/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/providers/EcoreModelingAssistantProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
20780,
1290,
13770,
5190,
12,
45,
13716,
429,
1479,
13,
288,
202,
202,
921,
3874,
1988,
273,
1479,
18,
588,
4216,
12,
3047,
1483,
1706,
4666,
1988,
18,
1106,
1769,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
20780,
1290,
13770,
5190,
12,
45,
13716,
429,
1479,
13,
288,
202,
202,
921,
3874,
1988,
273,
1479,
18,
588,
4216,
12,
3047,
1483,
1706,
4666,
1988,
18,
1106,
1769,
202,
2... |
setErrorMessage("You must select a recipient before you may send this message."); | setErrorMessage(getResourceBundleString(SELECT_MSG_RECIPIENT)); | public String processPvtMsgSaveDraft() { LOG.debug("processPvtMsgSaveDraft()"); if(!hasValue(getComposeSubject())) { setErrorMessage("You must enter a subject before you may send this message."); return null ; }// if(!hasValue(getComposeBody()) )// {// setErrorMessage("Please enter message body for this compose message.");// return null ;// } if(getSelectedComposeToList().size()<1) { setErrorMessage("You must select a recipient before you may send this message."); return null ; } PrivateMessage dMsg=constructMessage() ; dMsg.setDraft(Boolean.TRUE); if((SET_AS_YES).equals(getComposeSendAsPvtMsg())) { prtMsgManager.sendPrivateMessage(dMsg, getRecipients(), false); } //reset contents resetComposeContents(); if(getMsgNavMode().equals("")) { return "main" ; // if navigation is from main page } else { return "pvtMsg"; } } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/31f059d4c004601241a992d38669d08dc47f709b/PrivateMessagesTool.java/buggy/msgcntr/messageforums-app/src/java/org/sakaiproject/tool/messageforums/PrivateMessagesTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1207,
27615,
3332,
4755,
12714,
1435,
288,
565,
2018,
18,
4148,
2932,
2567,
27615,
3332,
4755,
12714,
1435,
8863,
565,
309,
12,
5,
5332,
620,
12,
588,
22375,
6638,
1435,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
27615,
3332,
4755,
12714,
1435,
288,
565,
2018,
18,
4148,
2932,
2567,
27615,
3332,
4755,
12714,
1435,
8863,
565,
309,
12,
5,
5332,
620,
12,
588,
22375,
6638,
1435,
3719,
... |
public void testMessageWithParameters() throws Exception { String value; CmsMessages messages = new CmsMessages(CmsWorkplaceMessages.DEFAULT_WORKPLACE_MESSAGE_BUNDLE, Locale.ENGLISH); value = messages.key("editor.xmlcontent.validation.error"); assertEquals("Invalid value \"{0}\" according to rule {1}", value); value = messages.key("editor.xmlcontent.validation.error", new Object[]{"'value'", "'rule'"}); assertEquals("Invalid value \"'value'\" according to rule 'rule'", value); value = messages.key("editor.xmlcontent.validation.warning"); assertEquals("Bad value \"{0}\" according to rule {1}", value); value = messages.key("editor.xmlcontent.validation.warning", new Object[]{"some value", "the rule"}); assertEquals("Bad value \"some value\" according to rule the rule", value); } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/6f754ad872cb162fb0d29d167cdd6d159d8112a0/TestCmsMessages.java/buggy/test/org/opencms/i18n/TestCmsMessages.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1079,
1190,
2402,
1435,
1216,
1185,
288,
7734,
514,
460,
31,
7734,
2149,
5058,
2743,
273,
394,
2149,
5058,
12,
4747,
16514,
5058,
18,
5280,
67,
10566,
12134,
67,
8723,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1079,
1190,
2402,
1435,
1216,
1185,
288,
7734,
514,
460,
31,
7734,
2149,
5058,
2743,
273,
394,
2149,
5058,
12,
4747,
16514,
5058,
18,
5280,
67,
10566,
12134,
67,
8723,
67... | ||
synchronized (this) | if (running) | public void connect() { synchronized (this) { if (running) { return; } log.info("Connecting..."); doConnect(); running = true; notify(); log.info(getAddress() + " connected."); } } | 51249 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51249/6924fde902f731f10cf6a2276f5da659c7278d64/JGroupsBus.java/buggy/jegrid/src/org/jegrid/jgroups/JGroupsBus.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3077,
1435,
565,
288,
3639,
309,
261,
8704,
13,
3639,
288,
5411,
309,
261,
8704,
13,
5411,
288,
7734,
327,
31,
5411,
289,
5411,
613,
18,
1376,
2932,
30049,
7070,
1769,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3077,
1435,
565,
288,
3639,
309,
261,
8704,
13,
3639,
288,
5411,
309,
261,
8704,
13,
5411,
288,
7734,
327,
31,
5411,
289,
5411,
613,
18,
1376,
2932,
30049,
7070,
1769,
5411,
... |
if (CLabel.this.text != null) { char mnemonic = findMnemonic(CLabel.this.text); if (mnemonic != '\0') { e.result = "Alt+"+mnemonic; } | char mnemonic = findMnemonic(CLabel.this.text); if (mnemonic != '\0') { e.result = "Alt+"+mnemonic; | private void initAccessible() { Accessible accessible = getAccessible(); accessible.addAccessibleListener(new AccessibleAdapter() { public void getName(AccessibleEvent e) { e.result = getText(); } public void getHelp(AccessibleEvent e) { e.result = getToolTipText(); } public void getKeyboardShortcut(AccessibleEvent e) { if (CLabel.this.text != null) { char mnemonic = findMnemonic(CLabel.this.text); if (mnemonic != '\0') { e.result = "Alt+"+mnemonic; //$NON-NLS-1$ } } } }); accessible.addAccessibleControlListener(new AccessibleControlAdapter() { public void getChildAtPoint(AccessibleControlEvent e) { Point pt = toControl(new Point(e.x, e.y)); e.childID = (getBounds().contains(pt)) ? ACC.CHILDID_SELF : ACC.CHILDID_NONE; } public void getLocation(AccessibleControlEvent e) { Rectangle location = getBounds(); Point pt = toDisplay(new Point(location.x, location.y)); e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; } public void getChildCount(AccessibleControlEvent e) { e.detail = 0; } public void getRole(AccessibleControlEvent e) { e.detail = ACC.ROLE_LABEL; } public void getState(AccessibleControlEvent e) { e.detail = ACC.STATE_READONLY; } public void getValue(AccessibleControlEvent e) { e.result = getText(); } });} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/e181b6e9188cddf2a587544c0109556e814864e2/CLabel.java/clean/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
1208,
10451,
1435,
288,
202,
10451,
12718,
273,
336,
10451,
5621,
202,
26037,
18,
1289,
10451,
2223,
12,
2704,
5016,
1523,
4216,
1435,
288,
202,
202,
482,
918,
1723,
12,
10451,
1133,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1208,
10451,
1435,
288,
202,
10451,
12718,
273,
336,
10451,
5621,
202,
26037,
18,
1289,
10451,
2223,
12,
2704,
5016,
1523,
4216,
1435,
288,
202,
202,
482,
918,
1723,
12,
10451,
1133,
... |
btnGridlines = createToggleButton( cmp, popup.getTitle( ), popup ); | Button btnGridlines = createToggleButton( cmp, popup.getTitle( ), popup ); | private void createButtonGroup( Composite parent ) { Composite cmp = new Composite( parent, SWT.NONE ); { cmp.setLayout( new GridLayout( 5, false ) ); GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); gridData.horizontalSpan = 2; gridData.grabExcessVerticalSpace = true; gridData.verticalAlignment = SWT.END; cmp.setLayoutData( gridData ); } ITaskPopupSheet popup = new AxisScaleSheet( Messages.getString( "AxisYSheetImpl.Label.Scale" ), //$NON-NLS-1$ getContext( ), getAxisForProcessing( ) ); btnScale = createToggleButton( cmp, popup.getTitle( ), popup ); btnScale.addSelectionListener( this ); popup = new AxisTextSheet( Messages.getString( "AxisYSheetImpl.Label.TextFormat" ), //$NON-NLS-1$ getContext( ), getAxisForProcessing( ), getAxisAngleType( ) ); btnAxisTitle = createToggleButton( cmp, popup.getTitle( ), popup ); btnAxisTitle.addSelectionListener( this ); popup = new AxisGridLinesSheet( Messages.getString( "AxisYSheetImpl.Label.Gridlines" ), //$NON-NLS-1$ getContext( ), getAxisForProcessing( ), getAxisAngleType( ) ); btnGridlines = createToggleButton( cmp, popup.getTitle( ), popup ); btnGridlines.addSelectionListener( this ); // Marker is not supported for 3D popup = new AxisMarkersSheet( Messages.getString( "AxisYSheetImpl.Label.Markers" ), //$NON-NLS-1$ getContext( ), getAxisForProcessing( ) ); btnMarkers = createToggleButton( cmp, popup.getTitle( ), popup ); btnMarkers.addSelectionListener( this ); btnMarkers.setEnabled( !ChartUIUtil.is3DType( getChart( ) ) ); // Interactivity popup = new InteractivitySheet( Messages.getString( "SeriesYSheetImpl.Label.Interactivity" ), //$NON-NLS-1$ getContext( ), getAxisForProcessing( ).getTriggers( ), false, true ); btnInteractivity = createToggleButton( cmp, popup.getTitle( ), popup ); btnInteractivity.addSelectionListener( this ); btnInteractivity.setEnabled( getChart( ).getInteractivity( ).isEnable( ) ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/b7743b34e1d4aa062c44ee59a8b7377b982d9960/AbstractAxisSubtask.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/axis/AbstractAxisSubtask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
3616,
1114,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
9411,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
9625,
18,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
3616,
1114,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
9411,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
9625,
18,
542,
... |
asmArg.emitSTAddr(REGISTER_ZERO, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; spillOffsetVM+=BYTES_IN_STACKSLOT; | asmArg.emitSTAddr(REGISTER_ZERO, spillOffsetAIX - BYTES_IN_ADDRESS, FP); | private static void storeParametersForAIX(VM_Assembler asm, int frameSize, VM_Method method, VM_Class klass) { int nextAIXArgReg, nextAIXArgFloatReg, nextVMArgReg, nextVMArgFloatReg; // offset to the spill area in the callee (AIX frame): // skip past the 2 arguments to be added in front: JNIenv and class or object pointer int spillOffsetAIX = NATIVE_FRAME_HEADER_SIZE + 2*BYTES_IN_STACKSLOT; // offset to the spill area in the caller (RVM frame), relative to the callee's FP int spillOffsetVM = frameSize + STACKFRAME_HEADER_SIZE; VM_TypeReference[] types = method.getParameterTypes(); // does NOT include implicit this or class ptr int numArguments = types.length; // number of arguments for this method // Set up the Reference table for GC // PR <- JREFS array base asm.emitLAddr(PROCESSOR_REGISTER, VM_Entrypoints.JNIRefsField.getOffset(), S0); // TI <- JREFS current top asm.emitLInt(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); // JREFS offset for current TOP asm.emitADD(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG); // convert into address // TODO - count number of refs // TODO - emit overflow check for JNIRefs array // start a new JNIRefs frame on each transition from Java to native C // push current SavedFP ptr onto top of JNIRefs stack (use available S1 reg as a temp) // and make current TOP the new savedFP // asm.emitLInt (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); asm.emitSTWU (S1, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // push prev frame ptr onto JNIRefs array asm.emitSUBFC(S1, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset for new TOP asm.emitSTW (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // save new TOP as new frame ptr in JNIEnv // for static methods: caller has placed args in r3,r4,... // for non-static methods:"this" ptr is in r3, and args start in r4,r5,... // // for static methods: for nonstatic methods: // Java caller AIX callee Java caller AIX callee // ----------- ---------- ----------- ---------- // spill = arg11 -> new spill spill = arg11 -> new spill // spill = arg10 -> new spill spill = arg10 -> new spill // spill = arg9 -> new spill // spill = arg9 -> new spill // spill = arg8 -> new spill spill = arg8 -> new spill // R10 = arg7 -> new spill spill = arg7 -> new spill // R9 = arg6 -> new spill R10 = arg6 -> new spill // // R8 = arg5 -> R10 R9 = arg5 -> R10 // R7 = arg4 -> R9 R8 = arg4 -> R9 // R6 = arg3 -> R8 R7 = arg3 -> R8 // R5 = arg2 -> R7 R6 = arg2 -> R7 // R4 = arg1 -> R6 R5 = arg1 -> R6 // R3 = arg0 -> R5 R4 = arg0 -> R5 // R4 = class R3 = this -> R4 // R3 = JNIenv R3 = JNIenv // nextAIXArgFloatReg = FIRST_OS_PARAMETER_FPR; nextVMArgFloatReg = FIRST_VOLATILE_FPR; nextAIXArgReg = FIRST_OS_PARAMETER_GPR + 2; // 1st reg = JNIEnv, 2nd reg = class if (method.isStatic()) { nextVMArgReg = FIRST_VOLATILE_GPR; } else { nextVMArgReg = FIRST_VOLATILE_GPR+1; // 1st reg = this, to be processed separately } // The loop below assumes the following relationship: if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_FPR==FIRST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_FPR<=LAST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_GPR==FIRST_VOLATILE_GPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_GPR<=LAST_VOLATILE_GPR); // create one VM_Assembler object for each argument // This is needed for the following reason: // -2 new arguments are added in front for native methods, so the normal arguments // need to be shifted down in addition to being moved // -to avoid overwriting each other, the arguments must be copied in reverse order // -the analysis for mapping however must be done in forward order // -the moving/mapping for each argument may involve a sequence of 1-3 instructions // which must be kept in the normal order // To solve this problem, the instructions for each argument is generated in its // own VM_Assembler in the forward pass, then in the reverse pass, each VM_Assembler // emist the instruction sequence and copies it into the main VM_Assembler VM_Assembler[] asmForArgs = new VM_Assembler[numArguments]; for (int arg = 0; arg < numArguments; arg++) { boolean mustSaveFloatToSpill; asmForArgs[arg] = new VM_Assembler(0); VM_Assembler asmArg = asmForArgs[arg]; // For 32-bit float arguments // if (types[arg].isFloatType()) { // Side effect of float arguments on the GPR's // (1a) reserve one GPR for each float if it is available if (nextAIXArgReg<=LAST_OS_PARAMETER_GPR) { nextAIXArgReg++; mustSaveFloatToSpill = false; } else { // (1b) if GPR has spilled, store the float argument in the callee spill area // regardless of whether the FPR has spilled or not mustSaveFloatToSpill = true; } // Check if the args need to be moved // (2a) leave those in FPR[1:13] as is unless the GPR has spilled if (nextVMArgFloatReg<=LAST_OS_PARAMETER_FPR) { if (mustSaveFloatToSpill) { asmArg.emitSTFS(nextVMArgFloatReg, spillOffsetAIX, FP); } spillOffsetAIX+=BYTES_IN_STACKSLOT; nextAIXArgFloatReg++; nextVMArgFloatReg++; } else if (nextVMArgFloatReg<=LAST_VOLATILE_FPR) { // (2b) run out of FPR in AIX, but still have 2 more FPR in VM, // so FPR[14:15] goes to the callee spill area asmArg.emitSTFS(nextVMArgFloatReg, spillOffsetAIX, FP); nextVMArgFloatReg++; spillOffsetAIX+=BYTES_IN_STACKSLOT; } else { // (2c) run out of FPR in VM, now get the remaining args from the caller spill area // and move them into the callee spill area spillOffsetVM+=BYTES_IN_STACKSLOT; asmArg.emitLFS(FIRST_SCRATCH_FPR, spillOffsetVM - BYTES_IN_FLOAT, FP); //Kris Venstermans: Attention, different calling convention !! asmArg.emitSTFS(FIRST_SCRATCH_FPR, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; } } else if (types[arg].isDoubleType()) { // For 64-bit float arguments if (VM.BuildFor64Addr) { // Side effect of float arguments on the GPR's // (1a) reserve one GPR for double if (nextAIXArgReg<=LAST_OS_PARAMETER_GPR) { nextAIXArgReg++; mustSaveFloatToSpill = false; } else { // (1b) if GPR has spilled, store the float argument in the callee spill area // regardless of whether the FPR has spilled or not mustSaveFloatToSpill = true; } } else { // Side effect of float arguments on the GPR's // (1a) reserve two GPR's for double if (nextAIXArgReg<=LAST_OS_PARAMETER_GPR-1) { nextAIXArgReg+=2; mustSaveFloatToSpill = false; } else { // if only one GPR is left, reserve it anyway although it won't be used if (nextAIXArgReg<=LAST_OS_PARAMETER_GPR) nextAIXArgReg++; mustSaveFloatToSpill = true; } } // Check if the args need to be moved // (2a) leave those in FPR[1:13] as is unless the GPR has spilled if (nextVMArgFloatReg<=LAST_OS_PARAMETER_FPR) { if (mustSaveFloatToSpill) { asmArg.emitSTFD(nextVMArgFloatReg, spillOffsetAIX, FP); } spillOffsetAIX+=BYTES_IN_DOUBLE; //Kris Venstermans: equals 2 slots on 32-bit platforms and 1 slot on 64-bit platform nextAIXArgFloatReg++; nextVMArgFloatReg++; } else if (nextVMArgFloatReg<=LAST_VOLATILE_FPR) { // (2b) run out of FPR in AIX, but still have 2 more FPR in VM, // so FPR[14:15] goes to the callee spill area asmArg.emitSTFD(nextVMArgFloatReg, spillOffsetAIX, FP); nextVMArgFloatReg++; spillOffsetAIX+=BYTES_IN_DOUBLE; } else { // (2c) run out of FPR in VM, now get the remaining args from the caller spill area // and move them into the callee spill area asmArg.emitLFD(FIRST_SCRATCH_FPR, spillOffsetVM , FP); asmArg.emitSTFD(FIRST_SCRATCH_FPR, spillOffsetAIX, FP); spillOffsetAIX+= BYTES_IN_DOUBLE; spillOffsetVM+=BYTES_IN_DOUBLE; } } else if (VM.BuildFor32Addr && types[arg].isLongType()) { // For 64-bit int arguments on 32-bit platforms // // (1a) fit in AIX register, move the pair if (nextAIXArgReg<=LAST_OS_PARAMETER_GPR-1) { asmArg.emitMR(nextAIXArgReg+1, nextVMArgReg+1); // move lo-word first asmArg.emitMR(nextAIXArgReg, nextVMArgReg); // so it doesn't overwritten nextAIXArgReg+=2; nextVMArgReg+=2; spillOffsetAIX+=2*BYTES_IN_STACKSLOT; } else if (nextAIXArgReg==LAST_OS_PARAMETER_GPR && nextVMArgReg<=LAST_VOLATILE_GPR-1) { // (1b) fit in VM register but straddle across AIX register/spill spillOffsetAIX+=BYTES_IN_STACKSLOT; asmArg.emitSTW(nextVMArgReg+1, spillOffsetAIX, FP); // move lo-word first spillOffsetAIX+=BYTES_IN_STACKSLOT; // so it doesn't overwritten asmArg.emitMR(nextAIXArgReg, nextVMArgReg); nextAIXArgReg+=2; nextVMArgReg+=2; } else if (nextAIXArgReg>LAST_OS_PARAMETER_GPR && nextVMArgReg<=LAST_VOLATILE_GPR-1) { // (1c) fit in VM register, spill in AIX without straddling register/spill asmArg.emitSTW(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; asmArg.emitSTW(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; } else if (nextVMArgReg==LAST_VOLATILE_GPR) { // (1d) split across VM/spill, spill in AIX asmArg.emitSTW(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; asmArg.emitLWZ(REGISTER_ZERO, spillOffsetVM , FP); asmArg.emitSTW(REGISTER_ZERO, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; spillOffsetVM+=BYTES_IN_STACKSLOT; } else { // (1e) spill both in VM and AIX asmArg.emitLFD(FIRST_SCRATCH_FPR, spillOffsetVM, FP); asmArg.emitSTFD(FIRST_SCRATCH_FPR, spillOffsetAIX, FP); spillOffsetAIX+=2*BYTES_IN_STACKSLOT; spillOffsetVM+=2*BYTES_IN_STACKSLOT; } } else if (types[arg].isReferenceType() ) { // For reference type, replace with handlers before passing to AIX // // (1a) fit in AIX register, move the register if (nextAIXArgReg<=LAST_OS_PARAMETER_GPR) { asmArg.emitSTAddrU(nextVMArgReg++, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append ref to end of JNIRefs array asmArg.emitSUBFC(nextAIXArgReg++, PROCESSOR_REGISTER, KLUDGE_TI_REG); // pass offset in bytes of jref spillOffsetAIX+=BYTES_IN_STACKSLOT; } else if (nextVMArgReg<=LAST_VOLATILE_GPR) { // (1b) spill AIX register, but still fit in VM register asmArg.emitSTAddrU(nextVMArgReg++, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append ref to end of JNIRefs array asmArg.emitSUBFC(REGISTER_ZERO, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset in bytes for jref asmArg.emitSTAddr(REGISTER_ZERO, spillOffsetAIX, FP); // spill into AIX frame spillOffsetAIX+=BYTES_IN_STACKSLOT; } else { // (1c) spill VM register asmArg.emitLAddr(REGISTER_ZERO, spillOffsetVM , FP); // retrieve arg from VM spill area asmArg.emitSTAddrU(REGISTER_ZERO, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append ref to end of JNIRefs array asmArg.emitSUBFC(REGISTER_ZERO, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset in bytes for jref asmArg.emitSTAddr(REGISTER_ZERO, spillOffsetAIX, FP); // spill into AIX frame spillOffsetAIX+=BYTES_IN_STACKSLOT; spillOffsetVM+=BYTES_IN_STACKSLOT; } } else { // For all other types: int, short, char, byte, boolean ( and long on 64-bit platform) // (1a) fit in AIX register, move the register if (nextAIXArgReg<=LAST_OS_PARAMETER_GPR) { asmArg.emitMR(nextAIXArgReg++, nextVMArgReg++); spillOffsetAIX+=BYTES_IN_STACKSLOT; } // (1b) spill AIX register, but still fit in VM register else if (nextVMArgReg<=LAST_VOLATILE_GPR) { asmArg.emitSTAddr(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; } else { // (1c) spill VM register asmArg.emitLAddr(REGISTER_ZERO,spillOffsetVM, FP); // retrieve arg from VM spill area asmArg.emitSTAddr(REGISTER_ZERO, spillOffsetAIX, FP); spillOffsetAIX+=BYTES_IN_STACKSLOT; spillOffsetVM+=BYTES_IN_STACKSLOT; } } } // Append the code sequences for parameter mapping // to the current machine code in reverse order // so that the move does not overwrite the parameters for (int arg = numArguments-1; arg >= 0; arg--) { VM_MachineCode codeForArg = asmForArgs[arg].makeMachineCode(); asm.appendInstructions(codeForArg.getInstructions()); } // Now add the 2 new JNI parameters: JNI environment and Class or "this" object // if static method, append ref for class, else append ref for "this" // and pass offset in JNIRefs array in r4 (as second arg to called native code) if (method.isStatic()) { klass.getClassForType(); // ensure the Java class object is created // JTOC saved above in JNIEnv is still valid, used by following emitLWZtoc asm.emitLAddrToc( 4, klass.getTibOffset() ); // r4 <- class TIB ptr from jtoc asm.emitLAddr( 4, 0, 4 ); // r4 <- first TIB entry == -> class object asm.emitLAddr( 4, VM_Entrypoints.classForTypeField.getOffset(), 4 ); // r4 <- java Class for this VM_Class asm.emitSTAddrU ( 4, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append class ptr to end of JNIRefs array asm.emitSUBFC( 4, PROCESSOR_REGISTER, KLUDGE_TI_REG); // pass offset in bytes } else { asm.emitSTAddrU ( 3, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append this ptr to end of JNIRefs array asm.emitSUBFC( 4, PROCESSOR_REGISTER, KLUDGE_TI_REG); // pass offset in bytes } // store the new JNIRefs array TOP back into JNIEnv asm.emitSUBFC(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset for the current TOP asm.emitSTW(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/67d25b2c1438934ab57dab085ea0bc42cb3a1a43/VM_JNICompiler.java/clean/rvm/src/vm/arch/powerPC/jni/VM_JNICompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1707,
2402,
1290,
37,
12507,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
9944,
565,
509,
2623,
1225,
16,
9944,
565,
8251,
67,
1305,
707,
16,
8251,
67,
797,
7352,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1707,
2402,
1290,
37,
12507,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
9944,
565,
509,
2623,
1225,
16,
9944,
565,
8251,
67,
1305,
707,
16,
8251,
67,
797,
7352,
13,
288,
... |
handlePaint(event); | handleTraverse(event); | public void handleEvent(Event event) { handlePaint(event); } | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/8862e9074b4e4a9560de676a5074c8c48df6bb4d/StyledText.java/clean/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1640,
1133,
12,
1133,
871,
13,
288,
1082,
202,
4110,
12699,
12,
2575,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1640,
1133,
12,
1133,
871,
13,
288,
1082,
202,
4110,
12699,
12,
2575,
1769,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
catch(javax.swing.text.BadLocationException ble) { tooltip = null; /* just don't give a tool tip */ } finally { doc.releaseReadLock(); } setText(node.getUserObject().toString()); renderer = this; | public Component getTreeCellRendererComponent(JTree tree, Object value, boolean isSelected, boolean isExpanded, boolean leaf, int row, boolean hasFocus) { Component renderer = super.getTreeCellRendererComponent(tree, value, isSelected, isExpanded, leaf, row, hasFocus); if (renderer instanceof JComponent) { ((JComponent) renderer).setOpaque(false); } _setColors(renderer); // set tooltip String tooltip = null; if (leaf) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)value; if (node.getUserObject() instanceof RegionTreeUserObj) { @SuppressWarnings("unchecked") R r = ((RegionTreeUserObj<R>)(node.getUserObject())).region(); OpenDefinitionsDocument doc = r.getDocument(); doc.acquireReadLock(); try { int lnr = doc.getLineOfOffset(r.getStartOffset())+1; int startOffset = doc.getOffset(lnr-3); if (startOffset<0) { startOffset = 0; } int endOffset = doc.getOffset(lnr+3); if (endOffset<0) { endOffset = doc.getLength()-1; } // convert to HTML (i.e. < to < and > to > and newlines to <br>) String s = doc.getText(startOffset, endOffset-startOffset); // this highlights the actual region in red int rStart = r.getStartOffset()-startOffset; if (rStart<0) { rStart = 0; } int rEnd = r.getEndOffset()-startOffset; if (rEnd>s.length()) { rEnd = s.length(); } if ((rStart<=s.length()) && (rEnd>=rStart)) { String t1 = StringOps.encodeHTML(s.substring(0,rStart)); String t2 = StringOps.encodeHTML(s.substring(rStart,rEnd)); String t3 = StringOps.encodeHTML(s.substring(rEnd)); s = t1 + "<font color=#ff0000>" + t2 + "</font>" + t3; } else { s = StringOps.encodeHTML(s); } tooltip = "<html><pre>"+s+"</pre></html>"; } catch(javax.swing.text.BadLocationException ble) { tooltip = null; /* just don't give a tool tip */ } finally { doc.releaseReadLock(); } setText(node.getUserObject().toString()); renderer = this; } } setToolTipText(tooltip); return renderer; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/b25e1764d5b4aa3e174628947c02047c67664960/RegionsTreePanel.java/buggy/drjava/src/edu/rice/cs/drjava/ui/RegionsTreePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5435,
15867,
4020,
6747,
1841,
12,
46,
2471,
2151,
16,
1033,
460,
16,
1250,
20956,
16,
1250,
353,
17957,
16,
4766,
10792,
1250,
7839,
16,
509,
1027,
16,
1250,
711,
9233,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5435,
15867,
4020,
6747,
1841,
12,
46,
2471,
2151,
16,
1033,
460,
16,
1250,
20956,
16,
1250,
353,
17957,
16,
4766,
10792,
1250,
7839,
16,
509,
1027,
16,
1250,
711,
9233,
13,
288,
... | |
public ListWindow (ListModule ownerModule) { super(ownerModule, true); equals = new MesquiteBoolean(defaultEquals); greaterThan = new MesquiteBoolean(defaultGT); lessThan = new MesquiteBoolean(defaultLT); withinExistingSelection = new MesquiteBoolean(defaultWithinSelection); setWindowSize(windowWidth, windowHeight); ownerModule.setModuleWindow(this); owner = ownerModule; int numItems = owner.getNumberOfRows(); table = new ListTable (numItems, 0, windowWidth, windowHeight, 130, this, ownerModule); setCurrentObject(owner.getMainObject()); collator = Collator.getInstance(); String selectExplanation = "Select items in table. If a single cell in the table is touched, and that cell is editable, then you will be given a little box in which you can edit the "; selectExplanation += "contents of the cell. By holding down shift while clicking, the selection will be extended from the first to the last touched cell. "; selectExplanation += " A block of cells can be selected either by using shift-click to extend a previous selection, or by clicking on a cell and dragging with the mouse button still down"; selectExplanation += " Discontinous selections are allowed, and can be obtained by a \"meta\"-click (right mouse button click, or command-click on a MacOS system). "; arrowTool = new TableTool(this, "arrow", MesquiteModule.getRootImageDirectoryPath(),"arrow.gif", 4,2,"Select", selectExplanation, null, null, null); arrowTool.setIsArrowTool(true); addTool(arrowTool); setCurrentTool(arrowTool); ibeamTool = new TableTool(this, "ibeam", MesquiteModule.getRootImageDirectoryPath(),"ibeam.gif", 7,7,"Edit", "This tool can be used to edit elements in the table.", MesquiteModule.makeCommand("editCell", (Commandable)table) , null, null); ibeamTool.setWorksOnRowNames(true); ibeamTool.setWorksOnMatrixPanel(false); addTool(ibeamTool); String wandExplanation = "Select rows in table according to whether they have the same value as the cell touched in that column. "; wandExplanation += "By holding down shift while clicking, the selection will be added to the previous selection. "; wandTool = new TableTool(this, "wand", MesquiteModule.getRootImageDirectoryPath(),"wand.gif", 4,4,"Select rows with same", wandExplanation, MesquiteModule.makeCommand("wandTouch", this) , null, null); wandTool.setOptionsCommand(MesquiteModule.makeCommand("wandOptions", this)); addTool(wandTool); if (owner.rowsMovable()){ String sortExplanation = "Sorts items (that is, rows) in table from lowest to highest values in the column touched. "; sortExplanation += "By holding down option while clicking, items will be sorted from highest to lowest. "; sortTool = new TableTool(this, "sort", MesquiteModule.getRootImageDirectoryPath(),"sort.gif", 4,4,"Sort rows", sortExplanation, MesquiteModule.makeCommand("sortTouch", this) , null, null); sortTool.setOptionImageFileName("revSort.gif", 8, 13); sortTool.setWorksOnRowNames(true); addTool(sortTool); } table.setColumnWidthsUniform(100); table.setUserAdjust(MesquiteTable.RESIZE, MesquiteTable.RESIZE); addToWindow(table); table.setVisible(true); table.setLocation(0,0); MesquiteMenuSpec acm = ownerModule.addAuxiliaryMenu("Columns"); MesquiteMenuItemSpec mss = ownerModule.addModuleMenuItems(acm, ownerModule.makeCommand("newAssistant", this), owner.getAssistantClass()); mss.setCompatibilityCheck(ownerModule.getAddColumnCompatibility()); if (columnsRemovable()){ ownerModule.addMenuItem(acm, "-", null); ownerModule.addMenuItem(acm, "Hide Selected Columns", ownerModule.makeCommand("deleteSelectedColumns", this)); } /*MesquiteSubmenuSpec mss = ownerModule.addSubmenu(null, "Show Column", ownerModule.makeCommand("newAssistant", this),owner.getAssistantClass()); mss.setCompatibilityCheck(ownerModule.getAddColumnCompatibility()); if (columnsRemovable()) ownerModule.addMenuItem( "Hide Selected Columns", ownerModule.makeCommand("deleteSelectedColumns", this)); */ if (owner.rowsAddable()) ownerModule.addMenuItem( "Add " + owner.getItemTypeNamePlural() + "...", ownerModule.makeCommand("addRows", this)); if (owner.rowsDeletable()) { ownerModule.addMenuItem( "Delete Selected " + owner.getItemTypeNamePlural(), deleteCommand = ownerModule.makeCommand("deleteSelectedRows", this)); MesquiteWindow.addKeyListener(this, this); } if (owner.rowsMovable()) { MesquiteMenuItemSpec mm = ownerModule.addMenuItem( "Move Selected " + owner.getItemTypeNamePlural() + " To...", ownerModule.makeCommand("moveSelectedTo", this)); mm.setShortcut(KeyEvent.VK_M); } setShowExplanation(true); setShowAnnotation(true); table.requestFocus(); MesquiteWindow.addKeyListener(this, table); resetTitle(); | public ListWindow () { | public ListWindow (ListModule ownerModule) { super(ownerModule, true); //INFOBAR equals = new MesquiteBoolean(defaultEquals); greaterThan = new MesquiteBoolean(defaultGT); lessThan = new MesquiteBoolean(defaultLT); withinExistingSelection = new MesquiteBoolean(defaultWithinSelection); setWindowSize(windowWidth, windowHeight); ownerModule.setModuleWindow(this); owner = ownerModule; int numItems = owner.getNumberOfRows(); table = new ListTable (numItems, 0, windowWidth, windowHeight, 130, this, ownerModule); setCurrentObject(owner.getMainObject()); collator = Collator.getInstance(); //TODO: note: strangely enough, the commands of the arrow tools are not used, since it uses default behavior of table String selectExplanation = "Select items in table. If a single cell in the table is touched, and that cell is editable, then you will be given a little box in which you can edit the "; selectExplanation += "contents of the cell. By holding down shift while clicking, the selection will be extended from the first to the last touched cell. "; selectExplanation += " A block of cells can be selected either by using shift-click to extend a previous selection, or by clicking on a cell and dragging with the mouse button still down"; selectExplanation += " Discontinous selections are allowed, and can be obtained by a \"meta\"-click (right mouse button click, or command-click on a MacOS system). "; arrowTool = new TableTool(this, "arrow", MesquiteModule.getRootImageDirectoryPath(),"arrow.gif", 4,2,"Select", selectExplanation, null, null, null); //MesquiteModule.makeCommand("arrowTouchCell", this) , MesquiteModule.makeCommand("arrowDragCell", this), MesquiteModule.makeCommand("arrowDropCell", this)); arrowTool.setIsArrowTool(true); addTool(arrowTool); setCurrentTool(arrowTool); ibeamTool = new TableTool(this, "ibeam", MesquiteModule.getRootImageDirectoryPath(),"ibeam.gif", 7,7,"Edit", "This tool can be used to edit elements in the table.", MesquiteModule.makeCommand("editCell", (Commandable)table) , null, null); ibeamTool.setWorksOnRowNames(true); ibeamTool.setWorksOnMatrixPanel(false); addTool(ibeamTool); String wandExplanation = "Select rows in table according to whether they have the same value as the cell touched in that column. "; wandExplanation += "By holding down shift while clicking, the selection will be added to the previous selection. "; wandTool = new TableTool(this, "wand", MesquiteModule.getRootImageDirectoryPath(),"wand.gif", 4,4,"Select rows with same", wandExplanation, MesquiteModule.makeCommand("wandTouch", this) , null, null); wandTool.setOptionsCommand(MesquiteModule.makeCommand("wandOptions", this)); addTool(wandTool); if (owner.rowsMovable()){ String sortExplanation = "Sorts items (that is, rows) in table from lowest to highest values in the column touched. "; sortExplanation += "By holding down option while clicking, items will be sorted from highest to lowest. "; sortTool = new TableTool(this, "sort", MesquiteModule.getRootImageDirectoryPath(),"sort.gif", 4,4,"Sort rows", sortExplanation, MesquiteModule.makeCommand("sortTouch", this) , null, null); sortTool.setOptionImageFileName("revSort.gif", 8, 13); sortTool.setWorksOnRowNames(true); addTool(sortTool); } //System.out.println("number of chars " + numItems); table.setColumnWidthsUniform(100); table.setUserAdjust(MesquiteTable.RESIZE, MesquiteTable.RESIZE); addToWindow(table); table.setVisible(true); table.setLocation(0,0); MesquiteMenuSpec acm = ownerModule.addAuxiliaryMenu("Columns"); MesquiteMenuItemSpec mss = ownerModule.addModuleMenuItems(acm, ownerModule.makeCommand("newAssistant", this), owner.getAssistantClass()); mss.setCompatibilityCheck(ownerModule.getAddColumnCompatibility()); if (columnsRemovable()){ ownerModule.addMenuItem(acm, "-", null); ownerModule.addMenuItem(acm, "Hide Selected Columns", ownerModule.makeCommand("deleteSelectedColumns", this)); } /*MesquiteSubmenuSpec mss = ownerModule.addSubmenu(null, "Show Column", ownerModule.makeCommand("newAssistant", this),owner.getAssistantClass()); mss.setCompatibilityCheck(ownerModule.getAddColumnCompatibility()); if (columnsRemovable()) ownerModule.addMenuItem( "Hide Selected Columns", ownerModule.makeCommand("deleteSelectedColumns", this)); */ //ownerModule.addMenuItem( "-", null); if (owner.rowsAddable()) ownerModule.addMenuItem( "Add " + owner.getItemTypeNamePlural() + "...", ownerModule.makeCommand("addRows", this)); if (owner.rowsDeletable()) { ownerModule.addMenuItem( "Delete Selected " + owner.getItemTypeNamePlural(), deleteCommand = ownerModule.makeCommand("deleteSelectedRows", this)); MesquiteWindow.addKeyListener(this, this); } if (owner.rowsMovable()) { MesquiteMenuItemSpec mm = ownerModule.addMenuItem( "Move Selected " + owner.getItemTypeNamePlural() + " To...", ownerModule.makeCommand("moveSelectedTo", this)); mm.setShortcut(KeyEvent.VK_M); } setShowExplanation(true); setShowAnnotation(true); table.requestFocus(); MesquiteWindow.addKeyListener(this, table); resetTitle(); } | 56479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56479/3ecea059b3577db56657224c5cecbccd44eb8f38/ListWindow.java/buggy/Source/mesquite/lists/lib/ListWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
3829,
261,
682,
3120,
3410,
3120,
13,
288,
202,
202,
9565,
12,
8443,
3120,
16,
638,
1769,
368,
5923,
21908,
202,
202,
14963,
273,
394,
490,
281,
372,
1137,
5507,
12,
1886... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
3829,
261,
682,
3120,
3410,
3120,
13,
288,
202,
202,
9565,
12,
8443,
3120,
16,
638,
1769,
368,
5923,
21908,
202,
202,
14963,
273,
394,
490,
281,
372,
1137,
5507,
12,
1886... |
if (player.getName() != client.getPlayerName()) | if (!player.getName().equals(client.getPlayerName())) | private void setupActions() { undoLastSplitAction = new AbstractAction(undoLastSplit) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } // peek at the undo stack so we know where to align String hexLabel = (String)Client.topUndoStack(); player.undoLastSplit(); alignLegions(hexLabel); highlightTallLegions(player); repaint(); } }; undoAllSplitsAction = new AbstractAction(undoAllSplits) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } // peek at the undo stack so we know where to align player.undoAllSplits(); alignAllLegions(); highlightTallLegions(player); repaint(); } }; doneWithSplitsAction = new AbstractAction(doneWithSplits) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } // Initial legions must be split. if (game.getTurnNumber() == 1 && player.getNumLegions() == 1) { JOptionPane.showMessageDialog(masterFrame, "Must split."); } else { game.advancePhase(); } } }; undoLastMoveAction = new AbstractAction(undoLastMove) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } player.undoLastMove(); highlightUnmovedLegions(); } }; undoAllMovesAction = new AbstractAction(undoAllMoves) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } player.undoAllMoves(); highlightUnmovedLegions(); } }; takeMulliganAction = new AbstractAction(takeMulligan) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } player.takeMulligan(); // Reroll movement die. Remove Take Mulligan option // if applicable. game.setupPhase(); } }; doneWithMovesAction = new AbstractAction(doneWithMoves) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } // If any legion has a legal non-teleport move, then the // player must move at least one legion. if (player.legionsMoved() == 0 && player.countMobileLegions() > 0) { highlightUnmovedLegions(); JOptionPane.showMessageDialog(masterFrame, "At least one legion must move."); } else { // If legions share a hex and have a legal non-teleport // move, force one of them to take it. if (player.splitLegionHasForcedMove()) { highlightUnmovedLegions(); JOptionPane.showMessageDialog(masterFrame, "Split legions must be separated."); } // Otherwise, recombine all split legions still in the // same hex, and move on to the next phase. else { player.undoAllSplits(); game.advancePhase(); } } } }; doneWithEngagementsAction = new AbstractAction(doneWithEngagements) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } // Advance only if there are no unresolved engagements. if (highlightEngagements() == 0) { game.advancePhase(); } else { JOptionPane.showMessageDialog(masterFrame, "Must Resolve Engagements."); } } }; undoLastRecruitAction = new AbstractAction(undoLastRecruit) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } player.undoLastRecruit(); highlightPossibleRecruits(); } }; undoAllRecruitsAction = new AbstractAction(undoAllRecruits) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } player.undoAllRecruits(); highlightPossibleRecruits(); } }; doneWithTurnAction = new AbstractAction(doneWithTurn) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } player.commitMoves(); // Mulligans are only allowed on turn 1. player.setMulligansLeft(0); game.advancePhase(); } }; // TODO Let inactive players withdraw from the game. withdrawFromGameAction = new AbstractAction(withdrawFromGame) { public void actionPerformed(ActionEvent e) { Player player = game.getActivePlayer(); if (player.getName() != client.getPlayerName()) { return; } String [] options = new String[2]; options[0] = "Yes"; options[1] = "No"; int answer = JOptionPane.showOptionDialog(masterFrame, "Are you sure you with to withdraw from the game?", "Confirm Withdrawal?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]); if (answer == JOptionPane.YES_OPTION) { player.die(null, true); game.advancePhase(); } } }; viewRecruitInfoAction = new AbstractAction(viewRecruitInfo) { public void actionPerformed(ActionEvent e) { GUIMasterHex hex = getHexContainingPoint(lastPoint); if (hex != null) { new ShowMasterHex(masterFrame, game, hex, lastPoint); // Work around a Windows JDK 1.3 bug. hex.repaint(); } } }; viewBattleMapAction = new AbstractAction(viewBattleMap) { public void actionPerformed(ActionEvent e) { GUIMasterHex hex = getHexContainingPoint(lastPoint); if (hex != null) { new ShowBattleMap(masterFrame, hex.getLabel()); // Work around a Windows JDK 1.3 bug. hex.repaint(); } } }; newGameAction = new AbstractAction(newGame) { public void actionPerformed(ActionEvent e) { String [] options = new String[2]; options[0] = "Yes"; options[1] = "No"; int answer = JOptionPane.showOptionDialog(masterFrame, "Are you sure you with to start a new game?", "New Game?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]); if (answer == JOptionPane.YES_OPTION) { game.newGame(); } } }; loadGameAction = new AbstractAction(loadGame) { public void actionPerformed(ActionEvent e) { String [] options = new String[2]; options[0] = "Yes"; options[1] = "No"; int answer = JOptionPane.showOptionDialog(masterFrame, "Are you sure you with to load another game?", "Load Game?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]); if (answer == JOptionPane.YES_OPTION) { JFileChooser chooser = new JFileChooser(Game.saveDirname); chooser.setFileFilter(new SaveGameFilter()); int returnVal = chooser.showOpenDialog(masterFrame); if (returnVal == JFileChooser.APPROVE_OPTION) { game.loadGame(chooser.getSelectedFile().getName()); } } } }; saveGameAction = new AbstractAction(saveGame) { public void actionPerformed(ActionEvent e) { // XXX Offer the ability to re-use a save filename, // rather than always making a new one? game.saveGame(); } }; saveGameAsAction = new AbstractAction(saveGameAs) { // XXX Need a confirmation dialog on overwrite? public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(Game.saveDirname); chooser.setFileFilter(new SaveGameFilter()); int returnVal = chooser.showSaveDialog(masterFrame); if (returnVal == JFileChooser.APPROVE_OPTION) { String dirname = chooser.getCurrentDirectory().getName(); String basename = chooser.getSelectedFile().getName(); StringBuffer path = new StringBuffer(); path.append(dirname); path.append(File.separator); path.append(basename); // Add default savegame extension. if (!path.toString().endsWith(Game.saveExtension)) { path.append(Game.saveExtension); } game.saveGame(path.toString()); } } }; saveOptionsAction = new AbstractAction(saveOptions) { public void actionPerformed(ActionEvent e) { client.saveOptions(); } }; quitGameAction = new AbstractAction(quitGame) { public void actionPerformed(ActionEvent e) { String [] options = new String[2]; options[0] = "Yes"; options[1] = "No"; int answer = JOptionPane.showOptionDialog(masterFrame, "Are you sure you with to quit?", "Quit Game?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]); if (answer == JOptionPane.YES_OPTION) { game.dispose(); } } }; changeScaleAction = new AbstractAction(changeScale) { public void actionPerformed(ActionEvent e) { final int oldScale = Scale.get(); final int newScale = PickScale.pickScale(masterFrame, oldScale); if (newScale != oldScale && newScale != -1) { Scale.set(newScale); client.rescaleAllWindows(); } } }; } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/5e69df65648ef05d9048794b8368383e131bba86/MasterBoard.java/clean/Colossus/MasterBoard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
6100,
1435,
565,
288,
3639,
15436,
3024,
5521,
1803,
273,
394,
4115,
1803,
12,
31226,
3024,
5521,
13,
3639,
288,
5411,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
5411,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
6100,
1435,
565,
288,
3639,
15436,
3024,
5521,
1803,
273,
394,
4115,
1803,
12,
31226,
3024,
5521,
13,
3639,
288,
5411,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
5411,
28... |
Object value = argumentsProperty; if (value != null) { | Object value = defaultGet("arguments"); if (value != NOT_FOUND) { | private Object getArguments() { // <Function name>.arguments is deprecated, so we use a slow // way of getting it that doesn't add to the invocation cost. // TODO: add warning, error based on version Object value = argumentsProperty; if (value != null) { // Should after changing <Function name>.arguments its // activation still be available during Function call? // This code assumes it should not: argumentsProperty != null // means assigned or delete arguments return (value == UniqueTag.NULL_VALUE) ? null : value; } Context cx = Context.getContext(); NativeCall activation = ScriptRuntime.findFunctionActivation(cx, this); return (activation == null) ? null : activation.get("arguments", activation); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/993454366a57fd32ee051c61ff3a0658292d84f2/BaseFunction.java/buggy/js/rhino/src/org/mozilla/javascript/BaseFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
17839,
1435,
565,
288,
1377,
368,
411,
2083,
508,
18652,
7099,
353,
6849,
16,
1427,
732,
999,
279,
11816,
1377,
368,
4031,
434,
8742,
518,
716,
3302,
1404,
527,
358,
326,
9495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
17839,
1435,
565,
288,
1377,
368,
411,
2083,
508,
18652,
7099,
353,
6849,
16,
1427,
732,
999,
279,
11816,
1377,
368,
4031,
434,
8742,
518,
716,
3302,
1404,
527,
358,
326,
9495... |
String name = f.argNames[slot]; activation.put(name, activation, value); | String name = state.fnOrScript.argNames[slot]; Scriptable scope = state.scope; scope.put(name, scope, value); | private static void activationPut(NativeFunction f, Scriptable activation, int slot, Object value) { String name = f.argNames[slot]; activation.put(name, activation, value); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/199b043221701f9744538a048390c041bd370c5f/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
10027,
6426,
12,
9220,
2083,
284,
16,
4766,
1377,
22780,
10027,
16,
509,
4694,
16,
4766,
1377,
1033,
460,
13,
565,
288,
3639,
514,
508,
273,
284,
18,
3175,
1557,
63,
141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
10027,
6426,
12,
9220,
2083,
284,
16,
4766,
1377,
22780,
10027,
16,
509,
4694,
16,
4766,
1377,
1033,
460,
13,
565,
288,
3639,
514,
508,
273,
284,
18,
3175,
1557,
63,
141... |
this.historyImpl = historyImpl; } | this.historyImpl = historyImpl; } | protected HistoryReaderImpl(HistoryImpl historyImpl) { this.historyImpl = historyImpl; } | 27035 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27035/dd511f0f97892bf31dc2a7a1989480bf6b6b5308/HistoryReaderImpl.java/buggy/src/net/java/sip/communicator/impl/history/HistoryReaderImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
16058,
2514,
2828,
12,
5623,
2828,
4927,
2828,
13,
288,
202,
202,
2211,
18,
8189,
2828,
273,
4927,
2828,
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,
0,
0,
0,
0,
0,
0,
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,
1117,
16058,
2514,
2828,
12,
5623,
2828,
4927,
2828,
13,
288,
202,
202,
2211,
18,
8189,
2828,
273,
4927,
2828,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if(deleted == 0 || dontCheck) break; | if((deleted == 0) || dontCheck) break; | private void maybeShrink(boolean dontCheck) throws DatabaseException, IOException { Transaction t = null; try { // long's are not atomic. long maxBlocks; long curBlocks; synchronized(this) { maxBlocks = maxChkBlocks; curBlocks = chkBlocksInStore; if(maxBlocks >= curBlocks) return; } System.err.println("Shrinking store: "+curBlocks+" -> "+maxBlocks); Logger.error(this, "Shrinking store: "+curBlocks+" -> "+maxBlocks); while(true) { t = environment.beginTransaction(null,null); long deleted = 0; for(long i=curBlocks-1;i>=maxBlocks;i--) { // Delete the block with this blocknum. Long blockNo = new Long(i); DatabaseEntry blockNumEntry = new DatabaseEntry(); longTupleBinding.objectToEntry(blockNo, blockNumEntry); OperationStatus result = chkDB_blockNum.delete(t, blockNumEntry); if(result.equals(OperationStatus.SUCCESS)) deleted++; synchronized(this) { maxBlocks = maxChkBlocks; curBlocks = chkBlocksInStore; if(maxBlocks >= curBlocks) return; } } t.commit(); System.err.println("Deleted "+deleted+" keys"); t = null; if(deleted == 0 || dontCheck) break; else { System.err.println("Checking..."); synchronized(this) { maxBlocks = maxChkBlocks; curBlocks = chkBlocksInStore; if(maxBlocks >= curBlocks) return; } } } chkStore.setLength(maxChkBlocks * (dataBlockSize + headerBlockSize)); chkBlocksInStore = maxChkBlocks; System.err.println("Successfully shrunk store to "+chkBlocksInStore); } finally { if(t != null) t.abort(); } } | 50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/BerkeleyDBFreenetStore.java/clean/src/freenet/store/BerkeleyDBFreenetStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6944,
28747,
12,
6494,
14046,
1564,
13,
1216,
27215,
16,
1860,
288,
202,
202,
3342,
268,
273,
446,
31,
202,
202,
698,
288,
1082,
202,
759,
1525,
1807,
854,
486,
7960,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6944,
28747,
12,
6494,
14046,
1564,
13,
1216,
27215,
16,
1860,
288,
202,
202,
3342,
268,
273,
446,
31,
202,
202,
698,
288,
1082,
202,
759,
1525,
1807,
854,
486,
7960,
18... |
return MOVE_REDUCED; | return DefUseEffect.MOVE_REDUCED; | private static byte intOr(OPT_Instruction s) { if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op1 = Binary.getVal1(s); OPT_Operand op2 = Binary.getVal2(s); if (op1.similar(op2)) { // THE SAME OPERAND: x | x == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return op1.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; 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; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/eb4369b6f8fdd0cd15c56bc3cbfa8673171db226/OPT_Simplifier.java/clean/rvm/src/com/ibm/jikesrvm/opt/OPT_Simplifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
509,
1162,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
3217,
13,
288,
1377,
25839,
799,
10735,
1535,
5592,
12,
87,
1769,
1377,
16456,
67,
10265,
1061,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
509,
1162,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
3217,
13,
288,
1377,
25839,
799,
10735,
1535,
5592,
12,
87,
1769,
1377,
16456,
67,
10265,
1061,
... |
ContentHandler contentHandler = (ContentHandler) contentHandlers[i]; | ContentHandler contentHandler = contentHandlers[i]; | public void endPrefixMapping(String prefix) throws SAXException { for (int i = 0; i < contentHandlers.length; i++) { ContentHandler contentHandler = (ContentHandler) contentHandlers[i]; contentHandler.endPrefixMapping(prefix); } } | 51410 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51410/d8c5174f7bb62208ddf12b8a1e2b8283bbea61a6/TeeContentHandler.java/buggy/src/java/org/orbeon/oxf/xml/TeeContentHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
2244,
3233,
12,
780,
1633,
13,
1216,
14366,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
913,
6919,
18,
2469,
31,
277,
27245,
288,
5411,
3697,
1503,
913,
1503,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
679,
2244,
3233,
12,
780,
1633,
13,
1216,
14366,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
913,
6919,
18,
2469,
31,
277,
27245,
288,
5411,
3697,
1503,
913,
1503,... |
Node exn = createNewLocal(new Node(Token.VOID)); | Node exn = createNewLocal(new Node(Token.EMPTY)); | public Object createTryCatchFinally(Object tryblock, Object catchblocks, Object finallyblock, int lineno) { Node trynode = (Node)tryblock; boolean hasFinally = false; Node finallyNode = null; if (finallyblock != null) { finallyNode = (Node)finallyblock; hasFinally = (finallyNode.getType() != Token.BLOCK || finallyNode.hasChildren()); } // short circuit if (trynode.getType() == Token.BLOCK && !trynode.hasChildren() && !hasFinally) { return trynode; } Node catchNodes = (Node)catchblocks; boolean hasCatch = catchNodes.hasChildren(); // short circuit if (!hasFinally && !hasCatch) { // bc finally might be an empty block... return trynode; } Node pn = new Node(Token.TRY, trynode, lineno); Node finallyTarget = null; if (hasFinally) { // make a TARGET for the finally that the tcf node knows about finallyTarget = new Node(Token.TARGET); pn.putProp(Node.FINALLY_PROP, finallyTarget); // add jsr finally to the try block Node jsrFinally = new Node(Token.JSR); jsrFinally.putProp(Node.TARGET_PROP, finallyTarget); pn.addChildToBack(jsrFinally); } Node endTarget = new Node(Token.TARGET); Node GOTOToEnd = new Node(Token.GOTO); GOTOToEnd.putProp(Node.TARGET_PROP, endTarget); pn.addChildToBack(GOTOToEnd); if (hasCatch) { /* * Given try { throw 3; } catch (e: e instanceof Object) { print("object"); } catch (e2) { print(e2); } rewrite as try { throw 3; } catch (x) { o = newScope(); o.e = x; with (o) { if (e instanceof Object) { print("object"); } } o2 = newScope(); o2.e2 = x; with (o2) { if (true) { print(e2); } } } */ // make a TARGET for the catch that the tcf node knows about Node catchTarget = new Node(Token.TARGET); pn.putProp(Node.TARGET_PROP, catchTarget); // mark it pn.addChildToBack(catchTarget); // get the exception object and store it in a temp Node exn = createNewLocal(new Node(Token.VOID)); pn.addChildToBack(new Node(Token.POP, exn)); Node endCatch = new Node(Token.TARGET); // add [jsr finally?] goto end to each catch block // expects catchNode children to be (cond block) pairs. Node cb = catchNodes.getFirstChild(); while (cb != null) { Node catchStmt = new Node(Token.BLOCK); int catchLineNo = cb.getLineno(); Node name = cb.getFirstChild(); Node cond = name.getNext(); Node catchBlock = cond.getNext(); cb.removeChild(name); cb.removeChild(cond); cb.removeChild(catchBlock); Node newScope = createNewLocal(new Node(Token.NEWSCOPE)); Node initScope = new Node(Token.SETPROP, newScope, Node.newString( name.getString()), createUseLocal(exn)); catchStmt.addChildToBack(new Node(Token.POP, initScope)); catchBlock.addChildToBack(new Node(Token.LEAVEWITH)); Node GOTOToEndCatch = new Node(Token.GOTO); GOTOToEndCatch.putProp(Node.TARGET_PROP, endCatch); catchBlock.addChildToBack(GOTOToEndCatch); Node ifStmt = (Node) createIf(cond, catchBlock, null, catchLineNo); // Try..catch produces "with" code in order to limit // the scope of the exception object. // OPT: We should be able to figure out the correct // scoping at compile-time and avoid the // runtime overhead. Node withStmt = (Node) createWith(createUseLocal(newScope), ifStmt, catchLineNo); catchStmt.addChildToBack(withStmt); pn.addChildToBack(catchStmt); // move to next cb cb = cb.getNext(); } // Generate code to rethrow if no catch clause was executed Node rethrow = new Node(Token.THROW, createUseLocal(exn)); pn.addChildToBack(rethrow); pn.addChildToBack(endCatch); // add a JSR finally if needed if (hasFinally) { Node jsrFinally = new Node(Token.JSR); jsrFinally.putProp(Node.TARGET_PROP, finallyTarget); pn.addChildToBack(jsrFinally); Node GOTO = new Node(Token.GOTO); GOTO.putProp(Node.TARGET_PROP, endTarget); pn.addChildToBack(GOTO); } } if (hasFinally) { pn.addChildToBack(finallyTarget); Node returnTemp = createNewLocal(new Node(Token.VOID)); Node popAndMake = new Node(Token.POP, returnTemp); pn.addChildToBack(popAndMake); pn.addChildToBack(finallyNode); Node ret = createUseLocal(returnTemp); // add the magic prop that makes it output a RET ret.putProp(Node.TARGET_PROP, Boolean.TRUE); pn.addChildToBack(ret); } pn.addChildToBack(endTarget); return pn; } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/5bb0de51f4eb37ef1f776e50a739fa69b125b9db/IRFactory.java/buggy/src/org/mozilla/javascript/IRFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
752,
7833,
14842,
29987,
12,
921,
775,
2629,
16,
1033,
1044,
7996,
16,
4766,
3639,
1033,
3095,
2629,
16,
509,
7586,
13,
565,
288,
3639,
2029,
775,
2159,
273,
261,
907,
13,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
752,
7833,
14842,
29987,
12,
921,
775,
2629,
16,
1033,
1044,
7996,
16,
4766,
3639,
1033,
3095,
2629,
16,
509,
7586,
13,
565,
288,
3639,
2029,
775,
2159,
273,
261,
907,
13,
6... |
debug(">findUser("+username+")"); | debug(">findUser(" + username + ")"); | public UserAdminData findUser(Admin admin, String username) throws FinderException, AuthorizationDeniedException { debug(">findUser("+username+")"); UserDataPK pk = new UserDataPK(username); UserDataLocal data; try { data = home.findByPrimaryKey(pk); } catch (ObjectNotFoundException oe) { return null; } if(!authorizedToCA(admin, data.getCAId())){ throw new AuthorizationDeniedException("Administrator not authorized to view user with given CA."); } if(getGlobalConfiguration(admin).getEnableEndEntityProfileLimitations()){ // Check if administrator is authorized to view user. if(!authorizedToEndEntityProfile(admin, data.getEndEntityProfileId(), AvailableAccessRules.VIEW_RIGHTS)) throw new AuthorizationDeniedException("Administrator not authorized to view user."); } UserAdminData ret = new UserAdminData(data.getUsername(), data.getSubjectDN(), data.getCAId(), data.getSubjectAltName() ,data.getSubjectEmail(), data.getStatus() , data.getType(), data.getEndEntityProfileId(), data.getCertificateProfileId() , new java.util.Date(data.getTimeCreated()), new java.util.Date(data.getTimeModified()) , data.getTokenType(), data.getHardTokenIssuerId()); ret.setPassword(data.getClearPassword()); debug("<findUser("+username+")"); return ret; } // findUser | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/ccb0ad29d39a3f815cc97cd37d04cf533c4593c3/LocalUserAdminSessionBean.java/buggy/src/java/se/anatom/ejbca/ra/LocalUserAdminSessionBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2177,
4446,
751,
1104,
1299,
12,
4446,
3981,
16,
514,
2718,
13,
1216,
19307,
503,
16,
10234,
15877,
288,
3639,
1198,
2932,
34,
4720,
1299,
2932,
397,
2718,
397,
7310,
1769,
3639,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2177,
4446,
751,
1104,
1299,
12,
4446,
3981,
16,
514,
2718,
13,
1216,
19307,
503,
16,
10234,
15877,
288,
3639,
1198,
2932,
34,
4720,
1299,
2932,
397,
2718,
397,
7310,
1769,
3639,
31... |
finishVisit(query); | finishVisit( query ); | public void visitImageItem(ImageItemDesign image) { BaseQueryDefinition query = prepareVisit(image); handleAction(image.getAction()); if (image.getImageSource() == ImageItemDesign.IMAGE_EXPRESSION) { addExpression(image.getImageExpression()); addExpression(image.getImageFormat()); } finishVisit(query); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/457851dcc056d96f2ec05106ceba68d3c8f9162c/ReportQueryBuilder.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/ReportQueryBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3757,
2040,
1180,
12,
2040,
1180,
15478,
1316,
13,
288,
1082,
202,
2171,
1138,
1852,
843,
273,
2911,
10432,
12,
2730,
1769,
1082,
202,
4110,
1803,
12,
2730,
18,
588,
1803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3757,
2040,
1180,
12,
2040,
1180,
15478,
1316,
13,
288,
1082,
202,
2171,
1138,
1852,
843,
273,
2911,
10432,
12,
2730,
1769,
1082,
202,
4110,
1803,
12,
2730,
18,
588,
1803,... |
re = new NativeRegExp(scope, src, opt); | re = new NativeRegExp(cx, scope, src, opt); | private static Object matchOrReplace(Context cx, Scriptable thisObj, Object[] args, Function funObj, GlobData data) throws JavaScriptException { NativeRegExp re; String str = ScriptRuntime.toString(thisObj); data.str = str; RegExpImpl reImpl = RegExpImpl.getRegExpImpl(cx); if (args[0] instanceof NativeRegExp) { re = (NativeRegExp) args[0]; } else { String src = ScriptRuntime.toString(args[0]); String opt; if (data.optarg < args.length) { args[0] = src; opt = ScriptRuntime.toString(args[data.optarg]); } else { opt = null; } Scriptable scope = ScriptableObject.getTopLevelScope(funObj); re = new NativeRegExp(scope, src, opt); } data.regexp = re; data.global = (re.getFlags() & NativeRegExp.GLOB) != 0; int[] indexp = { 0 }; Object result = null; if (data.mode == GlobData.GLOB_SEARCH) { result = re.executeRegExp(funObj, str, indexp, true); if (result != null && result.equals(Boolean.TRUE)) result = new Integer(reImpl.leftContext.length); else result = new Integer(-1); } else if (data.global) { re.setLastIndex(0); for (int count = 0; indexp[0] <= str.length(); count++) { result = re.executeRegExp(funObj, str, indexp, true); if (result == null || !result.equals(Boolean.TRUE)) break; data.doGlobal(funObj, count); if (reImpl.lastMatch.length == 0) { if (indexp[0] == str.length()) break; indexp[0]++; } } } else { result = re.executeRegExp(funObj, str, indexp, data.mode == GlobData.GLOB_REPLACE); } return result; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/86ebd6188686efee74353b64c7fb3a9a3b999f11/RegExpImpl.java/clean/js/rhino/org/mozilla/javascript/regexp/RegExpImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1033,
845,
1162,
5729,
12,
1042,
9494,
16,
22780,
15261,
16,
29159,
1033,
8526,
833,
16,
4284,
9831,
2675,
16,
29159,
18901,
751,
501,
13,
3639,
1216,
11905,
503,
565,
288,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1033,
845,
1162,
5729,
12,
1042,
9494,
16,
22780,
15261,
16,
29159,
1033,
8526,
833,
16,
4284,
9831,
2675,
16,
29159,
18901,
751,
501,
13,
3639,
1216,
11905,
503,
565,
288,
363... |
public boolean deleteTeacher(ITeacher teacher) throws RemoteException, FlexiException { try { //A mettre dans le reallyDeleteTecher// for(Iterator<IBusy> it = teacher.getLstBusy().iterator(); it.hasNext(); )// {// IBusy b = it.next();// if(b instanceof ILesson)// {// ILesson l = (ILesson) b;// l.removeResource(teacher);// LessonStorage.save(l);// }// } TeacherStorage.delete(teacher); } catch (HibernateException e) { throw new FlexiException(FlexiLanguage.getInstance().getText("teacherDeletion"),e); //$NON-NLS-1$ } manager.fireDataChanged(ITeacher.class, new DataEvent(teacher, "", DataEvent.TYPE_PROPERTY_REMOVED)); //$NON-NLS-1$ return true; } | 13357 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13357/88394371c35f4389a1cd4ba2e6c30c902f533ddc/DataManagerImpl.java/clean/current/src/fr/umlv/ir3/flexitime/server/core/DataManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1430,
56,
13798,
264,
12,
1285,
13798,
264,
6489,
27779,
13,
1216,
18361,
16,
25361,
77,
503,
565,
288,
3639,
775,
3639,
288,
2398,
368,
37,
5100,
27427,
26224,
884,
8654,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1430,
56,
13798,
264,
12,
1285,
13798,
264,
6489,
27779,
13,
1216,
18361,
16,
25361,
77,
503,
565,
288,
3639,
775,
3639,
288,
2398,
368,
37,
5100,
27427,
26224,
884,
8654,
261... | ||
public boolean isSet(org.quickfix.field.MiscFeeAmt field) | public boolean isSet(quickfix.field.MiscFeeAmt field) | public boolean isSet(org.quickfix.field.MiscFeeAmt field) { return isSetField(field); } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/CollateralRequest.java/clean/src/java/src/quickfix/fix44/CollateralRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
11729,
71,
14667,
31787,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
11729,
71,
14667,
31787,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
args = ArgsUtil.setupArgs(threadContext, this, iVisited.getArgsNode()); | args = ArgsUtil.setupArgs(runtime, threadContext, this, iVisited.getArgsNode()); | public void visitCallNode(CallNode iVisited) { Block tmpBlock = ArgsUtil.beginCallArgs(threadContext); IRubyObject receiver = null; IRubyObject[] args = null; try { receiver = eval(iVisited.getReceiverNode()); args = ArgsUtil.setupArgs(threadContext, this, iVisited.getArgsNode()); } finally { ArgsUtil.endCallArgs(threadContext, tmpBlock); } Asserts.notNull(receiver.getMetaClass(), receiver.getClass().getName()); result = receiver.getMetaClass().call(receiver, iVisited.getName(), args, CallType.NORMAL); } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/f5c9a1ebd775712f2dc086acfce1a14a123ec632/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
1477,
907,
12,
1477,
907,
277,
30019,
13,
288,
3639,
3914,
1853,
1768,
273,
6634,
1304,
18,
10086,
1477,
2615,
12,
5930,
1042,
1769,
3639,
15908,
10340,
921,
5971,
273,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
1477,
907,
12,
1477,
907,
277,
30019,
13,
288,
3639,
3914,
1853,
1768,
273,
6634,
1304,
18,
10086,
1477,
2615,
12,
5930,
1042,
1769,
3639,
15908,
10340,
921,
5971,
273,
4... |
public static String replace(String base, String delim, String[] str) { final int len = base.length(); final StringBuffer result = new StringBuffer(); for (int i = 0; i < len; i++) { final char ch = base.charAt(i); final int k = delim.indexOf(ch); if (k >= 0) { result.append(str[k]); } else { result.append(ch); } } return result.toString(); | public static String replace(String base, char ch, String str) { return (base.indexOf(ch) < 0) ? base : replace(base, String.valueOf(ch), new String[] { str }); | public static String replace(String base, String delim, String[] str) { final int len = base.length(); final StringBuffer result = new StringBuffer(); for (int i = 0; i < len; i++) { final char ch = base.charAt(i); final int k = delim.indexOf(ch); if (k >= 0) { result.append(str[k]); } else { result.append(ch); } } return result.toString(); } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/053675ac48d814d19fdf07b2ec8f90d39d4513a1/BasisLibrary.java/buggy/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1453,
12,
780,
1026,
16,
514,
10508,
16,
514,
8526,
609,
13,
288,
202,
6385,
509,
562,
273,
1026,
18,
2469,
5621,
202,
6385,
6674,
563,
273,
394,
6674,
5621,
202,
1884,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1453,
12,
780,
1026,
16,
514,
10508,
16,
514,
8526,
609,
13,
288,
202,
6385,
509,
562,
273,
1026,
18,
2469,
5621,
202,
6385,
6674,
563,
273,
394,
6674,
5621,
202,
1884,
... |
long fileOff = ((Long) offsets.get(no / (bmpBitsPerPixel / 8))).longValue(); | int c = (isRGB(id) && separated) ? 3 : 1; long fileOff = ((Long) offsets.get(no / c)).longValue(); | public byte[] openBytes(String id, int no) throws FormatException, IOException { if (!id.equals(currentId)) initFile(id); if (no < 0 || no >= getImageCount(id)) { throw new FormatException("Invalid image number: " + no); } byteData = new byte[dwWidth * bmpHeight]; long fileOff = ((Long) offsets.get(no / (bmpBitsPerPixel / 8))).longValue(); in.seek(fileOff); int len = bmpScanLineSize; int pad = bmpScanLineSize - dwWidth*(bmpBitsPerPixel / 8); rawData = new byte[bmpActualSize]; int rawOffset = 0; int offset = (bmpHeight - 1) * dwWidth; for (int i=bmpHeight - 1; i>=0; i--) { int n = in.read(rawData, rawOffset, len); if (n < len) { whine("Scan line " + i + " ended prematurely."); } unpack(rawData, rawOffset, byteData, offset, dwWidth); rawOffset += (len - pad); offset -= dwWidth; } // reverse scanline ordering byte[] temp = rawData; rawData = new byte[temp.length]; int off = (bmpHeight - 1) * dwWidth * (bmpBitsPerPixel / 8); int newOff = 0; int length = dwWidth * (bmpBitsPerPixel / 8); for (int q=0; q<bmpHeight; q++) { if (bmpBitsPerPixel == 8) { System.arraycopy(temp, off, rawData, newOff, length); } else { // reverse bytes in groups of 3 for (int p=0; p<dwWidth; p++) { rawData[newOff + p*3] = temp[off + p*3 + 2]; rawData[newOff + p*3 + 1] = temp[off + p*3 + 1]; rawData[newOff + p*3 + 2] = temp[off + p*3]; } } off -= length; newOff += length; } if (separated) { byte[] rtn = new byte[rawData.length / 3]; int j = 0; for (int i=(no%3); i<rawData.length; i+=3) { rtn[j] = rawData[i]; j++; } return rtn; } else { return rawData; } } | 55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/e5dda0b0f353a61e34611f22a94abdac3b911b7b/AVIReader.java/clean/loci/formats/AVIReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1160,
8526,
1696,
2160,
12,
780,
612,
16,
509,
1158,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1160,
8526,
1696,
2160,
12,
780,
612,
16,
509,
1158,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
... |
target = game.getEntity(dest); | violation = Compute.stackingViolation(game, entity.getId(), dest); | private void doEntityFallsInto(Entity entity, Coords src, Coords dest, PilotingRollData roll) { final Hex srcHex = game.board.getHex(src); final Hex destHex = game.board.getHex(dest); final int fallElevation = Math.abs(destHex.floor() - srcHex.floor()); int direction = src.direction(dest); // check entity in target hex Entity target = game.getEntity(dest); // check if we can fall in that hex if (target != null && !target.equals(entity) && !Compute.isValidDisplacement(game, target.getId(), src, dest)) { // if target can't be displaced, fall in source hex. // NOTE: source hex should never contain a non-displacable entity Coords temp = dest; dest = src; src = temp; target = game.getEntity(dest); } // falling mech falls phaseReport.append(entity.getDisplayName() + " falls " + fallElevation + " level(s) into hex " + dest.getBoardNum() + ".\n"); // if hex was empty, deal damage and we're done if (target == null || target.equals(entity)) { doEntityFall(entity, dest, fallElevation, roll); return; } // hmmm... somebody there... problems. if (fallElevation >= 2) { // accidental death from above } else { // damage as normal doEntityFall(entity, dest, fallElevation, roll); // target gets displaced doEntityDisplacement(target, dest, dest.translated(direction), new PilotingRollData(target.getId(), 0, "domino effect")); } } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/5c811f2bbe340325973104367c7360814d4cafdb/Server.java/buggy/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
1943,
42,
454,
87,
5952,
12,
1943,
1522,
16,
10320,
87,
1705,
16,
10320,
87,
1570,
16,
453,
330,
17128,
24194,
751,
5824,
13,
288,
3639,
727,
15734,
1705,
7037,
273,
792... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
1943,
42,
454,
87,
5952,
12,
1943,
1522,
16,
10320,
87,
1705,
16,
10320,
87,
1570,
16,
453,
330,
17128,
24194,
751,
5824,
13,
288,
3639,
727,
15734,
1705,
7037,
273,
792... |
final Object alignTypeMembersOnColumnsOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS); | final Object alignTypeMembersOnColumnsOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS); | public void set(Map settings) { final Object alignmentForArgumentsInAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ALLOCATION_EXPRESSION); if (alignmentForArgumentsInAllocationExpressionOption != null) { try { this.alignment_for_arguments_in_allocation_expression = Integer.parseInt((String) alignmentForArgumentsInAllocationExpressionOption); } catch (NumberFormatException e) { this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForArgumentsInEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ENUM_CONSTANT); if (alignmentForArgumentsInEnumConstantOption != null) { try { this.alignment_for_arguments_in_enum_constant = Integer.parseInt((String) alignmentForArgumentsInEnumConstantOption); } catch (NumberFormatException e) { this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForArgumentsInExplicitConstructorCallOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL); if (alignmentForArgumentsInExplicitConstructorCallOption != null) { try { this.alignment_for_arguments_in_explicit_constructor_call = Integer.parseInt((String) alignmentForArgumentsInExplicitConstructorCallOption); } catch (NumberFormatException e) { this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForArgumentsInMethodInvocationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION); if (alignmentForArgumentsInMethodInvocationOption != null) { try { this.alignment_for_arguments_in_method_invocation = Integer.parseInt((String) alignmentForArgumentsInMethodInvocationOption); } catch (NumberFormatException e) { this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForArgumentsInQualifiedAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION); if (alignmentForArgumentsInQualifiedAllocationExpressionOption != null) { try { this.alignment_for_arguments_in_qualified_allocation_expression = Integer.parseInt((String) alignmentForArgumentsInQualifiedAllocationExpressionOption); } catch (NumberFormatException e) { this.alignment_for_arguments_in_qualified_allocation_expression = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_arguments_in_qualified_allocation_expression = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForAssignmentOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ASSIGNMENT); if (alignmentForAssignmentOption != null) { try { this.alignment_for_assignment = Integer.parseInt((String) alignmentForAssignmentOption); } catch (NumberFormatException e) { this.alignment_for_assignment = Alignment.M_ONE_PER_LINE_SPLIT; } catch (ClassCastException e) { this.alignment_for_assignment = Alignment.M_ONE_PER_LINE_SPLIT; } } final Object alignmentForBinaryExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION); if (alignmentForBinaryExpressionOption != null) { try { this.alignment_for_binary_expression = Integer.parseInt((String) alignmentForBinaryExpressionOption); } catch (NumberFormatException e) { this.alignment_for_binary_expression = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_binary_expression = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForCompactIfOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_COMPACT_IF); if (alignmentForCompactIfOption != null) { try { this.alignment_for_compact_if = Integer.parseInt((String) alignmentForCompactIfOption); } catch (NumberFormatException e) { this.alignment_for_compact_if = Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_INDENT_BY_ONE; } catch (ClassCastException e) { this.alignment_for_compact_if = Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_INDENT_BY_ONE; } } final Object alignmentForConditionalExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION); if (alignmentForConditionalExpressionOption != null) { try { this.alignment_for_conditional_expression = Integer.parseInt((String) alignmentForConditionalExpressionOption); } catch (NumberFormatException e) { this.alignment_for_conditional_expression = Alignment.M_ONE_PER_LINE_SPLIT; } catch (ClassCastException e) { this.alignment_for_conditional_expression = Alignment.M_ONE_PER_LINE_SPLIT; } } final Object alignmentForEnumConstantsOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ENUM_CONSTANTS); if (alignmentForEnumConstantsOption != null) { try { this.alignment_for_enum_constants = Integer.parseInt((String) alignmentForEnumConstantsOption); } catch (NumberFormatException e) { this.alignment_for_enum_constants = Alignment.NONE; } catch (ClassCastException e) { this.alignment_for_enum_constants = Alignment.NONE; } } final Object alignmentForExpressionsInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER); if (alignmentForExpressionsInArrayInitializerOption != null) { try { this.alignment_for_expressions_in_array_initializer = Integer.parseInt((String) alignmentForExpressionsInArrayInitializerOption); } catch (NumberFormatException e) { this.alignment_for_expressions_in_array_initializer = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_expressions_in_array_initializer = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForMultipleFieldsOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS); if (alignmentForMultipleFieldsOption != null) { try { this.alignment_for_multiple_fields = Integer.parseInt((String) alignmentForMultipleFieldsOption); } catch (NumberFormatException e) { this.alignment_for_multiple_fields = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_multiple_fields = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForParametersInConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_CONSTRUCTOR_DECLARATION); if (alignmentForParametersInConstructorDeclarationOption != null) { try { this.alignment_for_parameters_in_constructor_declaration = Integer.parseInt((String) alignmentForParametersInConstructorDeclarationOption); } catch (NumberFormatException e) { this.alignment_for_parameters_in_constructor_declaration = Alignment.M_COMPACT_SPLIT; } catch (ClassCastException e) { this.alignment_for_parameters_in_constructor_declaration = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForParametersInMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION); if (alignmentForParametersInMethodDeclarationOption != null) { try { this.alignment_for_parameters_in_method_declaration = Integer.parseInt((String) alignmentForParametersInMethodDeclarationOption); } catch (NumberFormatException e) { this.alignment_for_parameters_in_method_declaration = Alignment.M_COMPACT_SPLIT; } catch(ClassCastException e) { this.alignment_for_parameters_in_method_declaration = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForSelectorInMethodInvocationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SELECTOR_IN_METHOD_INVOCATION); if (alignmentForSelectorInMethodInvocationOption != null) { try { this.alignment_for_selector_in_method_invocation = Integer.parseInt((String) alignmentForSelectorInMethodInvocationOption); } catch (NumberFormatException e) { this.alignment_for_selector_in_method_invocation = Alignment.M_COMPACT_SPLIT; } catch(ClassCastException e) { this.alignment_for_selector_in_method_invocation = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForSuperclassInTypeDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SUPERCLASS_IN_TYPE_DECLARATION); if (alignmentForSuperclassInTypeDeclarationOption != null) { try { this.alignment_for_superclass_in_type_declaration = Integer.parseInt((String) alignmentForSuperclassInTypeDeclarationOption); } catch (NumberFormatException e) { this.alignment_for_superclass_in_type_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; } catch(ClassCastException e) { this.alignment_for_superclass_in_type_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; } } final Object alignmentForSuperinterfacesInEnumDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SUPERINTERFACES_IN_ENUM_DECLARATION); if (alignmentForSuperinterfacesInEnumDeclarationOption != null) { try { this.alignment_for_superinterfaces_in_enum_declaration = Integer.parseInt((String) alignmentForSuperinterfacesInEnumDeclarationOption); } catch (NumberFormatException e) { this.alignment_for_superinterfaces_in_enum_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; } catch(ClassCastException e) { this.alignment_for_superinterfaces_in_enum_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; } } final Object alignmentForSuperinterfacesInTypeDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SUPERINTERFACES_IN_TYPE_DECLARATION); if (alignmentForSuperinterfacesInTypeDeclarationOption != null) { try { this.alignment_for_superinterfaces_in_type_declaration = Integer.parseInt((String) alignmentForSuperinterfacesInTypeDeclarationOption); } catch (NumberFormatException e) { this.alignment_for_superinterfaces_in_type_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; } catch(ClassCastException e) { this.alignment_for_superinterfaces_in_type_declaration = Alignment.M_NEXT_SHIFTED_SPLIT; } } final Object alignmentForThrowsClauseInConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_CONSTRUCTOR_DECLARATION); if (alignmentForThrowsClauseInConstructorDeclarationOption != null) { try { this.alignment_for_throws_clause_in_constructor_declaration = Integer.parseInt((String) alignmentForThrowsClauseInConstructorDeclarationOption); } catch (NumberFormatException e) { this.alignment_for_throws_clause_in_constructor_declaration = Alignment.M_COMPACT_SPLIT; } catch(ClassCastException e) { this.alignment_for_throws_clause_in_constructor_declaration = Alignment.M_COMPACT_SPLIT; } } final Object alignmentForThrowsClauseInMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_METHOD_DECLARATION); if (alignmentForThrowsClauseInMethodDeclarationOption != null) { try { this.alignment_for_throws_clause_in_method_declaration = Integer.parseInt((String) alignmentForThrowsClauseInMethodDeclarationOption); } catch (NumberFormatException e) { this.alignment_for_throws_clause_in_method_declaration = Alignment.M_COMPACT_SPLIT; } catch(ClassCastException e) { this.alignment_for_throws_clause_in_method_declaration = Alignment.M_COMPACT_SPLIT; } } final Object alignTypeMembersOnColumnsOption = settings.get(CodeFormatterConstants.FORMATTER_ALIGN_TYPE_MEMBERS_ON_COLUMNS); if (alignTypeMembersOnColumnsOption != null) { this.align_type_members_on_columns = CodeFormatterConstants.TRUE.equals(alignTypeMembersOnColumnsOption); } final Object bracePositionForArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ARRAY_INITIALIZER); if (bracePositionForArrayInitializerOption != null) { try { this.brace_position_for_array_initializer = (String) bracePositionForArrayInitializerOption; } catch(ClassCastException e) { this.brace_position_for_array_initializer = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForBlockOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_BLOCK); if (bracePositionForBlockOption != null) { try { this.brace_position_for_block = (String) bracePositionForBlockOption; } catch(ClassCastException e) { this.brace_position_for_block = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForBlockInCaseOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_BLOCK_IN_CASE); if (bracePositionForBlockInCaseOption != null) { try { this.brace_position_for_block_in_case = (String) bracePositionForBlockInCaseOption; } catch(ClassCastException e) { this.brace_position_for_block_in_case = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_CONSTRUCTOR_DECLARATION); if (bracePositionForConstructorDeclarationOption != null) { try { this.brace_position_for_constructor_declaration = (String) bracePositionForConstructorDeclarationOption; } catch(ClassCastException e) { this.brace_position_for_constructor_declaration = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ENUM_CONSTANT); if (bracePositionForEnumConstantOption != null) { try { this.brace_position_for_enum_constant = (String) bracePositionForEnumConstantOption; } catch(ClassCastException e) { this.brace_position_for_enum_constant = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForEnumDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ENUM_DECLARATION); if (bracePositionForEnumDeclarationOption != null) { try { this.brace_position_for_enum_declaration = (String) bracePositionForEnumDeclarationOption; } catch(ClassCastException e) { this.brace_position_for_enum_declaration = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION); if (bracePositionForMethodDeclarationOption != null) { try { this.brace_position_for_method_declaration = (String) bracePositionForMethodDeclarationOption; } catch(ClassCastException e) { this.brace_position_for_method_declaration = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForSwitchOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH); if (bracePositionForSwitchOption != null) { try { this.brace_position_for_switch = (String) bracePositionForSwitchOption; } catch(ClassCastException e) { this.brace_position_for_switch = CodeFormatterConstants.END_OF_LINE; } } final Object bracePositionForTypeDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION); if (bracePositionForTypeDeclarationOption != null) { try { this.brace_position_for_type_declaration = (String) bracePositionForTypeDeclarationOption; } catch(ClassCastException e) { this.brace_position_for_type_declaration = CodeFormatterConstants.END_OF_LINE; } } final Object continuationIndentationOption = settings.get(CodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION); if (continuationIndentationOption != null) { try { this.continuation_indentation = Integer.parseInt((String) continuationIndentationOption); } catch (NumberFormatException e) { this.continuation_indentation = 2; } catch(ClassCastException e) { this.continuation_indentation = 2; } } final Object continuationIndentationForArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER); if (continuationIndentationForArrayInitializerOption != null) { try { this.continuation_indentation_for_array_initializer = Integer.parseInt((String) continuationIndentationForArrayInitializerOption); } catch (NumberFormatException e) { this.continuation_indentation_for_array_initializer = 2; } catch(ClassCastException e) { this.continuation_indentation_for_array_initializer = 2; } }// final Object blankLinesAfterImportsOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_AFTER_IMPORTS);// if (blankLinesAfterImportsOption != null) {// try {// this.blank_lines_after_imports = Integer.parseInt((String) blankLinesAfterImportsOption);// } catch (NumberFormatException e) {// this.blank_lines_after_imports = 0;// } catch(ClassCastException e) {// this.blank_lines_after_imports = 0;// }// }// final Object blankLinesAfterPackageOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_AFTER_PACKAGE);// if (blankLinesAfterPackageOption != null) {// try {// this.blank_lines_after_package = Integer.parseInt((String) blankLinesAfterPackageOption);// } catch (NumberFormatException e) {// this.blank_lines_after_package = 0;// } catch(ClassCastException e) {// this.blank_lines_after_package = 0;// }// }// final Object blankLinesBeforeFieldOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_FIELD);// if (blankLinesBeforeFieldOption != null) {// try {// this.blank_lines_before_field = Integer.parseInt((String) blankLinesBeforeFieldOption);// } catch (NumberFormatException e) {// this.blank_lines_before_field = 0;// } catch(ClassCastException e) {// this.blank_lines_before_field = 0;// }// }// final Object blankLinesBeforeFirstClassBodyDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_FIRST_CLASS_BODY_DECLARATION);// if (blankLinesBeforeFirstClassBodyDeclarationOption != null) {// try {// this.blank_lines_before_first_class_body_declaration = Integer.parseInt((String) blankLinesBeforeFirstClassBodyDeclarationOption);// } catch (NumberFormatException e) {// this.blank_lines_before_first_class_body_declaration = 0;// } catch(ClassCastException e) {// this.blank_lines_before_first_class_body_declaration = 0;// }// }// final Object blankLinesBeforeImportsOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_IMPORTS);// if (blankLinesBeforeImportsOption != null) {// try {// this.blank_lines_before_imports = Integer.parseInt((String) blankLinesBeforeImportsOption);// } catch (NumberFormatException e) {// this.blank_lines_before_imports = 0;// } catch(ClassCastException e) {// this.blank_lines_before_imports = 0;// }// }// final Object blankLinesBeforeMemberTypeOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_MEMBER_TYPE);// if (blankLinesBeforeMemberTypeOption != null) {// try {// this.blank_lines_before_member_type = Integer.parseInt((String) blankLinesBeforeMemberTypeOption);// } catch (NumberFormatException e) {// this.blank_lines_before_member_type = 0;// } catch(ClassCastException e) {// this.blank_lines_before_member_type = 0;// }// }// final Object blankLinesBeforeMethodOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_METHOD);// if (blankLinesBeforeMethodOption != null) {// try {// this.blank_lines_before_method = Integer.parseInt((String) blankLinesBeforeMethodOption);// } catch (NumberFormatException e) {// this.blank_lines_before_method = 0;// } catch(ClassCastException e) {// this.blank_lines_before_method = 0;// }// }// final Object blankLinesBeforeNewChunkOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_NEW_CHUNK);// if (blankLinesBeforeNewChunkOption != null) {// try {// this.blank_lines_before_new_chunk = Integer.parseInt((String) blankLinesBeforeNewChunkOption);// } catch (NumberFormatException e) {// this.blank_lines_before_new_chunk = 0;// } catch(ClassCastException e) {// this.blank_lines_before_new_chunk = 0;// }// }// final Object blankLinesBeforePackageOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BEFORE_PACKAGE);// if (blankLinesBeforePackageOption != null) {// try {// this.blank_lines_before_package = Integer.parseInt((String) blankLinesBeforePackageOption);// } catch (NumberFormatException e) {// this.blank_lines_before_package = 0;// } catch(ClassCastException e) {// this.blank_lines_before_package = 0;// }// }// final Object blankLinesBetweenTypeDeclarationsOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_BETWEEN_TYPE_DECLARATIONS);// if (blankLinesBetweenTypeDeclarationsOption != null) {// try {// this.blank_lines_between_type_declarations = Integer.parseInt((String) blankLinesBetweenTypeDeclarationsOption);// } catch (NumberFormatException e) {// this.blank_lines_between_type_declarations = 0;// } catch(ClassCastException e) {// this.blank_lines_between_type_declarations = 0;// }// }// final Object blankLinesAtBeginningOfMethodBodyOption = settings.get(CodeFormatterConstants.FORMATTER_BLANK_LINES_AT_BEGINNING_OF_METHOD_BODY);// if (blankLinesAtBeginningOfMethodBodyOption != null) {// try {// this.blank_lines_at_beginning_of_method_body = Integer.parseInt((String) blankLinesAtBeginningOfMethodBodyOption);// } catch (NumberFormatException e) {// this.blank_lines_at_beginning_of_method_body = 0;// } catch(ClassCastException e) {// this.blank_lines_at_beginning_of_method_body = 0;// }// }// final Object commentClearBlankLinesOption = settings.get(CodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES);// if (commentClearBlankLinesOption != null) {// this.comment_clear_blank_lines = CodeFormatterConstants.TRUE.equals(commentClearBlankLinesOption);// }// final Object commentFormatOption = settings.get(CodeFormatterConstants.FORMATTER_COMMENT_FORMAT);// if (commentFormatOption != null) {// this.comment_format = CodeFormatterConstants.TRUE.equals(commentFormatOption);// }// final Object commentFormatHeaderOption = settings.get(CodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HEADER);// if (commentFormatHeaderOption != null) {// this.comment_format_header = CodeFormatterConstants.TRUE.equals(commentFormatHeaderOption);// }// final Object commentFormatHtmlOption = settings.get(CodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HTML);// if (commentFormatHtmlOption != null) {// this.comment_format_html = CodeFormatterConstants.TRUE.equals(commentFormatHtmlOption);// }// final Object commentFormatSourceOption = settings.get(CodeFormatterConstants.FORMATTER_COMMENT_FORMAT_SOURCE);// if (commentFormatSourceOption != null) {// this.comment_format_source = CodeFormatterConstants.TRUE.equals(commentFormatSourceOption);// }// final Object commentLineLengthOption = settings.get(CodeFormatterConstants.FORMATTER_COMMENT_LINE_LENGTH);// if (commentLineLengthOption != null) {// try {// this.comment_line_length = Integer.parseInt((String) commentLineLengthOption);// } catch (NumberFormatException e) {// this.comment_line_length = 80;// } catch(ClassCastException e) {// this.comment_line_length = 80;// }// } final Object indentStatementsCompareToBlockOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BLOCK); if (indentStatementsCompareToBlockOption != null) { this.indent_statements_compare_to_block = CodeFormatterConstants.TRUE.equals(indentStatementsCompareToBlockOption); } final Object indentStatementsCompareToBodyOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BODY); if (indentStatementsCompareToBodyOption != null) { this.indent_statements_compare_to_body = CodeFormatterConstants.TRUE.equals(indentStatementsCompareToBodyOption); } final Object indentBodyDeclarationsCompareToEnumConstantHeaderOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ENUM_CONSTANT_HEADER); if (indentBodyDeclarationsCompareToEnumConstantHeaderOption != null) { this.indent_body_declarations_compare_to_enum_constant_header = CodeFormatterConstants.TRUE.equals(indentBodyDeclarationsCompareToEnumConstantHeaderOption); } final Object indentBodyDeclarationsCompareToEnumDeclarationHeaderOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ENUM_DECLARATION_HEADER); if (indentBodyDeclarationsCompareToEnumDeclarationHeaderOption != null) { this.indent_body_declarations_compare_to_enum_declaration_header = CodeFormatterConstants.TRUE.equals(indentBodyDeclarationsCompareToEnumDeclarationHeaderOption); } final Object indentBodyDeclarationsCompareToTypeHeaderOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_TYPE_HEADER); if (indentBodyDeclarationsCompareToTypeHeaderOption != null) { this.indent_body_declarations_compare_to_type_header = CodeFormatterConstants.TRUE.equals(indentBodyDeclarationsCompareToTypeHeaderOption); } final Object indentBreaksCompareToCasesOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_BREAKS_COMPARE_TO_CASES); if (indentBreaksCompareToCasesOption != null) { this.indent_breaks_compare_to_cases = CodeFormatterConstants.TRUE.equals(indentBreaksCompareToCasesOption); } final Object indentEmptyLinesOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_EMPTY_LINES); if (indentEmptyLinesOption != null) { this.indent_empty_lines = CodeFormatterConstants.TRUE.equals(indentEmptyLinesOption); } final Object indentSwitchstatementsCompareToCasesOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES); if (indentSwitchstatementsCompareToCasesOption != null) { this.indent_switchstatements_compare_to_cases = CodeFormatterConstants.TRUE.equals(indentSwitchstatementsCompareToCasesOption); } final Object indentSwitchstatementsCompareToSwitchOption = settings.get(CodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH); if (indentSwitchstatementsCompareToSwitchOption != null) { this.indent_switchstatements_compare_to_switch = CodeFormatterConstants.TRUE.equals(indentSwitchstatementsCompareToSwitchOption); } final Object indentationSizeOption = settings.get(CodeFormatterConstants.FORMATTER_INDENTATION_SIZE); if (indentationSizeOption != null) { try { this.indentation_size = Integer.parseInt((String) indentationSizeOption); } catch (NumberFormatException e) { this.indentation_size = 4; } catch(ClassCastException e) { this.indentation_size = 4; } }// final Object insertNewLineAfterOpeningBraceInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER);// if (insertNewLineAfterOpeningBraceInArrayInitializerOption != null) {// this.insert_new_line_after_opening_brace_in_array_initializer = CCorePlugin.INSERT.equals(insertNewLineAfterOpeningBraceInArrayInitializerOption);// }// final Object insertNewLineAtEndOfFileIfMissingOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING);// if (insertNewLineAtEndOfFileIfMissingOption != null) {// this.insert_new_line_at_end_of_file_if_missing = CCorePlugin.INSERT.equals(insertNewLineAtEndOfFileIfMissingOption);// }// final Object insertNewLineBeforeCatchInTryStatementOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CATCH_IN_TRY_STATEMENT);// if (insertNewLineBeforeCatchInTryStatementOption != null) {// this.insert_new_line_before_catch_in_try_statement = CCorePlugin.INSERT.equals(insertNewLineBeforeCatchInTryStatementOption);// }// final Object insertNewLineBeforeClosingBraceInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER);// if (insertNewLineBeforeClosingBraceInArrayInitializerOption != null) {// this.insert_new_line_before_closing_brace_in_array_initializer = CCorePlugin.INSERT.equals(insertNewLineBeforeClosingBraceInArrayInitializerOption);// }// final Object insertNewLineBeforeElseInIfStatementOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_ELSE_IN_IF_STATEMENT);// if (insertNewLineBeforeElseInIfStatementOption != null) {// this.insert_new_line_before_else_in_if_statement = CCorePlugin.INSERT.equals(insertNewLineBeforeElseInIfStatementOption);// }// final Object insertNewLineBeforeFinallyInTryStatementOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_FINALLY_IN_TRY_STATEMENT);// if (insertNewLineBeforeFinallyInTryStatementOption != null) {// this.insert_new_line_before_finally_in_try_statement = CCorePlugin.INSERT.equals(insertNewLineBeforeFinallyInTryStatementOption);// }// final Object insertNewLineBeforeWhileInDoStatementOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_WHILE_IN_DO_STATEMENT);// if (insertNewLineBeforeWhileInDoStatementOption != null) {// this.insert_new_line_before_while_in_do_statement = CCorePlugin.INSERT.equals(insertNewLineBeforeWhileInDoStatementOption);// }// final Object insertNewLineInEmptyBlockOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK);// if (insertNewLineInEmptyBlockOption != null) {// this.insert_new_line_in_empty_block = CCorePlugin.INSERT.equals(insertNewLineInEmptyBlockOption);// }// final Object insertNewLineInEmptyEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_CONSTANT);// if (insertNewLineInEmptyEnumConstantOption != null) {// this.insert_new_line_in_empty_enum_constant = CCorePlugin.INSERT.equals(insertNewLineInEmptyEnumConstantOption);// }// final Object insertNewLineInEmptyEnumDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_DECLARATION);// if (insertNewLineInEmptyEnumDeclarationOption != null) {// this.insert_new_line_in_empty_enum_declaration = CCorePlugin.INSERT.equals(insertNewLineInEmptyEnumDeclarationOption);// }// final Object insertNewLineInEmptyMethodBodyOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY);// if (insertNewLineInEmptyMethodBodyOption != null) {// this.insert_new_line_in_empty_method_body = CCorePlugin.INSERT.equals(insertNewLineInEmptyMethodBodyOption);// }// final Object insertNewLineInEmptyTypeDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION);// if (insertNewLineInEmptyTypeDeclarationOption != null) {// this.insert_new_line_in_empty_type_declaration = CCorePlugin.INSERT.equals(insertNewLineInEmptyTypeDeclarationOption);// }// final Object insertSpaceAfterAndInWildcardOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_AND_IN_TYPE_PARAMETER);// if (insertSpaceAfterAndInWildcardOption != null) {// this.insert_space_after_and_in_type_parameter = CCorePlugin.INSERT.equals(insertSpaceAfterAndInWildcardOption);// }// final Object insertSpaceAfterAssignmentOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATOR);// if (insertSpaceAfterAssignmentOperatorOption != null) {// this.insert_space_after_assignment_operator = CCorePlugin.INSERT.equals(insertSpaceAfterAssignmentOperatorOption);// }// final Object insertSpaceAfterBinaryOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_BINARY_OPERATOR);// if (insertSpaceAfterBinaryOperatorOption != null) {// this.insert_space_after_binary_operator = CCorePlugin.INSERT.equals(insertSpaceAfterBinaryOperatorOption);// }// final Object insertSpaceAfterClosingAngleBracketInTypeArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENTS);// if (insertSpaceAfterClosingAngleBracketInTypeArgumentsOption != null) {// this.insert_space_after_closing_angle_bracket_in_type_arguments = CCorePlugin.INSERT.equals(insertSpaceAfterClosingAngleBracketInTypeArgumentsOption);// }// final Object insertSpaceAfterClosingAngleBracketInTypeParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_PARAMETERS);// if (insertSpaceAfterClosingAngleBracketInTypeParametersOption != null) {// this.insert_space_after_closing_angle_bracket_in_type_parameters = CCorePlugin.INSERT.equals(insertSpaceAfterClosingAngleBracketInTypeParametersOption);// }// final Object insertSpaceAfterClosingParenInCastOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_PAREN_IN_CAST);// if (insertSpaceAfterClosingParenInCastOption != null) {// this.insert_space_after_closing_paren_in_cast = CCorePlugin.INSERT.equals(insertSpaceAfterClosingParenInCastOption);// }// final Object insertSpaceAfterClosingBraceInBlockOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_CLOSING_BRACE_IN_BLOCK);// if (insertSpaceAfterClosingBraceInBlockOption != null) {// this.insert_space_after_closing_brace_in_block = CCorePlugin.INSERT.equals(insertSpaceAfterClosingBraceInBlockOption);// }// final Object insertSpaceAfterColonInAssertOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COLON_IN_ASSERT);// if (insertSpaceAfterColonInAssertOption != null) {// this.insert_space_after_colon_in_assert = CCorePlugin.INSERT.equals(insertSpaceAfterColonInAssertOption);// }// final Object insertSpaceAfterColonInCaseOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COLON_IN_CASE);// if (insertSpaceAfterColonInCaseOption != null) {// this.insert_space_after_colon_in_case = CCorePlugin.INSERT.equals(insertSpaceAfterColonInCaseOption);// }// final Object insertSpaceAfterColonInConditionalOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COLON_IN_CONDITIONAL);// if (insertSpaceAfterColonInConditionalOption != null) {// this.insert_space_after_colon_in_conditional = CCorePlugin.INSERT.equals(insertSpaceAfterColonInConditionalOption);// }// final Object insertSpaceAfterColonInForOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COLON_IN_FOR);// if (insertSpaceAfterColonInForOption != null) {// this.insert_space_after_colon_in_for = CCorePlugin.INSERT.equals(insertSpaceAfterColonInForOption);// }// final Object insertSpaceAfterColonInLabeledStatementOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COLON_IN_LABELED_STATEMENT);// if (insertSpaceAfterColonInLabeledStatementOption != null) {// this.insert_space_after_colon_in_labeled_statement = CCorePlugin.INSERT.equals(insertSpaceAfterColonInLabeledStatementOption);// }// final Object insertSpaceAfterCommaInAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_ALLOCATION_EXPRESSION);// if (insertSpaceAfterCommaInAllocationExpressionOption != null) {// this.insert_space_after_comma_in_allocation_expression = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInAllocationExpressionOption);// }// final Object insertSpaceAfterCommaInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_ARRAY_INITIALIZER);// if (insertSpaceAfterCommaInArrayInitializerOption != null) {// this.insert_space_after_comma_in_array_initializer = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInArrayInitializerOption);// }// final Object insertSpaceAfterCommaInConstructorDeclarationParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_DECLARATION_PARAMETERS);// if (insertSpaceAfterCommaInConstructorDeclarationParametersOption != null) {// this.insert_space_after_comma_in_constructor_declaration_parameters = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInConstructorDeclarationParametersOption);// }// final Object insertSpaceAfterCommaInConstructorDeclarationThrowsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_DECLARATION_THROWS);// if (insertSpaceAfterCommaInConstructorDeclarationThrowsOption != null) {// this.insert_space_after_comma_in_constructor_declaration_throws = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInConstructorDeclarationThrowsOption);// }// final Object insertSpaceAfterCommaInEnumConstantArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_ENUM_CONSTANT_ARGUMENTS);// if (insertSpaceAfterCommaInEnumConstantArgumentsOption != null) {// this.insert_space_after_comma_in_enum_constant_arguments = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInEnumConstantArgumentsOption);// }// final Object insertSpaceAfterCommaInEnumDeclarationsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_ENUM_DECLARATIONS);// if (insertSpaceAfterCommaInEnumDeclarationsOption != null) {// this.insert_space_after_comma_in_enum_declarations = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInEnumDeclarationsOption);// }// final Object insertSpaceAfterCommaInExplicitConstructorCallArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_EXPLICIT_CONSTRUCTOR_CALL_ARGUMENTS);// if (insertSpaceAfterCommaInExplicitConstructorCallArgumentsOption != null) {// this.insert_space_after_comma_in_explicit_constructor_call_arguments = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInExplicitConstructorCallArgumentsOption);// }// final Object insertSpaceAfterCommaInForIncrementsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_FOR_INCREMENTS);// if (insertSpaceAfterCommaInForIncrementsOption != null) {// this.insert_space_after_comma_in_for_increments = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInForIncrementsOption);// }// final Object insertSpaceAfterCommaInForInitsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_FOR_INITS);// if (insertSpaceAfterCommaInForInitsOption != null) {// this.insert_space_after_comma_in_for_inits = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInForInitsOption);// }// final Object insertSpaceAfterCommaInMethodInvocationArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_INVOCATION_ARGUMENTS);// if (insertSpaceAfterCommaInMethodInvocationArgumentsOption != null) {// this.insert_space_after_comma_in_method_invocation_arguments = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInMethodInvocationArgumentsOption);// }// final Object insertSpaceAfterCommaInMethodDeclarationParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_DECLARATION_PARAMETERS);// if (insertSpaceAfterCommaInMethodDeclarationParametersOption != null) {// this.insert_space_after_comma_in_method_declaration_parameters = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInMethodDeclarationParametersOption);// }// final Object insertSpaceAfterCommaInMethodDeclarationThrowsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_DECLARATION_THROWS);// if (insertSpaceAfterCommaInMethodDeclarationThrowsOption != null) {// this.insert_space_after_comma_in_method_declaration_throws = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInMethodDeclarationThrowsOption);// }// final Object insertSpaceAfterCommaInMultipleFieldDeclarationsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_MULTIPLE_FIELD_DECLARATIONS);// if (insertSpaceAfterCommaInMultipleFieldDeclarationsOption != null) {// this.insert_space_after_comma_in_multiple_field_declarations = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInMultipleFieldDeclarationsOption);// }// final Object insertSpaceAfterCommaInMultipleLocalDeclarationsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_MULTIPLE_LOCAL_DECLARATIONS);// if (insertSpaceAfterCommaInMultipleLocalDeclarationsOption != null) {// this.insert_space_after_comma_in_multiple_local_declarations = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInMultipleLocalDeclarationsOption);// }// final Object insertSpaceAfterCommaInParameterizedTypeReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_PARAMETERIZED_TYPE_REFERENCE);// if (insertSpaceAfterCommaInParameterizedTypeReferenceOption != null) {// this.insert_space_after_comma_in_parameterized_type_reference = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInParameterizedTypeReferenceOption);// }// final Object insertSpaceAfterCommaInSuperinterfacesOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_SUPERINTERFACES);// if (insertSpaceAfterCommaInSuperinterfacesOption != null) {// this.insert_space_after_comma_in_superinterfaces = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInSuperinterfacesOption);// }// final Object insertSpaceAfterCommaInTypeArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_TYPE_ARGUMENTS);// if (insertSpaceAfterCommaInTypeArgumentsOption != null) {// this.insert_space_after_comma_in_type_arguments = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInTypeArgumentsOption);// }// final Object insertSpaceAfterCommaInTypeParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_TYPE_PARAMETERS);// if (insertSpaceAfterCommaInTypeParametersOption != null) {// this.insert_space_after_comma_in_type_parameters = CCorePlugin.INSERT.equals(insertSpaceAfterCommaInTypeParametersOption);// }// final Object insertSpaceAfterEllipsisOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ELLIPSIS);// if (insertSpaceAfterEllipsisOption != null) {// this.insert_space_after_ellipsis = CCorePlugin.INSERT.equals(insertSpaceAfterEllipsisOption);// }// final Object insertSpaceAfterOpeningAngleBracketInParameterizedTypeReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE);// if (insertSpaceAfterOpeningAngleBracketInParameterizedTypeReferenceOption != null) {// this.insert_space_after_opening_angle_bracket_in_parameterized_type_reference = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningAngleBracketInParameterizedTypeReferenceOption);// }// final Object insertSpaceAfterOpeningAngleBracketInTypeArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_TYPE_ARGUMENTS);// if (insertSpaceAfterOpeningAngleBracketInTypeArgumentsOption != null) {// this.insert_space_after_opening_angle_bracket_in_type_arguments = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningAngleBracketInTypeArgumentsOption);// }// final Object insertSpaceAfterOpeningAngleBracketInTypeParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETERS);// if (insertSpaceAfterOpeningAngleBracketInTypeParametersOption != null) {// this.insert_space_after_opening_angle_bracket_in_type_parameters = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningAngleBracketInTypeParametersOption);// }// final Object insertSpaceAfterOpeningBracketInArrayAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACKET_IN_ARRAY_ALLOCATION_EXPRESSION);// if (insertSpaceAfterOpeningBracketInArrayAllocationExpressionOption != null) {// this.insert_space_after_opening_bracket_in_array_allocation_expression = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningBracketInArrayAllocationExpressionOption);// }// final Object insertSpaceAfterOpeningBracketInArrayReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACKET_IN_ARRAY_REFERENCE);// if (insertSpaceAfterOpeningBracketInArrayReferenceOption != null) {// this.insert_space_after_opening_bracket_in_array_reference = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningBracketInArrayReferenceOption);// }// final Object insertSpaceAfterOpeningBraceInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER);// if (insertSpaceAfterOpeningBraceInArrayInitializerOption != null) {// this.insert_space_after_opening_brace_in_array_initializer = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningBraceInArrayInitializerOption);// }// final Object insertSpaceAfterOpeningParenInCastOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_CAST);// if (insertSpaceAfterOpeningParenInCastOption != null) {// this.insert_space_after_opening_paren_in_cast = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInCastOption);// }// final Object insertSpaceAfterOpeningParenInCatchOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_CATCH);// if (insertSpaceAfterOpeningParenInCatchOption != null) {// this.insert_space_after_opening_paren_in_catch = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInCatchOption);// }// final Object insertSpaceAfterOpeningParenInConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_CONSTRUCTOR_DECLARATION);// if (insertSpaceAfterOpeningParenInConstructorDeclarationOption != null) {// this.insert_space_after_opening_paren_in_constructor_declaration = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInConstructorDeclarationOption);// }// final Object insertSpaceAfterOpeningParenInEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_ENUM_CONSTANT);// if (insertSpaceAfterOpeningParenInEnumConstantOption != null) {// this.insert_space_after_opening_paren_in_enum_constant = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInEnumConstantOption);// }// final Object insertSpaceAfterOpeningParenInForOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_FOR);// if (insertSpaceAfterOpeningParenInForOption != null) {// this.insert_space_after_opening_paren_in_for = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInForOption);// }// final Object insertSpaceAfterOpeningParenInIfOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_IF);// if (insertSpaceAfterOpeningParenInIfOption != null) {// this.insert_space_after_opening_paren_in_if = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInIfOption);// }// final Object insertSpaceAfterOpeningParenInMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_DECLARATION);// if (insertSpaceAfterOpeningParenInMethodDeclarationOption != null) {// this.insert_space_after_opening_paren_in_method_declaration = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInMethodDeclarationOption);// }// final Object insertSpaceAfterOpeningParenInMethodInvocationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION);// if (insertSpaceAfterOpeningParenInMethodInvocationOption != null) {// this.insert_space_after_opening_paren_in_method_invocation = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInMethodInvocationOption);// }// final Object insertSpaceAfterOpeningParenInParenthesizedExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_PARENTHESIZED_EXPRESSION);// if (insertSpaceAfterOpeningParenInParenthesizedExpressionOption != null) {// this.insert_space_after_opening_paren_in_parenthesized_expression = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInParenthesizedExpressionOption);// }// final Object insertSpaceAfterOpeningParenInSwitchOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_SWITCH);// if (insertSpaceAfterOpeningParenInSwitchOption != null) {// this.insert_space_after_opening_paren_in_switch = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInSwitchOption);// }// final Object insertSpaceAfterOpeningParenInSynchronizedOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_SYNCHRONIZED);// if (insertSpaceAfterOpeningParenInSynchronizedOption != null) {// this.insert_space_after_opening_paren_in_synchronized = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInSynchronizedOption);// }// final Object insertSpaceAfterOpeningParenInWhileOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_WHILE);// if (insertSpaceAfterOpeningParenInWhileOption != null) {// this.insert_space_after_opening_paren_in_while = CCorePlugin.INSERT.equals(insertSpaceAfterOpeningParenInWhileOption);// }// final Object insertSpaceAfterPostfixOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_POSTFIX_OPERATOR);// if (insertSpaceAfterPostfixOperatorOption != null) {// this.insert_space_after_postfix_operator = CCorePlugin.INSERT.equals(insertSpaceAfterPostfixOperatorOption);// }// final Object insertSpaceAfterPrefixOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_PREFIX_OPERATOR);// if (insertSpaceAfterPrefixOperatorOption != null) {// this.insert_space_after_prefix_operator = CCorePlugin.INSERT.equals(insertSpaceAfterPrefixOperatorOption);// }// final Object insertSpaceAfterQuestionInConditionalOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_QUESTION_IN_CONDITIONAL);// if (insertSpaceAfterQuestionInConditionalOption != null) {// this.insert_space_after_question_in_conditional = CCorePlugin.INSERT.equals(insertSpaceAfterQuestionInConditionalOption);// }// final Object insertSpaceAfterQuestionInWildcardOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_QUESTION_IN_WILDCARD);// if (insertSpaceAfterQuestionInWildcardOption != null) {// this.insert_space_after_question_in_wilcard = CCorePlugin.INSERT.equals(insertSpaceAfterQuestionInWildcardOption);// }// final Object insertSpaceAfterSemicolonInForOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_SEMICOLON_IN_FOR);// if (insertSpaceAfterSemicolonInForOption != null) {// this.insert_space_after_semicolon_in_for = CCorePlugin.INSERT.equals(insertSpaceAfterSemicolonInForOption);// }// final Object insertSpaceAfterUnaryOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_UNARY_OPERATOR);// if (insertSpaceAfterUnaryOperatorOption != null) {// this.insert_space_after_unary_operator = CCorePlugin.INSERT.equals(insertSpaceAfterUnaryOperatorOption);// }// final Object insertSpaceBeforeAndInWildcardOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_AND_IN_TYPE_PARAMETER);// if (insertSpaceBeforeAndInWildcardOption != null) {// this.insert_space_before_and_in_type_parameter = CCorePlugin.INSERT.equals(insertSpaceBeforeAndInWildcardOption);// }// final Object insertSpaceBeforeAssignmentOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR);// if (insertSpaceBeforeAssignmentOperatorOption != null) {// this.insert_space_before_assignment_operator = CCorePlugin.INSERT.equals(insertSpaceBeforeAssignmentOperatorOption);// }// final Object insertSpaceBeforeBinaryOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_BINARY_OPERATOR);// if (insertSpaceBeforeBinaryOperatorOption != null) {// this.insert_space_before_binary_operator = CCorePlugin.INSERT.equals(insertSpaceBeforeBinaryOperatorOption);// }// final Object insertSpaceBeforeClosingAngleBracketInParameterizedTypeReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE);// if (insertSpaceBeforeClosingAngleBracketInParameterizedTypeReferenceOption != null) {// this.insert_space_before_closing_angle_bracket_in_parameterized_type_reference = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingAngleBracketInParameterizedTypeReferenceOption);// }// final Object insertSpaceBeforeClosingAngleBracketInTypeArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENTS);// if (insertSpaceBeforeClosingAngleBracketInTypeArgumentsOption != null) {// this.insert_space_before_closing_angle_bracket_in_type_arguments = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingAngleBracketInTypeArgumentsOption);// }// final Object insertSpaceBeforeClosingAngleBracketInTypeParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_ANGLE_BRACKET_IN_TYPE_PARAMETERS);// if (insertSpaceBeforeClosingAngleBracketInTypeParametersOption != null) {// this.insert_space_before_closing_angle_bracket_in_type_parameters = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingAngleBracketInTypeParametersOption);// }// final Object insertSpaceBeforeClosingBraceInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER);// if (insertSpaceBeforeClosingBraceInArrayInitializerOption != null) {// this.insert_space_before_closing_brace_in_array_initializer = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingBraceInArrayInitializerOption);// }// final Object insertSpaceBeforeClosingBracketInArrayAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_BRACKET_IN_ARRAY_ALLOCATION_EXPRESSION);// if (insertSpaceBeforeClosingBracketInArrayAllocationExpressionOption != null) {// this.insert_space_before_closing_bracket_in_array_allocation_expression = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingBracketInArrayAllocationExpressionOption);// }// final Object insertSpaceBeforeClosingBracketInArrayReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_BRACKET_IN_ARRAY_REFERENCE);// if (insertSpaceBeforeClosingBracketInArrayReferenceOption != null) {// this.insert_space_before_closing_bracket_in_array_reference = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingBracketInArrayReferenceOption);// }// final Object insertSpaceBeforeClosingParenInCastOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_CAST);// if (insertSpaceBeforeClosingParenInCastOption != null) {// this.insert_space_before_closing_paren_in_cast = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInCastOption);// }// final Object insertSpaceBeforeClosingParenInCatchOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_CATCH);// if (insertSpaceBeforeClosingParenInCatchOption != null) {// this.insert_space_before_closing_paren_in_catch = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInCatchOption);// }// final Object insertSpaceBeforeClosingParenInConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_CONSTRUCTOR_DECLARATION);// if (insertSpaceBeforeClosingParenInConstructorDeclarationOption != null) {// this.insert_space_before_closing_paren_in_constructor_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInConstructorDeclarationOption);// }// final Object insertSpaceBeforeClosingParenInEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_ENUM_CONSTANT);// if (insertSpaceBeforeClosingParenInEnumConstantOption != null) {// this.insert_space_before_closing_paren_in_enum_constant = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInEnumConstantOption);// }// final Object insertSpaceBeforeClosingParenInForOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_FOR);// if (insertSpaceBeforeClosingParenInForOption != null) {// this.insert_space_before_closing_paren_in_for = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInForOption);// }// final Object insertSpaceBeforeClosingParenInIfOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_IF);// if (insertSpaceBeforeClosingParenInIfOption != null) {// this.insert_space_before_closing_paren_in_if = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInIfOption);// }// final Object insertSpaceBeforeClosingParenInMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_DECLARATION);// if (insertSpaceBeforeClosingParenInMethodDeclarationOption != null) {// this.insert_space_before_closing_paren_in_method_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInMethodDeclarationOption);// }// final Object insertSpaceBeforeClosingParenInMethodInvocationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_INVOCATION);// if (insertSpaceBeforeClosingParenInMethodInvocationOption != null) {// this.insert_space_before_closing_paren_in_method_invocation = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInMethodInvocationOption);// }// final Object insertSpaceBeforeClosingParenInParenthesizedExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_PARENTHESIZED_EXPRESSION);// if (insertSpaceBeforeClosingParenInParenthesizedExpressionOption != null) {// this.insert_space_before_closing_paren_in_parenthesized_expression = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInParenthesizedExpressionOption);// }// final Object insertSpaceBeforeClosingParenInSwitchOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_SWITCH);// if (insertSpaceBeforeClosingParenInSwitchOption != null) {// this.insert_space_before_closing_paren_in_switch = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInSwitchOption);// }// final Object insertSpaceBeforeClosingParenInSynchronizedOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_SYNCHRONIZED);// if (insertSpaceBeforeClosingParenInSynchronizedOption != null) {// this.insert_space_before_closing_paren_in_synchronized = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInSynchronizedOption);// }// final Object insertSpaceBeforeClosingParenInWhileOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_WHILE);// if (insertSpaceBeforeClosingParenInWhileOption != null) {// this.insert_space_before_closing_paren_in_while = CCorePlugin.INSERT.equals(insertSpaceBeforeClosingParenInWhileOption);// }// final Object insertSpaceBeforeColonInAssertOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COLON_IN_ASSERT);// if (insertSpaceBeforeColonInAssertOption != null) {// this.insert_space_before_colon_in_assert = CCorePlugin.INSERT.equals(insertSpaceBeforeColonInAssertOption);// }// final Object insertSpaceBeforeColonInCaseOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COLON_IN_CASE);// if (insertSpaceBeforeColonInCaseOption != null) {// this.insert_space_before_colon_in_case = CCorePlugin.INSERT.equals(insertSpaceBeforeColonInCaseOption);// }// final Object insertSpaceBeforeColonInConditionalOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COLON_IN_CONDITIONAL);// if (insertSpaceBeforeColonInConditionalOption != null) {// this.insert_space_before_colon_in_conditional = CCorePlugin.INSERT.equals(insertSpaceBeforeColonInConditionalOption);// }// final Object insertSpaceBeforeColonInDefaultOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COLON_IN_DEFAULT);// if (insertSpaceBeforeColonInDefaultOption != null) {// this.insert_space_before_colon_in_default = CCorePlugin.INSERT.equals(insertSpaceBeforeColonInDefaultOption);// }// final Object insertSpaceBeforeColonInForOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COLON_IN_FOR);// if (insertSpaceBeforeColonInForOption != null) {// this.insert_space_before_colon_in_for = CCorePlugin.INSERT.equals(insertSpaceBeforeColonInForOption);// }// final Object insertSpaceBeforeColonInLabeledStatementOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COLON_IN_LABELED_STATEMENT);// if (insertSpaceBeforeColonInLabeledStatementOption != null) {// this.insert_space_before_colon_in_labeled_statement = CCorePlugin.INSERT.equals(insertSpaceBeforeColonInLabeledStatementOption);// }// final Object insertSpaceBeforeCommaInAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_ALLOCATION_EXPRESSION);// if (insertSpaceBeforeCommaInAllocationExpressionOption != null) {// this.insert_space_before_comma_in_allocation_expression = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInAllocationExpressionOption);// }// final Object insertSpaceBeforeCommaInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_ARRAY_INITIALIZER);// if (insertSpaceBeforeCommaInArrayInitializerOption != null) {// this.insert_space_before_comma_in_array_initializer = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInArrayInitializerOption);// }// final Object insertSpaceBeforeCommaInConstructorDeclarationParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_DECLARATION_PARAMETERS);// if (insertSpaceBeforeCommaInConstructorDeclarationParametersOption != null) {// this.insert_space_before_comma_in_constructor_declaration_parameters = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInConstructorDeclarationParametersOption);// }// final Object insertSpaceBeforeCommaInConstructorDeclarationThrowsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_CONSTRUCTOR_DECLARATION_THROWS);// if (insertSpaceBeforeCommaInConstructorDeclarationThrowsOption != null) {// this.insert_space_before_comma_in_constructor_declaration_throws = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInConstructorDeclarationThrowsOption);// }// final Object insertSpaceBeforeCommaInEnumConstantArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_ENUM_CONSTANT_ARGUMENTS);// if (insertSpaceBeforeCommaInEnumConstantArgumentsOption != null) {// this.insert_space_before_comma_in_enum_constant_arguments = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInEnumConstantArgumentsOption);// }// final Object insertSpaceBeforeCommaInEnumDeclarationsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_ENUM_DECLARATIONS);// if (insertSpaceBeforeCommaInEnumDeclarationsOption != null) {// this.insert_space_before_comma_in_enum_declarations = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInEnumDeclarationsOption);// }// final Object insertSpaceBeforeCommaInExplicitConstructorCallArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_EXPLICIT_CONSTRUCTOR_CALL_ARGUMENTS);// if (insertSpaceBeforeCommaInExplicitConstructorCallArgumentsOption != null) {// this.insert_space_before_comma_in_explicit_constructor_call_arguments = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInExplicitConstructorCallArgumentsOption);// }// final Object insertSpaceBeforeCommaInForIncrementsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_FOR_INCREMENTS);// if (insertSpaceBeforeCommaInForIncrementsOption != null) {// this.insert_space_before_comma_in_for_increments = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInForIncrementsOption);// }// final Object insertSpaceBeforeCommaInForInitsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_FOR_INITS);// if (insertSpaceBeforeCommaInForInitsOption != null) {// this.insert_space_before_comma_in_for_inits = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInForInitsOption);// }// final Object insertSpaceBeforeCommaInMethodInvocationArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_INVOCATION_ARGUMENTS);// if (insertSpaceBeforeCommaInMethodInvocationArgumentsOption != null) {// this.insert_space_before_comma_in_method_invocation_arguments = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInMethodInvocationArgumentsOption);// }// final Object insertSpaceBeforeCommaInMethodDeclarationParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_DECLARATION_PARAMETERS);// if (insertSpaceBeforeCommaInMethodDeclarationParametersOption != null) {// this.insert_space_before_comma_in_method_declaration_parameters = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInMethodDeclarationParametersOption);// }// final Object insertSpaceBeforeCommaInMethodDeclarationThrowsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_DECLARATION_THROWS);// if (insertSpaceBeforeCommaInMethodDeclarationThrowsOption != null) {// this.insert_space_before_comma_in_method_declaration_throws = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInMethodDeclarationThrowsOption);// }// final Object insertSpaceBeforeCommaInMultipleFieldDeclarationsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_MULTIPLE_FIELD_DECLARATIONS);// if (insertSpaceBeforeCommaInMultipleFieldDeclarationsOption != null) {// this.insert_space_before_comma_in_multiple_field_declarations = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInMultipleFieldDeclarationsOption);// }// final Object insertSpaceBeforeCommaInMultipleLocalDeclarationsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_MULTIPLE_LOCAL_DECLARATIONS);// if (insertSpaceBeforeCommaInMultipleLocalDeclarationsOption != null) {// this.insert_space_before_comma_in_multiple_local_declarations = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInMultipleLocalDeclarationsOption);// }// final Object insertSpaceBeforeCommaInParameterizedTypeReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_PARAMETERIZED_TYPE_REFERENCE);// if (insertSpaceBeforeCommaInParameterizedTypeReferenceOption != null) {// this.insert_space_before_comma_in_parameterized_type_reference = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInParameterizedTypeReferenceOption);// }// final Object insertSpaceBeforeCommaInSuperinterfacesOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_SUPERINTERFACES);// if (insertSpaceBeforeCommaInSuperinterfacesOption != null) {// this.insert_space_before_comma_in_superinterfaces = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInSuperinterfacesOption);// }// final Object insertSpaceBeforeCommaInTypeArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_TYPE_ARGUMENTS);// if (insertSpaceBeforeCommaInTypeArgumentsOption != null) {// this.insert_space_before_comma_in_type_arguments = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInTypeArgumentsOption);// }// final Object insertSpaceBeforeCommaInTypeParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_TYPE_PARAMETERS);// if (insertSpaceBeforeCommaInTypeParametersOption != null) {// this.insert_space_before_comma_in_type_parameters = CCorePlugin.INSERT.equals(insertSpaceBeforeCommaInTypeParametersOption);// }// final Object insertSpaceBeforeEllipsisOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ELLIPSIS);// if (insertSpaceBeforeEllipsisOption != null) {// this.insert_space_before_ellipsis = CCorePlugin.INSERT.equals(insertSpaceBeforeEllipsisOption);// }// final Object insertSpaceBeforeOpeningAngleBrackerInParameterizedTypeReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE);// if (insertSpaceBeforeOpeningAngleBrackerInParameterizedTypeReferenceOption != null) {// this.insert_space_before_opening_angle_bracket_in_parameterized_type_reference = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningAngleBrackerInParameterizedTypeReferenceOption);// }// final Object insertSpaceBeforeOpeningAngleBrackerInTypeArgumentsOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_ARGUMENTS);// if (insertSpaceBeforeOpeningAngleBrackerInTypeArgumentsOption != null) {// this.insert_space_before_opening_angle_bracket_in_type_arguments = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningAngleBrackerInTypeArgumentsOption);// }// final Object insertSpaceBeforeOpeningAngleBrackerInTypeParametersOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETERS);// if (insertSpaceBeforeOpeningAngleBrackerInTypeParametersOption != null) {// this.insert_space_before_opening_angle_bracket_in_type_parameters = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningAngleBrackerInTypeParametersOption);// }// final Object insertSpaceBeforeOpeningBraceInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ARRAY_INITIALIZER);// if (insertSpaceBeforeOpeningBraceInArrayInitializerOption != null) {// this.insert_space_before_opening_brace_in_array_initializer = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInArrayInitializerOption);// }// final Object insertSpaceBeforeOpeningBraceInBlockOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_BLOCK);// if (insertSpaceBeforeOpeningBraceInBlockOption != null) {// this.insert_space_before_opening_brace_in_block = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInBlockOption);// }// final Object insertSpaceBeforeOpeningBraceInConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_CONSTRUCTOR_DECLARATION);// if (insertSpaceBeforeOpeningBraceInConstructorDeclarationOption != null) {// this.insert_space_before_opening_brace_in_constructor_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInConstructorDeclarationOption);// }// final Object insertSpaceBeforeOpeningBraceInEnumDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ENUM_DECLARATION);// if (insertSpaceBeforeOpeningBraceInEnumDeclarationOption != null) {// this.insert_space_before_opening_brace_in_enum_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInEnumDeclarationOption);// }// final Object insertSpaceBeforeOpeningBraceInEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_ENUM_CONSTANT);// if (insertSpaceBeforeOpeningBraceInEnumConstantOption != null) {// this.insert_space_before_opening_brace_in_enum_constant = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInEnumConstantOption);// }// final Object insertSpaceBeforeOpeningBraceInMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_METHOD_DECLARATION);// if (insertSpaceBeforeOpeningBraceInMethodDeclarationOption != null) {// this.insert_space_before_opening_brace_in_method_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInMethodDeclarationOption);// }// final Object insertSpaceBeforeOpeningBraceInTypeDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_TYPE_DECLARATION);// if (insertSpaceBeforeOpeningBraceInTypeDeclarationOption != null) {// this.insert_space_before_opening_brace_in_type_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInTypeDeclarationOption);// }// final Object insertSpaceBeforeOpeningBracketInArrayAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_ALLOCATION_EXPRESSION);// if (insertSpaceBeforeOpeningBracketInArrayAllocationExpressionOption != null) {// this.insert_space_before_opening_bracket_in_array_allocation_expression = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBracketInArrayAllocationExpressionOption);// }// final Object insertSpaceBeforeOpeningBracketInArrayReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_REFERENCE);// if (insertSpaceBeforeOpeningBracketInArrayReferenceOption != null) {// this.insert_space_before_opening_bracket_in_array_reference = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBracketInArrayReferenceOption);// }// final Object insertSpaceBeforeOpeningBracketInArrayTypeReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACKET_IN_ARRAY_TYPE_REFERENCE);// if (insertSpaceBeforeOpeningBracketInArrayTypeReferenceOption != null) {// this.insert_space_before_opening_bracket_in_array_type_reference = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBracketInArrayTypeReferenceOption);// }// final Object insertSpaceBeforeOpeningParenInCatchOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_CATCH);// if (insertSpaceBeforeOpeningParenInCatchOption != null) {// this.insert_space_before_opening_paren_in_catch = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInCatchOption);// }// final Object insertSpaceBeforeOpeningParenInConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_CONSTRUCTOR_DECLARATION);// if (insertSpaceBeforeOpeningParenInConstructorDeclarationOption != null) {// this.insert_space_before_opening_paren_in_constructor_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInConstructorDeclarationOption);// }// final Object insertSpaceBeforeOpeningParenInEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_ENUM_CONSTANT);// if (insertSpaceBeforeOpeningParenInEnumConstantOption != null) {// this.insert_space_before_opening_paren_in_enum_constant = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInEnumConstantOption);// }// final Object insertSpaceBeforeOpeningParenInForOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_FOR);// if (insertSpaceBeforeOpeningParenInForOption != null) {// this.insert_space_before_opening_paren_in_for = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInForOption);// }// final Object insertSpaceBeforeOpeningParenInIfOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_IF);// if (insertSpaceBeforeOpeningParenInIfOption != null) {// this.insert_space_before_opening_paren_in_if = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInIfOption);// }// final Object insertSpaceBeforeOpeningParenInMethodInvocationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_INVOCATION);// if (insertSpaceBeforeOpeningParenInMethodInvocationOption != null) {// this.insert_space_before_opening_paren_in_method_invocation = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInMethodInvocationOption);// }// final Object insertSpaceBeforeOpeningParenInMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_DECLARATION);// if (insertSpaceBeforeOpeningParenInMethodDeclarationOption != null) {// this.insert_space_before_opening_paren_in_method_declaration = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInMethodDeclarationOption);// }// final Object insertSpaceBeforeOpeningParenInSwitchOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_SWITCH);// if (insertSpaceBeforeOpeningParenInSwitchOption != null) {// this.insert_space_before_opening_paren_in_switch = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInSwitchOption);// }// final Object insertSpaceBeforeOpeningBraceInSwitchOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_SWITCH);// if (insertSpaceBeforeOpeningBraceInSwitchOption != null) {// this.insert_space_before_opening_brace_in_switch = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningBraceInSwitchOption);// }// final Object insertSpaceBeforeOpeningParenInSynchronizedOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_SYNCHRONIZED);// if (insertSpaceBeforeOpeningParenInSynchronizedOption != null) {// this.insert_space_before_opening_paren_in_synchronized = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInSynchronizedOption);// }// final Object insertSpaceBeforeOpeningParenInParenthesizedExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_PARENTHESIZED_EXPRESSION);// if (insertSpaceBeforeOpeningParenInParenthesizedExpressionOption != null) {// this.insert_space_before_opening_paren_in_parenthesized_expression = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInParenthesizedExpressionOption);// }// final Object insertSpaceBeforeOpeningParenInWhileOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_WHILE);// if (insertSpaceBeforeOpeningParenInWhileOption != null) {// this.insert_space_before_opening_paren_in_while = CCorePlugin.INSERT.equals(insertSpaceBeforeOpeningParenInWhileOption);// }// final Object insertSpaceBeforeParenthesizedExpressionInReturnOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_PARENTHESIZED_EXPRESSION_IN_RETURN);// if (insertSpaceBeforeParenthesizedExpressionInReturnOption != null) {// this.insert_space_before_parenthesized_expression_in_return = CCorePlugin.INSERT.equals(insertSpaceBeforeParenthesizedExpressionInReturnOption);// }// final Object insertSpaceBeforePostfixOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_POSTFIX_OPERATOR);// if (insertSpaceBeforePostfixOperatorOption != null) {// this.insert_space_before_postfix_operator = CCorePlugin.INSERT.equals(insertSpaceBeforePostfixOperatorOption);// }// final Object insertSpaceBeforePrefixOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_PREFIX_OPERATOR);// if (insertSpaceBeforePrefixOperatorOption != null) {// this.insert_space_before_prefix_operator = CCorePlugin.INSERT.equals(insertSpaceBeforePrefixOperatorOption);// }// final Object insertSpaceBeforeQuestionInConditionalOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_QUESTION_IN_CONDITIONAL);// if (insertSpaceBeforeQuestionInConditionalOption != null) {// this.insert_space_before_question_in_conditional = CCorePlugin.INSERT.equals(insertSpaceBeforeQuestionInConditionalOption);// }// final Object insertSpaceBeforeQuestionInWildcardOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_QUESTION_IN_WILDCARD);// if (insertSpaceBeforeQuestionInWildcardOption != null) {// this.insert_space_before_question_in_wilcard = CCorePlugin.INSERT.equals(insertSpaceBeforeQuestionInWildcardOption);// }// final Object insertSpaceBeforeSemicolonOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON);// if (insertSpaceBeforeSemicolonOption != null) {// this.insert_space_before_semicolon = CCorePlugin.INSERT.equals(insertSpaceBeforeSemicolonOption);// }// final Object insertSpaceBeforeSemicolonInForOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON_IN_FOR);// if (insertSpaceBeforeSemicolonInForOption != null) {// this.insert_space_before_semicolon_in_for = CCorePlugin.INSERT.equals(insertSpaceBeforeSemicolonInForOption);// }// final Object insertSpaceBeforeUnaryOperatorOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_UNARY_OPERATOR);// if (insertSpaceBeforeUnaryOperatorOption != null) {// this.insert_space_before_unary_operator = CCorePlugin.INSERT.equals(insertSpaceBeforeUnaryOperatorOption);// }// final Object insertSpaceBetweenBracketsInArrayTypeReferenceOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_BRACKETS_IN_ARRAY_TYPE_REFERENCE);// if (insertSpaceBetweenBracketsInArrayTypeReferenceOption != null) {// this.insert_space_between_brackets_in_array_type_reference = CCorePlugin.INSERT.equals(insertSpaceBetweenBracketsInArrayTypeReferenceOption);// }// final Object insertSpaceBetweenEmptyBracesInArrayInitializerOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_BRACES_IN_ARRAY_INITIALIZER);// if (insertSpaceBetweenEmptyBracesInArrayInitializerOption != null) {// this.insert_space_between_empty_braces_in_array_initializer = CCorePlugin.INSERT.equals(insertSpaceBetweenEmptyBracesInArrayInitializerOption);// }// final Object insertSpaceBetweenEmptyBracketsInArrayAllocationExpressionOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_BRACKETS_IN_ARRAY_ALLOCATION_EXPRESSION);// if (insertSpaceBetweenEmptyBracketsInArrayAllocationExpressionOption != null) {// this.insert_space_between_empty_brackets_in_array_allocation_expression = CCorePlugin.INSERT.equals(insertSpaceBetweenEmptyBracketsInArrayAllocationExpressionOption);// }// final Object insertSpaceBetweenEmptyParensInConstructorDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_CONSTRUCTOR_DECLARATION);// if (insertSpaceBetweenEmptyParensInConstructorDeclarationOption != null) {// this.insert_space_between_empty_parens_in_constructor_declaration = CCorePlugin.INSERT.equals(insertSpaceBetweenEmptyParensInConstructorDeclarationOption);// }// final Object insertSpaceBetweenEmptyParensInEnumConstantOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_ENUM_CONSTANT);// if (insertSpaceBetweenEmptyParensInEnumConstantOption != null) {// this.insert_space_between_empty_parens_in_enum_constant = CCorePlugin.INSERT.equals(insertSpaceBetweenEmptyParensInEnumConstantOption);// }// final Object insertSpaceBetweenEmptyParensInMethodDeclarationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_DECLARATION);// if (insertSpaceBetweenEmptyParensInMethodDeclarationOption != null) {// this.insert_space_between_empty_parens_in_method_declaration = CCorePlugin.INSERT.equals(insertSpaceBetweenEmptyParensInMethodDeclarationOption);// }// final Object insertSpaceBetweenEmptyParensInMethodInvocationOption = settings.get(CodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_INVOCATION);// if (insertSpaceBetweenEmptyParensInMethodInvocationOption != null) {// this.insert_space_between_empty_parens_in_method_invocation = CCorePlugin.INSERT.equals(insertSpaceBetweenEmptyParensInMethodInvocationOption);// }// final Object compactElseIfOption = settings.get(CodeFormatterConstants.FORMATTER_COMPACT_ELSE_IF);// if (compactElseIfOption != null) {// this.compact_else_if = CodeFormatterConstants.TRUE.equals(compactElseIfOption);// }// final Object keepGuardianClauseOnOneLineOption = settings.get(CodeFormatterConstants.FORMATTER_KEEP_GUARDIAN_CLAUSE_ON_ONE_LINE);// if (keepGuardianClauseOnOneLineOption != null) {// this.keep_guardian_clause_on_one_line = CodeFormatterConstants.TRUE.equals(keepGuardianClauseOnOneLineOption);// }// final Object keepElseStatementOnSameLineOption = settings.get(CodeFormatterConstants.FORMATTER_KEEP_ELSE_STATEMENT_ON_SAME_LINE);// if (keepElseStatementOnSameLineOption != null) {// this.keep_else_statement_on_same_line = CodeFormatterConstants.TRUE.equals(keepElseStatementOnSameLineOption);// }// final Object keepEmptyArrayInitializerOnOneLineOption = settings.get(CodeFormatterConstants.FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE);// if (keepEmptyArrayInitializerOnOneLineOption != null) {// this.keep_empty_array_initializer_on_one_line = CodeFormatterConstants.TRUE.equals(keepEmptyArrayInitializerOnOneLineOption);// }// final Object keepSimpleIfOnOneLineOption = settings.get(CodeFormatterConstants.FORMATTER_KEEP_SIMPLE_IF_ON_ONE_LINE);// if (keepSimpleIfOnOneLineOption != null) {// this.keep_simple_if_on_one_line = CodeFormatterConstants.TRUE.equals(keepSimpleIfOnOneLineOption);// }// final Object keepThenStatementOnSameLineOption = settings.get(CodeFormatterConstants.FORMATTER_KEEP_THEN_STATEMENT_ON_SAME_LINE);// if (keepThenStatementOnSameLineOption != null) {// this.keep_then_statement_on_same_line = CodeFormatterConstants.TRUE.equals(keepThenStatementOnSameLineOption);// }// final Object numberOfEmptyLinesToPreserveOption = settings.get(CodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE);// if (numberOfEmptyLinesToPreserveOption != null) {// try {// this.number_of_empty_lines_to_preserve = Integer.parseInt((String) numberOfEmptyLinesToPreserveOption);// } catch (NumberFormatException e) {// this.number_of_empty_lines_to_preserve = 0;// } catch(ClassCastException e) {// this.number_of_empty_lines_to_preserve = 0;// }// }// final Object putEmptyStatementOnNewLineOption = settings.get(CodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE);// if (putEmptyStatementOnNewLineOption != null) {// this.put_empty_statement_on_new_line = CodeFormatterConstants.TRUE.equals(putEmptyStatementOnNewLineOption);// } final Object tabSizeOption = settings.get(CodeFormatterConstants.FORMATTER_TAB_SIZE); if (tabSizeOption != null) { try { this.tab_size = Integer.parseInt((String) tabSizeOption); } catch (NumberFormatException e) { this.tab_size = 4; } catch(ClassCastException e) { this.tab_size = 4; } } final Object useTabsOnlyForLeadingIndentationsOption = settings.get(CodeFormatterConstants.FORMATTER_USE_TABS_ONLY_FOR_LEADING_INDENTATIONS); if (useTabsOnlyForLeadingIndentationsOption != null) { this.use_tabs_only_for_leading_indentations = CodeFormatterConstants.TRUE.equals(useTabsOnlyForLeadingIndentationsOption); } final Object pageWidthOption = settings.get(CodeFormatterConstants.FORMATTER_LINE_SPLIT); if (pageWidthOption != null) { try { this.page_width = Integer.parseInt((String) pageWidthOption); } catch (NumberFormatException e) { this.page_width = 80; } catch(ClassCastException e) { this.page_width = 80; } } final Object useTabOption = settings.get(CodeFormatterConstants.FORMATTER_TAB_CHAR); if (useTabOption != null) { if (CCorePlugin.TAB.equals(useTabOption)) { this.tab_char = TAB; } else if (CCorePlugin.SPACE.equals(useTabOption)) { this.tab_char = SPACE; } else { this.tab_char = MIXED; } } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/0482b3954404fd528d629e737114a70d018a10db/DefaultCodeFormatterOptions.java/buggy/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/DefaultCodeFormatterOptions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
12,
863,
1947,
13,
288,
202,
202,
6385,
1033,
8710,
1290,
4628,
382,
17353,
2300,
1895,
273,
1947,
18,
588,
12,
1085,
5074,
2918,
18,
7254,
2560,
67,
26439,
3212,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
12,
863,
1947,
13,
288,
202,
202,
6385,
1033,
8710,
1290,
4628,
382,
17353,
2300,
1895,
273,
1947,
18,
588,
12,
1085,
5074,
2918,
18,
7254,
2560,
67,
26439,
3212,
67... |
context.operands.push(new Double(Math.abs(data[0]))); | context.operands.push(new Long(Math.round(data[0]))); | public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.abs(data[0]))); } | 4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/d2f614f1cabfa6f585b4e67b060a3e4e49a9f71e/PAContext.java/clean/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1645,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
1854,
3542,
5708,
12,
21,
1769,
3639,
819,
18,
4063,
570... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1645,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
1854,
3542,
5708,
12,
21,
1769,
3639,
819,
18,
4063,
570... |
public org.quickfix.field.UnderlyingMaturityDate getUnderlyingMaturityDate() throws FieldNotFound { org.quickfix.field.UnderlyingMaturityDate value = new org.quickfix.field.UnderlyingMaturityDate(); | public quickfix.field.UnderlyingMaturityDate getUnderlyingMaturityDate() throws FieldNotFound { quickfix.field.UnderlyingMaturityDate value = new quickfix.field.UnderlyingMaturityDate(); | public org.quickfix.field.UnderlyingMaturityDate getUnderlyingMaturityDate() throws FieldNotFound { org.quickfix.field.UnderlyingMaturityDate value = new org.quickfix.field.UnderlyingMaturityDate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/CrossOrderCancelReplaceRequest.java/clean/src/java/src/quickfix/fix44/CrossOrderCancelReplaceRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
15947,
2336,
1626,
10833,
765,
6291,
15947,
2336,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
15947,
2336,
1626,
10833,
765,
6291,
15947,
2336,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
... |
MuleConfiguration cfg = ((MuleManager)digester.getRoot()).getConfiguration(); | MuleConfiguration cfg = MuleManager.getConfiguration(); | protected void addThreadingProfileRules(Digester digester, String path, final String type) { //set threading profile digester.addRule(path + "/threading-profile", new Rule(){ public void begin(String s, String s1, Attributes attributes) throws Exception { //use the default as a template MuleConfiguration cfg = ((MuleManager)digester.getRoot()).getConfiguration(); if("component".equals(type)) { digester.push(cfg.getComponentThreadingProfile()); } else if("messageReceiver".equals(type)) { digester.push(cfg.getComponentThreadingProfile()); } else if("messageDispatcher".equals(type)) { digester.push(cfg.getComponentThreadingProfile()); } else { digester.push(cfg.getDefaultThreadingProfile()); } } public void end(String s, String s1) throws Exception { digester.pop(); } }); //set threading profile SetPropertiesRule threadingRule = new SetPropertiesRule(); threadingRule.addAlias("setPoolExhaustedAction", "setPoolExhaustedActionString"); digester.addRule(path + "/threading-profile", threadingRule); digester.addSetNext(path + "/threading-profile", "setThreadingProfile"); } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/cedf2fc1e9973b1ed339f2698bf2a2085f7cca7e/MuleXmlConfigurationBuilder.java/buggy/src/java/org/mule/config/builders/MuleXmlConfigurationBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
3830,
310,
4029,
4478,
12,
4907,
7654,
23821,
16,
514,
589,
16,
727,
514,
618,
13,
565,
288,
3639,
368,
542,
17254,
3042,
3639,
23821,
18,
1289,
2175,
12,
803,
397,
2206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
3830,
310,
4029,
4478,
12,
4907,
7654,
23821,
16,
514,
589,
16,
727,
514,
618,
13,
565,
288,
3639,
368,
542,
17254,
3042,
3639,
23821,
18,
1289,
2175,
12,
803,
397,
2206... |
try { Thread.sleep(30L * 1000L); } catch (Exception e) { } | try { Thread.sleep(30L * 1000L); } catch (Exception e) { } | public void run() throws Exception { Log log = LogFactory.getLog(SimpleTriggerExample.class); log.info("------- Initializing -------------------"); // First we must get a reference to a scheduler SchedulerFactory sf = new StdSchedulerFactory(); Scheduler sched = sf.getScheduler(); log.info("------- Initialization Complete --------"); log.info("------- Scheduling Jobs ----------------"); // jobs can be scheduled before sched.start() has been called // get a "nice round" time a few seconds in the future... long ts = TriggerUtils.getNextGivenSecondDate(null, 15).getTime(); // job1 will only fire once at date/time "ts" JobDetail job = new JobDetail("job1", "group1", SimpleJob.class); SimpleTrigger trigger = new SimpleTrigger("trigger1", "group1", new Date(ts)); // schedule it to run! Date ft = sched.scheduleJob(job, trigger); log.info(job.getFullName() + " will run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); // job2 will only fire once at date/time "ts" job = new JobDetail("job2", "group1", SimpleJob.class); trigger = new SimpleTrigger("trigger2", "group1", "job2", "group1", new Date(ts), null, 0, 0); ft = sched.scheduleJob(job, trigger); log.info(job.getFullName() + " will run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); // job3 will run 11 times (run once and repeat 10 more times) // job3 will repeat every 10 seconds (10000 ms) job = new JobDetail("job3", "group1", SimpleJob.class); trigger = new SimpleTrigger("trigger3", "group1", "job3", "group1", new Date(ts), null, 10, 10000L); ft = sched.scheduleJob(job, trigger); log.info(job.getFullName() + " will run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); // the same job (job3) will be scheduled by a another trigger // this time will only run every 70 seocnds (70000 ms) trigger = new SimpleTrigger("trigger3", "group2", "job3", "group1", new Date(ts), null, 2, 70000L); ft = sched.scheduleJob(trigger); log.info(job.getFullName() + " will [also] run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); // job4 will run 6 times (run once and repeat 5 more times) // job4 will repeat every 10 seconds (10000 ms) job = new JobDetail("job4", "group1", SimpleJob.class); trigger = new SimpleTrigger("trigger4", "group1", "job4", "group1", new Date(ts), null, 5, 10000L); ft = sched.scheduleJob(job, trigger); log.info(job.getFullName() + " will run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); // job5 will run once, five minutes past "ts" (300 seconds past "ts") job = new JobDetail("job5", "group1", SimpleJob.class); trigger = new SimpleTrigger("trigger5", "group1", "job5", "group1", new Date(ts + 300000L), null, 0, 0); ft = sched.scheduleJob(job, trigger); log.info(job.getFullName() + " will run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); // job6 will run indefinitely, every 50 seconds job = new JobDetail("job6", "group1", SimpleJob.class); trigger = new SimpleTrigger("trigger6", "group1", "job6", "group1", new Date(ts), null, SimpleTrigger.REPEAT_INDEFINITELY, 50000L); ft = sched.scheduleJob(job, trigger); log.info(job.getFullName() + " will run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); log.info("------- Starting Scheduler ----------------"); // All of the jobs have been added to the scheduler, but none of the jobs // will run until the scheduler has been started sched.start(); log.info("------- Started Scheduler -----------------"); // jobs can also be scheduled after start() has been called... // job7 will repeat 20 times, repeat every five minutes job = new JobDetail("job7", "group1", SimpleJob.class); trigger = new SimpleTrigger("trigger7", "group1", "job7", "group1", new Date(ts), null, 20, 300000L); ft = sched.scheduleJob(job, trigger); log.info(job.getFullName() + " will run at: " + ft + " and repeat: " + trigger.getRepeatCount() + " times, every " + trigger.getRepeatInterval() / 1000 + " seconds"); // jobs can be fired directly... (rather than waiting for a trigger) job = new JobDetail("job8", "group1", SimpleJob.class); job.setDurability(true); sched.addJob(job, true); log.info("'Manually' triggering job8..."); sched.triggerJob("job8", "group1"); log.info("------- Waiting 30 seconds... --------------"); try { // wait 30 seconds to show jobs Thread.sleep(30L * 1000L); // executing... } catch (Exception e) { } // jobs can be re-scheduled... // job 7 will run immediately and repeat 10 times for every second log.info("------- Rescheduling... --------------------"); trigger = new SimpleTrigger("trigger7", "group1", "job7", "group1", new Date(), null, 10, 1000L); ft = sched.rescheduleJob("trigger7", "group1", trigger); log.info("job7 rescheduled to run at: " + ft); log.info("------- Waiting five minutes... ------------"); try { // wait five minutes to show jobs Thread.sleep(300L * 1000L); // executing... } catch (Exception e) { } log.info("------- Shutting Down ---------------------"); sched.shutdown(true); log.info("------- Shutdown Complete -----------------"); // display some stats about the schedule that just ran SchedulerMetaData metaData = sched.getMetaData(); log.info("Executed " + metaData.numJobsExecuted() + " jobs."); } | 3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/8441c8be6e16f3f87693ab6cfeae2bf90caf7159/SimpleTriggerExample.java/buggy/examples/src/java/org/quartz/examples/example2/SimpleTriggerExample.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
1216,
1185,
288,
202,
202,
1343,
613,
273,
1827,
1733,
18,
588,
1343,
12,
5784,
6518,
10908,
18,
1106,
1769,
202,
202,
1330,
18,
1376,
2932,
17082,
10188,
6894,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
1216,
1185,
288,
202,
202,
1343,
613,
273,
1827,
1733,
18,
588,
1343,
12,
5784,
6518,
10908,
18,
1106,
1769,
202,
202,
1330,
18,
1376,
2932,
17082,
10188,
6894,... |
if ( model.isErrorColumnProfile(row) ) | if ( model.isErrorColumnProfile(row2) ) | public TableCellRenderer getCellRenderer(int row, int column) { TableModelSortDecorator t = (TableModelSortDecorator) getModel(); ProfileTableModel model = (ProfileTableModel) t.getTableModel(); int modelColumn = convertColumnIndexToModel(column); ProfileColumn pc = ProfileColumn.values()[modelColumn]; switch(pc) { case DATABASE: case SCHEMA: case CATALOG: case TABLE: case COLUMN: SQLObjectRendererFactory objectRendererFactory = new SQLObjectRendererFactory(); if ( model.isErrorColumnProfile(row) ) objectRendererFactory.setError(true); return objectRendererFactory; case RUNDATE: return new DateRendererFactory(); case PERCENT_UNIQUE: case PERCENT_NULL: return new PercentRendererFactory(); case AVERAGE_LENGTH: return new DecimalRendererFactory(); case MIN_VALUE: case MAX_VALUE: case AVERAGE_VALUE: return new ValueRendererFactory(); case TOP_VALUE: ValueRendererFactory valueRendererFactory = new ValueRendererFactory(); StringBuffer toolTip = new StringBuffer(); List<ColumnValueCount> topNValue = model.getTopNValueAt(row); if ( topNValue != null ) { toolTip.append("<html><table>"); for ( ColumnValueCount v : topNValue ) { toolTip.append("<tr>"); toolTip.append("<td align=\"left\">"); if ( v.getValue() == null ) { toolTip.append("null"); } else { toolTip.append(v.getValue().toString()); } toolTip.append("</td>"); toolTip.append("<td> </td>"); toolTip.append("<td align=\"right\">"); toolTip.append(v.getCount()); toolTip.append("</td>"); toolTip.append("</tr>"); } toolTip.append("</table></html>"); valueRendererFactory.setToolTipText(toolTip.toString()); } return valueRendererFactory; default: return super.getCellRenderer(row, column); } } | 53257 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53257/42f6a0a8e97fd00286c5891e7852251bcd6bc110/ProfileTable.java/clean/src/ca/sqlpower/architect/swingui/ProfileTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3555,
4020,
6747,
16458,
6747,
12,
474,
1027,
16,
509,
1057,
13,
288,
3639,
3555,
1488,
4416,
10361,
268,
273,
261,
1388,
1488,
4416,
10361,
13,
7454,
5621,
3639,
11357,
1388,
1488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3555,
4020,
6747,
16458,
6747,
12,
474,
1027,
16,
509,
1057,
13,
288,
3639,
3555,
1488,
4416,
10361,
268,
273,
261,
1388,
1488,
4416,
10361,
13,
7454,
5621,
3639,
11357,
1388,
1488,
... |
if (saveablesSourceHelper != null) { saveablesSourceHelper.dispose(); saveablesSourceHelper = null; } | public void dispose() { if (commonManager != null) { commonManager.dispose(); } if(commonActionGroup != null) { commonActionGroup.dispose(); } if (saveablesSourceHelper != null) { saveablesSourceHelper.dispose(); saveablesSourceHelper = null; } super.dispose(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/74644d9992cb1a835eb923ff9904e153fb81045c/CommonNavigator.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15825,
1435,
288,
202,
202,
430,
261,
6054,
1318,
480,
446,
13,
288,
1082,
202,
6054,
1318,
18,
2251,
4150,
5621,
202,
202,
97,
202,
202,
430,
12,
6054,
1803,
1114,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15825,
1435,
288,
202,
202,
430,
261,
6054,
1318,
480,
446,
13,
288,
1082,
202,
6054,
1318,
18,
2251,
4150,
5621,
202,
202,
97,
202,
202,
430,
12,
6054,
1803,
1114,
480,
... | |
pathBeyondViewID = pathInfo.substring(viewParameters.viewID.length()); | pathBeyondViewID = pathInfo.substring(viewParameters.viewID.length() + 1); | public boolean handle() { String viewID = viewParameters.viewID; Logger.log.info("Handling view: " + viewID); String pathBeyondViewID = "" ; if (pathInfo.length() > viewID.length() + 1) { pathBeyondViewID = pathInfo.substring(viewParameters.viewID.length()); } if (Logger.log.isInfoEnabled()) { Logger.log.info("pathInfo: " + pathInfo + " pathBeyondViewID: " + pathBeyondViewID); } if (pathBeyondViewID.startsWith(HELPER_FINISHED_PATH)) { return handleHelperDone(); } if (pathBeyondViewID.startsWith(IN_HELPER_PATH)) { return handleHelperHelper(pathBeyondViewID); } return handleHelperStart(); } | 46221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46221/c6fc8892a1bb06055d80a4b0669dbe7ee324e5bb/HelperHandlerHookBean.java/buggy/src/java/uk/ac/cam/caret/sakai/rsf/helper/HelperHandlerHookBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1640,
1435,
288,
202,
202,
780,
1476,
734,
273,
1476,
2402,
18,
1945,
734,
31,
202,
202,
3328,
18,
1330,
18,
1376,
2932,
14701,
1476,
30,
315,
397,
1476,
734,
1769,
9506... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
1435,
288,
202,
202,
780,
1476,
734,
273,
1476,
2402,
18,
1945,
734,
31,
202,
202,
3328,
18,
1330,
18,
1376,
2932,
14701,
1476,
30,
315,
397,
1476,
734,
1769,
9506... |
assert decl != null; | assert declarationStatement != null; | private static String createCollectionIterationText( @NotNull PsiForStatement forStatement) throws IncorrectOperationException{ final String text = forStatement.getText(); final int length = text.length(); @NonNls final StringBuffer out = new StringBuffer(length); final PsiStatement body = forStatement.getBody(); final PsiStatement firstStatement = getFirstStatement(body); final PsiStatement initialization = forStatement.getInitialization(); final PsiDeclarationStatement declaration = (PsiDeclarationStatement) initialization; if (declaration == null) { return null; } final PsiLocalVariable iterator = (PsiLocalVariable) declaration.getDeclaredElements()[0]; final PsiClassType iteratorType = (PsiClassType) iterator.getType(); final PsiType[] iteratorTypeParameters = iteratorType .getParameters(); PsiType iteratedContentsType = null; if(iteratorTypeParameters.length == 1){ final PsiType parameterType = iteratorTypeParameters[0]; if(parameterType instanceof PsiWildcardType){ final PsiWildcardType wildcardType = (PsiWildcardType) parameterType; iteratedContentsType = wildcardType.getExtendsBound(); } else{ iteratedContentsType = parameterType; } } final PsiMethodCallExpression initializer = (PsiMethodCallExpression) iterator.getInitializer(); if (initializer == null) { return null; } final PsiReferenceExpression methodExpression = initializer.getMethodExpression(); final PsiExpression collection = methodExpression.getQualifierExpression(); if (collection == null) { return null; } final PsiClassType collectionType = (PsiClassType) collection.getType(); if (collectionType == null) { return null; } final PsiType[] parameters = collectionType.getParameters(); final String collectionContentsTypeString; if(parameters.length == 1){ final PsiType parameterType = parameters[0]; if(parameterType instanceof PsiWildcardType){ final PsiWildcardType wildcardType = (PsiWildcardType) parameterType; final PsiType bound = wildcardType.getExtendsBound(); collectionContentsTypeString = bound.getCanonicalText(); } else if(parameterType != null){ collectionContentsTypeString = parameterType .getCanonicalText(); } else{ collectionContentsTypeString = "java.lang.Object"; } } else{ collectionContentsTypeString = "java.lang.Object"; } final String contentTypeString; if(iteratedContentsType != null){ contentTypeString = iteratedContentsType.getCanonicalText(); } else{ contentTypeString = collectionContentsTypeString; } final PsiManager psiManager = forStatement.getManager(); final PsiElementFactory elementFactory = psiManager.getElementFactory(); final PsiType contentType = elementFactory.createTypeFromText(contentTypeString, forStatement); final String iteratorName = iterator.getName(); final boolean isDeclaration = isIteratorNextDeclaration(firstStatement, iteratorName, contentTypeString); final PsiStatement statementToSkip; @NonNls final String finalString; final String contentVariableName; if(isDeclaration){ final PsiDeclarationStatement decl = (PsiDeclarationStatement) firstStatement; assert decl != null; final PsiElement[] declaredElements = decl.getDeclaredElements(); final PsiLocalVariable localVar = (PsiLocalVariable) declaredElements[0]; contentVariableName = localVar.getName(); statementToSkip = decl; if(localVar.hasModifierProperty(PsiModifier.FINAL)){ finalString = "final "; } else{ finalString = ""; } } else{ if(collection instanceof PsiReferenceExpression){ final PsiReferenceExpression referenceExpression = (PsiReferenceExpression)collection; final String collectionName = referenceExpression.getReferenceName(); contentVariableName = createNewVarName(forStatement, contentType, collectionName); } else{ contentVariableName = createNewVarName(forStatement, contentType, null); } final Project project = forStatement.getProject(); final CodeStyleSettings codeStyleSettings = CodeStyleSettingsManager.getSettings(project); if(codeStyleSettings.GENERATE_FINAL_LOCALS){ finalString = "final "; } else{ finalString = ""; } statementToSkip = null; } @NonNls final String iterableTypeString = "java.lang.Iterable<" + contentTypeString + '>'; final PsiManager manager = forStatement.getManager(); final PsiElementFactory factory = manager.getElementFactory(); final PsiType collectionContentsType = factory .createTypeFromText(collectionContentsTypeString, forStatement); final String castString; if(iteratedContentsType == null || iteratedContentsType .isAssignableFrom(collectionContentsType)){ castString = ""; } else{ castString = '(' + iterableTypeString + ')'; } out.append("for("); out.append(finalString); out.append(contentTypeString); out.append(' '); out.append(contentVariableName); out.append(": "); out.append(castString); out.append(collection.getText()); out.append(')'); replaceIteratorNext(body, contentVariableName, iteratorName, statementToSkip, out, contentTypeString); return out.toString(); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/9c59a0ba1e8fc5685a99bd20714c4dfa226d5c4c/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/jdk15/ForCanBeForeachInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
760,
514,
752,
2532,
10795,
1528,
12,
7734,
632,
5962,
453,
7722,
1290,
3406,
364,
3406,
13,
7734,
1216,
657,
6746,
10602,
95,
5411,
727,
514,
977,
273,
364,
3406,
18,
588,
1528,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
760,
514,
752,
2532,
10795,
1528,
12,
7734,
632,
5962,
453,
7722,
1290,
3406,
364,
3406,
13,
7734,
1216,
657,
6746,
10602,
95,
5411,
727,
514,
977,
273,
364,
3406,
18,
588,
1528,
... |
String status = null; | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //boolean hasInternalWhitespace = false; rlistener.startSequence(); if (ns==null) ns=RichObjectFactory.getDefaultNamespace(); rlistener.setNamespace(ns); // Get an ordered list of key->value pairs in array-tuples String sectionKey = null; NCBITaxon tax = null; String organism = null; String accession = null; int xrefCount = 0; do { List section = this.readSection(reader); sectionKey = ((String[])section.get(0))[0]; if(sectionKey == null){ throw new ParseException("Section key was null. Accession:"+ accession == null ? "Not set" : accession); } // process section-by-section if (sectionKey.equals(LOCUS_TAG)) { // entryname dataclass; moltype; sequencelength AA. String loc = ((String[])section.get(0))[1]; Matcher m = lp.matcher(loc); if (m.matches()) { rlistener.setName(m.group(2)); rlistener.setDivision(m.group(3)); rlistener.addSequenceProperty(Terms.getDataClassTerm(),m.group(4)); rlistener.addSequenceProperty(Terms.getMolTypeTerm(),m.group(5)); } else { throw new ParseException("Bad ID line found: "+loc); } } else if (sectionKey.equals(DEFINITION_TAG)) { String val = ((String[])section.get(0))[1]; if (val.endsWith(".")) val = val.substring(0, val.length()-1); // chomp dot rlistener.setDescription(val); } else if (sectionKey.equals(SOURCE_TAG)) { // use SOURCE_TAG and TAXON_TAG values String sciname = null; String comname = null; List synonym = new ArrayList(); int taxid = 0; for (int i = 0; i < section.size(); i++) { String tag = ((String[])section.get(i))[0]; String value = ((String[])section.get(i))[1].trim(); if (tag.equals(SOURCE_TAG)) { if (value.endsWith(".")) value = value.substring(0,value.length()-1); // chomp trailing dot String[] parts = value.split("\\("); sciname = parts[0].trim(); if (parts.length>1) { comname = parts[1].trim(); if (comname.endsWith(")")) comname = comname.substring(0,comname.length()-1); // chomp trailing bracket if (parts.length>2) { // synonyms for (int j = 2 ; j < parts.length; j++) { String syn = parts[j].trim(); if (syn.endsWith(")")) syn = syn.substring(0,syn.length()-1); // chomp trailing bracket synonym.add(syn); } } } } else if (tag.equals(TAXON_TAG)) { String[] parts = value.split(";"); for (int j = 0; j < parts.length; j++) { String[] bits = parts[j].split("="); if (bits[0].equals("NCBI_TaxID")) { String[] morebits = bits[1].split(","); taxid = Integer.parseInt(morebits[0].trim()); } } } else if (tag.equals(ORGANELLE_TAG)) { if (value.endsWith(".")) value = value.substring(0,value.length()-1); // chomp trailing dot String[] parts = value.split(";"); for (int j = 0; j < parts.length; j++) { parts[j]=parts[j].trim(); rlistener.addSequenceProperty(Terms.getOrganelleTerm(),parts[j]); } } } // Set the Taxon tax = (NCBITaxon)RichObjectFactory.getObject(SimpleNCBITaxon.class, new Object[]{new Integer(taxid)}); rlistener.setTaxon(tax); try { if (sciname!=null) tax.addName(NCBITaxon.SCIENTIFIC,sciname); if (comname!=null) tax.addName(NCBITaxon.COMMON,comname); for (Iterator j = synonym.iterator(); j.hasNext(); ) tax.addName(NCBITaxon.SYNONYM, (String)j.next()); } catch (ChangeVetoException e) { throw new ParseException(e); } } else if (sectionKey.equals(DATE_TAG)) { String chunk = ((String[])section.get(0))[1]; Matcher dm = dp.matcher(chunk); if (dm.matches()) { String date = dm.group(1).trim(); String type = dm.group(2).trim(); String rel = dm.group(3); if (rel!=null) rel = rel.trim(); if (type.startsWith("integrated into UniProtKB")) { String dbname = type.split("/")[1]; rlistener.addSequenceProperty(Terms.getDateCreatedTerm(), date); rlistener.addSequenceProperty(Terms.getUniProtDBNameTerm(), dbname); } else if (type.equalsIgnoreCase("sequence version")) { if (rel==null) throw new ParseException("Version missing for "+type); rlistener.addSequenceProperty(Terms.getDateUpdatedTerm(), date); rlistener.addSequenceProperty(Terms.getRelUpdatedTerm(), rel); } else if (type.equalsIgnoreCase("entry version")) { if (rel==null) throw new ParseException("Version missing for "+type); rlistener.addSequenceProperty(Terms.getDateAnnotatedTerm(), date); rlistener.addSequenceProperty(Terms.getRelAnnotatedTerm(), rel); } else throw new ParseException("Bad date type found: "+type); } else throw new ParseException("Bad date line found: "+chunk); } else if (sectionKey.equals(ACCESSION_TAG)) { // if multiple accessions, store only first as accession, // and store rest in annotation String[] accs = ((String[])section.get(0))[1].split(";"); accession = accs[0].trim(); rlistener.setAccession(accession); for (int i = 1; i < accs.length; i++) { rlistener.addSequenceProperty(Terms.getAdditionalAccessionTerm(),accs[i].trim()); } } else if (sectionKey.equals(KEYWORDS_TAG)) { String val = ((String[])section.get(0))[1]; if (val.endsWith(".")) val = val.substring(0, val.length()-1); // chomp dot String[] kws = val.split(";"); for (int i = 0; i < kws.length; i++) { String kw = kws[i].trim(); if (kw.length()==0) continue; rlistener.addSequenceProperty(Terms.getKeywordTerm(), kw); } } else if (sectionKey.equals(GENE_TAG)) { String[] genes = ((String[])section.get(0))[1].split("\\s+(or|and)\\s+"); for (int geneID = 0; geneID < genes.length; geneID++) { String[] parts = genes[geneID].split(";"); for (int j = 0; j < parts.length; j++) { String[] moreparts = parts[j].split("="); String[] values = moreparts[1].split(","); // nasty hack - we really should have notes on the gene object itself... if such a thing existed... if (moreparts[0].trim().equals(Terms.GENENAME_KEY)) rlistener.addSequenceProperty(Terms.getGeneNameTerm(),geneID+":"+values[0].trim()); else if (moreparts[0].trim().equals(Terms.GENESYNONYM_KEY)) { for (int k = 0; k < values.length; k++) rlistener.addSequenceProperty(Terms.getGeneSynonymTerm(),geneID+":"+values[k].trim()); } else if (moreparts[0].trim().equals(Terms.ORDLOCNAME_KEY)) { for (int k = 0; k < values.length; k++) rlistener.addSequenceProperty(Terms.getOrderedLocusNameTerm(),geneID+":"+values[k].trim()); } else if (moreparts[0].trim().equals(Terms.ORFNAME_KEY)) { for (int k = 0; k < values.length; k++) rlistener.addSequenceProperty(Terms.getORFNameTerm(),geneID+":"+values[k].trim()); } } } } else if (sectionKey.equals(DATABASE_XREF_TAG)) { // database_identifier; primary_identifier; secondary_identifier.... String val = ((String[])section.get(0))[1]; if (val.endsWith(".")) val = val.substring(0, val.length()-1); // chomp dot String[] parts = val.split(";"); // construct a DBXREF out of the dbname part[0] and accession part[1] String dbname = parts[0].trim(); String acc = parts[1].trim(); CrossRef crossRef = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{dbname,acc,new Integer(0)}); // assign remaining bits of info as additional accession annotations for (int j = 2; j < parts.length; j++) { ComparableTerm t = (ComparableTerm)Terms.getAdditionalAccessionTerm(); Note note = new SimpleNote(t,parts[j].trim(),j); try { ((RichAnnotation)crossRef.getAnnotation()).addNote(note); } catch (ChangeVetoException ce) { ParseException pe = new ParseException("Could not annotate additional accession terms"); pe.initCause(ce); throw pe; } } RankedCrossRef rcrossRef = new SimpleRankedCrossRef(crossRef, ++xrefCount); rlistener.setRankedCrossRef(rcrossRef); } else if (sectionKey.equals(REFERENCE_TAG) && !this.getElideReferences()) { // first line of section has rank and location String refrank = ((String[])section.get(0))[1]; int ref_rank = Integer.parseInt(refrank.substring(1,refrank.length()-1)); // rest can be in any order String authors = null; String consortium = null; String title = null; String locator = null; String pubmed = null; String medline = null; String doi = null; String remark = null; Integer rstart = null; Integer rend = null; for (int i = 1; i < section.size(); i++) { String key = ((String[])section.get(i))[0]; String val = ((String[])section.get(i))[1]; //System.err.println(key+": "+val); if (key.equals(AUTHORS_TAG)) { if (val.endsWith(";")) val = val.trim().substring(0, val.length()-1); // chomp semicolon authors = val; } if (key.equals(CONSORTIUM_TAG)) { if (val.endsWith(";")) val = val.trim().substring(0, val.length()-1); // chomp semicolon consortium = val; } if (key.equals(TITLE_TAG)) { if (val.endsWith(";")) val = val.trim().substring(0, val.length()-1); // chomp semicolon if (val.endsWith("\"")) val = val.trim().substring(1, val.length()-2); // chomp quotes title = val; } if (key.equals(LOCATION_TAG)) { if (val.endsWith(".")) val = val.trim().substring(0, val.length()-1); // chomp dot locator = val; } if (key.equals(REFERENCE_XREF_TAG)) { // database_identifier=primary_identifier; String[] refs = val.split(";"); for (int j = 0 ; j < refs.length; j++) { if (refs[j].trim().length()==0) continue; String[] parts = refs[j].split("="); String db = parts[0]; String ref = parts[1]; if (db.equalsIgnoreCase(Terms.PUBMED_KEY)) pubmed = ref; else if (db.equalsIgnoreCase(Terms.MEDLINE_KEY)) medline = ref; else if (db.equalsIgnoreCase(Terms.DOI_KEY)) doi = ref; } } if (key.equals(RP_LINE_TAG)) { remark = val; if (val.endsWith(".")) val = val.substring(0, val.length()-1); // chomp dot // Try to use it to find the location of the reference, if we have one. Matcher m = rppat.matcher(val); if (m.matches()) { rstart = Integer.valueOf(m.group(1)); rend = Integer.valueOf(m.group(2)); } } if (key.equals(RC_LINE_TAG)) { // Split into key=value pairs separated by semicolons and terminated with semicolon. String[] parts = val.split(";"); for (int j = 0; j < parts.length; j++) { String[] subparts = parts[j].split("="); // get term for first section String termName = subparts[0].trim(); Term t; if (termName.equalsIgnoreCase(Terms.SPECIES_KEY)) t = Terms.getSpeciesTerm(); else if (termName.equalsIgnoreCase(Terms.STRAIN_KEY)) t = Terms.getStrainTerm(); else if (termName.equalsIgnoreCase(Terms.TISSUE_KEY)) t = Terms.getTissueTerm(); else if (termName.equalsIgnoreCase(Terms.TRANSPOSON_KEY)) t = Terms.getTransposonTerm(); else if (termName.equalsIgnoreCase(Terms.PLASMID_KEY)) t = Terms.getPlasmidTerm(); else throw new ParseException("Invalid RC term found: "+termName); // assign notes using term and rank:second section as value // nasty hack - we really should have notes on the reference itself. rlistener.addSequenceProperty(t, ref_rank+":"+subparts[1].trim()); } } } // create the pubmed crossref and assign to the bioentry CrossRef pcr = null; if (pubmed!=null) { pcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{Terms.PUBMED_KEY, pubmed, new Integer(0)}); RankedCrossRef rpcr = new SimpleRankedCrossRef(pcr, 0); rlistener.setRankedCrossRef(rpcr); } // create the medline crossref and assign to the bioentry CrossRef mcr = null; if (medline!=null) { mcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{Terms.MEDLINE_KEY, medline, new Integer(0)}); RankedCrossRef rmcr = new SimpleRankedCrossRef(mcr, 0); rlistener.setRankedCrossRef(rmcr); } // create the doi crossref and assign to the bioentry CrossRef dcr = null; if (doi!=null) { dcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{Terms.DOI_KEY, doi, new Integer(0)}); RankedCrossRef rdcr = new SimpleRankedCrossRef(dcr, 0); rlistener.setRankedCrossRef(rdcr); } // create the docref object try { List auths = null; if(authors != null) auths = DocRefAuthor.Tools.parseAuthorString(authors); if (consortium!=null){ if(auths == null) auths = new ArrayList(); auths.add(new SimpleDocRefAuthor(consortium,true,false)); } DocRef dr = (DocRef)RichObjectFactory.getObject(SimpleDocRef.class,new Object[]{auths,locator}); if (title!=null) dr.setTitle(title); // assign either the pubmed or medline to the docref - medline gets priority, then pubmed, then doi if (mcr!=null) dr.setCrossref(mcr); else if (pcr!=null) dr.setCrossref(pcr); else if (dcr!=null) dr.setCrossref(dcr); // assign the remarks if (!this.getElideComments()) dr.setRemark(remark); // assign the docref to the bioentry RankedDocRef rdr = new SimpleRankedDocRef(dr,rstart,rend,ref_rank); rlistener.setRankedDocRef(rdr); } catch (ChangeVetoException e) { throw new ParseException(e); } } else if (sectionKey.equals(COMMENT_TAG) && !this.getElideComments()) { // Set up some comments String val = ((String[])section.get(0))[1]; if (UniProtCommentParser.isParseable(val)) rlistener.setComment(val); else { // copyright message rlistener.addSequenceProperty(Terms.getCopyrightTerm(), val); } } else if (sectionKey.equals(FEATURE_TAG) && !this.getElideFeatures()) { // starting from second line of input, start a new feature whenever we come across // a key that does not start with / boolean seenAFeature = false; for (int i = 1 ; i < section.size(); i++) { String key = ((String[])section.get(i))[0]; String val = ((String[])section.get(i))[1]; val = val.trim(); if (val.endsWith(".")) val = val.substring(0,val.length()-1); // chomp dot if (key.startsWith("/")) { key = key.substring(1); // strip leading slash if (key.equals("FTId")) rlistener.addFeatureProperty(Terms.getFTIdTerm(),val); else { // should never happen - but here just in case rlistener.addFeatureProperty(RichObjectFactory.getDefaultOntology().getOrCreateTerm(key),val); } } else { // new feature! // end previous feature if (seenAFeature) rlistener.endFeature(); // start next one, with lots of lovely info in it RichFeature.Template templ = new RichFeature.Template(); templ.annotation = new SimpleRichAnnotation(); templ.sourceTerm = Terms.getUniProtTerm(); templ.typeTerm = RichObjectFactory.getDefaultOntology().getOrCreateTerm(key); templ.featureRelationshipSet = new TreeSet(); templ.rankedCrossRefs = new TreeSet(); String desc = null; String status = null; val = val.replaceAll("\n", " "); // Nasty hack but we have to do this, sadly. Matcher m = fp.matcher(val); if (m.matches()) { String loc = m.group(1); desc = m.group(3); templ.location = UniProtLocationParser.parseLocation(loc); } else { System.err.println("XX"+val+"XX"); throw new ParseException("Bad feature value: "+val); } rlistener.startFeature(templ); if (desc!=null) rlistener.addFeatureProperty(Terms.getFeatureDescTerm(),desc); seenAFeature = true; } } if (seenAFeature) rlistener.endFeature(); } else if (sectionKey.equals(START_SEQUENCE_TAG) && !this.getElideSymbols()) { StringBuffer seq = new StringBuffer(); for (int i = 0 ; i < section.size(); i++) seq.append(((String[])section.get(i))[1]); try { SymbolList sl = new SimpleSymbolList(symParser, seq.toString().replaceAll("\\s+","").replaceAll("[\\.|~]","-")); rlistener.addSymbols(symParser.getAlphabet(), (Symbol[])(sl.toList().toArray(new Symbol[0])), 0, sl.length()); } catch (Exception e) { throw new ParseException(e); } } } while (!sectionKey.equals(END_SEQUENCE_TAG)); // Allows us to tolerate trailing whitespace without // thinking that there is another Sequence to follow while (true) { reader.mark(1); int c = reader.read(); if (c == -1) { hasAnotherSequence = false; break; } if (Character.isWhitespace((char) c)) { //hasInternalWhitespace = true; continue; } //if (hasInternalWhitespace) //System.err.println("Warning: whitespace found between sequence entries"); reader.reset(); break; } // Finish up. rlistener.endSequence(); return hasAnotherSequence; } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/05b36241610b2e40a85168dccc182f8d5f51e4de/UniProtFormat.java/clean/src/org/biojavax/bio/seq/io/UniProtFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
855,
22591,
4021,
12,
17947,
2514,
2949,
16,
5411,
8565,
1345,
1588,
5382,
2678,
16,
5411,
534,
1354,
6926,
4294,
2223,
436,
12757,
16,
5411,
6005,
3153,
13,
5411,
1216,
2141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
22591,
4021,
12,
17947,
2514,
2949,
16,
5411,
8565,
1345,
1588,
5382,
2678,
16,
5411,
534,
1354,
6926,
4294,
2223,
436,
12757,
16,
5411,
6005,
3153,
13,
5411,
1216,
2141,
... | |
TraceClassVisitor tv = new TraceClassVisitor( cw, new PrintWriter( System.err)) { protected TraceMethodVisitor createTraceMethodVisitor() { return new TraceMethodVisitor() { protected void appendLabel( Label l) { super.appendLabel(l); buf.append( " "+System.identityHashCode( l)); } }; } }; | public void test() throws Exception { Attribute[] tattributes = new Attribute[] { new StubStackMapTableAttribute()}; Attribute[] attributes = new Attribute[] { new StackMapTableAttribute()}; ClassWriter cw = new ClassWriter( false); TraceClassVisitor tv = new TraceClassVisitor( cw, new PrintWriter( System.err)) { protected TraceMethodVisitor createTraceMethodVisitor() { return new TraceMethodVisitor() { protected void appendLabel( Label l) { super.appendLabel(l); buf.append( " "+System.identityHashCode( l)); } }; } }; ClassReader cr1 = new ClassReader( is); cr1.accept( tv, attributes, false); ClassReader cr2 = new ClassReader( cw.toByteArray()); if(!Arrays.equals(cr1.b, cr2.b)) { StringWriter sw1 = new StringWriter(); StringWriter sw2 = new StringWriter(); ClassVisitor cv1 = new TraceClassVisitor(new PrintWriter(sw1)); ClassVisitor cv2 = new TraceClassVisitor(new PrintWriter(sw2)); cr1.accept( cv1, attributes, false); cr2.accept( cv2, attributes, false); assertEquals("different data", sw1.toString(), sw2.toString()); } } | 392 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/392/45df8e02b4bf1bc8313d51eb04cd138cf7fbf651/StackMapTableAttributeTest.java/clean/test/conform/org/objectweb/asm/attrs/StackMapTableAttributeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
1435,
1216,
1185,
288,
565,
3601,
8526,
268,
4350,
273,
394,
3601,
8526,
288,
394,
26483,
2624,
863,
1388,
1499,
17767,
31,
565,
3601,
8526,
1677,
273,
394,
3601,
8526,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
1435,
1216,
1185,
288,
565,
3601,
8526,
268,
4350,
273,
394,
3601,
8526,
288,
394,
26483,
2624,
863,
1388,
1499,
17767,
31,
565,
3601,
8526,
1677,
273,
394,
3601,
8526,
2... | |
else { scriptable = makeJavaScriptObject(javaScriptClassName); } scriptable.setDomNode(domNode); scriptable.setParentScope(ScriptableObject.getTopLevelScope((Scriptable) domNode.getPage().getScriptObject())); return scriptable; | public SimpleScriptable makeScriptableFor(final DomNode domNode) { // Get the JS class name for the specified DOM node. // Walk up the inheritance chain if necessary. String javaScriptClassName = null; for( Class c = domNode.getClass(); javaScriptClassName == null && c != null; c = c.getSuperclass() ) { javaScriptClassName = (String) getHtmlJavaScriptMapping().get( c ); } final SimpleScriptable scriptable; if (javaScriptClassName == null) { // We don't have a specific subclass for this element so create something generic. scriptable = makeJavaScriptObject("HTMLElement"); getLog().debug("No javascript class found for element <"+domNode.getNodeName()+">. Using HTMLElement"); } else { scriptable = makeJavaScriptObject(javaScriptClassName); } scriptable.setDomNode(domNode); // parent scope needs to be set to "window" (no simple unit test found to illustrate the necessity) // if navigation has continued, the window may contain an other page as the on to which the current node // belongs to // see test JavaScriptEngineTest#testScopeInInactivePage scriptable.setParentScope(ScriptableObject.getTopLevelScope((Scriptable) domNode.getPage().getScriptObject())); return scriptable; } | 47843 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47843/a29b4d215e65ac8211b0fc8aaf4d375d3c5c55c3/SimpleScriptable.java/clean/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4477,
3651,
429,
1221,
3651,
429,
1290,
12,
6385,
12965,
907,
24984,
13,
288,
3639,
368,
968,
326,
6756,
667,
508,
364,
326,
1269,
4703,
756,
18,
3639,
368,
7564,
731,
326,
16334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4477,
3651,
429,
1221,
3651,
429,
1290,
12,
6385,
12965,
907,
24984,
13,
288,
3639,
368,
968,
326,
6756,
667,
508,
364,
326,
1269,
4703,
756,
18,
3639,
368,
7564,
731,
326,
16334,
... | |
realStereo.setNamespace(ns); | public MAbstraction buildRealization(MModelElement client, MModelElement supplier) { MAbstraction realization = new MAbstractionImpl();// MStereotype realStereo = (MStereotype)STANDARDS.lookup("realize");// System.out.println("real ist: "+realStereo); MStereotype realStereo = new MStereotypeImpl(); realStereo.setName("realize"); if (supplier.getNamespace() != null) { MNamespace ns = supplier.getNamespace(); realization.setNamespace(ns); realStereo.setNamespace(ns); // ns.addOwnedElement(STANDARDS); } else if (client.getNamespace() != null) { MNamespace ns = client.getNamespace(); realization.setNamespace(ns); realStereo.setNamespace(ns); // ns.addOwnedElement(STANDARDS); } realization.setStereotype(realStereo); realization.addSupplier(supplier); realization.addClient(client); return realization; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ccb822c30e1c762f951b4d90d6a4c793d58079d9/MMUtil.java/clean/src_new/org/argouml/uml/MMUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
490,
5895,
701,
1128,
1361,
6955,
1588,
12,
49,
1488,
1046,
1004,
16,
490,
1488,
1046,
17402,
13,
288,
202,
202,
5535,
70,
701,
1128,
2863,
1588,
273,
394,
490,
5895,
701,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
490,
5895,
701,
1128,
1361,
6955,
1588,
12,
49,
1488,
1046,
1004,
16,
490,
1488,
1046,
17402,
13,
288,
202,
202,
5535,
70,
701,
1128,
2863,
1588,
273,
394,
490,
5895,
701,
112... | |
final String queryString = "select count (distinct bs2gp) from CompositeSequenceImpl as cs inner join cs.arrayDesign as ar " + "inner join cs.biologicalCharacteristic, BioSequence2GeneProductImpl as bs2gp " + "where bs2gp.bioSequence=cs.biologicalCharacteristic and ar.id = :id"; | final String queryString = "select count (distinct bs2gp) from CompositeSequenceImpl as cs inner join cs.arrayDesign as ar " + "inner join cs.biologicalCharacteristic, BioSequence2GeneProductImpl as bs2gp " + "where bs2gp.bioSequence=cs.biologicalCharacteristic and ar.id = :id"; | protected long handleNumBlatResults( ArrayDesign arrayDesign ) throws Exception { if (arrayDesign == null || arrayDesign.getId() == null) { throw new IllegalArgumentException(); } long id = arrayDesign.getId(); final String queryString = "select count (distinct bs2gp) from CompositeSequenceImpl as cs inner join cs.arrayDesign as ar " + "inner join cs.biologicalCharacteristic, BioSequence2GeneProductImpl as bs2gp " + "where bs2gp.bioSequence=cs.biologicalCharacteristic and ar.id = :id"; return queryByIdReturnInteger( id, queryString ); } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/a38ec5b62d473dbb459399b7f03a372b314f1d88/ArrayDesignDaoImpl.java/buggy/gemma-mda/src/main/java/ubic/gemma/model/expression/arrayDesign/ArrayDesignDaoImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1525,
1640,
2578,
38,
4801,
3447,
12,
1510,
15478,
526,
15478,
262,
1216,
1185,
288,
3639,
309,
261,
1126,
15478,
422,
446,
747,
526,
15478,
18,
26321,
1435,
422,
446,
13,
288,
5411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1525,
1640,
2578,
38,
4801,
3447,
12,
1510,
15478,
526,
15478,
262,
1216,
1185,
288,
3639,
309,
261,
1126,
15478,
422,
446,
747,
526,
15478,
18,
26321,
1435,
422,
446,
13,
288,
5411... |
p_start = createRefillTimePreference(start, earliest); p_end = createRefillTimePreference(end, earliest); | p_start = createRefillTimePreference(start, earliest, AspectType.START_TIME); p_end = createRefillTimePreference(end, earliest, AspectType.END_TIME); | private NewTask fillInTask(NewTask newRefill, long start, long end, long earliest, double qty, Asset asset) { // create preferences Vector prefs = new Vector(); Preference p_start,p_end,p_qty; p_start = createRefillTimePreference(start, earliest); p_end = createRefillTimePreference(end, earliest); p_qty = createRefillRatePreference(qty); prefs.add(p_start); prefs.add(p_end); prefs.add(p_qty); newRefill.setPreferences(prefs.elements()); //create Prepositional Phrases Vector pp_vector = new Vector(); pp_vector.add(createPrepPhrase(Constants.Preposition.FOR, getOrgName())); pp_vector.add(createPrepPhrase(Constants.Preposition.OFTYPE, inventoryPlugin.getSupplyType())); Object io; Enumeration geolocs = getAssetUtils().getGeolocLocationAtTime( getMyOrganization(), end); if (geolocs.hasMoreElements()) { io = (GeolocLocation)geolocs.nextElement(); } else { io = getHomeLocation(); } pp_vector.addElement(createPrepPhrase(Constants.Preposition.TO, io)); TypeIdentificationPG tip = asset.getTypeIdentificationPG(); MaintainedItem itemID = MaintainedItem. findOrMakeMaintainedItem("Inventory", tip.getTypeIdentification(), null, tip.getNomenclature(), inventoryPlugin); pp_vector.add(createPrepPhrase(Constants.Preposition.MAINTAINING, itemID)); pp_vector.add(createPrepPhrase(Constants.Preposition.REFILL, null)); newRefill.setPrepositionalPhrases(pp_vector.elements()); return newRefill; } | 11319 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11319/6b98fa6c43734537f2c625977b3ba3ac3429d6d0/RefillProjectionGenerator.java/clean/bbn/src/org/cougaar/logistics/plugin/inventory/RefillProjectionGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1166,
2174,
3636,
382,
2174,
12,
1908,
2174,
394,
1957,
737,
16,
1525,
787,
16,
1525,
679,
16,
1525,
20674,
16,
21821,
1645,
26667,
16,
10494,
3310,
13,
288,
565,
368,
752,
12750,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1166,
2174,
3636,
382,
2174,
12,
1908,
2174,
394,
1957,
737,
16,
1525,
787,
16,
1525,
679,
16,
1525,
20674,
16,
21821,
1645,
26667,
16,
10494,
3310,
13,
288,
565,
368,
752,
12750,
... |
setModel( model ); | getProvider( ).connect( model ); | public boolean onBroughtToTop( IReportEditorPage prePage ) { if ( getEditorInput( ) != prePage.getEditorInput( ) ) { setInput( prePage.getEditorInput( ) ); } ModuleHandle model = SessionHandleAdapter.getInstance( ).getReportDesignHandle( ); if ( model != null && getModel() != model) { Object oldModel = getModel( ); setModel( model ); rebuildReportDesign( oldModel ); if ( getModel( ) != null ) { setViewContentsAsMasterPage(); markPageStale( IPageStaleType.NONE ); } updateStackActions( ); } return true; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/604ce5391dbc451664ffe72c0eb2da50e51bc4ed/ReportMasterPageEditorFormPage.java/buggy/UI/org.eclipse.birt.report.designer.ui.editors.schematic/src/org/eclipse/birt/report/designer/ui/editors/pages/ReportMasterPageEditorFormPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
603,
38,
303,
9540,
774,
3401,
12,
467,
4820,
6946,
1964,
675,
1964,
262,
202,
95,
202,
202,
430,
261,
336,
6946,
1210,
12,
262,
480,
675,
1964,
18,
588,
6946,
1210,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
603,
38,
303,
9540,
774,
3401,
12,
467,
4820,
6946,
1964,
675,
1964,
262,
202,
95,
202,
202,
430,
261,
336,
6946,
1210,
12,
262,
480,
675,
1964,
18,
588,
6946,
1210,
1... |
case LEFT: iNewPointToCheck = 2; iPrevPointToCheck = 1; | case LEFT : iNewPointToCheck = 2; iPrevPointToCheck = 1; | final protected boolean[] checkTickLabelsVisibility( IDisplayServer xs, Label la, int iLabelLocation ) throws ChartException { boolean[] ba = new boolean[daTickCoordinates.length]; boolean vis = la.isSetVisible( ) && la.isVisible( ); Arrays.fill( ba, vis ); if ( !vis ) { // all non-visible label, skip checking. return ba; } if ( iType != TEXT && !bCategoryScale ) { // Already auto scaled, just return all as true. return ba; } final double dAngleInDegrees = la.getCaption( ) .getFont( ) .getRotation( ); double x = 0, y = 0; int iNewPointToCheck = 0, iPrevPointToCheck = 0; /* * Rectangle points are layed out like this * * 0 1 * NextLabel * 3 2 * * 0 1 0 1 * PreviousLabel NextLabel * 3 2 3 2 * */ boolean isNegativeRotation = ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ); switch ( iLabelLocation ) { case ABOVE: iNewPointToCheck = isNegativeRotation ? 3 : 0; iPrevPointToCheck = isNegativeRotation ? 1 : 3; break; case BELOW: iNewPointToCheck = isNegativeRotation ? 3 : 0; iPrevPointToCheck = isNegativeRotation ? 0 : 2; break; case LEFT: iNewPointToCheck = 2; iPrevPointToCheck = 1; break; case RIGHT: iNewPointToCheck = 3; iPrevPointToCheck = 0; break; } RotatedRectangle rrPrev[] = new RotatedRectangle[2]; DataSetIterator dsi = getData( ); dsi.reset( ); final int iDateTimeUnit = ( iType == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; String sText = null; dsi.reset( ); for ( int i = 0; i < daTickCoordinates.length - 1; i++ ) { if ( dsi.hasNext( ) ) { sText = formatCategoryValue( iType, dsi.next( ), iDateTimeUnit ); } else { sText = NULL_STRING; } if ( iLabelLocation == ABOVE || iLabelLocation == BELOW ) { x = this.daTickCoordinates[i]; } else if ( iLabelLocation == LEFT || iLabelLocation == RIGHT ) { y = this.daTickCoordinates[i]; } la.getCaption( ).setValue( sText ); if ( isAxisLabelStaggered( ) && i % 2 == 1 ) { ba[i] = checkOneTickLabelVisibility( rrPrev, 1, iLabelLocation, x, y, iNewPointToCheck, iPrevPointToCheck, la, xs, i ); } else { ba[i] = checkOneTickLabelVisibility( rrPrev, 0, iLabelLocation, x, y, iNewPointToCheck, iPrevPointToCheck, la, xs, i ); } } return ba; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/e5190634b7d993e200827f366f533ffbc5d0b341/AutoScale.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
4750,
1250,
8526,
866,
6264,
5888,
10135,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
2224,
2735,
262,
1216,
14804,
503,
202,
95,
202,
202,
6494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6385,
4750,
1250,
8526,
866,
6264,
5888,
10135,
12,
1599,
291,
1601,
2081,
9280,
16,
5287,
7125,
16,
1082,
202,
474,
277,
2224,
2735,
262,
1216,
14804,
503,
202,
95,
202,
202,
6494,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.