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 (0 < ignorePrefix) { newLine = newLine.substring(ignorePrefix); oldLine = oldLine.substring(ignorePrefix); | if (ignorePrefix) { int bracketColon = 0; if (-1 != (bracketColon = newLine.indexOf("]: "))) { newLine = newLine.substring(bracketColon + 3); } if (-1 != (bracketColon = oldLine.indexOf("]: "))) { oldLine = oldLine.substring(bracketColon + 3); } | public static boolean filesIdentical (String newFileName, String oldFileName, List oldLinesToIgnore, int ignorePrefix) throws IOException { boolean same = true; File newFile = new File(newFileName); File oldFile = new File(oldFileName); FileReader newFileReader = new FileReader(newFile); FileReader oldFileReader = new FileReader(oldFile); LineNumberReader newReader = new LineNumberReader(newFileReader); LineNumberReader oldReader = new LineNumberReader(oldFileReader); String newLine, oldLine; newLine = newReader.readLine().trim(); oldLine = oldReader.readLine().trim(); // if one of the lines is null, but not the other if (((null == newLine) && (null != oldLine)) || ((null != newLine) && (null == oldLine))) { same = false; } while (null != newLine && null != oldLine) { if (0 < ignorePrefix) { newLine = newLine.substring(ignorePrefix); oldLine = oldLine.substring(ignorePrefix); } if (!newLine.equals(oldLine)) { if (null != oldLinesToIgnore) { // go thru the list of oldLinesToIgnore and see if // the current oldLine matches any of them. Iterator ignoreLines = oldLinesToIgnore.iterator(); boolean foundMatch = false; while (ignoreLines.hasNext()) { String newTrim = ((String) ignoreLines.next()).trim(); if (oldLine.equals(newTrim)) { foundMatch = true; break; } } // If we haven't found a match, then this mismatch is // important if (!foundMatch) { same = false; break; } } else { same = false; break; } } newLine = newReader.readLine(); oldLine = oldReader.readLine(); // if one of the lines is null, but not the other if (((null == newLine) && (null != oldLine)) || ((null != newLine) && (null == oldLine))) { same = false; break; } if (null != newLine) { newLine = newLine.trim(); } if (null != oldLine) { oldLine = oldLine.trim(); } } newReader.close(); oldReader.close(); // if same is true and both files have reached eof, then // files are identical if (same == true) { return true; } return false; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/b497e4b3ffee7f5f33b502c34c8c49bd700b7290/CompareFiles.java/buggy/java/webclient/test/automated/src/classes/org/mozilla/webclient/CompareFiles.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
1390,
6106,
1706,
261,
780,
394,
4771,
16,
9944,
225,
514,
1592,
4771,
16,
9944,
225,
987,
1592,
5763,
774,
3777,
16,
9944,
225,
509,
2305,
2244,
13,
2398,
1216,
1860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
1390,
6106,
1706,
261,
780,
394,
4771,
16,
9944,
225,
514,
1592,
4771,
16,
9944,
225,
987,
1592,
5763,
774,
3777,
16,
9944,
225,
509,
2305,
2244,
13,
2398,
1216,
1860,
... |
return receiver.getRuntime().getClasses().getFloatClass().callMethod("induced_from", receiver); | return receiver.getRuntime().getClass("Float").callMethod("induced_from", receiver); | public static IRubyObject prec_f(IRubyObject receiver) { return receiver.getRuntime().getClasses().getFloatClass().callMethod("induced_from", receiver); } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/ca6b16e996ea9af83ce593594b9c69b9364a9924/RubyPrecision.java/buggy/src/org/jruby/RubyPrecision.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
13382,
67,
74,
12,
7937,
10340,
921,
5971,
13,
288,
3639,
327,
5971,
18,
588,
5576,
7675,
588,
797,
2932,
4723,
20387,
1991,
1305,
2932,
728,
26372,
67,
2080... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
760,
15908,
10340,
921,
13382,
67,
74,
12,
7937,
10340,
921,
5971,
13,
288,
3639,
327,
5971,
18,
588,
5576,
7675,
588,
797,
2932,
4723,
20387,
1991,
1305,
2932,
728,
26372,
67,
2080... |
TempFileManager.setWorkingDirectory(new File(_ode.getContext() .getWorkspaceRoot())); | if (_ode.getContext().getWorkspaceRoot() != null) TempFileManager.setWorkingDirectory(new File(_ode.getContext().getWorkspaceRoot())); | public void init(ComponentContext context) throws JBIException { try { _ode = OdeContext.getInstance(); _ode.setContext(context); _ode._consumer = new OdeConsumer(_ode); TempFileManager.setWorkingDirectory(new File(_ode.getContext() .getWorkspaceRoot())); __log.debug("Loading properties."); initProperties(); __log.debug("Initializing message mappers."); initMappers(); __log.debug("Creating data source."); initDataSource(); __log.debug("Starting Hibernate."); initHibernate(); __log.info("Hibernate started."); __log.debug("Starting BPEL server."); initBpelServer(); __log.debug("Starting JCA connector."); initConnector(); _suManager = new OdeSUManager(_ode); _initSuccess = true; __log.info(__msgs.msgOdeInitialized()); } finally { if (!_initSuccess) { // TODO ..then what? at least shutdown the scheduler } } } | 45373 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45373/1a15505e6abed48284394b7c9c2a03b5f1150491/OdeLifeCycle.java/clean/jbi/src/main/java/org/apache/ode/jbi/OdeLifeCycle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
1841,
1042,
819,
13,
1216,
804,
31558,
503,
288,
3639,
775,
288,
5411,
389,
390,
273,
531,
323,
1042,
18,
588,
1442,
5621,
5411,
389,
390,
18,
542,
1042,
12,
2472,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
1841,
1042,
819,
13,
1216,
804,
31558,
503,
288,
3639,
775,
288,
5411,
389,
390,
273,
531,
323,
1042,
18,
588,
1442,
5621,
5411,
389,
390,
18,
542,
1042,
12,
2472,
... |
return getMinimumSize(c); | Dimension size = getMinimumSize(c); size.width += 4; return size; | public Dimension getPreferredSize(JComponent c) { // note: overriding getMinimumSize() (for example in the MetalComboBoxUI // class) affects the getPreferredSize() result, so it seems logical that // this method is implemented by delegating to the getMinimumSize() method return getMinimumSize(c); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/7cc107e01ff95c250142dda3e246542e1b0c0794/BasicComboBoxUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
12,
46,
1841,
276,
13,
225,
288,
565,
368,
4721,
30,
225,
19488,
30665,
1225,
1435,
261,
1884,
3454,
316,
326,
21604,
287,
22199,
5370,
377,
368,
667,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
12,
46,
1841,
276,
13,
225,
288,
565,
368,
4721,
30,
225,
19488,
30665,
1225,
1435,
261,
1884,
3454,
316,
326,
21604,
287,
22199,
5370,
377,
368,
667,
13,
... |
if (jj_3R_273()) { | if (jj_3_7()) { | final private boolean jj_3R_267() { Token xsp; xsp = jj_scanpos; if (jj_3R_273()) { jj_scanpos = xsp; if (jj_3R_274()) return true; } return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/a180e9b19197c7613f1e73c6ec8a574a17011e5e/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5558,
27,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
67,
27,
10756,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5558,
27,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
67,
27,
10756,
2... |
imcode.server.user.User user = super.getUserObj(req,res) ; | imcode.server.user.UserDomainObject user = super.getUserObj(req,res) ; | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { // Lets validate the session, e.g has the user logged in to Janus? if (super.checkSession(req,res) == false) return ; // Lets get the standard parameters and validate them Properties params = super.getSessionParameters(req) ; if (super.checkParameters(req, res, params) == false) { return; } String htmlFile = HTML_TEMPLATE ; if(req.getParameter("advancedView") != null) htmlFile = HTML_TEMPLATE_EXT ; // Lets get an user object imcode.server.user.User user = super.getUserObj(req,res) ; if(user == null) return ; if ( !isUserAuthorized( req, res, user ) ) { return; } HttpSession session = req.getSession(false) ; String aMetaId = (String) session.getAttribute("Conference.meta_id") ; String aForumId = (String) session.getAttribute("Conference.forum_id") ; String discIndex = params.getProperty("DISC_INDEX") ; // Lets get serverinformation IMCServiceInterface imcref = IMCServiceRMI.getIMCServiceInterface(req) ; IMCPoolInterface confref = IMCServiceRMI.getConfIMCPoolInterface(req) ; // Lets get the information from DB String sqlStoredProc = "A_GetAllForum " + aMetaId ; String sqlAnswer[] = confref.sqlProcedure( sqlStoredProc ) ; Vector forumV = super.convert2Vector(sqlAnswer) ; // Lets fill the select box String forumList = Html.createHtmlCode("ID_OPTION", "", forumV ) ; // Lets build the Responsepage VariableManager vm = new VariableManager() ; vm.addProperty( "FORUM_LIST", forumList ) ; vm.addProperty( "ADMIN_LINK_HTML", this.ADMIN_LINK_TEMPLATE ); this.sendHtml(req,res,vm, htmlFile) ; return ; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/aac0c3f1fbded79e44eeb9b126b31959f0f22c1d/ConfForum.java/buggy/servlets/conf/ConfForum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
288,
202,
759,
511,
2413,
1954,
326,
1339,
16,
425,
18,
75,
711,
326,
729,
7545,
316,
358,
23214,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
288,
202,
759,
511,
2413,
1954,
326,
1339,
16,
425,
18,
75,
711,
326,
729,
7545,
316,
358,
23214,... |
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ComponentPackage.SCALE__MAX, oldMax, newMax); if (msgs == null) msgs = notification; else msgs.add(notification); | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ComponentPackage.SCALE__MAX, oldMax, newMax); if (msgs == null) msgs = notification; else msgs.add(notification); | public NotificationChain basicSetMax(DataElement newMax, NotificationChain msgs) { DataElement oldMax = max; max = newMax; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ComponentPackage.SCALE__MAX, oldMax, newMax); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/ScaleImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/component/impl/ScaleImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
27050,
5337,
30643,
12,
751,
1046,
394,
2747,
16,
27050,
8733,
13,
565,
288,
3639,
1910,
1046,
1592,
2747,
273,
943,
31,
3639,
943,
273,
394,
2747,
31,
3639,
309,
261,
73,
21107,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27050,
5337,
30643,
12,
751,
1046,
394,
2747,
16,
27050,
8733,
13,
565,
288,
3639,
1910,
1046,
1592,
2747,
273,
943,
31,
3639,
943,
273,
394,
2747,
31,
3639,
309,
261,
73,
21107,
... |
return false; | return KEEP; | public boolean processRequest(Request request) { if (selectorRequestFilter.acceptRequest(request)) { body.serve(request); return true; } else { return false; } } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/2666230e00db643175e81dac0b52f3f8ba384784/Service.java/buggy/src/org/objectweb/proactive/Service.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1207,
691,
12,
691,
590,
13,
288,
1377,
309,
261,
9663,
691,
1586,
18,
9436,
691,
12,
2293,
3719,
288,
3639,
1417,
18,
30104,
12,
2293,
1769,
3639,
327,
638,
31,
3639,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1207,
691,
12,
691,
590,
13,
288,
1377,
309,
261,
9663,
691,
1586,
18,
9436,
691,
12,
2293,
3719,
288,
3639,
1417,
18,
30104,
12,
2293,
1769,
3639,
327,
638,
31,
3639,
289,
... |
NutchConf nutchConf = new NutchConf(); NutchBean bean = new NutchBean(nutchConf); Query query = Query.parse(args[0], nutchConf); | Configuration conf = NutchConfiguration.create(); NutchBean bean = new NutchBean(conf); Query query = Query.parse(args[0], conf); | public static void main(String[] args) throws Exception { String usage = "NutchBean query"; if (args.length == 0) { System.err.println(usage); System.exit(-1); } NutchConf nutchConf = new NutchConf(); NutchBean bean = new NutchBean(nutchConf); Query query = Query.parse(args[0], nutchConf); Hits hits = bean.search(query, 10); System.out.println("Total hits: " + hits.getTotal()); int length = (int)Math.min(hits.getTotal(), 10); Hit[] show = hits.getHits(0, length); HitDetails[] details = bean.getDetails(show); String[] summaries = bean.getSummary(details, query); for (int i = 0; i < hits.getLength(); i++) { System.out.println(" "+i+" "+ details[i] + "\n" + summaries[i]); } } | 46828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46828/25437bc825d50715dcc9a289a1b4c8fbbc6aced1/NutchBean.java/clean/src/java/org/apache/nutch/searcher/NutchBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
565,
514,
4084,
273,
315,
50,
322,
343,
3381,
843,
14432,
565,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
1377,
2332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
565,
514,
4084,
273,
315,
50,
322,
343,
3381,
843,
14432,
565,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
1377,
2332,
... |
throw new UnsupportedOperationException(); | throw new UnsupportedRepositoryOperationException(); | public Version checkin() throws RepositoryException { // TODO Auto-generated method stub // return null; throw new UnsupportedOperationException(); } | 49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/9a4d2d514f3034e7f39869df9e9bb9c1e8bc021e/ClientNode.java/clean/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4049,
866,
267,
1435,
1216,
13367,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
3639,
368,
327,
446,
31,
3639,
604,
394,
7221,
3305,
10602,
5621,
565,
289,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4049,
866,
267,
1435,
1216,
13367,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
3639,
368,
327,
446,
31,
3639,
604,
394,
7221,
3305,
10602,
5621,
565,
289,
2,
-100,
-100,
-100,... |
FontStyle style = (FontStyle) getPrimaryView().getStyle( | FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle( | protected void refreshUnderline() { FontStyle style = (FontStyle) getPrimaryView().getStyle( NotationPackage.eINSTANCE.getFontStyle()); if (style != null && getFigure() instanceof WrapLabel) { ((WrapLabel) getFigure()).setTextUnderline(style.isUnderline()); } } | 7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/c90605b94797aa95ffa039808ae26671d3dd7b1e/RelationshipLabel3EditPart.java/buggy/examples/org.eclipse.gmf.examples.mindmap.diagram/src/org/eclipse/gmf/examples/mindmap/diagram/edit/parts/RelationshipLabel3EditPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4460,
14655,
1369,
1435,
288,
202,
202,
5711,
2885,
2154,
273,
261,
5711,
2885,
13,
11398,
1767,
7675,
588,
2885,
12,
9506,
202,
14818,
2261,
18,
73,
13341,
18,
588,
5711,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4460,
14655,
1369,
1435,
288,
202,
202,
5711,
2885,
2154,
273,
261,
5711,
2885,
13,
11398,
1767,
7675,
588,
2885,
12,
9506,
202,
14818,
2261,
18,
73,
13341,
18,
588,
5711,... |
offsets = (int) in.getFilePointer(); | offsets = (int) (fileLength - in.available()); | protected void initFile(String id) throws FormatException, IOException { super.initFile(id); in = new RandomAccessFile(id, "r"); little = true; location = 0; // some DICOM files have a 128 byte header followed by a 4 byte identifier byte[] four = new byte[4]; in.seek(128); in.read(four); if ((new String(four)).equals("DICM")) { // header exists, so we'll read it in.seek(0); byte[] header = new byte[128]; in.read(header); metadata.put("Header information", new String(header)); in.skipBytes(4); location = 128; } else in.seek(0); boolean decodingTags = true; boolean signed = false; while (decodingTags) { int tag = getNextTag(); if ((location & 1) != 0) oddLocations = true; if (inSequence) { addInfo(tag, null); if (in.getFilePointer() >= (in.length() - 4)) decodingTags = false; continue; } String s; switch (tag) { case TRANSFER_SYNTAX_UID: byte[] st = new byte[elementLength]; in.read(st); s = new String(st); addInfo(tag, s); if (s.indexOf("1.2.4") > -1 || s.indexOf("1.2.5") > -1) { throw new FormatException("Sorry, compressed DICOM images not " + "supported"); } if (s.indexOf("1.2.840.10008.1.2.2") >= 0) { bigEndianTransferSyntax = true; } break; case NUMBER_OF_FRAMES: st = new byte[elementLength]; in.read(st); s = new String(st); addInfo(tag, s); double frames = Double.parseDouble(s); if (frames > 1.0) numImages = (int) frames; break; case SAMPLES_PER_PIXEL: int samplesPerPixel = DataTools.read2SignedBytes(in, little); addInfo(tag, samplesPerPixel); break; case PHOTOMETRIC_INTERPRETATION: st = new byte[elementLength]; in.read(st); String photoInterpretation = new String(st); addInfo(tag, photoInterpretation); break; case PLANAR_CONFIGURATION: int planarConfiguration = DataTools.read2SignedBytes(in, little); addInfo(tag, planarConfiguration); break; case ROWS: height = DataTools.read2SignedBytes(in, little); addInfo(tag, height); break; case COLUMNS: width = DataTools.read2SignedBytes(in, little); addInfo(tag, width); break; case PIXEL_SPACING: st = new byte[elementLength]; in.read(st); String scale = new String(st); addInfo(tag, scale); break; case SLICE_SPACING: st = new byte[elementLength]; in.read(st); String spacing = new String(st); addInfo(tag, spacing); break; case BITS_ALLOCATED: bitsPerPixel = DataTools.read2SignedBytes(in, little); addInfo(tag, bitsPerPixel); break; case PIXEL_REPRESENTATION: int pixelRepresentation = DataTools.read2SignedBytes(in, little); signed = pixelRepresentation == 1; addInfo(tag, pixelRepresentation); break; case WINDOW_CENTER: case WINDOW_WIDTH: case RESCALE_INTERCEPT: case RESCALE_SLOPE: st = new byte[elementLength]; in.read(st); String c = new String(st); addInfo(tag, c); break; case PIXEL_DATA: if (elementLength != 0) { offsets = (int) in.getFilePointer(); addInfo(tag, location); decodingTags = false; } else addInfo(tag, null); break; case 0x7f880010: if (elementLength != 0) { offsets = location + 4; decodingTags = false; } break; default: addInfo(tag, null); } if (in.getFilePointer() >= (in.length() - 4)) decodingTags = false; } if (numImages == 0) numImages = 1; // populate OME-XML node if (ome != null) { OMETools.setPixels(ome, new Integer((String) metadata.get("Columns")), // SizeX new Integer((String) metadata.get("Rows")), // SizeY new Integer(numImages), // SizeZ new Integer(1), // SizeC new Integer(1), // SizeT "int" + ((String) metadata.get("Bits Allocated")), // PixelType new Boolean(!little), // BigEndian "XYZTC"); OMETools.setImage(ome, null, // name ((String) metadata.get("Content Date")) + "T" + ((String) metadata.get("Content Time")), // CreationDate (String) metadata.get("Image Type")); OMETools.setInstrument(ome, (String) metadata.get("Manufacturer"), (String) metadata.get("Manufacturer's Model Name"), null, null); } } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/91859a26506b8a1d312b398da2c3ecd94e02fa60/DicomReader.java/buggy/loci/formats/DicomReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
26933,
12,
350,
16,
315,
86,
8863,
565,
1272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
26933,
12,
350,
16,
315,
86,
8863,
565,
1272... |
if (sel instanceof TreeViewer) { TreeViewer tv = (TreeViewer) sel; ISelection sel2 = tv.getSelection(); if (sel2 instanceof StructuredSelection) { monitor.beginTask("Searhing for files...", IProgressMonitor.UNKNOWN); StructuredSelection ss = (StructuredSelection) sel2; for (Iterator iter = ss.iterator(); iter.hasNext();) { Object obj = iter.next(); if (obj instanceof IProject) { ((IProject) obj).accept(visitor); } | Object sel = targetPart.getSite().getSelectionProvider().getSelection(); if (sel instanceof IStructuredSelection) { monitor.beginTask("Searhing for files...", IProgressMonitor.UNKNOWN); StructuredSelection ss = (StructuredSelection) sel; for (Iterator iter = ss.iterator(); iter.hasNext();) { Object obj = iter.next(); if (obj instanceof IProject) { ((IProject) obj).accept(visitor); } else if (obj instanceof IJavaProject) { IResource resource = ((IJavaProject) obj).getResource(); resource.accept(visitor); | public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { CPD cpd = new CPD(); //cpd.setListener(new CPDActivityListener(monitor)); //for some reason CPD dies when using this listener PMDPlugin.getDefault().getPreferenceStore().setDefault(PMDPlugin.MIN_TILE_SIZE_PREFERENCE, 25); cpd.setMinimumTileSize(PMDPlugin.getDefault().getPreferenceStore().getInt(PMDPlugin.MIN_TILE_SIZE_PREFERENCE)); CPDVisitor visitor = new CPDVisitor(cpd); Object sel = targetPart.getSite().getSelectionProvider(); CPDReportWindow crw = new CPDReportWindow(targetPart.getSite().getShell()); crw.create(); if (sel instanceof TreeViewer) { TreeViewer tv = (TreeViewer) sel; ISelection sel2 = tv.getSelection(); if (sel2 instanceof StructuredSelection) { monitor.beginTask("Searhing for files...", IProgressMonitor.UNKNOWN); StructuredSelection ss = (StructuredSelection) sel2; for (Iterator iter = ss.iterator(); iter.hasNext();) { Object obj = iter.next(); if (obj instanceof IProject) { ((IProject) obj).accept(visitor); } } monitor.beginTask("Running Cut & Paste Detector...", IProgressMonitor.UNKNOWN); cpd.go(); monitor.beginTask("Building result set...", IProgressMonitor.UNKNOWN); Results results = cpd.getResults(); for (Iterator iter = results.getTiles(); iter.hasNext();) { Tile tile = (Tile) iter.next(); int dups = results.getOccurrenceCountFor(tile); crw.addEntry(String.valueOf(dups) + " duplicates found.\n"); for (Iterator iter2 = results.getOccurrences(tile); iter2.hasNext();) { TokenEntry te = (TokenEntry) iter2.next(); crw.addEntry("\t" + te.getTokenSrcID() + ": " + te.getBeginLine() + "\n"); } crw.addEntry("\n"); } monitor.done(); crw.open(); crw.getShell().setSize(500, 500); } } } catch (Exception e) { MessageDialog.openError(null, "Error running CPD", e.toString()); monitor.done(); } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/885f0a09fd7fcd66c210cca8c46ce5b645c985ae/CPDCheckProjectAction.java/buggy/pmd-eclipse/src/net/sourceforge/pmd/eclipse/actions/CPDCheckProjectAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
1216,
15342,
16,
7558,
288,
3639,
775,
288,
5411,
5181,
40,
29660,
273,
394,
5181,
40,
5621,
5411,
368,
4057,
72,
18,
542,
2223,
12,
2704,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
45,
5491,
7187,
6438,
13,
1216,
15342,
16,
7558,
288,
3639,
775,
288,
5411,
5181,
40,
29660,
273,
394,
5181,
40,
5621,
5411,
368,
4057,
72,
18,
542,
2223,
12,
2704,... |
checkPageValid( ); | checkPageValid( ); | public void modifyText( ModifyEvent e ) { checkPageValid( ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/b91f1dd2fabe6ffd72656b2cfe7d12c525b2521c/GeneralPreferencePage.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/GeneralPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
5612,
1528,
12,
9518,
1133,
425,
262,
1082,
202,
95,
9506,
202,
1893,
1964,
1556,
12,
11272,
1082,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
5612,
1528,
12,
9518,
1133,
425,
262,
1082,
202,
95,
9506,
202,
1893,
1964,
1556,
12,
11272,
1082,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
bc2ir.appendInstruction(Binary.create(REF_ADD, op0, o1, op1)); | bc2ir.appendInstruction(Binary.create(REF_ADD, op0, o1, op1.copyD2U())); | static boolean generatePolymorphicMagic(OPT_BC2IR bc2ir, OPT_GenerationContext gc, VM_MethodReference meth, VM_Atom methodName) { VM_TypeReference [] paramTypes = meth.getParameterTypes(); VM_TypeReference resultType = meth.getReturnType(); if (methodName == VM_MagicNames.wordFromInt || methodName == VM_MagicNames.wordFromIntSignExtend) { OPT_RegisterOperand reg = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Unary.create(INT_2ADDRSigExt, reg, bc2ir.popInt())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordFromIntZeroExtend) { OPT_RegisterOperand reg = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Unary.create(INT_2ADDRZerExt, reg, bc2ir.popInt())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordFromLong) { if (VM.BuildFor64Addr) { OPT_RegisterOperand reg = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Unary.create(LONG_2ADDR, reg, bc2ir.popLong())); bc2ir.push(reg.copyD2U()); } else { VM._assert(false); //should not reach } } else if (methodName == VM_MagicNames.wordToInt) { OPT_RegisterOperand reg = gc.temps.makeTempInt(); bc2ir.appendInstruction(Unary.create(ADDR_2INT, reg, bc2ir.popAddress())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordToLong) { OPT_RegisterOperand lreg = gc.temps.makeTempLong(); bc2ir.appendInstruction(Unary.create(ADDR_2LONG, lreg, bc2ir.popAddress())); bc2ir.pushDual(lreg.copyD2U()); } else if (methodName == VM_MagicNames.wordToWord) { OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Word); bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popAddress())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordToAddress) { OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Address); bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popRef())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordToObject) { OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.JavaLangObject); bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popRef())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordToObjectReference || methodName == VM_MagicNames.wordFromObject) { OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.ObjectReference); bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popRef())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordToOffset) { OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Offset); bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popAddress())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordToExtent) { OPT_RegisterOperand reg = gc.temps.makeTemp(VM_TypeReference.Extent); bc2ir.appendInstruction(Move.create(REF_MOVE, reg, bc2ir.popAddress())); bc2ir.push(reg.copyD2U()); } else if (methodName == VM_MagicNames.wordAdd) { OPT_Operand o2 = bc2ir.pop(); OPT_Operand o1 = bc2ir.pop(); OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); if (VM.BuildFor64Addr && o2.isInt()){ OPT_RegisterOperand op1 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Unary.create(INT_2ADDRSigExt, op1, o2)); bc2ir.appendInstruction(Binary.create(REF_ADD, op0, o1, op1)); } else { bc2ir.appendInstruction(Binary.create(REF_ADD, op0, o1, o2)); } bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordSub) { OPT_Operand o2 = bc2ir.pop(); OPT_Operand o1 = bc2ir.pop(); OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); if (VM.BuildFor64Addr && o2.isInt()){ OPT_RegisterOperand op1 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Unary.create(INT_2ADDRSigExt, op1, o2)); bc2ir.appendInstruction(Binary.create(REF_SUB, op0, o1, op1)); } else { bc2ir.appendInstruction(Binary.create(REF_SUB, op0, o1, o2)); } bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordDiff) { OPT_Operand o2 = bc2ir.pop(); OPT_Operand o1 = bc2ir.pop(); OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Binary.create(REF_SUB, op0, o1, o2)); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordAnd) { OPT_Operand o2 = bc2ir.pop(); OPT_Operand o1 = bc2ir.pop(); OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Binary.create(REF_AND, op0, o1, o2)); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordOr) { OPT_Operand o2 = bc2ir.pop(); OPT_Operand o1 = bc2ir.pop(); OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Binary.create(REF_OR, op0, o1, o2)); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordXor) { OPT_Operand o2 = bc2ir.pop(); OPT_Operand o1 = bc2ir.pop(); OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Binary.create(REF_XOR, op0, o1, o2)); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordNot) { OPT_Operand o1 = bc2ir.pop(); OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Unary.create(REF_NOT, op0, o1)); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordZero || methodName == VM_MagicNames.wordNull) { OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Move.create(REF_MOVE, op0, new OPT_AddressConstantOperand(Address.zero()))); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordOne) { OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Move.create(REF_MOVE, op0, new OPT_AddressConstantOperand(Address.fromIntZeroExtend(1)))); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordMax) { OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Move.create(REF_MOVE, op0, new OPT_AddressConstantOperand(Address.max()))); bc2ir.push(op0.copyD2U()); } else if (methodName == VM_MagicNames.wordIsNull) { OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Move.create(REF_MOVE, op0, new OPT_AddressConstantOperand(Address.zero()))); OPT_ConditionOperand cond = OPT_ConditionOperand.EQUAL(); cmpHelper(bc2ir,gc,cond,op0.copyRO()); } else if (methodName == VM_MagicNames.wordIsZero) { OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Move.create(REF_MOVE, op0, new OPT_AddressConstantOperand(Address.zero()))); OPT_ConditionOperand cond = OPT_ConditionOperand.EQUAL(); cmpHelper(bc2ir,gc,cond, op0.copyRO()); } else if (methodName == VM_MagicNames.wordIsMax) { OPT_RegisterOperand op0 = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Move.create(REF_MOVE, op0, new OPT_AddressConstantOperand(Address.max()))); OPT_ConditionOperand cond = OPT_ConditionOperand.EQUAL(); cmpHelper(bc2ir,gc,cond, op0.copyRO()); } else if (methodName == VM_MagicNames.wordEQ) { OPT_ConditionOperand cond = OPT_ConditionOperand.EQUAL(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordNE) { OPT_ConditionOperand cond = OPT_ConditionOperand.NOT_EQUAL(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordLT) { OPT_ConditionOperand cond = OPT_ConditionOperand.LOWER(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordLE) { OPT_ConditionOperand cond = OPT_ConditionOperand.LOWER_EQUAL(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordGT) { OPT_ConditionOperand cond = OPT_ConditionOperand.HIGHER(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordGE) { OPT_ConditionOperand cond = OPT_ConditionOperand.HIGHER_EQUAL(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordsLT) { OPT_ConditionOperand cond = OPT_ConditionOperand.LESS(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordsLE) { OPT_ConditionOperand cond = OPT_ConditionOperand.LESS_EQUAL(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordsGT) { OPT_ConditionOperand cond = OPT_ConditionOperand.GREATER(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordsGE) { OPT_ConditionOperand cond = OPT_ConditionOperand.GREATER_EQUAL(); cmpHelper(bc2ir,gc,cond,null); } else if (methodName == VM_MagicNames.wordLsh) { OPT_Operand op2 = bc2ir.popInt(); OPT_Operand op1 = bc2ir.popAddress(); OPT_RegisterOperand res = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Binary.create(REF_SHL, res, op1, op2)); bc2ir.push(res.copyD2U()); } else if (methodName == VM_MagicNames.wordRshl) { OPT_Operand op2 = bc2ir.popInt(); OPT_Operand op1 = bc2ir.popAddress(); OPT_RegisterOperand res = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Binary.create(REF_USHR, res, op1, op2)); bc2ir.push(res.copyD2U()); } else if (methodName == VM_MagicNames.wordRsha) { OPT_Operand op2 = bc2ir.popInt(); OPT_Operand op1 = bc2ir.popAddress(); OPT_RegisterOperand res = gc.temps.makeTemp(resultType); bc2ir.appendInstruction(Binary.create(REF_SHR, res, op1, op2)); bc2ir.push(res.copyD2U()); } else { return false; } return true; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/1cc6fa656ae5eb0b3049f6a9bfd9a6e94b399522/OPT_GenerateMagic.java/buggy/rvm/src/vm/compilers/optimizing/ir/conversions/bc2hir/OPT_GenerateMagic.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
1250,
2103,
5850,
21976,
19289,
12,
15620,
67,
16283,
22,
7937,
6533,
22,
481,
16,
4766,
6647,
16456,
67,
13842,
1042,
8859,
16,
4766,
6647,
8251,
67,
1305,
2404,
7917,
16,
8251,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
1250,
2103,
5850,
21976,
19289,
12,
15620,
67,
16283,
22,
7937,
6533,
22,
481,
16,
4766,
6647,
16456,
67,
13842,
1042,
8859,
16,
4766,
6647,
8251,
67,
1305,
2404,
7917,
16,
8251,
67,... |
"Can't find component " + component); | "Can't find component " + component); | public Object getProperty(String component, String propertyName) throws PropertyException { Object obj = null; Symbol symbol = symbolTable.get(component); if (symbol != null) { PropertySheet ps = symbol.getPropertySheet(); obj = ps.getRawNoReplacement(propertyName); } else { throw new PropertyException(null, propertyName, "Can't find component " + component); } return obj; } | 52185 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52185/1e6515ee6eca03c12b6dd786af9302825b638188/ConfigurationManager.java/clean/src/sphinx4/edu/cmu/sphinx/util/props/ConfigurationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3911,
12,
780,
1794,
16,
514,
5470,
13,
225,
202,
15069,
4276,
503,
288,
202,
921,
1081,
273,
446,
31,
3639,
8565,
3273,
273,
26086,
18,
588,
12,
4652,
1769,
3639,
309,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3911,
12,
780,
1794,
16,
514,
5470,
13,
225,
202,
15069,
4276,
503,
288,
202,
921,
1081,
273,
446,
31,
3639,
8565,
3273,
273,
26086,
18,
588,
12,
4652,
1769,
3639,
309,
261,... |
out.writeObject(channel_name); | out.writeObject(channel_name); | public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(channel_name); } | 48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/462c7e2ed6980678c603a434a8eb5bc2e6749ac2/TunnelHeader.java/clean/src/org/jgroups/protocols/TunnelHeader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
6841,
12,
921,
1447,
596,
13,
1216,
1860,
288,
202,
659,
18,
2626,
921,
12,
4327,
67,
529,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
918,
1045,
6841,
12,
921,
1447,
596,
13,
1216,
1860,
288,
202,
659,
18,
2626,
921,
12,
4327,
67,
529,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
final byte parseForArrayElementTypeCode() { | final byte parseForArrayElementTypeCode() throws VM_PragmaUninterruptible { | final byte parseForArrayElementTypeCode() { if (VM.VerifyAssertions) VM.assert(val[0] == '['); return val[1]; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/4a987a25f93ceebb0f47a68989f48a184a7ef4ca/VM_Atom.java/buggy/rvm/src/vm/classLoader/VM_Atom.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1160,
1109,
1290,
1076,
1046,
15460,
1435,
1216,
8251,
67,
2050,
9454,
984,
31847,
1523,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
18,
11231,
12,
1125,
63,
20,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1160,
1109,
1290,
1076,
1046,
15460,
1435,
1216,
8251,
67,
2050,
9454,
984,
31847,
1523,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
18,
11231,
12,
1125,
63,
20,
65,
... |
handleSortByOverride(sortByStr); | handleSortByOverride(sortByStr); | public ZimbraQuery(String queryString, Mailbox mbox, byte[] types, SortBy searchOrder, boolean includeTrash, boolean includeSpam, int chunkSize) throws ParseException, ServiceException { mMbox = mbox; // // Step 1: parse the text using the JavaCC parser ZimbraQueryParser parser = new ZimbraQueryParser(new StringReader(queryString)); parser.init(new ZimbraAnalyzer(), mMbox); mClauses = parser.Parse(); String sortByStr = parser.getSortByStr(); if (sortByStr != null) handleSortByOverride(sortByStr); // // Step 2: build a parse tree and push all the "NOT's" down to the // bottom level -- this is because we cannot invert result sets if (ParseTree.SPEW) System.out.println("QueryString: "+queryString); ParseTree.Node pt = ParseTree.build(mClauses); if (ParseTree.SPEW) System.out.println("PT: "+pt.toString()); if (ParseTree.SPEW)System.out.println("Simplified:"); pt = pt.simplify(); if (ParseTree.SPEW)System.out.println("PT: "+pt.toString()); if (ParseTree.SPEW)System.out.println("Pushing nots down:"); pt.pushNotsDown(); if (ParseTree.SPEW)System.out.println("PT: "+pt.toString()); // // Store some variables that we'll need later mParseTree = pt; mSearchOrder = searchOrder; mTypes = types; mChunkSize = chunkSize; mOp = null; // // handle the special "sort:" tag in the search string if (mSortByOverride != null) { if (mLog.isDebugEnabled()) mLog.debug("Overriding SortBy parameter to execute ("+searchOrder.toString()+") w/ specification from QueryString: "+mSortByOverride.toString()); mSearchOrder = mSortByOverride; } // // Optimize the query BaseQuery head = getHead(); if (null != head) { // this generates all of the query operations mOp = mParseTree.getQueryOperation(); if (mLog.isDebugEnabled()) { mLog.debug("OP="+mOp.toString()); } // optimize the query down mOp = mOp.optimize(mMbox); if (mOp == null) { mOp = new NoTermQueryOperation(); } if (mLog.isDebugEnabled()) { mLog.debug("OPTIMIZED="+mOp.toString()); } // do spam/trash hackery! if (!includeTrash || !includeSpam) { if (!mOp.hasSpamTrashSetting()) { mOp = mOp.ensureSpamTrashSetting(mMbox, includeTrash, includeSpam); if (mLog.isDebugEnabled()) { mLog.debug("AFTERTS="+mOp.toString()); } mOp = mOp.optimize(mMbox); // optimize again now that we have the trash/spam setting } } } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/c2968386a64d285ddcd668a68b39b84d790490b4/ZimbraQuery.java/buggy/ZimbraServer/src/java/com/zimbra/cs/index/ZimbraQuery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2285,
381,
15397,
1138,
12,
780,
11337,
16,
11542,
2147,
312,
2147,
16,
1160,
8526,
1953,
16,
5928,
858,
1623,
2448,
16,
1250,
2341,
29420,
16,
1250,
2341,
3389,
301,
16,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2285,
381,
15397,
1138,
12,
780,
11337,
16,
11542,
2147,
312,
2147,
16,
1160,
8526,
1953,
16,
5928,
858,
1623,
2448,
16,
1250,
2341,
29420,
16,
1250,
2341,
3389,
301,
16,
509,
... |
BodyPeriodTotal = 0; BodyTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].avgPeriod); ShadowLongPeriodTotal = 0; ShadowLongTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].avgPeriod); ShadowVeryShortPeriodTotal = 0; ShadowVeryShortTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].avgPeriod); NearPeriodTotal = 0; NearTrailingIdx = startIdx - 1 - (this.candleSettings[TA_CandleSettingType.TA_Near.ordinal()].avgPeriod); | public TA_RetCode CDLHANGINGMAN(int startIdx, int endIdx, double inOpen[], double inHigh[], double inLow[], double inClose[], MInteger outBegIdx, MInteger outNbElement, int outInteger[]) { double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; lookbackTotal = CDLHANGINGMAN_Lookback(); if (startIdx < lookbackTotal) startIdx = lookbackTotal; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } BodyPeriodTotal = 0; BodyTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].avgPeriod); ShadowLongPeriodTotal = 0; ShadowLongTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].avgPeriod); ShadowVeryShortPeriodTotal = 0; ShadowVeryShortTrailingIdx = startIdx - (this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].avgPeriod); NearPeriodTotal = 0; NearTrailingIdx = startIdx - 1 - (this.candleSettings[TA_CandleSettingType.TA_Near.ordinal()].avgPeriod); i = BodyTrailingIdx; while (i < startIdx) { BodyPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))); i++; } i = ShadowLongTrailingIdx; while (i < startIdx) { ShadowLongPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))); i++; } i = ShadowVeryShortTrailingIdx; while (i < startIdx) { ShadowVeryShortPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))); i++; } i = NearTrailingIdx; while (i < startIdx - 1) { NearPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))); i++; } i = startIdx; outIdx = 0; do { if ((Math.abs(inClose[i] - inOpen[i])) < ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].factor) * ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].avgPeriod) != 0.0 ? BodyPeriodTotal / (this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].avgPeriod) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0)))) / ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? 2.0 : 1.0)) && ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) > ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].factor) * ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].avgPeriod) != 0.0 ? ShadowLongPeriodTotal / (this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].avgPeriod) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0)))) / ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? 2.0 : 1.0)) && (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) < ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].factor) * ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].avgPeriod) != 0.0 ? ShadowVeryShortPeriodTotal / (this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].avgPeriod) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0)))) / ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? 2.0 : 1.0)) && (((inClose[i]) < (inOpen[i])) ? (inClose[i]) : (inOpen[i])) >= inHigh[i - 1] - ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].factor) * ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].avgPeriod) != 0.0 ? NearPeriodTotal / (this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].avgPeriod) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i - 1] - inOpen[i - 1])) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i - 1] - inLow[i - 1]) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i - 1] - (inClose[i - 1] >= inOpen[i - 1] ? inClose[i - 1] : inOpen[i - 1])) + ((inClose[i - 1] >= inOpen[i - 1] ? inOpen[i - 1] : inClose[i - 1]) - inLow[i - 1]) : 0)))) / ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? 2.0 : 1.0))) outInteger[outIdx++] = -100; else outInteger[outIdx++] = 0; BodyPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))) - ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[BodyTrailingIdx] - inOpen[BodyTrailingIdx])) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[BodyTrailingIdx] - inLow[BodyTrailingIdx]) : ((this.candleSettings[TA_CandleSettingType.TA_BodyShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[BodyTrailingIdx] - (inClose[BodyTrailingIdx] >= inOpen[BodyTrailingIdx] ? inClose[BodyTrailingIdx] : inOpen[BodyTrailingIdx])) + ((inClose[BodyTrailingIdx] >= inOpen[BodyTrailingIdx] ? inOpen[BodyTrailingIdx] : inClose[BodyTrailingIdx]) - inLow[BodyTrailingIdx]) : 0))); ShadowLongPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))) - ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[ShadowLongTrailingIdx] - inOpen[ShadowLongTrailingIdx])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[ShadowLongTrailingIdx] - inLow[ShadowLongTrailingIdx]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowLong .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[ShadowLongTrailingIdx] - (inClose[ShadowLongTrailingIdx] >= inOpen[ShadowLongTrailingIdx] ? inClose[ShadowLongTrailingIdx] : inOpen[ShadowLongTrailingIdx])) + ((inClose[ShadowLongTrailingIdx] >= inOpen[ShadowLongTrailingIdx] ? inOpen[ShadowLongTrailingIdx] : inClose[ShadowLongTrailingIdx]) - inLow[ShadowLongTrailingIdx]) : 0))); ShadowVeryShortPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i] - inOpen[i])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i] - inLow[i]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i] - (inClose[i] >= inOpen[i] ? inClose[i] : inOpen[i])) + ((inClose[i] >= inOpen[i] ? inOpen[i] : inClose[i]) - inLow[i]) : 0))) - ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[ShadowVeryShortTrailingIdx] - inOpen[ShadowVeryShortTrailingIdx])) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[ShadowVeryShortTrailingIdx] - inLow[ShadowVeryShortTrailingIdx]) : ((this.candleSettings[TA_CandleSettingType.TA_ShadowVeryShort .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[ShadowVeryShortTrailingIdx] - (inClose[ShadowVeryShortTrailingIdx] >= inOpen[ShadowVeryShortTrailingIdx] ? inClose[ShadowVeryShortTrailingIdx] : inOpen[ShadowVeryShortTrailingIdx])) + ((inClose[ShadowVeryShortTrailingIdx] >= inOpen[ShadowVeryShortTrailingIdx] ? inOpen[ShadowVeryShortTrailingIdx] : inClose[ShadowVeryShortTrailingIdx]) - inLow[ShadowVeryShortTrailingIdx]) : 0))); NearPeriodTotal += ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[i - 1] - inOpen[i - 1])) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[i - 1] - inLow[i - 1]) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[i - 1] - (inClose[i - 1] >= inOpen[i - 1] ? inClose[i - 1] : inOpen[i - 1])) + ((inClose[i - 1] >= inOpen[i - 1] ? inOpen[i - 1] : inClose[i - 1]) - inLow[i - 1]) : 0))) - ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_RealBody ? (Math .abs(inClose[NearTrailingIdx] - inOpen[NearTrailingIdx])) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_HighLow ? (inHigh[NearTrailingIdx] - inLow[NearTrailingIdx]) : ((this.candleSettings[TA_CandleSettingType.TA_Near .ordinal()].rangeType) == TA_RangeType.TA_RangeType_Shadows ? (inHigh[NearTrailingIdx] - (inClose[NearTrailingIdx] >= inOpen[NearTrailingIdx] ? inClose[NearTrailingIdx] : inOpen[NearTrailingIdx])) + ((inClose[NearTrailingIdx] >= inOpen[NearTrailingIdx] ? inOpen[NearTrailingIdx] : inClose[NearTrailingIdx]) - inLow[NearTrailingIdx]) : 0))); i++; BodyTrailingIdx++; ShadowLongTrailingIdx++; ShadowVeryShortTrailingIdx++; NearTrailingIdx++; } 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,
482,
399,
37,
67,
7055,
1085,
385,
8914,
44,
3388,
1360,
9560,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
3678,
63,
6487,
1082,
202,
9056,
316,
8573,
63,
6487,
1645,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
385,
8914,
44,
3388,
1360,
9560,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
3678,
63,
6487,
1082,
202,
9056,
316,
8573,
63,
6487,
1645,
316,
... | |
log.logDetailed(APP_NAME, "Main window is created."); | log.logDetailed(APP_NAME, "Main window is created."); | public static void main (String [] a) throws KettleException { EnvUtil.environmentInit(); ArrayList args = new ArrayList(); for (int i=0;i<a.length;i++) args.add(a[i]); Display display = new Display(); Splash splash = new Splash(display); // System.out.println("Welcome to Chef!"); StringBuffer optionRepname, optionUsername, optionPassword, optionJobname, optionFilename, optionDirname, optionLogfile; CommandLineOption options[] = new CommandLineOption[] { new CommandLineOption("rep", "Repository name", optionRepname=new StringBuffer()), new CommandLineOption("user", "Repository username", optionUsername=new StringBuffer()), new CommandLineOption("pass", "Repository password", optionPassword=new StringBuffer()), new CommandLineOption("job", "The name of the job to load", optionJobname=new StringBuffer()), new CommandLineOption("dir", "The directory (don't forget the leading /)", optionDirname=new StringBuffer()), new CommandLineOption("file", "The filename (Transformation in XML) to launch", optionFilename=new StringBuffer()), new CommandLineOption("logfile", "The logging file to write to", optionLogfile=new StringBuffer()), new CommandLineOption("log", "The logging file to write to (deprecated)", optionLogfile=new StringBuffer(), false, true), }; // Parse the options... CommandLineOption.parseArguments(args, options); String kettleRepname = Const.getEnvironmentVariable("KETTLE_REPOSITORY", null); String kettleUsername = Const.getEnvironmentVariable("KETTLE_USER", null); String kettlePassword = Const.getEnvironmentVariable("KETTLE_PASSWORD", null); if (kettleRepname !=null && kettleRepname .length()>0) optionRepname = new StringBuffer(kettleRepname); if (kettleUsername!=null && kettleUsername.length()>0) optionUsername = new StringBuffer(kettleUsername); if (kettlePassword!=null && kettlePassword.length()>0) optionPassword = new StringBuffer(kettlePassword); Locale.setDefault(Const.DEFAULT_LOCALE); LogWriter log; if (Const.isEmpty(optionLogfile)) { log=LogWriter.getInstance(Const.SPOON_LOG_FILE, false, LogWriter.LOG_LEVEL_BASIC); } else { log=LogWriter.getInstance( optionLogfile.toString(), true, LogWriter.LOG_LEVEL_BASIC ); } if (log.getRealFilename()!=null) log.logBasic(APP_NAME, "Logging goes to "+log.getRealFilename()); /* Load the plugins etc.*/ StepLoader stloader = StepLoader.getInstance(); if (!stloader.read()) { log.logError(APP_NAME, "Error loading steps... halting Chef!"); return; } /* Load the plugins etc.*/ JobEntryLoader jeloader = JobEntryLoader.getInstance(); if (!jeloader.read()) { log.logError(APP_NAME, "Error loading job entries & plugins... halting Chef!"); return; } final Chef win = new Chef(log, display, null); win.setDestroy(true); log.logDetailed(APP_NAME, "Main window is created."); RepositoryMeta repinfo = null; UserInfo userinfo = null; if (Const.isEmpty(optionRepname) && Const.isEmpty(optionFilename) && win.props.showRepositoriesDialogAtStartup()) { log.logDetailed(APP_NAME, "Asking for repository"); int perms[] = new int[] { PermissionMeta.TYPE_PERMISSION_JOB }; splash.hide(); RepositoriesDialog rd = new RepositoriesDialog(win.disp, SWT.NONE, perms, "Chef"); if (rd.open()) { repinfo = rd.getRepository(); userinfo = rd.getUser(); if (!userinfo.useJobs()) { MessageBox mb = new MessageBox(win.shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage("Sorry, this repository user can't work with jobs from the repository."); mb.setText("Error!"); mb.open(); userinfo = null; repinfo = null; } } else { // Exit point: user pressed CANCEL! if (rd.isCancelled()) { splash.dispose(); win.quitFile(); return; } } } try { // Read kettle job specified on command-line? if (!Const.isEmpty(optionRepname) || !Const.isEmpty(optionFilename)) { if (!Const.isEmpty(optionRepname)) { RepositoriesMeta repsinfo = new RepositoriesMeta(log); if (repsinfo.readData()) { repinfo = repsinfo.findRepository(optionRepname.toString()); if (repinfo!=null) { // Define and connect to the repository... win.rep = new Repository(log, repinfo, userinfo); if (win.rep.connect("Chef")) { if (Const.isEmpty(optionDirname)) optionDirname=new StringBuffer(RepositoryDirectory.DIRECTORY_SEPARATOR); // Check username, password win.rep.userinfo = new UserInfo(win.rep, optionUsername.toString(), optionPassword.toString()); if (win.rep.getUserInfo().getID()>0) { RepositoryDirectory repdir = win.rep.getDirectoryTree().findDirectory(optionDirname.toString()); win.jobMeta = new JobMeta(log, win.rep, optionJobname.toString(), repdir); win.setFilename(optionFilename.toString()); win.jobMeta.clearChanged(); } else { log.logError(APP_NAME, "Can't verify username and password."); win.rep=null; } } else { log.logError(APP_NAME, "Can't connect to the repository."); } } else { log.logError(APP_NAME, "No repository provided, can't load the job."); } } else { log.logError(APP_NAME, "No repositories defined on this system."); } } else if (!Const.isEmpty(optionFilename)) { win.jobMeta = new JobMeta(log, optionFilename.toString()); win.jobMeta.clearChanged(); } } // Nothing on commandline... else { // Can we connect to the repository? if (repinfo!=null && userinfo!=null) { win.rep = new Repository(log, repinfo, userinfo); if (!win.rep.connect("Spoon")) { win.rep = null; } } if (win.props.openLastFile()) { String lastfiles[] = win.props.getLastFiles(); String lastdirs[] = win.props.getLastDirs(); boolean lasttypes[] = win.props.getLastTypes(); String lastrepos[] = win.props.getLastRepositories(); if (lastfiles.length>0) { boolean use_repository = win.rep!=null; if (use_repository || !lasttypes[0]) { if (win.rep!=null) // load from repository... { if (win.rep.getName().equalsIgnoreCase(lastrepos[0])) { RepositoryDirectory repdir = win.rep.getDirectoryTree().findDirectory(lastdirs[0]); if (repdir!=null) { log.logDetailed(APP_NAME, "Auto loading job ["+lastfiles[0]+"] from repository directory ["+repdir.getPath()+"]"); // win.jobinfo = new JobInfo(log, win.rep, lastfiles[0], repdir); JobLoadProgressDialog jlpd = new JobLoadProgressDialog(log, win.props, win.shell, win.rep, lastfiles[0], repdir); JobMeta jobInfo = jlpd.open(); if (jobInfo!=null) { win.jobMeta = jobInfo; win.setFilename(lastfiles[0]); } } } } else // Load from XML? { win.jobMeta = new JobMeta(log, lastfiles[0]); } win.setFilename(lastfiles[0]); } win.jobMeta.clearChanged(); } } } } catch(KettleException ke) { log.logError(APP_NAME, "Error loading job: "+ke.getMessage()); } win.open (); splash.dispose(); while (!win.isDisposed ()) { if (!win.readAndDispatch ()) win.sleep (); } win.dispose(); log.logBasic(APP_NAME, APP_NAME+" has ended."); // Close the logfile... log.close(); // Kill all remaining things in this VM! System.exit(0); } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/466ea40abc95c39a5103fe3a9a74262a61dce808/Chef.java/buggy/src/be/ibridge/kettle/chef/Chef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
261,
780,
5378,
279,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
3491,
1304,
18,
10274,
2570,
5621,
202,
565,
2407,
833,
273,
394,
2407,
5621,
202,
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,
225,
202,
482,
760,
918,
2774,
261,
780,
5378,
279,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
3491,
1304,
18,
10274,
2570,
5621,
202,
565,
2407,
833,
273,
394,
2407,
5621,
202,
565,... |
try { setParamScope((String) evalAttr("paramScope", getParamScopeExpr(), String.class)); } catch (NullAttributeException ex) { } | if ((string = EvalHelper.evalString("paramProperty", getParamPropertyExpr(), this, pageContext)) != null) setParamProperty(string); | private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accessKey", getAccesskeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAction((String) evalAttr("action", getActionExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAnchor((String) evalAttr("anchor", getAnchorExpr(), String.class)); } catch (NullAttributeException ex) { } try { setForward((String) evalAttr("forward", getForwardExpr(), String.class)); } catch (NullAttributeException ex) { } try { setHref((String) evalAttr("href", getHrefExpr(), String.class)); } catch (NullAttributeException ex) { } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setIndexId((String) evalAttr("indexId", getIndexIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setLinkName((String) evalAttr("linkName", getLinkNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setName((String) evalAttr("name", getNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnblur((String) evalAttr("onblur", getOnblurExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnclick((String) evalAttr("onclick", getOnclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOndblclick((String) evalAttr("ondblclick", getOndblclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnfocus((String) evalAttr("onfocus", getOnfocusExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypressExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemoveExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseoutExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseoverExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setPage((String) evalAttr("page", getPageExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamId((String) evalAttr("paramId", getParamIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamName((String) evalAttr("paramName", getParamNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamProperty((String) evalAttr("paramProperty", getParamPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamScope((String) evalAttr("paramScope", getParamScopeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setScope((String) evalAttr("scope", getScopeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleClass((String) evalAttr("styleClass", getStyleClassExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleId((String) evalAttr("styleId", getStyleIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTabindex((String) evalAttr("tabindex", getTabindexExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTarget((String) evalAttr("target", getTargetExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitle((String) evalAttr("title", getTitleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitleKey((String) evalAttr("titleKey", getTitleKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTransaction(((Boolean) evalAttr("transaction", getTransactionExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/022bd23c954cf673e53731849d562b3c295473f1/ELLinkTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELLinkTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... |
return (net.suberic.crypto.EncryptionManager.checkEncryptionType((MimeMessage) msgInfo.getMessage()) != null); | EncryptionUtils utils = getEncryptionUtils(); if (utils != null) { return true; } else return false; | public boolean isEncrypted() throws MessagingException { // FIXME return (net.suberic.crypto.EncryptionManager.checkEncryptionType((MimeMessage) msgInfo.getMessage()) != null); } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/5ce8823d091ec5be46b22baaf589bd0fd36ba948/MessageCryptoInfo.java/clean/net/suberic/pooka/MessageCryptoInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
14678,
1435,
1216,
23794,
503,
288,
565,
368,
9852,
282,
14585,
1989,
2990,
273,
336,
7894,
1989,
5621,
309,
261,
5471,
480,
446,
13,
288,
225,
327,
638,
31,
289,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
282,
1071,
1250,
353,
14678,
1435,
1216,
23794,
503,
288,
565,
368,
9852,
282,
14585,
1989,
2990,
273,
336,
7894,
1989,
5621,
309,
261,
5471,
480,
446,
13,
288,
225,
327,
638,
31,
289,
469,
... |
item.imageCanvasGC.drawImage(offScreenImage, 0, 0); | void animateLoop(IProgressMonitor monitor) { // Create an off-screen image to draw on, and a GC to draw with. // Both are disposed after the animation. if (items.size() == 0) return; AnimationItem[] animationItems = getAnimationItems(); boolean startErrorState = showingError; Display display = animationItems[0].getControl().getDisplay(); ImageData[] imageDataArray = getImageData(); ImageData imageData = imageDataArray[0]; Image image = JobProgressManager.getInstance().getImage(imageData); int imageDataIndex = 0; ImageLoader loader = getLoader(); if (display.isDisposed()) { monitor.setCanceled(true); setAnimated(false); return; } Image offScreenImage = new Image( display, loader.logicalScreenWidth, loader.logicalScreenHeight); GC offScreenImageGC = new GC(offScreenImage); try { // Fill the off-screen image with the background color of the canvas. offScreenImageGC.setBackground(background); offScreenImageGC.fillRectangle( 0, 0, loader.logicalScreenWidth, loader.logicalScreenHeight); // Draw the current image onto the off-screen image. offScreenImageGC.drawImage( image, 0, 0, imageData.width, imageData.height, imageData.x, imageData.y, imageData.width, imageData.height); if (loader.repeatCount > 0) { while (isAnimated() && !monitor.isCanceled() && (startErrorState == showingError)) { if (display.isDisposed()) { monitor.setCanceled(true); continue; } if (imageData.disposalMethod == SWT.DM_FILL_BACKGROUND) { // Fill with the background color before drawing. Color bgColor = null; int backgroundPixel = loader.backgroundPixel; if (backgroundPixel != -1) { // Fill with the background color. RGB backgroundRGB = imageData.palette.getRGB(backgroundPixel); bgColor = new Color(null, backgroundRGB); } try { offScreenImageGC.setBackground( bgColor != null ? bgColor : background); offScreenImageGC.fillRectangle( imageData.x, imageData.y, imageData.width, imageData.height); } finally { if (bgColor != null) bgColor.dispose(); } } else if ( imageData.disposalMethod == SWT.DM_FILL_PREVIOUS) { // Restore the previous image before drawing. offScreenImageGC.drawImage( image, 0, 0, imageData.width, imageData.height, imageData.x, imageData.y, imageData.width, imageData.height); } // Get the next image data. imageDataIndex = (imageDataIndex + 1) % imageDataArray.length; imageData = imageDataArray[imageDataIndex]; image.dispose(); image = new Image(display, imageData); // Draw the new image data. offScreenImageGC.drawImage( image, 0, 0, imageData.width, imageData.height, imageData.x, imageData.y, imageData.width, imageData.height); boolean refreshItems = false; for (int i = 0; i < animationItems.length; i++) { AnimationItem item = animationItems[i]; if (item.imageCanvasGC.isDisposed()) { refreshItems = true; continue; } // Draw the off-screen image to the screen. item.imageCanvasGC.drawImage(offScreenImage, 0, 0); } if (refreshItems) animationItems = getAnimationItems(); // Sleep for the specified delay time before drawing again. try { Thread.sleep(visibleDelay(imageData.delayTime * 10)); } catch (InterruptedException e) { } } } } finally { image.dispose(); offScreenImage.dispose(); offScreenImageGC.dispose(); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/4e2d6cb95ed1b15963cfd0327c709ad8ca53c4b5/AnimationManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
14671,
6452,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
759,
1788,
392,
3397,
17,
9252,
1316,
358,
3724,
603,
16,
471,
279,
15085,
358,
3724,
598,
18,
202,
202,
759,
19118,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
14671,
6452,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
759,
1788,
392,
3397,
17,
9252,
1316,
358,
3724,
603,
16,
471,
279,
15085,
358,
3724,
598,
18,
202,
202,
759,
19118,... | |
while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); | while (optNode != null && args.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, args.getRuby(0), true); args.inc(1); | public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = ruby.getCRef(); // +++ = null; // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { // savedCref = ruby.getCRef(); s.a. ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); // +++ // localVarsList.set(3, argsList, argsList.size()); // --- localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/f629550c5947df9c1dbe414645f3dc76bcb70df4/ScopeNode.java/buggy/org/jruby/nodes/ScopeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
745,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
548,
612,
16,
19817,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
3639,
385,
1957,
907,
5198,
39,
1734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
745,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
548,
612,
16,
19817,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
3639,
385,
1957,
907,
5198,
39,
1734,
... |
protected void fdOpen(int fd) { switch (fd) { case 0 : inStream = new RubyInputStream(getRuntime().getInputStream()); break; case 1 : outStream = getRuntime().getOutputStream(); break; case 2 : outStream = getRuntime().getErrorStream(); break; default : throw new IOError(getRuntime(), "Bad file descriptor"); } | public static IRubyObject fdOpen(Ruby ruby, int descriptor) { return new RubyIO(ruby, descriptor); | protected void fdOpen(int fd) { switch (fd) { case 0 : inStream = new RubyInputStream(getRuntime().getInputStream()); break; case 1 : outStream = getRuntime().getOutputStream(); break; case 2 : outStream = getRuntime().getErrorStream(); break; default : throw new IOError(getRuntime(), "Bad file descriptor"); } } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/4c689a812e20d4fcf2da0cdc9b527b00cc1960ef/RubyIO.java/buggy/src/org/jruby/RubyIO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
5194,
3678,
12,
474,
5194,
13,
288,
3639,
1620,
261,
8313,
13,
288,
5411,
648,
374,
294,
7734,
28987,
273,
394,
19817,
4348,
12,
588,
5576,
7675,
588,
4348,
10663,
7734,
898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5194,
3678,
12,
474,
5194,
13,
288,
3639,
1620,
261,
8313,
13,
288,
5411,
648,
374,
294,
7734,
28987,
273,
394,
19817,
4348,
12,
588,
5576,
7675,
588,
4348,
10663,
7734,
898,
... |
return nilString(getRuntime()); | return getRuntime().getNil(); | public RubyString downcase_bang() { String result = getValue().toLowerCase(); if (result.equals(getValue())) { return nilString(getRuntime()); } setValue(result); return this; } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/b72a2862ae5b2f01f9a767ef2ce248fd785857c4/RubyString.java/clean/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
780,
21662,
67,
70,
539,
1435,
288,
3639,
514,
563,
273,
2366,
7675,
869,
5630,
5621,
3639,
309,
261,
2088,
18,
14963,
12,
24805,
1435,
3719,
288,
5411,
327,
18814,
7675,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
780,
21662,
67,
70,
539,
1435,
288,
3639,
514,
563,
273,
2366,
7675,
869,
5630,
5621,
3639,
309,
261,
2088,
18,
14963,
12,
24805,
1435,
3719,
288,
5411,
327,
18814,
7675,... |
List children = getKettleVariablesWithParent(thread); for (int i=0;i<children.size();i++) { Thread child = (Thread)children.get(i); removeKettleVariables(child); } map.remove(thread); | removeKettleVariables(thread, 1); | public void removeKettleVariables(Thread thread) { List children = getKettleVariablesWithParent(thread); for (int i=0;i<children.size();i++) { Thread child = (Thread)children.get(i); // System.out.println("--> removing child #"+i+"/"+children.size()+" ["+child+"] for thread ["+thread+"]"); removeKettleVariables(child); } map.remove(thread); } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/7d32172925db51f9b170e33071270f7769b1d080/LocalVariables.java/buggy/kettle/src/be/ibridge/kettle/core/LocalVariables.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
47,
278,
5929,
6158,
12,
3830,
2650,
13,
565,
288,
3639,
987,
2325,
273,
16566,
278,
5929,
6158,
1190,
3054,
12,
5930,
1769,
3639,
364,
261,
474,
277,
33,
20,
31,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
47,
278,
5929,
6158,
12,
3830,
2650,
13,
565,
288,
3639,
987,
2325,
273,
16566,
278,
5929,
6158,
1190,
3054,
12,
5930,
1769,
3639,
364,
261,
474,
277,
33,
20,
31,
77,
... |
static boolean precedes(ClassType ct1, ClassType ct2,Map prec_rel) { return ct1.descendsFrom(ct2) || (prec_rel.containsKey(ct1.fullName()) && ((Set) prec_rel.get(ct1.fullName())).contains(ct2.fullName())); | static boolean precedes(ClassType ct1, ClassType ct2) { return (ct1.descendsFrom(ct2) || (GlobalAspectInfo.v().getPrecedence(ct1.fullName(), ct2.fullName()) == GlobalAspectInfo.PRECEDENCE_FIRST) ); | static boolean precedes(ClassType ct1, ClassType ct2,Map prec_rel) { return ct1.descendsFrom(ct2) || (prec_rel.containsKey(ct1.fullName()) && ((Set) prec_rel.get(ct1.fullName())).contains(ct2.fullName())); } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/52bb3f75a47894c0c6a472fc6a22c93a32d49165/IntertypeMethodDecl_c.java/buggy/aop/abc/src/abc/aspectj/ast/IntertypeMethodDecl_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
1250,
10575,
281,
12,
18328,
5691,
21,
16,
1659,
559,
5691,
22,
16,
863,
13382,
67,
2878,
13,
288,
202,
202,
2463,
5691,
21,
18,
5569,
5839,
1265,
12,
299,
22,
13,
747,
686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
1250,
10575,
281,
12,
18328,
5691,
21,
16,
1659,
559,
5691,
22,
16,
863,
13382,
67,
2878,
13,
288,
202,
202,
2463,
5691,
21,
18,
5569,
5839,
1265,
12,
299,
22,
13,
747,
686... |
public Number executeUpdateAndGetGeneratedKey( String sql, String[] parameters ) { try { PreparedStatement preparedStatement = this.connection.prepareStatement( sql, Statement.RETURN_GENERATED_KEYS ); setPreparedStatementParameters( preparedStatement, parameters ); preparedStatement.executeUpdate(); ResultSet generatedKeysResultSet = preparedStatement.getGeneratedKeys(); Number result = null ; if ( generatedKeysResultSet.next() ) { result = (Number)generatedKeysResultSet.getObject( 1 ); } return result ; } catch ( SQLException se ) { throw new UnhandledException( se ); } } | Number executeUpdateAndGetGeneratedKey( String sql, String[] parameters ); | public Number executeUpdateAndGetGeneratedKey( String sql, String[] parameters ) { try { PreparedStatement preparedStatement = this.connection.prepareStatement( sql, Statement.RETURN_GENERATED_KEYS ); setPreparedStatementParameters( preparedStatement, parameters ); preparedStatement.executeUpdate(); ResultSet generatedKeysResultSet = preparedStatement.getGeneratedKeys(); Number result = null ; if ( generatedKeysResultSet.next() ) { result = (Number)generatedKeysResultSet.getObject( 1 ); } return result ; } catch ( SQLException se ) { throw new UnhandledException( se ); } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/962b9fbccc20a9dc1f7559965c2b0b91e0712a46/DatabaseConnection.java/clean/server/src/imcode/server/db/DatabaseConnection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3588,
17521,
14042,
7823,
653,
12,
514,
1847,
16,
514,
8526,
1472,
262,
288,
3639,
775,
288,
5411,
16913,
8208,
3406,
273,
333,
18,
4071,
18,
9366,
3406,
12,
1847,
16,
8056,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3588,
17521,
14042,
7823,
653,
12,
514,
1847,
16,
514,
8526,
1472,
262,
288,
3639,
775,
288,
5411,
16913,
8208,
3406,
273,
333,
18,
4071,
18,
9366,
3406,
12,
1847,
16,
8056,
18,
1... |
int res = c1.compareTo(c2); if (res != 0) { return res; } | int res = 0; try { int componentInt1 = Integer.parseInt(component1.trim()); int componentInt2 = Integer.parseInt(component2.trim()); res = componentInt1 - componentInt2; } catch (NumberFormatException e) { res = component1.compareTo(component2); } if (res != 0) { return res; } | public static int compare(String v1, String v2) { while (!v1.equals("") || !v2.equals("")) { String c1; int p1 = v1.indexOf("."); if (p1 > -1) { c1 = v1.substring(0, p1); v1 = v1.substring(p1 + 1); } else { c1 = v1; v1 = ""; } if (c1.equals("")) { c1 = "0"; } String c2; int p2 = v2.indexOf("."); if (p2 > -1) { c2 = v2.substring(0, p2); v2 = v2.substring(p2 + 1); } else { c2 = v2; v2 = ""; } if (c2.equals("")) { c2 = "0"; } int res = c1.compareTo(c2); if (res != 0) { return res; } } return 0; } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/40a42d66ffbe70421296fd193264bbf4d291d8fc/Version.java/buggy/src/games/stendhal/client/update/Version.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
3400,
12,
780,
331,
21,
16,
514,
331,
22,
13,
288,
202,
202,
17523,
16051,
90,
21,
18,
14963,
2932,
7923,
747,
401,
90,
22,
18,
14963,
2932,
6,
3719,
288,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
3400,
12,
780,
331,
21,
16,
514,
331,
22,
13,
288,
202,
202,
17523,
16051,
90,
21,
18,
14963,
2932,
7923,
747,
401,
90,
22,
18,
14963,
2932,
6,
3719,
288,
1082,
... |
protected static void println2Log(String dbname, String drdaID, String msg) { | protected static void println2Log(String dbname, String drdaID, String msg) { | protected static void println2Log(String dbname, String drdaID, String msg) { if (logStream == null) logStream = Monitor.getStream(); if (dbname != null) { int endOfName = dbname.indexOf(';'); if (endOfName != -1) dbname = dbname.substring(0, endOfName); } logStream.printlnWithHeader("(DATABASE = " + dbname + "), (DRDAID = " + drdaID + "), " + msg); } | 56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/d2989b7c8e85d8e5237ca2f36344eb4f163a426b/DRDAConnThread.java/clean/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
918,
3785,
22,
1343,
12,
780,
18448,
16,
514,
5081,
2414,
734,
16,
514,
1234,
13,
565,
288,
202,
430,
261,
1330,
1228,
422,
446,
13,
202,
565,
613,
1228,
273,
14086,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
918,
3785,
22,
1343,
12,
780,
18448,
16,
514,
5081,
2414,
734,
16,
514,
1234,
13,
565,
288,
202,
430,
261,
1330,
1228,
422,
446,
13,
202,
565,
613,
1228,
273,
14086,
18,
58... |
return ((((this.candleSettings[TA_CandleSettingType.TA_BodyDoji .ordinal()].avgPeriod)) > ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod))) ? ((this.candleSettings[TA_CandleSettingType.TA_BodyDoji .ordinal()].avgPeriod)) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod))) + 1; } | return ((( (this.candleSettings[TA_CandleSettingType.TA_BodyDoji.ordinal()].avgPeriod) ) > ( (this.candleSettings[TA_CandleSettingType.TA_BodyLong.ordinal()].avgPeriod) )) ? ( (this.candleSettings[TA_CandleSettingType.TA_BodyDoji.ordinal()].avgPeriod) ) : ( (this.candleSettings[TA_CandleSettingType.TA_BodyLong.ordinal()].avgPeriod) )) + 1; } | public int CDLHARAMICROSS_Lookback() { return ((((this.candleSettings[TA_CandleSettingType.TA_BodyDoji .ordinal()].avgPeriod)) > ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod))) ? ((this.candleSettings[TA_CandleSettingType.TA_BodyDoji .ordinal()].avgPeriod)) : ((this.candleSettings[TA_CandleSettingType.TA_BodyLong .ordinal()].avgPeriod))) + 1; } | 7231 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7231/5df8081f2a7211016256c0f481213a987e02947a/Core.java/clean/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
385,
8914,
44,
985,
2192,
2871,
1457,
1260,
67,
9794,
823,
1435,
288,
202,
202,
2463,
261,
12443,
12,
2211,
18,
71,
464,
298,
2628,
63,
9833,
67,
39,
464,
298,
5568,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
385,
8914,
44,
985,
2192,
2871,
1457,
1260,
67,
9794,
823,
1435,
288,
202,
202,
2463,
261,
12443,
12,
2211,
18,
71,
464,
298,
2628,
63,
9833,
67,
39,
464,
298,
5568,
55... |
for(int j = 0; j < mar.length; j++){ Match m = mar[j]; try{ XmlNodeHelper xnode = new XmlNodeHelper(fei, m.getOffset()); nodeMap.put(m, xnode); IMylarStructureBridge bridge = MylarPlugin.getDefault().getStructureBridge(f.getName()); String handle = xnode.getHandle(); Object o = bridge.getObjectForHandle(handle); String name = bridge.getName(o); if(o != null){ nodes.put(handle, name); } } catch(Exception e){ MylarPlugin.log(e, "search failed"); } } | public void searchCompleted(List<?> l) { // deal with File if(l.isEmpty()) return; Map<String, String> nodes = new HashMap<String, String>(); if (l.get(0) instanceof FileSearchResult){ FileSearchResult fsr = (FileSearchResult) l.get(0); Object[] far = fsr.getElements(); for(int i = 0; i < far.length; i++){ Match[] mar = fsr.getMatches(far[i]); if(far[i] instanceof File){ File f = (File)far[i]; // change the file into a document FileEditorInput fei = new FileEditorInput(f); for(int j = 0; j < mar.length; j++){ Match m = mar[j]; try{ XmlNodeHelper xnode = new XmlNodeHelper(fei, m.getOffset()); nodeMap.put(m, xnode); IMylarStructureBridge bridge = MylarPlugin.getDefault().getStructureBridge(f.getName()); String handle = xnode.getHandle(); Object o = bridge.getObjectForHandle(handle); String name = bridge.getName(o); if(o != null){ nodes.put(handle, name); } } catch(Exception e){ MylarPlugin.log(e, "search failed"); } } } } } for(String handle : nodes.keySet()) { incrementInterest(node, PdeStructureBridge.EXTENSION, handle, degreeOfSeparation); } gathered = true; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/fc1edb65cf1ee5a5bb60acc081f4e192caf98d00/XmlReferencesProvider.java/clean/org.eclipse.mylyn.resources.ui/src/org/eclipse/mylyn/xml/XmlReferencesProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7734,
1071,
918,
1623,
9556,
12,
682,
12880,
34,
328,
13,
288,
10402,
368,
225,
10490,
598,
1387,
10402,
309,
12,
80,
18,
291,
1921,
10756,
327,
31,
4766,
1377,
1635,
32,
780,
16,
514,
34,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7734,
1071,
918,
1623,
9556,
12,
682,
12880,
34,
328,
13,
288,
10402,
368,
225,
10490,
598,
1387,
10402,
309,
12,
80,
18,
291,
1921,
10756,
327,
31,
4766,
1377,
1635,
32,
780,
16,
514,
34,
... | |
File classFile = new File(destDir, | File classFile = new File(destDir, | private void scanDir(File srcDir, File destDir, String[] files) { for (int i = 0; i < files.length; i++) { File srcFile = new File(srcDir, files[i]); File destFile = new File(destDir, files[i]); String filename = files[i]; // if it's a non source file, copy it if a later date than the // dest // if it's a source file, see if the destination class file // needs to be recreated via compilation if (filename.toLowerCase().endsWith(".nrx")) { File classFile = new File(destDir, filename.substring(0, filename.lastIndexOf('.')) + ".class"); if (!compile || srcFile.lastModified() > classFile.lastModified()) { filecopyList.put(srcFile.getAbsolutePath(), destFile.getAbsolutePath()); compileList.addElement(destFile.getAbsolutePath()); } } else { if (srcFile.lastModified() > destFile.lastModified()) { filecopyList.put(srcFile.getAbsolutePath(), destFile.getAbsolutePath()); } } } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/04337673032f6fdbebf4d2539e3c668eb963f4e6/NetRexxC.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4135,
1621,
12,
812,
30585,
16,
1387,
26231,
16,
514,
8526,
1390,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1390,
18,
2469,
31,
277,
27245,
288,
5411,
1387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4135,
1621,
12,
812,
30585,
16,
1387,
26231,
16,
514,
8526,
1390,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1390,
18,
2469,
31,
277,
27245,
288,
5411,
1387,
... |
while (enum.hasMoreElements()) { Definition def = (Definition) enum.nextElement(); | while (enumList.hasMoreElements()) { Definition def = (Definition) enumList.nextElement(); | public void accept(Visitor visitor) { Enumeration enum = elements(); while (enum.hasMoreElements()) { Definition def = (Definition) enum.nextElement(); def.accept(visitor); } | 6140 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6140/27e2b7f1f395db1c66b73c2c05a6dd78a7deb478/JavaVector.java/buggy/whiteboard/forrestdoc/src/java/org/apache/forrest/forrestdoc/java/src/symtab/JavaVector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2791,
12,
7413,
8000,
13,
288,
3639,
13864,
2792,
273,
2186,
5621,
3639,
1323,
261,
7924,
18,
5332,
7417,
3471,
10756,
288,
5411,
10849,
1652,
273,
261,
1852,
13,
2792,
18,
428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2791,
12,
7413,
8000,
13,
288,
3639,
13864,
2792,
273,
2186,
5621,
3639,
1323,
261,
7924,
18,
5332,
7417,
3471,
10756,
288,
5411,
10849,
1652,
273,
261,
1852,
13,
2792,
18,
428... |
mm ).length > 0 ) | mm, getContext() ).length > 0 ) | protected boolean isUpToDate( FileScanner[] scanners, File zipFile ) throws TaskException { String[][] fileNames = grabFileNames( scanners ); File[] files = grabFiles( scanners, fileNames ); if( files.length == 0 ) { if( m_emptyBehavior.equals( "skip" ) ) { final String message = "Warning: skipping " + m_archiveType + " archive " + zipFile + " because no files were included."; getLogger().warn( message ); return true; } else if( m_emptyBehavior.equals( "fail" ) ) { throw new TaskException( "Cannot create " + m_archiveType + " archive " + zipFile + ": no files were included." ); } else { // Create. return createEmptyZip( zipFile ); } } else { for( int i = 0; i < files.length; ++i ) { if( files[ i ].equals( zipFile ) ) { throw new TaskException( "A zip file cannot include itself" ); } } if( !zipFile.exists() ) { return false; } final SourceFileScanner scanner = new SourceFileScanner(); setupLogger( scanner ); MergingMapper mm = new MergingMapper(); mm.setTo( zipFile.getAbsolutePath() ); for( int i = 0; i < scanners.length; i++ ) { if( scanner.restrict( fileNames[ i ], scanners[ i ].getBasedir(), null, mm ).length > 0 ) { return false; } } return true; } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/2afc643a3ea676cc68f2f010ea3a7560b7a0a3af/Zip.java/buggy/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/archive/Zip.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
353,
1211,
31264,
12,
1387,
11338,
8526,
888,
19637,
16,
1387,
19450,
262,
3639,
1216,
3837,
503,
565,
288,
3639,
514,
63,
6362,
65,
27375,
273,
11086,
812,
1557,
12,
888,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
1211,
31264,
12,
1387,
11338,
8526,
888,
19637,
16,
1387,
19450,
262,
3639,
1216,
3837,
503,
565,
288,
3639,
514,
63,
6362,
65,
27375,
273,
11086,
812,
1557,
12,
888,
196... |
} | }); | public void showTab(Component c) { int numVisible = 0; // This retarded method doesn't work for our two always-on tabs, // so here's a temporary kludge. if (c == _interactionsPane) _tabbedPane.setSelectedIndex(0); else if (c == _consolePane) _tabbedPane.setSelectedIndex(1); else { for (TabbedPanel tp: _tabs) { if (tp == c) { // 2 right now is a magic number for the number of tabs always visible // interactions & console if (! tp.isDisplayed()) { _tabbedPane.insertTab(tp.getName(), null, tp, null, numVisible + 2); tp.setDisplayed(true); } _tabbedPane.setSelectedIndex(numVisible + 2); c.requestFocusInWindow(); return; } if (tp.isDisplayed()) numVisible++; } } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/d1ffac675273323f7a1b9777462d16896d09a1af/MainFrame.java/clean/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
5661,
12,
1841,
276,
13,
288,
565,
509,
818,
6207,
273,
374,
31,
3639,
368,
1220,
325,
17212,
707,
3302,
1404,
1440,
364,
3134,
2795,
3712,
17,
265,
10920,
16,
565,
368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
5661,
12,
1841,
276,
13,
288,
565,
509,
818,
6207,
273,
374,
31,
3639,
368,
1220,
325,
17212,
707,
3302,
1404,
1440,
364,
3134,
2795,
3712,
17,
265,
10920,
16,
565,
368... |
timeStamp+ONE_HOUR, qty, geoLoc, org, type, item); | timeStamp+duration, qty, geoLoc, org, type, item); | public List generateDemandTasks(long start, long duration, Collection relevantProjectSupplys) { ArrayList demandTasks = new ArrayList(); // Make sure the file reader is initialized initReader(); if (reader == null) { return demandTasks; } HashMap subtaskMap = new HashMap(); String line = null; try { // Mark current position in file reader.mark(maxLineLength); // Reader lines until we exit our defined period (ignore entries earlier) for (line = reader.readLine(); line != null; line=reader.readLine()) { line = line.trim(); // skip empty lines if (line.length() == 0) continue; StringTokenizer tok = new StringTokenizer(line, ","); long timeStamp = (new Long(tok.nextToken())).longValue(); if (timeStamp < start) { // Ignore entries prior to start continue; } if (timeStamp >= start + duration) { // Done. Reset file marker to beginning of this line reader.reset(); break; } // Extract The Org Name String org = tok.nextToken(); // Extract the Item Id of the item being maintained String maintainedItemId = tok.nextToken(); if (maintainedItemId.equalsIgnoreCase("null")) { maintainedItemId = null; } // Extract the Type Id of the item being maintained String maintainedTypeId = tok.nextToken(); // Extract the Nomenclature of the item being maintained String maintainedNomen = tok.nextToken(); if (maintainedNomen.equalsIgnoreCase("null")) { maintainedNomen = null; } // Extract the Id of the consumed item String consumedItem = tok.nextToken(); // Extract the qty demanded double qty = Double.parseDouble(tok.nextToken()); // Extract the location (lat, lon, name) for delivery double lat = Double.parseDouble(tok.nextToken()); double lon = Double.parseDouble(tok.nextToken()); String geoLocName = tok.nextToken(); // Create an instance of the consumed item to determine supply type Asset consumed = getPlanningFactory().createInstance(consumedItem); SupplyClassPG supplyPG = (SupplyClassPG)consumed.searchForPropertyGroup( org.cougaar.glm.ldm.asset.SupplyClassPG.class); if (supplyPG == null) { logger.error("Unable to retrieve SupplyClassPG for " + consumedItem); continue; } String type = supplyPG.getSupplyType(); if (!type.equals(dgPlugin.getSupplyType())) { // This plugin/module does not handle this particular supply type continue; } // Create an instance of the Maintained Item and find the associated // GenerateProjections task MaintainedItem item = new MaintainedItem(type, maintainedTypeId, maintainedItemId, maintainedNomen, this.dgPlugin); Task gpTask = getGenerateProjectionsTask(item, type); if (gpTask == null) { logger.error("Unable to find GenerateProjections task for item type id = '" + item.getTypeIdentification() + "' and type = '" + type + "'"); continue; } // Create the geoloc for delivery GeolocLocationImpl geoLoc = new GeolocLocationImpl(Latitude.newLatitude(lat), Longitude.newLongitude(lon), geoLocName); // Create the new demand task for the entry and add to list of new subtasks Task demandTask = createNewDemandTask(gpTask, consumed, timeStamp, timeStamp+ONE_HOUR, qty, geoLoc, org, type, item); demandTasks.add(demandTask); ArrayList subtasks = (ArrayList)subtaskMap.get(gpTask); if (subtasks == null) { subtasks = new ArrayList(); subtaskMap.put(gpTask, subtasks); } subtasks.add(demandTask); // Mark the beginning of the next line before reading reader.mark(maxLineLength); } } catch (IOException ioe) { logger.error("Unable to parse demand input file: '" + line + "'"); ioe.printStackTrace(); return demandTasks; } // Go through each of the new demand tasks and publish as subtasks // of the appropriate GenerateProjections task Iterator gpTasks = subtaskMap.keySet().iterator(); while (gpTasks.hasNext()) { Task gpTask = (Task)gpTasks.next(); Collection subtasks = (Collection)subtaskMap.get(gpTask); addToAndPublishExpansion(gpTask, subtasks); } // Return list of created demand tasks return demandTasks; } | 11319 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11319/bee58ee1018339f5fa6fe45ea4d7def555bd0eff/DemandGeneratorInputModule.java/buggy/bbn/src/org/cougaar/logistics/plugin/demand/DemandGeneratorInputModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
987,
2103,
25461,
6685,
12,
5748,
787,
16,
1525,
3734,
16,
2200,
9368,
4109,
3088,
1283,
87,
13,
288,
565,
2407,
23653,
6685,
273,
394,
2407,
5621,
565,
368,
4344,
3071,
326,
585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
2103,
25461,
6685,
12,
5748,
787,
16,
1525,
3734,
16,
2200,
9368,
4109,
3088,
1283,
87,
13,
288,
565,
2407,
23653,
6685,
273,
394,
2407,
5621,
565,
368,
4344,
3071,
326,
585,
... |
public void visitUnconditionalBranch(UnconditionalBranch obj); | void visitUnconditionalBranch(UnconditionalBranch obj); | public void visitUnconditionalBranch(UnconditionalBranch obj); | 3029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3029/6f181de4aafbe2a9534fc417eee9f0b8d8ae805d/Bytecodes.java/clean/joeq_core/joeq/Compiler/BytecodeAnalysis/Bytecodes.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
984,
22019,
7108,
12,
984,
22019,
7108,
1081,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
984,
22019,
7108,
12,
984,
22019,
7108,
1081,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if (chosenPersp != null) list.setSelection(new StructuredSelection(chosenPersp)); | if (chosenPersp != null) { list.setSelection(new StructuredSelection(chosenPersp)); } | protected Control createDialogArea(Composite parent) { // page group Composite composite = (Composite) super.createDialogArea(parent); composite.setLayout(new GridLayout()); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = MIN_DIALOG_WIDTH; data.heightHint = MIN_DIALOG_HEIGHT; composite.setLayoutData(data); createPerspectiveGroup(composite); createOptionGroup(composite); if (chosenPersp != null) list.setSelection(new StructuredSelection(chosenPersp)); return composite; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ProjectPerspectiveChoiceDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectPerspectiveChoiceDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
3639,
368,
1363,
1041,
3639,
14728,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
2938,
1769,
3639,
9635,
18,
542,
3744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
3639,
368,
1363,
1041,
3639,
14728,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
2938,
1769,
3639,
9635,
18,
542,
3744,
... |
return person.getAttributeNames(); | return this.person.getAttributeNames(); | public Enumeration getAttributeNames() { return person.getAttributeNames(); } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/c0c1dd0a1871ebae4f0039a690088b1e96747524/RestrictedPerson.java/buggy/source/org/jasig/portal/security/provider/RestrictedPerson.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13864,
4061,
1557,
1435,
288,
3639,
327,
333,
18,
12479,
18,
588,
26080,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13864,
4061,
1557,
1435,
288,
3639,
327,
333,
18,
12479,
18,
588,
26080,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
commonData.setProjectname(ECGEclipseSensor.getProjectnameFromLocation(textEditor.getTitleToolTip())); | commonData.setProjectname(ECGEclipseSensor.getProjectnameFromPart(textEditor)); | public void run() { ECGEclipseSensor.logger.entering(this.getClass().getName(), "run"); ECGEclipseSensor sensor = ECGEclipseSensor.getInstance(); ECGEclipseSensor.logger.log(ECGLevel.PACKET, "A codechange event has been recorded."); CommonData commonData = microActivity.getCommonData(); commonData.setProjectname(ECGEclipseSensor.getProjectnameFromLocation(textEditor.getTitleToolTip())); commonData.setId(String.valueOf(textEditor.hashCode())); codechange_contents.setNodeValue(this.doc.get()); codechange_documentname.setTextContent(ECGEclipseSensor.getFilenameFromLocation(textEditor.getTitleToolTip())); sensor.processActivity("msdt.codechange.xsd", microActivity.getSerializedMicroActivity()); ECGEclipseSensor.logger.exiting(this.getClass().getName(), "run"); } | 239 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/239/61da006d249981bbf8884625b0bd42db6c11f647/ECGDocumentListener.java/buggy/sensors/eclipse/ECG_EclipseSensor/src/org/electrocodeogram/sensor/eclipse/listener/ECGDocumentListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
7773,
7113,
71,
10472,
22294,
18,
4901,
18,
2328,
310,
12,
2211,
18,
588,
797,
7675,
17994,
9334,
315,
2681,
8863,
5411,
7773,
7113,
71,
10472,
22294,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
5411,
7773,
7113,
71,
10472,
22294,
18,
4901,
18,
2328,
310,
12,
2211,
18,
588,
797,
7675,
17994,
9334,
315,
2681,
8863,
5411,
7773,
7113,
71,
10472,
22294,
10... |
filterText.setText(filterText.getText() + " && " + columnNameKeywordMap.get(colName).toString() + | filterText.setText(columnNameKeywordMap.get(colName) .toString() + | public void actionPerformed(ActionEvent evt) { if (currentPoint != null) { int column = table.columnAtPoint(currentPoint); int row = table.rowAtPoint(currentPoint); String colName = table.getColumnName(column); String value = ""; if (colName.equalsIgnoreCase( ChainsawConstants.TIMESTAMP_COL_NAME)) { JComponent comp = (JComponent) table.getCellRenderer(row, column); if (comp instanceof JLabel) { value = ((JLabel) comp).getText(); } } else { value = table.getValueAt(row, column).toString(); } if (columnNameKeywordMap.containsKey(colName)) { filterText.setText(filterText.getText() + " && " + columnNameKeywordMap.get(colName).toString() + " == '" + value + "'"); } } } | 47730 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47730/5e174411f47eae139a3b4c2198c45ad6f0ba2cbc/LogPanel.java/buggy/src/java/org/apache/log4j/chainsaw/LogPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
26100,
12,
1803,
1133,
6324,
13,
288,
10792,
309,
261,
2972,
2148,
480,
446,
13,
288,
13491,
509,
1057,
273,
1014,
18,
2827,
861,
2148,
12,
2972,
2148,
1769,
13491,
509,
1027,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26100,
12,
1803,
1133,
6324,
13,
288,
10792,
309,
261,
2972,
2148,
480,
446,
13,
288,
13491,
509,
1057,
273,
1014,
18,
2827,
861,
2148,
12,
2972,
2148,
1769,
13491,
509,
1027,... |
checkBoxMultiKeyRocker.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); | gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalSpan = 2; checkBoxMultiKeyRocker.setLayoutData(gridData); | private Composite createAdvancedTab(TabFolder parent) { // The composite for this tab. final Composite composite = new Composite(parent, SWT.NULL); final GridLayout gridLayout = new GridLayout(); gridLayout.marginHeight = 5; gridLayout.marginWidth = 5; composite.setLayout(gridLayout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); // The multi key assit button. checkBoxMultiKeyAssist = new Button(composite, SWT.CHECK); checkBoxMultiKeyAssist.setText(Util.translateString(RESOURCE_BUNDLE, "checkBoxMultiKeyAssist.Text")); //$NON-NLS-1$ checkBoxMultiKeyAssist.setToolTipText(Util.translateString(RESOURCE_BUNDLE, "checkBoxMultiKeyAssist.ToolTipText")); //$NON-NLS-1$ checkBoxMultiKeyAssist.setFont(composite.getFont()); checkBoxMultiKeyAssist.setSelection( getPreferenceStore().getBoolean(IPreferenceConstants.MULTI_KEY_ASSIST)); checkBoxMultiKeyAssist.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // The multi key assist time. final IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore(); textMultiKeyAssistTime = new IntegerFieldEditor(IPreferenceConstants.MULTI_KEY_ASSIST_TIME, Util.translateString(RESOURCE_BUNDLE, "textMultiKeyAssistTime.Text"), composite); //$NON-NLS-1$ textMultiKeyAssistTime.setPreferenceStore(store); textMultiKeyAssistTime.setPreferencePage(this); textMultiKeyAssistTime.setTextLimit(2); textMultiKeyAssistTime.setErrorMessage(Util.translateString(RESOURCE_BUNDLE, "textMultiKeyAssistTime.ErrorMessage")); //$NON-NLS-1$ textMultiKeyAssistTime.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); textMultiKeyAssistTime.setValidRange(0, Integer.MAX_VALUE); textMultiKeyAssistTime.setStringValue( Integer.toString(store.getInt(IPreferenceConstants.MULTI_KEY_ASSIST_TIME))); textMultiKeyAssistTime.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(textMultiKeyAssistTime.isValid()); } }); // The multi-key rocker button. checkBoxMultiKeyRocker = new Button(composite, SWT.CHECK); checkBoxMultiKeyRocker.setText(Util.translateString(RESOURCE_BUNDLE, "checkBoxMultiKeyRocker.Text")); //$NON-NLS-1$ checkBoxMultiKeyRocker.setToolTipText(Util.translateString(RESOURCE_BUNDLE, "checkBoxMultiKeyRocker.ToolTipText")); //$NON-NLS-1$ checkBoxMultiKeyRocker.setFont(composite.getFont()); checkBoxMultiKeyRocker.setSelection( getPreferenceStore().getBoolean(IPreferenceConstants.MULTI_KEY_ROCKER)); checkBoxMultiKeyRocker.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); return composite; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/4a6a0c1ba6e5e14fe8663036fd791735c80e6210/KeysPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/KeysPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
14728,
752,
23618,
5661,
12,
5661,
3899,
982,
13,
288,
202,
202,
759,
1021,
9635,
364,
333,
3246,
18,
202,
202,
6385,
14728,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14728,
752,
23618,
5661,
12,
5661,
3899,
982,
13,
288,
202,
202,
759,
1021,
9635,
364,
333,
3246,
18,
202,
202,
6385,
14728,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
1... |
private void generate_checks() { /* do constraint checks */ Iterator i; if (Compiler.REPAIR) i=termination.constraintdependence.computeOrdering().iterator(); else i=state.vConstraints.iterator(); for (; i.hasNext();) { Constraint constraint; if (Compiler.REPAIR) constraint= (Constraint) ((GraphNode)i.next()).getOwner(); else constraint=(Constraint)i.next(); { final SymbolTable st = constraint.getSymbolTable(); CodeWriter cr = new StandardCodeWriter(outputaux); cr.pushSymbolTable(constraint.getSymbolTable()); cr.outputline("// checking " + escape(constraint.toString())); cr.startblock(); ListIterator quantifiers = constraint.quantifiers(); while (quantifiers.hasNext()) { Quantifier quantifier = (Quantifier) quantifiers.next(); quantifier.generate_open(cr); } cr.outputline("int maybe = 0;"); /* now we have to generate the guard test */ VarDescriptor constraintboolean = VarDescriptor.makeNew("constraintboolean"); constraint.getLogicStatement().generate(cr, constraintboolean); cr.outputline("if (maybe)"); cr.startblock(); cr.outputline("printf(\"maybe fail " + escape(constraint.toString()) + ". \\n\");"); //cr.outputline("exit(1);"); cr.endblock(); cr.outputline("else if (!" + constraintboolean.getSafeSymbol() + ")"); cr.startblock(); if (!Compiler.REPAIR||Compiler.GENERATEDEBUGHOOKS) cr.outputline("printf(\"fail " + escape(constraint.toString()) + ". \\n\");"); if (Compiler.REPAIR) { /* Do repairs */ /* Build new repair table */ cr.outputline("if ("+repairtable.getSafeSymbol()+")"); cr.outputline("delete "+repairtable.getSafeSymbol()+";"); cr.outputline(repairtable.getSafeSymbol()+"=new RepairHash();"); if (Compiler.GENERATEDEBUGHOOKS) cr.outputline("debughook();"); /* Compute cost of each repair */ VarDescriptor mincost=VarDescriptor.makeNew("mincost"); VarDescriptor mincostindex=VarDescriptor.makeNew("mincostindex"); Vector dnfconst=new Vector(); dnfconst.addAll((Set)termination.conjunctionmap.get(constraint)); if (dnfconst.size()<=1) { cr.outputline("int "+mincostindex.getSafeSymbol()+"=0;"); } if (dnfconst.size()>1) { cr.outputline("int "+mincostindex.getSafeSymbol()+";"); boolean first=true; for(int j=0;j<dnfconst.size();j++) { GraphNode gn=(GraphNode)dnfconst.get(j); Conjunction conj=((TermNode)gn.getOwner()).getConjunction(); if (removed.contains(gn)) continue; VarDescriptor costvar; if (first) { costvar=mincost; } else costvar=VarDescriptor.makeNew("cost"); for(int k=0;k<conj.size();k++) { DNFPredicate dpred=conj.get(k); Predicate p=dpred.getPredicate(); boolean negate=dpred.isNegated(); VarDescriptor predvalue=VarDescriptor.makeNew("Predicatevalue"); p.generate(cr,predvalue); if (k==0) cr.outputline("int "+costvar.getSafeSymbol()+"=0;"); if (negate) cr.outputline("if (maybe||"+predvalue.getSafeSymbol()+")"); else cr.outputline("if (maybe||!"+predvalue.getSafeSymbol()+")"); cr.outputline(costvar.getSafeSymbol()+"+="+cost.getCost(dpred)+";"); } if(!first) { cr.outputline("if ("+costvar.getSafeSymbol()+"<"+mincost.getSafeSymbol()+")"); cr.startblock(); cr.outputline(mincost.getSafeSymbol()+"="+costvar.getSafeSymbol()+";"); cr.outputline(mincostindex.getSafeSymbol()+"="+j+";"); cr.endblock(); } else cr.outputline(mincostindex.getSafeSymbol()+"="+j+";"); first=false; } } cr.outputline("switch("+mincostindex.getSafeSymbol()+") {"); for(int j=0;j<dnfconst.size();j++) { GraphNode gn=(GraphNode)dnfconst.get(j); Conjunction conj=((TermNode)gn.getOwner()).getConjunction(); if (removed.contains(gn)) continue; cr.outputline("case "+j+":"); cr.startblock(); for(int k=0;k<conj.size();k++) { DNFPredicate dpred=conj.get(k); Predicate p=dpred.getPredicate(); boolean negate=dpred.isNegated(); VarDescriptor predvalue=VarDescriptor.makeNew("Predicatevalue"); p.generate(cr,predvalue); if (negate) cr.outputline("if (maybe||"+predvalue.getSafeSymbol()+")"); else cr.outputline("if (maybe||!"+predvalue.getSafeSymbol()+")"); cr.startblock(); if (Compiler.GENERATEINSTRUMENT) cr.outputline("abstractcount++;"); if (p instanceof InclusionPredicate) generateinclusionrepair(conj,dpred, cr); else if (p instanceof ExprPredicate) { ExprPredicate ep=(ExprPredicate)p; if (ep.getType()==ExprPredicate.SIZE) generatesizerepair(conj,dpred,cr); else if (ep.getType()==ExprPredicate.COMPARISON) generatecomparisonrepair(conj,dpred,cr); } else throw new Error("Unrecognized Predicate"); cr.endblock(); } /* Update model */ cr.endblock(); cr.outputline("break;"); } cr.outputline("}"); cr.outputline("if ("+oldmodel.getSafeSymbol()+")"); cr.outputline("delete "+oldmodel.getSafeSymbol()+";"); cr.outputline(oldmodel.getSafeSymbol()+"="+newmodel.getSafeSymbol()+";"); cr.outputline("goto rebuild;"); /* Rebuild model and all */ } cr.endblock(); while (quantifiers.hasPrevious()) { Quantifier quantifier = (Quantifier) quantifiers.previous(); cr.endblock(); } cr.endblock(); cr.outputline(""); cr.outputline(""); } } CodeWriter cr = new StandardCodeWriter(outputaux); cr.startblock(); cr.outputline("if ("+repairtable.getSafeSymbol()+")"); cr.outputline("delete "+repairtable.getSafeSymbol()+";"); cr.outputline("if ("+oldmodel.getSafeSymbol()+")"); cr.outputline("delete "+oldmodel.getSafeSymbol()+";"); cr.outputline("delete "+newmodel.getSafeSymbol()+";"); cr.outputline("delete "+worklist.getSafeSymbol()+";"); cr.outputline("resettypemap();"); cr.outputline("break;"); cr.endblock(); cr.outputline("rebuild:"); cr.outputline(";"); } | 2866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2866/32bfda5c6823fd1bc1337f18afee0b0502328a23/RepairGenerator.java/clean/RepairCompiler/MCC/IR/RepairGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
67,
12366,
1435,
288,
3639,
1748,
741,
4954,
4271,
1195,
202,
3198,
277,
31,
202,
430,
261,
9213,
18,
862,
4066,
7937,
13,
202,
565,
277,
33,
9505,
367,
18,
13364,
5817... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
12366,
1435,
288,
3639,
1748,
741,
4954,
4271,
1195,
202,
3198,
277,
31,
202,
430,
261,
9213,
18,
862,
4066,
7937,
13,
202,
565,
277,
33,
9505,
367,
18,
13364,
5817... | ||
GraphModelConnection c = (GraphModelConnection) i.next(); | IGraphModelConnection c = (IGraphModelConnection) i.next(); | private List recursiveGetConnectionsFrom(NestedGraphModelNode currentNode, NestedGraphModelNode topNode) { List connectedFrom = new ArrayList(); List targetConnections = currentNode.getTargetConnections(); for (Iterator i = targetConnections.iterator(); i.hasNext();) { GraphModelConnection c = (GraphModelConnection) i.next(); //@tag bug(unreported(fix)) : it is possible for nested nodes to be connected to non nested nodes. if (!(c.getSource() instanceof NestedGraphModelNode)) continue; NestedGraphModelNode source = (NestedGraphModelNode) c.getSource(); if (topNode.getRelationshipBetweenNodes(source) != NestedGraphModelNode.ANCESTOR) connectedFrom.add(c); } for (Iterator i = currentNode.getChildren().iterator(); i.hasNext();) { connectedFrom.addAll(recursiveGetConnectionsFrom((NestedGraphModelNode) i.next(), topNode)); } return connectedFrom; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/a3a79bed35b871a171afff98eeddb6ea113e8052/NestedGraphModelNode.java/buggy/sandbox/org.eclipse.mylyn.zest.core/src/org/eclipse/mylyn/zest/core/internal/graphmodel/nested/NestedGraphModelNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
987,
5904,
967,
9314,
1265,
12,
8649,
4137,
1488,
907,
13425,
16,
19071,
4137,
1488,
907,
1760,
907,
13,
288,
202,
202,
682,
5840,
1265,
273,
394,
2407,
5621,
202,
202,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
5904,
967,
9314,
1265,
12,
8649,
4137,
1488,
907,
13425,
16,
19071,
4137,
1488,
907,
1760,
907,
13,
288,
202,
202,
682,
5840,
1265,
273,
394,
2407,
5621,
202,
202,
682,
... |
return standardCodes.getData(type, e.type); | if(e.type == null) { return "NULL"; } else { String sc = standardCodes.getData(type, e.type); if(sc == null) { return e.type; } else { return sc; } } | public String text(NodeSet.NodeSetEntry e) { return standardCodes.getData(type, e.type); } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/388dc79784c2930f26e30ef359d1148fe73f365f/StandardCodeTexter.java/clean/tools/java/org/unicode/cldr/web/StandardCodeTexter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
977,
12,
907,
694,
18,
907,
694,
1622,
425,
13,
288,
3639,
309,
12,
73,
18,
723,
422,
446,
13,
288,
327,
315,
8560,
14432,
289,
469,
288,
514,
888,
273,
225,
4529,
6295,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
977,
12,
907,
694,
18,
907,
694,
1622,
425,
13,
288,
3639,
309,
12,
73,
18,
723,
422,
446,
13,
288,
327,
315,
8560,
14432,
289,
469,
288,
514,
888,
273,
225,
4529,
6295,
... |
if (ch == rtable.postfixLookupOperator && ! inEscapes && validPostfixLookupStart()) | if (postfixMode && ch == rtable.postfixLookupOperator && ! inEscapes && validPostfixLookupStart(rtable)) | public void readToken(int ch, boolean inEscapes, char readCase) throws java.io.IOException, SyntaxException { ReadTable rtable = ReadTable.getCurrent(); for (;; ch = read()) { if (ch < 0) { if (inEscapes) eofError("unexpected EOF between escapes"); else break; } ReadTableEntry entry = rtable.lookup(ch); if (entry == null) { if (inEscapes) { tokenBufferAppend(TOKEN_ESCAPE_CHAR); tokenBufferAppend(ch); continue; } unread(ch); break; } int kind = entry.getKind(); if (ch == rtable.postfixLookupOperator && ! inEscapes && validPostfixLookupStart()) kind = ReadTable.TERMINATING_MACRO; if (kind == ReadTable.SINGLE_ESCAPE) { ch = read(); if (ch < 0) eofError("unexpected EOF after single escape"); tokenBufferAppend(TOKEN_ESCAPE_CHAR); tokenBufferAppend(ch); seenEscapes = true; continue; } if (kind == ReadTable.MULTIPLE_ESCAPE) { inEscapes = ! inEscapes; continue; } if (inEscapes) { // Step 9: tokenBufferAppend(TOKEN_ESCAPE_CHAR); tokenBufferAppend(ch); } else { // Step 8: switch (kind) { case ReadTable.CONSTITUENT: // ... fall through ... case ReadTable.NON_TERMINATING_MACRO: if (readCase == 'U' || (readCase == 'I' && Character.isLowerCase((char) ch))) ch = Character.toUpperCase((char) ch); else if (readCase == 'D' || (readCase == 'I' && Character.isUpperCase((char) ch))) ch = Character.toLowerCase ((char) ch); tokenBufferAppend(ch); continue; case ReadTable.MULTIPLE_ESCAPE: inEscapes = true; seenEscapes = true; continue; case ReadTable.TERMINATING_MACRO: unread(ch); return; case ReadTable.WHITESPACE: // if (readPreservingWhitespace) FIXME unread(ch); return; } } } } | 41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/6cf919d3705207d6e2cacf938c58b9ed226887b6/LispReader.java/buggy/gnu/kawa/lispexpr/LispReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
855,
1345,
12,
474,
462,
16,
1250,
316,
30092,
16,
1149,
855,
2449,
13,
1377,
1216,
2252,
18,
1594,
18,
14106,
16,
11517,
503,
225,
288,
565,
2720,
1388,
436,
2121,
273,
2720... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
1345,
12,
474,
462,
16,
1250,
316,
30092,
16,
1149,
855,
2449,
13,
1377,
1216,
2252,
18,
1594,
18,
14106,
16,
11517,
503,
225,
288,
565,
2720,
1388,
436,
2121,
273,
2720... |
public void generateKey(NLSSubstitution[] substitutions, String keyPrefix) { if (fState != EXTERNALIZED || ((fState == EXTERNALIZED) && hasChanged())) { | public void generateKey(NLSSubstitution[] substitutions) { if (fState != EXTERNALIZED || ((fState == EXTERNALIZED) && hasStateChanged())) { | public void generateKey(NLSSubstitution[] substitutions, String keyPrefix) { if (fState != EXTERNALIZED || ((fState == EXTERNALIZED) && hasChanged())) { int counter = 0; fKey = createKey(counter); while(true) { int i; for (i = 0; i < substitutions.length; i++) { NLSSubstitution substitution = substitutions[i]; if ((substitution == this) || (substitution.fState != EXTERNALIZED)) continue; if (substitution.hasChanged()) { if (substitution.getKey().equals(fKey)) { fKey = createKey(counter++); break; } } else { if (substitution.getKey().equals(getKeyWithPrefix(keyPrefix))) { fKey = createKey(counter++); break; } } } if (i == substitutions.length) return; } } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/a664535ef1d5fa986173c5b6b54d580c28bdfd0e/NLSSubstitution.java/buggy/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSSubstitution.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2103,
653,
12,
24924,
1260,
373,
14278,
8526,
23368,
16,
514,
28877,
13,
288,
377,
202,
430,
261,
74,
1119,
480,
5675,
11702,
24131,
747,
14015,
74,
1119,
422,
5675,
11702,
241... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
653,
12,
24924,
1260,
373,
14278,
8526,
23368,
16,
514,
28877,
13,
288,
377,
202,
430,
261,
74,
1119,
480,
5675,
11702,
24131,
747,
14015,
74,
1119,
422,
5675,
11702,
241... |
public static void bind(Class name, Object service) throws NamingException, NameAlreadyBoundException { getNameSpace().bind(name, service); | public static void bind(Class name, Object service) throws NamingException, NameAlreadyBoundException { getNameSpace().bind(name, service); | public static void bind(Class name, Object service) throws NamingException, NameAlreadyBoundException { getNameSpace().bind(name, service); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/95d080b6dd45e9377ad3ace3a74f8c5e46c8815f/InitialNaming.java/buggy/core/src/core/org/jnode/naming/InitialNaming.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1993,
12,
797,
508,
16,
1033,
1156,
13,
225,
202,
15069,
26890,
16,
1770,
9430,
3499,
503,
288,
3639,
1723,
3819,
7675,
4376,
12,
529,
16,
1156,
1769,
202,
565,
289,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1993,
12,
797,
508,
16,
1033,
1156,
13,
225,
202,
15069,
26890,
16,
1770,
9430,
3499,
503,
288,
3639,
1723,
3819,
7675,
4376,
12,
529,
16,
1156,
1769,
202,
565,
289,... |
OPT_BasicBlock b1 = (OPT_BasicBlock)out1.getOutNodes().nextElement(); | OPT_BasicBlock b1 = (OPT_BasicBlock)out1.getNormalOut().nextElement(); | static OPT_Diamond buildDiamond(OPT_BasicBlock bb) { if (bb.getNumberOfNormalOut() != 2) return null; // Identify the two out nodes from bb. Enumeration outNodes = bb.getOutNodes(); OPT_BasicBlock out1 = (OPT_BasicBlock)outNodes.nextElement(); OPT_BasicBlock out2 = (OPT_BasicBlock)outNodes.nextElement(); int out1In = out1.getNumberOfIn(); int out2In = out2.getNumberOfIn(); if (out1In == 1 && out2In ==1) { // look for the case where the diamond has four non-empty blocks. if (out1.getNumberOfNormalOut() == 1 && out2.getNumberOfNormalOut() == 1) { OPT_BasicBlock b1 = (OPT_BasicBlock)out1.getOutNodes().nextElement(); OPT_BasicBlock b2 = (OPT_BasicBlock)out2.getOutNodes().nextElement(); if (b1 == b2) { if (b1.getNumberOfIn() == 2) { return fourElementDiamond(bb,out1,out2,b1); } } } } else if (out1In == 1 && out2In == 2) { // check for a 3-element diamond if (out1.getNumberOfNormalOut() == 1) { OPT_BasicBlock b1 = (OPT_BasicBlock)out1.getOutNodes().nextElement(); if (b1 == out2) { if (b1.getNumberOfIn() == 2) { return threeElementDiamond(bb,out1,out2); } } } } else if (out1In == 1 && out2In == 2) { // check for a 3-element diamond if (out2.getNumberOfNormalOut() == 1) { OPT_BasicBlock b2 = (OPT_BasicBlock)out2.getOutNodes().nextElement(); if (b2 == out1) { if (b2.getNumberOfIn() == 2) { return threeElementDiamond(bb,out2,out1); } } } } // didn't find a diamond return null; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/1dda5410520a0f500ffcd29f04308d88ddf71967/OPT_Diamond.java/buggy/rvm/src/vm/compilers/optimizing/optimizations/control/OPT_Diamond.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
16456,
67,
14521,
301,
1434,
1361,
14521,
301,
1434,
12,
15620,
67,
8252,
1768,
7129,
13,
288,
565,
309,
261,
9897,
18,
588,
9226,
5506,
1182,
1435,
480,
576,
13,
327,
446,
31,
565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
16456,
67,
14521,
301,
1434,
1361,
14521,
301,
1434,
12,
15620,
67,
8252,
1768,
7129,
13,
288,
565,
309,
261,
9897,
18,
588,
9226,
5506,
1182,
1435,
480,
576,
13,
327,
446,
31,
565... |
noex = iVisited.getNoex(); | noex = iVisited.getVisibility(); | public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = ruby.getRubyClass(); if (rubyClass == null) { throw new TypeError(ruby, "No class to add method."); } //if (ruby_class == getRuby().getObjectClass() && node.nd_mid() == init) { // warn("redefining Object#initialize may cause infinite loop"); //} //if (node.nd_mid() == __id__ || node.nd_mid() == __send__) { // warn("redefining `%s' may cause serious problem", ((RubyId)node.nd_mid()).toName()); //} // ruby_class.setFrozen(true); ICallable method = rubyClass.searchMethod(iVisited.getName()); // RubyObject origin = body.getOrigin(); // if (body != null){ // if (ruby_verbose.isTrue() && ruby_class == origin && body.nd_cnt() == 0) { // rom.rb_warning("discarding old %s", ((RubyId)node.nd_mid()).toName()); // } // if (node.nd_noex() != 0) { /* toplevel */ /* should upgrade to rb_warn() if no super was called inside? */ // rom.rb_warning("overriding global function `%s'", ((RubyId)node.nd_mid()).toName()); // } // } Visibility noex = Visibility.PUBLIC; if (ruby.isScope(Constants.SCOPE_PRIVATE) || iVisited.getName().equals("initialize")) { noex = Visibility.PRIVATE; } else if (ruby.isScope(Constants.SCOPE_PROTECTED)) { noex = Visibility.PROTECTED; } else if (rubyClass == ruby.getClasses().getObjectClass()) { noex = iVisited.getNoex(); } /* FIXME Fix the undef stuff if (method != null && method.getImplementationClass() == rubyClass && (method.getVisibility() & Constants.NOEX_UNDEF) != 0) { noex |= Constants.NOEX_UNDEF; } */ // FIXME Create new method store class. // ScopeNode body = copyNodeScope((ScopeNode)iVisited.getBodyNode(), ruby.getNamespace()); DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), ruby.getNamespace(), noex); rubyClass.addMethod(iVisited.getName(), newMethod); if (ruby.getCurrentMethodScope() == Constants.SCOPE_MODFUNC) { rubyClass.getSingletonClass().addMethod(iVisited.getName(), new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(iVisited.getName())); } if (rubyClass.isSingleton()) { rubyClass.getInstanceVariable("__attached__").callMethod("singleton_method_added", builtins.toSymbol(iVisited.getName())); } else { rubyClass.callMethod("method_added", builtins.toSymbol(iVisited.getName())); } } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/615c030e9e2e4f7129fe3e92d877dd15dd313c3d/EvaluateVisitor.java/clean/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
3262,
82,
907,
12,
3262,
82,
907,
277,
30019,
13,
288,
3639,
19817,
3120,
22155,
797,
273,
22155,
18,
588,
54,
10340,
797,
5621,
3639,
309,
261,
27768,
797,
422,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
3262,
82,
907,
12,
3262,
82,
907,
277,
30019,
13,
288,
3639,
19817,
3120,
22155,
797,
273,
22155,
18,
588,
54,
10340,
797,
5621,
3639,
309,
261,
27768,
797,
422,
446,
1... |
input.close(); } | input.close(); } | protected void initMapping() throws IOException, ServletException { String value = null; // Link our mappings collection to this servlet instance mappings.setServlet(this); // Initialize the debugging detail level we will use int detail; try { value = getServletConfig().getInitParameter("detail"); detail = Integer.parseInt(value); } catch (Throwable t) { detail = 0; } // Initialize the validating XML parser flag value = getServletConfig().getInitParameter("validating"); if (value != null) { if (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("yes")) validating = true; else validating = false; } // Initialize the name of our ActionFormBean implementation class value = getServletConfig().getInitParameter("formBean"); if (value != null) formBeanClass = value; // Initialize the name of our ActionForward implementation class value = getServletConfig().getInitParameter("forward"); if (value != null) forwardClass = value; // Initialize the name of our ActionMapping implementation class value = getServletConfig().getInitParameter("mapping"); if (value != null) mappingClass = value; // Initialize the context-relative path to our configuration resources value = getServletConfig().getInitParameter("config"); if (value != null) config = value; if (debug >= 1) log(internal.getMessage("configInit", config)); // Acquire an input stream to our configuration resource InputStream input = getServletContext().getResourceAsStream(config); if (input == null) throw new UnavailableException (internal.getMessage("configMissing", config)); // Build a digester to process our configuration resource Digester digester = initDigester(detail); // Parse the input stream to configure our mappings try { formBeans.setFast(false); forwards.setFast(false); mappings.setFast(false); digester.parse(input); mappings.setFast(true); forwards.setFast(true); formBeans.setFast(true); } catch (SAXException e) { throw new ServletException (internal.getMessage("configParse", config), e); } finally { input.close(); } } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/893cf1f05ff2aed2f868307f45763b5b3bc5a257/ActionServlet.java/clean/src/share/org/apache/struts/action/ActionServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
3233,
1435,
1216,
1860,
16,
16517,
288,
202,
780,
460,
273,
446,
31,
3639,
368,
4048,
3134,
7990,
1849,
358,
333,
8100,
791,
3639,
7990,
18,
542,
4745,
12,
2211,
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,
4750,
918,
1208,
3233,
1435,
1216,
1860,
16,
16517,
288,
202,
780,
460,
273,
446,
31,
3639,
368,
4048,
3134,
7990,
1849,
358,
333,
8100,
791,
3639,
7990,
18,
542,
4745,
12,
2211,
1769,
... |
buffer[1], | repair.recoveryOnNextStack ? buffer[1] : buffer[2], | private void secondaryDiagnosis(SecondaryRepairInfo repair) { switch(repair.code) { case SCOPE_CODE: { if (repair.stackPosition < stateStackTop) { reportError(DELETION_CODE, Parser.terminal_index[ERROR_SYMBOL], locationStack[repair.stackPosition], buffer[1]); } for (int i = 0; i < scopeStackTop; i++) { reportError(SCOPE_CODE, -scopeIndex[i], locationStack[scopePosition[i]], buffer[1], Parser.non_terminal_index[Parser.scope_lhs[scopeIndex[i]]]); } repair.symbol = Parser.scope_lhs[scopeIndex[scopeStackTop]] + NT_OFFSET; stateStackTop = scopePosition[scopeStackTop]; reportError(SCOPE_CODE, -scopeIndex[scopeStackTop], locationStack[scopePosition[scopeStackTop]], buffer[1], getNtermIndex(stack[stateStackTop], repair.symbol, repair.bufferPosition) ); break; } default: { reportError(repair.code, (repair.code == SECONDARY_CODE ? getNtermIndex(stack[repair.stackPosition], repair.symbol, repair.bufferPosition) : Parser.terminal_index[ERROR_SYMBOL]), locationStack[repair.stackPosition], buffer[repair.bufferPosition - 1]); stateStackTop = repair.stackPosition; } } } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/a45110537db794da9beaea8c7409e380466db842/DiagnoseParser.java/clean/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
9946,
14058,
18050,
291,
12,
14893,
426,
6017,
966,
20994,
13,
288,
202,
202,
9610,
12,
266,
6017,
18,
710,
13,
288,
1082,
202,
3593,
19296,
67,
5572,
30,
288,
202,
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,
225,
202,
1152,
918,
9946,
14058,
18050,
291,
12,
14893,
426,
6017,
966,
20994,
13,
288,
202,
202,
9610,
12,
266,
6017,
18,
710,
13,
288,
1082,
202,
3593,
19296,
67,
5572,
30,
288,
202,
5411... |
} } else { _numActive++; return pair.value; | } else { continue; } | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { _factory.destroyObject(pair.value); if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } // else keep looping } else { _numActive++; return pair.value; } } } | 50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/9edfa6440c9902186229544c41e8449da42b6b9a/GenericObjectPool.java/clean/src/java/org/apache/commons/pool/impl/GenericObjectPool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
1033,
29759,
921,
1435,
1216,
1185,
288,
3639,
1815,
3678,
5621,
3639,
1525,
23437,
273,
2332,
18,
2972,
28512,
5621,
3639,
1250,
10894,
6119,
273,
629,
31,
3639,
364,
12,
25708... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
29759,
921,
1435,
1216,
1185,
288,
3639,
1815,
3678,
5621,
3639,
1525,
23437,
273,
2332,
18,
2972,
28512,
5621,
3639,
1250,
10894,
6119,
273,
629,
31,
3639,
364,
12,
25708... |
void initialiseCRC() { | void initialiseCRC() { | void initialiseCRC() { globalCrc = 0xffffffff; } | 10884 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10884/8348e0b29d34f62b8f140a99598373fb0cbf7fcb/CRC.java/buggy/src/main/java/org/codehaus/plexus/archiver/bzip2/CRC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
21301,
26803,
1435,
288,
3639,
2552,
39,
1310,
273,
374,
28857,
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,
... | [
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
21301,
26803,
1435,
288,
3639,
2552,
39,
1310,
273,
374,
28857,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void global() throws RecognitionException { Token id=null; String type = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:325:17: ( 'global' type= dotted_name id= ID ( ';' )? opt_eol ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:325:17: 'global' type= dotted_name id= ID ( ';' )? opt_eol { match(input,21,FOLLOW_21_in_global325); following.push(FOLLOW_dotted_name_in_global329); type=dotted_name(); following.pop(); id=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_global333); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:325:49: ( ';' )? int alt11=2; int LA11_0 = input.LA(1); if ( LA11_0==15 ) { alt11=1; } else if ( LA11_0==-1||LA11_0==EOL||LA11_0==17||(LA11_0>=20 && LA11_0<=22)||LA11_0==28||LA11_0==30 ) { alt11=2; } else { NoViableAltException nvae = new NoViableAltException("325:49: ( \';\' )?", 11, 0, input); throw nvae; } switch (alt11) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:325:49: ';' { match(input,15,FOLLOW_15_in_global335); } break; } following.push(FOLLOW_opt_eol_in_global338); opt_eol(); following.pop(); packageDescr.addGlobal( id.getText(), type ); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/fb2f51ad0fb80e03d0cc7f4644cb7a7e17027618/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2552,
1435,
1216,
9539,
288,
6647,
3155,
612,
33,
2011,
31,
3639,
514,
618,
273,
446,
31,
540,
202,
3639,
775,
288,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2552,
1435,
1216,
9539,
288,
6647,
3155,
612,
33,
2011,
31,
3639,
514,
618,
273,
446,
31,
540,
202,
3639,
775,
288,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
... | ||
if (! entry.isDirectory()) { zipFile(in, zOut, prefix+vPath, entry.getTime(), | if (!entry.isDirectory()) { zipFile(in, zOut, prefix + vPath, entry.getTime(), | protected void addZipEntries(ZipFileSet fs, DirectoryScanner ds, ZipOutputStream zOut, String prefix, String fullpath) throws IOException { log("adding zip entries: " + fullpath, Project.MSG_VERBOSE); if (prefix.length() > 0 && fullpath.length() > 0) { throw new BuildException("Both prefix and fullpath attributes must" + " not be set on the same fileset."); } ZipScanner zipScanner = (ZipScanner) ds; File zipSrc = fs.getSrc(); ZipEntry entry; java.util.zip.ZipEntry origEntry; ZipInputStream in = null; try { in = new ZipInputStream(new FileInputStream(zipSrc)); while ((origEntry = in.getNextEntry()) != null) { entry = new ZipEntry(origEntry); String vPath = entry.getName(); if (zipScanner.match(vPath)) { if (fullpath.length() > 0) { addParentDirs(null, fullpath, zOut, ""); zipFile(in, zOut, fullpath, entry.getTime(), zipSrc); } else { addParentDirs(null, vPath, zOut, prefix); if (! entry.isDirectory()) { zipFile(in, zOut, prefix+vPath, entry.getTime(), zipSrc); } } } } } finally { if (in != null) { in.close(); } } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/c7b5b643b25b20f5c96097b2c54e2e26a054f212/Zip.java/clean/src/main/org/apache/tools/ant/taskdefs/Zip.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
9141,
5400,
12,
29394,
694,
2662,
16,
8930,
11338,
3780,
16,
4766,
8603,
4632,
998,
1182,
16,
514,
1633,
16,
21394,
514,
15170,
13,
3639,
1216,
1860,
565,
288,
3639,
613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9141,
5400,
12,
29394,
694,
2662,
16,
8930,
11338,
3780,
16,
4766,
8603,
4632,
998,
1182,
16,
514,
1633,
16,
21394,
514,
15170,
13,
3639,
1216,
1860,
565,
288,
3639,
613,
... |
Cursor cursor = DragSource.DefaultCopyNoDrop; myCurrentDragContext.setCursor(cursor); | myCurrentDragContext.setCursor(null); | private void onDragExit() { if (myCurrentDragContext != null) { Cursor cursor = DragSource.DefaultCopyNoDrop; myCurrentDragContext.setCursor(cursor); } myLastProcessedTarget.cleanUpOnLeave(); hideCurrentHighlighter(); //FabriqueStatusBar.setStatusText(""); myHightlighterShowRequest = null; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/1175c8c5dd00704d4c12e1b6f540c24696396592/DnDManagerImpl.java/buggy/source/com/intellij/ide/dnd/DnDManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
603,
11728,
6767,
1435,
288,
565,
309,
261,
4811,
3935,
11728,
1042,
480,
446,
13,
288,
1377,
13949,
3347,
273,
28425,
1830,
18,
1868,
2951,
2279,
7544,
31,
1377,
3399,
3935,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
11728,
6767,
1435,
288,
565,
309,
261,
4811,
3935,
11728,
1042,
480,
446,
13,
288,
1377,
13949,
3347,
273,
28425,
1830,
18,
1868,
2951,
2279,
7544,
31,
1377,
3399,
3935,
1... |
v.visitTypedInstruction(this); v.visitStackProducer(this); v.visitStackConsumer(this); v.visitConversionInstruction(this); v.visitD2F(this); } | v.visitTypedInstruction(this); v.visitStackProducer(this); v.visitStackConsumer(this); v.visitConversionInstruction(this); v.visitD2F(this); } | public void accept(Visitor v) { v.visitTypedInstruction(this); v.visitStackProducer(this); v.visitStackConsumer(this); v.visitConversionInstruction(this); v.visitD2F(this); } | 3029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3029/d7c792e0a316dd3ac20a9fe9f758abdde9bd79fe/Bytecodes.java/buggy/joeq_core/joeq/Compiler/BytecodeAnalysis/Bytecodes.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2791,
12,
7413,
331,
13,
288,
5411,
331,
18,
11658,
11985,
11983,
12,
2211,
1769,
5411,
331,
18,
11658,
2624,
12140,
12,
2211,
1769,
5411,
331,
18,
11658,
2624,
5869,
12,
2211,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2791,
12,
7413,
331,
13,
288,
5411,
331,
18,
11658,
11985,
11983,
12,
2211,
1769,
5411,
331,
18,
11658,
2624,
12140,
12,
2211,
1769,
5411,
331,
18,
11658,
2624,
5869,
12,
2211,... |
removeReport(bugReport); | removeOfflineTaskData(bugReport); | private void internalSubmitBugReport(RepositoryReport bugReport, BugzillaReportSubmitForm form) { try { form.submitReportToRepository(); removeReport(bugReport); String handle = AbstractRepositoryTask.getHandle(bugReport.getRepositoryUrl(), bugReport.getId()); ITask task = MylarTaskListPlugin.getTaskListManager().getTaskList().getTask(handle); if (task != null) { Set<AbstractRepositoryQuery> queriesWithHandle = MylarTaskListPlugin.getTaskListManager().getTaskList() .getQueriesForHandle(task.getHandleIdentifier()); synchronize(queriesWithHandle, null, Job.SHORT, 0, true); if (task instanceof AbstractRepositoryTask) { synchronize((AbstractRepositoryTask) task, true, null); } } } catch (Exception e) { throw new RuntimeException(e); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d6adf902ecafbef942349464348e4435750dd099/BugzillaRepositoryConnector.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2713,
11620,
19865,
4820,
12,
3305,
4820,
7934,
4820,
16,
16907,
15990,
4820,
11620,
1204,
646,
13,
288,
202,
202,
698,
288,
1082,
202,
687,
18,
9297,
4820,
774,
3305,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2713,
11620,
19865,
4820,
12,
3305,
4820,
7934,
4820,
16,
16907,
15990,
4820,
11620,
1204,
646,
13,
288,
202,
202,
698,
288,
1082,
202,
687,
18,
9297,
4820,
774,
3305,
562... |
logError(Messages.getString("DatabaseJoin.Log.UnexpectedError")+debug+"] : "+e.toString()); | logError(Messages.getString("DatabaseJoin.Log.UnexpectedError")+" : "+e.toString()); | public void run() { logBasic(Messages.getString("DatabaseJoin.Log.StartingToRun")); //$NON-NLS-1$ try { while (processRow(meta, data) && !isStopped()); } catch(Exception e) { logError(Messages.getString("DatabaseJoin.Log.UnexpectedError")+debug+"] : "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$ logError(Const.getStackTracker(e)); setErrors(1); stopAll(); } finally { dispose(meta, data); logSummary(); markStop(); } } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/3f39d037ba2ddf06fc422d6ae1f3add16df6eae5/DatabaseJoin.java/buggy/src/be/ibridge/kettle/trans/step/databasejoin/DatabaseJoin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
202,
95,
202,
202,
1330,
8252,
12,
5058,
18,
588,
780,
2932,
4254,
4572,
18,
1343,
18,
11715,
774,
1997,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
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,
918,
1086,
1435,
202,
95,
202,
202,
1330,
8252,
12,
5058,
18,
588,
780,
2932,
4254,
4572,
18,
1343,
18,
11715,
774,
1997,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
9506,
... |
public void update(boolean force) { // long startTime= 0; // if (DEBUG) { // dumpStatistics(); // startTime= (new Date()).getTime(); // } if (isDirty() || force) { if (toolBarExist()) { int oldCount = toolBar.getItemCount(); // clean contains all active items without double separators IContributionItem[] items = getItems(); ArrayList clean = new ArrayList(items.length); IContributionItem separator = null; // long cleanStartTime= 0; // if (DEBUG) { // cleanStartTime= (new Date()).getTime(); // } for (int i = 0; i < items.length; ++i) { IContributionItem ci = items[i]; if (!ci.isVisible()) continue; if (ci.isSeparator()) { // delay creation until necessary // (handles both adjacent separators, and separator at end) separator = ci; } else { if (separator != null) { if (clean.size() > 0) // no separator if first item clean.add(separator); separator = null; } clean.add(ci); } } // if (DEBUG) { // System.out.println(" Time needed to build clean vector: " + ((new Date()).getTime() - cleanStartTime)); // } // determine obsolete items (removed or non active) ToolItem[] mi = toolBar.getItems(); ArrayList toRemove = new ArrayList(mi.length); for (int i = 0; i < mi.length; i++) { Object data = mi[i].getData(); if (data == null || !clean.contains(data) || (data instanceof IContributionItem && ((IContributionItem) data) .isDynamic())) { toRemove.add(mi[i]); } } // Turn redraw off if the number of items to be added // is above a certain threshold, to minimize flicker, // otherwise the toolbar can be seen to redraw after each item. // Do this before any modifications are made. // We assume each contribution item will contribute at least one toolbar item. boolean useRedraw = (clean.size() - (mi.length - toRemove .size())) >= 3; if (useRedraw) { toolBar.setRedraw(false); } // remove obsolete items for (int i = toRemove.size(); --i >= 0;) { ToolItem item = (ToolItem) toRemove.get(i); if (!item.isDisposed()) { Control ctrl = item.getControl(); if (ctrl != null) { item.setControl(null); ctrl.dispose(); } item.dispose(); } } // add new items IContributionItem src, dest; mi = toolBar.getItems(); int srcIx = 0; int destIx = 0; for (Iterator e = clean.iterator(); e.hasNext();) { src = (IContributionItem) e.next(); // get corresponding item in SWT widget if (srcIx < mi.length) dest = (IContributionItem) mi[srcIx].getData(); else dest = null; if (dest != null && src.equals(dest)) { srcIx++; destIx++; continue; } if (dest != null && dest.isSeparator() && src.isSeparator()) { mi[srcIx].setData(src); srcIx++; destIx++; continue; } int start = toolBar.getItemCount(); src.fill(toolBar, destIx); int newItems = toolBar.getItemCount() - start; for (int i = 0; i < newItems; i++) { ToolItem item = toolBar.getItem(destIx++); item.setData(src); } } // remove any old tool items not accounted for for (int i = mi.length; --i >= srcIx;) { ToolItem item = mi[i]; if (!item.isDisposed()) { Control ctrl = item.getControl(); if (ctrl != null) { item.setControl(null); ctrl.dispose(); } item.dispose(); } } setDirty(false); // turn redraw back on if we turned it off above if (useRedraw) { toolBar.setRedraw(true); } int newCount = toolBar.getItemCount(); relayout(toolBar, oldCount, newCount); } } // if (DEBUG) { // System.out.println(" Time needed for update: " + ((new Date()).getTime() - startTime)); // System.out.println(); // } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/95cd7fe82387f3f7959231b5ddc4a9efad83986a/ToolBarManager.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
12,
6494,
2944,
13,
288,
3639,
368,
202,
5748,
8657,
33,
374,
31,
3639,
368,
202,
430,
261,
9394,
13,
288,
3639,
368,
202,
202,
8481,
8569,
5621,
3639,
368,
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,
377,
1071,
918,
1089,
12,
6494,
2944,
13,
288,
3639,
368,
202,
5748,
8657,
33,
374,
31,
3639,
368,
202,
430,
261,
9394,
13,
288,
3639,
368,
202,
202,
8481,
8569,
5621,
3639,
368,
202,
202,
... | ||
/* | public void testSnmpInterfaceNonUniqueKeys() throws Exception { if (!isDBTestEnabled()) { return; } m_installer.createSequences(); m_installer.updatePlPgsql(); m_installer.addStoredProcedures(); addTableFromSQL("distpoller"); addTableFromSQL("node"); addTableFromSQL("snmpinterface"); executeSQL("drop index snmpinterface_nodeid_ifindex_idx"); executeSQL("INSERT INTO node ( nodeId, nodeCreateTime ) " + "VALUES ( 1, now() )"); /* executeSQL("INSERT INTO snmpInterface ( nodeID, ipAddr, snmpIfIndex ) " + "VALUES ( 1, '0.0.0.0', 1 )"); executeSQL("INSERT INTO snmpInterface ( nodeID, ipAddr, snmpIfIndex ) " + "VALUES ( 1, '0.0.0.0', 1 )"); */ executeSQL("INSERT INTO snmpInterface ( nodeID, ipAddr, snmpIfIndex ) " + "VALUES ( 1, '0.0.0.1', 1 )"); executeSQL("INSERT INTO snmpInterface ( nodeID, ipAddr, snmpIfIndex ) " + "VALUES ( 1, '0.0.0.2', 1 )"); ThrowableAnticipator ta = new ThrowableAnticipator(); ta.anticipate(new Exception("Unique index " + "'snmpinterface_nodeid_ifindex_idx' " + "cannot be added to table " + "'snmpinterface' because 2 rows are not " + "unique. See the install guide for " + "details on how to correct this " + "problem. You can use the following SQL " + "to see which rows are not unique:\n" + "SELECT DISTINCT a.* FROM snmpinterface " + "a, snmpinterface b WHERE a.nodeID = " + "b.nodeID AND a.snmpIfIndex = " + "b.snmpIfIndex " + "AND a.ipAddr != b.ipAddr")); try { m_installer.checkIndexUniqueness(); } catch (Throwable t) { ta.throwableReceived(t); } ta.verifyAnticipated(); } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/e14afda26b6a106ace58fd834660594638109533/InstallerDBTest.java/buggy/opennms-install/src/test/java/org/opennms/install/InstallerDBTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10461,
1291,
1358,
3989,
6303,
2396,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
312,
67,
20163,
18,
2640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10461,
1291,
1358,
3989,
6303,
2396,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
312,
67,
20163,
18,
2640,
... | |
fDatatypeValidator = datatypeValidator; | public Field(Field.XPath xpath, DatatypeValidator datatypeValidator, IdentityConstraint identityConstraint) { fXPath = xpath; fDatatypeValidator = datatypeValidator; fIdentityConstraint = identityConstraint; } // <init>(Field.XPath,DatatypeValidator,IdentityConstraint) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/d193f24a367ea37291fecfd902a4b0da65c27110/Field.java/buggy/src/org/apache/xerces/validators/schema/identity/Field.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2286,
12,
974,
18,
14124,
6748,
16,
21168,
5126,
11172,
5126,
16,
1171,
7808,
5806,
4215,
5806,
13,
288,
3639,
284,
14124,
273,
6748,
31,
9079,
284,
4334,
5806,
273,
4215,
5806,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2286,
12,
974,
18,
14124,
6748,
16,
21168,
5126,
11172,
5126,
16,
1171,
7808,
5806,
4215,
5806,
13,
288,
3639,
284,
14124,
273,
6748,
31,
9079,
284,
4334,
5806,
273,
4215,
5806,
31,... | |
public int getConversationCount(HttpUrl url) { | public int getConversationCount() { | public int getConversationCount(HttpUrl url) { try { _rwl.readLock().acquire(); return _compared.size(); } catch (InterruptedException ie) { _logger.warning("Interrupted! " + ie); return -1; } finally { _rwl.readLock().release(); } } | 8554 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8554/5cd0631e882b72a5ed80c126194f77856e1d210a/CompareModel.java/clean/src/org/owasp/webscarab/plugin/compare/CompareModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
509,
336,
15717,
1380,
1435,
288,
5411,
775,
288,
7734,
389,
86,
21504,
18,
896,
2531,
7675,
1077,
1039,
5621,
7734,
327,
389,
9877,
72,
18,
1467,
5621,
5411,
289,
1044,
261,
24485,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
336,
15717,
1380,
1435,
288,
5411,
775,
288,
7734,
389,
86,
21504,
18,
896,
2531,
7675,
1077,
1039,
5621,
7734,
327,
389,
9877,
72,
18,
1467,
5621,
5411,
289,
1044,
261,
24485,... |
ruby_class.getSingletonClass().addMethod((RubyId)node.nd_mid(), defn, NOEX_PUBLIC); ruby_class.funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } if (ruby_class.isSingleton()) { ruby_class.getInstanceVar("__attached__").funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); | ruby.getRubyClass().getSingletonClass().addMethod((RubyId)node.nd_mid(), defn, NOEX_PUBLIC); ruby.getRubyClass().funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } if (ruby.getRubyClass().isSingleton()) { ruby.getRubyClass().getInstanceVar("__attached__").funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); | public RubyObject eval(RubyObject self, NODE n) { NODE node = n; RubyObject cond = null; RubyObject[] args = null; RubyObject value = null; RubyObject result = null; RubyModule rubyClass = null; // int state; // RubyOriginalMethods rom = getRuby().getOriginalMethods(); while (true) { if (node == null) { return getRuby().getNil(); } switch (node.nd_type()) { case NODE_BLOCK: while (node.nd_next() != null) { eval(self, node.nd_head()); node = node.nd_next(); } node = node.nd_head(); break; case NODE_POSTEXE: // rb_f_END(); node.nd_set_type(NODE_NIL); /* exec just once */ return getRuby().getNil(); /* begin .. end without clauses */ case NODE_BEGIN: node = node.nd_body(); break; /* nodes for speed-up(default match) */ case NODE_MATCH: //return rom.rb_reg_match2(node.nd_head().nd_lit()); return getRuby().getNil(); /* nodes for speed-up(literal match) */ case NODE_MATCH2: //return rom.rb_reg_match(eval(node.nd_recv()), eval(node.nd_value())); return getRuby().getNil(); /* nodes for speed-up(literal match) */ case NODE_MATCH3: //VALUE r = eval(node.nd_recv()); //VALUE l = eval(node.nd_value()); //if (r instanceof RubyString) { // return rom.rb_reg_match(l, r); //} else { // return rom.rb_funcall(r, match, 1, l); //} return getRuby().getNil(); /* node for speed-up(top-level loop for -n/-p) */ case NODE_OPT_N: while (true) { try { // while (!rb_gets().isNil() false) { // HACK +++ if (true) { // HACK --- try { eval(self, node.nd_body()); } catch (RedoException rExcptn) { } } break; } catch (NextException nExcptn) { } catch (BreakException bExcptn) { break; } } return getRuby().getNil(); case NODE_SELF: return self; case NODE_NIL: return getRuby().getNil(); case NODE_TRUE: return getRuby().getTrue(); case NODE_FALSE: return getRuby().getFalse(); case NODE_IF: // ruby_sourceline = node.nd_line(); cond = eval(self, node.nd_cond()); if (cond.isTrue()) { node = node.nd_body(); } else { node = node.nd_else(); } break; case NODE_WHEN: while (node != null) { NODE tag; if (node.nd_type() != NODE_WHEN) { break; } tag = node.nd_head(); while (tag != null) {/* if (trace_func) { call_trace_func("line", tag->nd_file, nd_line(tag), self, ruby_frame->last_func, ruby_frame->last_class); }*/ // ruby_sourcefile = tag.nd_file; // ruby_sourceline = tag.nd_line(); if (tag.nd_head().nd_type() == NODE_WHEN) { RubyObject obj = eval(self, tag.nd_head().nd_head()); if (!(obj instanceof RubyArray)) { obj = RubyArray.m_newArray(getRuby(), obj); } for (int i = 0; i < ((RubyArray)obj).length(); i++) { if (((RubyArray)obj).entry(i).isTrue()) { node = node.nd_body(); break; } } tag = tag.nd_next(); continue; } if (eval(self, tag.nd_head()).isTrue()) { node = node.nd_body(); break; } tag = tag.nd_next(); } node = node.nd_next(); } return getRuby().getNil(); case NODE_CASE: RubyObject obj = eval(self, node.nd_head()); node = node.nd_body(); while (node != null) { NODE tag; if (node.nd_type() != NODE_WHEN) { break; } tag = node.nd_head(); while (tag != null) {/* if (trace_func) { call_trace_func("line", tag->nd_file, nd_line(tag), self, ruby_frame->last_func, ruby_frame->last_class); } ruby_sourcefile = tag->nd_file; ruby_sourceline = nd_line(tag);*/ if (tag.nd_head().nd_type() == NODE_WHEN) { RubyObject obj2 = eval(self, tag.nd_head().nd_head()); if (!(obj2 instanceof RubyArray)) { obj2 = RubyArray.m_newArray(getRuby(), obj2); } for (int i = 0; i < ((RubyArray)obj).length(); i++) { RubyObject eqq = ((RubyArray)obj2).entry(i).funcall(getRuby().intern("==="), obj); if (eqq.isTrue()) { node = node.nd_body(); break; } } tag = tag.nd_next(); continue; } if (eval(self, tag.nd_head()).funcall(getRuby().intern("==="), obj).isTrue()) { node = node.nd_body(); break; } tag = tag.nd_next(); } node = node.nd_next(); } return getRuby().getNil(); case NODE_WHILE: while (eval(self, node.nd_cond()).isTrue()) { while (true) { try { eval(self, node.nd_body()); break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { break; } catch (BreakException bExcptn) { return getRuby().getNil(); } } } return getRuby().getNil(); case NODE_UNTIL: while (eval(self, node.nd_cond()).isFalse()) { while (true) { try { eval(self, node.nd_body()); break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { break; } catch (BreakException bExcptn) { return getRuby().getNil(); } } } return getRuby().getNil(); case NODE_BLOCK_PASS: //return block_pass(node); return null; case NODE_ITER: case NODE_FOR: rubyBlock.push(node.nd_var(), node.nd_body(), self); rubyIter.push(Iter.ITER_PRE); while (true) { try { if (node.nd_type() == NODE_ITER) { result = eval(self, node.nd_iter()); } else { // String file = // int line = rubyBlock.flags &= ~RubyBlock.BLOCK_D_SCOPE; RubyBlock tmpBlock = beginCallargs(); RubyObject recv = eval(self, node.nd_iter()); endCallArgs(tmpBlock); // = file; // = line; result = recv.getRubyClass().call(recv, ruby.intern("each"), null, 0); } break; } catch (RetryException rExcptn) { } catch (ReturnException rExcptn) { result = rExcptn.getReturnValue(); break; } catch (BreakException bExcptn) { result = ruby.getNil(); break; } } rubyIter.pop(); rubyBlock.pop(); return result; case NODE_BREAK: throw new BreakException(); case NODE_NEXT: throw new NextException(); case NODE_REDO: throw new RedoException(); case NODE_RETRY: throw new RetryException(); case NODE_RESTARGS: result = eval(self, node.nd_head()); if (!(result instanceof RubyArray)) { result = obj = RubyArray.m_newArray(getRuby(), result); } return result; case NODE_YIELD: if (node.nd_stts() != null) { result = eval(self, node.nd_stts()); if (node.nd_stts().nd_type() == NODE_RESTARGS && ((RubyArray)result).length() == 1) { result = ((RubyArray)result).entry(0); } } else { result = ruby.getNil(); } return yield0(result, null, null, false); case NODE_RESCUE:/* retry_entry: { volatile VALUE e_info = ruby_errinfo; PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { result = rb_eval(self, node->nd_head); } POP_TAG(); if (state == TAG_RAISE) { NODE * volatile resq = node->nd_resq; ruby_sourceline = nd_line(node); while (resq) { if (handle_rescue(self, resq)) { state = 0; PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { result = rb_eval(self, resq->nd_body); } POP_TAG(); if (state == TAG_RETRY) { state = 0; ruby_errinfo = Qnil; goto retry_entry; } if (state != TAG_RAISE) { ruby_errinfo = e_info; } break; } resq = resq->nd_head; /* next rescue */ /** } * } * else if (node->nd_else) { /* else clause given *//* if (!state) { /* no exception raised *//* result = rb_eval(self, node->nd_else); } } if (state) JUMP_TAG(state); } break;*/ case NODE_ENSURE:/* PUSH_TAG(PROT_NONE); if ((state = EXEC_TAG()) == 0) { result = eval(node.nd_head()); } POP_TAG(); if (node.nd_ensr()) { VALUE retval = prot_tag->retval; /* save retval *//* VALUE errinfo = ruby_errinfo; rb_eval(self, node->nd_ensr); return_value(retval); ruby_errinfo = errinfo; } if (state) JUMP_TAG(state); break;*/ case NODE_AND: cond = eval(self, node.nd_1st()); if (cond.isFalse()) { return cond; } node = node.nd_2nd(); break; case NODE_OR: cond = eval(self, node.nd_1st()); if (cond.isTrue()) { return cond; } node = node.nd_2nd(); break; case NODE_NOT: return RubyBoolean.m_newBoolean(getRuby(), eval(self, node.nd_1st()).isFalse()); case NODE_DOT2: case NODE_DOT3: result = RubyRange.m_newRange(getRuby(), eval(self, node.nd_beg()), eval(self, node.nd_end()), node.nd_type() == NODE_DOT3); if (node.nd_state() != 0) { return result; } if (node.nd_beg().nd_type() == NODE_LIT && (node.nd_beg().nd_lit() instanceof RubyFixnum) && node.nd_end().nd_type() == NODE_LIT && (node.nd_end().nd_lit() instanceof RubyFixnum)) { node.nd_set_type(NODE_LIT); node.nd_lit(result); } else { node.nd_state(1L); } return result; case NODE_FLIP2: /* like AWK */ /*if (ruby_scope->local_vars == 0) { rb_bug("unexpected local variable"); }*/ if (ruby.getRubyScope().getLocalVars(node.nd_cnt()).isFalse()) { if (eval(self, node.nd_beg()).isTrue()) { ruby.getRubyScope().setLocalVars(node.nd_cnt(), eval(self, node.nd_end()).isTrue() ? ruby.getFalse() : ruby.getTrue()); result = ruby.getTrue(); } else { result = ruby.getFalse(); } } else { if (eval(self, node.nd_end()).isTrue()) { ruby.getRubyScope().setLocalVars(node.nd_cnt(), ruby.getFalse()); } result = ruby.getTrue(); } return result; case NODE_FLIP3: /* like SED */ /*if (ruby_scope->local_vars == 0) { rb_bug("unexpected local variable"); }*/ if (ruby.getRubyScope().getLocalVars(node.nd_cnt()).isFalse()) { result = eval(self, node.nd_beg()).isTrue() ? ruby.getFalse() : ruby.getTrue(); ruby.getRubyScope().setLocalVars(node.nd_cnt(), result); } else { if (eval(self, node.nd_end()).isTrue()) { ruby.getRubyScope().setLocalVars(node.nd_cnt(), ruby.getFalse()); } result = ruby.getTrue(); } return result; case NODE_RETURN: if (node.nd_stts() != null) { result = eval(self, node.nd_stts()); } else { result = ruby.getNil(); } throw new ReturnException(result); case NODE_ARGSCAT: return ((RubyArray)eval(self, node.nd_head())).m_concat(eval(self, node.nd_body())); case NODE_ARGSPUSH: return ((RubyArray)eval(self, node.nd_head()).m_dup()).push(eval(self, node.nd_body())); case NODE_CALL: // TMP_PROTECT; RubyBlock tmpBlock = beginCallargs(); RubyObject recv = eval(self, node.nd_recv()); args = setupArgs(self, node.nd_args()); endCallArgs(tmpBlock); return recv.getRubyClass().call(recv, (RubyId)node.nd_mid(), args, 0); case NODE_FCALL: // TMP_PROTECT; tmpBlock = beginCallargs(); args = setupArgs(self, node.nd_args()); endCallArgs(tmpBlock); return self.getRubyClass().call(self, (RubyId)node.nd_mid(), args, 1); case NODE_VCALL: return self.getRubyClass().call(self, (RubyId)node.nd_mid(), null, 2); case NODE_SUPER: case NODE_ZSUPER: // TMP_PROTECT; if (getRubyFrame().getLastClass() == null) { throw new RubyNameException("superclass method '" + rubyFrame.getLastFunc().toName() + "' disabled"); } if (node.nd_type() == NODE_ZSUPER) { List argsList = getRubyFrame().getArgs(); args = (RubyObject[])argsList.toArray(new RubyObject[argsList.size()]); } else { tmpBlock = beginCallargs(); args = setupArgs(self, node.nd_args()); endCallArgs(tmpBlock); } rubyIter.push(rubyIter.getIter() != Iter.ITER_NOT ? Iter.ITER_PRE : Iter.ITER_NOT); result = getRubyFrame().getLastClass().getSuperClass().call(rubyFrame.getSelf(), rubyFrame.getLastFunc(), args, 3); rubyIter.pop(); return result; case NODE_SCOPE: NODE saved_cref = null; Frame frame = getRubyFrame(); frame.setTmp(getRubyFrame()); rubyFrame = frame; ruby.getRubyScope().push(); if (node.nd_rval() != null) { saved_cref = ruby_cref; ruby_cref = (NODE)node.nd_rval(); getRubyFrame().setCbase(node.nd_rval()); } if (node.nd_tbl() != null) { List tmp = Collections.nCopies(node.nd_tbl()[0].intValue() + 1, ruby.getNil()); ShiftableList vars = new ShiftableList(new ArrayList(tmp)); vars.set(0, (VALUE)node); vars.shift(1); getRuby().getRubyScope().setLocalVars(vars); getRuby().getRubyScope().setLocalTbl(node.nd_tbl()); } else { getRuby().getRubyScope().setLocalVars(null); getRuby().getRubyScope().setLocalTbl(null); } result = eval(self, node.nd_next()); ruby.getRubyScope().pop(); rubyFrame = frame.getTmp(); if (saved_cref != null) { ruby_cref = saved_cref; } return result; case NODE_OP_ASGN1: // TMP_PROTECT; recv = eval(self, node.nd_recv()); NODE rval = node.nd_args().nd_head(); args = setupArgs(self, node.nd_args().nd_next()); ArrayList argsList = new ArrayList(Arrays.asList(args)); argsList.remove(args.length - 1); RubyObject val = recv.funcall(getRuby().intern("[]"), (RubyObject[])argsList.toArray(new RubyObject[argsList.size()])); switch (node.nd_mid().intValue()) { case 0: /* OR */ if (val.isTrue()) { return val; } val = eval(self, rval); break; case 1: /* AND */ if (val.isFalse()) { return val; } val = eval(self, rval); break; default: val = val.funcall((RubyId)node.nd_mid(), eval(self, rval)); } args[args.length - 1] = val; return recv.funcall(getRuby().intern("[]="), args); case NODE_OP_ASGN2: ID id = node.nd_next().nd_vid(); recv = eval(self, node.nd_recv()); val = recv.funcall((RubyId)id, (RubyObject[])null); switch (node.nd_next().nd_mid().intValue()) { case 0: /* OR */ if (val.isTrue()) { return val; } val = eval(self, node.nd_value()); break; case 1: /* AND */ if (val.isFalse()) { return val; } val = eval(self, node.nd_value()); break; default: val = val.funcall((RubyId)node.nd_mid(), eval(self, node.nd_value())); } // HACK +++ val = recv.funcall((RubyId)node.nd_next().nd_aid(), val); // HACK --- return val; case NODE_OP_ASGN_AND: cond = eval(self, node.nd_head()); if (cond.isFalse()) { return cond; } node = node.nd_value(); break; case NODE_OP_ASGN_OR: cond = eval(self, node.nd_head()); if ((node.nd_aid() != null && !self.isInstanceVarDefined((RubyId)node.nd_aid())) || cond.isFalse()) { node = node.nd_value(); break; } return cond; case NODE_MASGN: return massign(self, node, eval(self, node.nd_value()), false); case NODE_LASGN: // if (ruby.ruby_scope.local_vars == null) { // rb_bug("unexpected local variable assignment"); // } result = eval(self, node.nd_value()); getRuby().getRubyScope().setLocalVars(node.nd_cnt(), result); return result; case NODE_DASGN: result = eval(self, node.nd_value()); RubyVarmap.assign(ruby, (RubyId)node.nd_vid(), result); return result; case NODE_DASGN_CURR: result = eval(self, node.nd_value()); RubyVarmap.assignCurrent(ruby, (RubyId)node.nd_vid(), result); return result; case NODE_GASGN: result = eval(self, node.nd_value()); ((RubyGlobalEntry)node.nd_entry()).set(result); return result; case NODE_IASGN: result = eval(self, node.nd_value()); self.setInstanceVar((RubyId)node.nd_vid(), result); return result; case NODE_CDECL: if (ruby_class == null) { throw new RubyTypeException("no class/module to define constant"); } result = eval(self, node.nd_value()); ruby_class.setConstant((RubyId)node.nd_vid(), result); return result; case NODE_CVDECL: if (ruby_cbase == null) { throw new RubyTypeException("no class/module to define class variable"); } result = eval(self, node.nd_value()); if (ruby_cbase.isSingleton()) { ruby_cbase.getInstanceVar("__attached__").getClassVarSingleton().declareClassVar((RubyId)node.nd_vid(), result); return result; } ruby_cbase.declareClassVar((RubyId)node.nd_vid(), result); return result; case NODE_CVASGN: result = eval(self, node.nd_value()); self.getClassVarSingleton().setClassVar((RubyId)node.nd_vid(), result); return result; case NODE_LVAR: //if (getRuby().ruby_scope.local_vars == null) { // rb_bug("unexpected local variable"); // } return (RubyObject)getRuby().getRubyScope().getLocalVars(node.nd_cnt()); case NODE_DVAR: return getDynamicVars().getRef((RubyId)node.nd_vid()); case NODE_GVAR: return ((RubyGlobalEntry)node.nd_entry()).get(); case NODE_IVAR: return self.getInstanceVar((RubyId)node.nd_vid()); case NODE_CONST: return getConstant((NODE)getRubyFrame().getCbase(), (RubyId)node.nd_vid(), self); case NODE_CVAR: /* normal method */ if (ruby_cbase == null) { return self.getRubyClass().getClassVar((RubyId)node.nd_vid()); } if (!ruby_cbase.isSingleton()) { return ruby_cbase.getClassVar((RubyId)node.nd_vid()); } return ruby_cbase.getInstanceVar("__attached__").getClassVarSingleton().getClassVar((RubyId)node.nd_vid()); case NODE_CVAR2: /* singleton method */ return self.getClassVarSingleton().getClassVar((RubyId)node.nd_vid()); case NODE_BLOCK_ARG: if (ruby.getRubyScope().getLocalVars() == null) { throw new RuntimeException("BUG: unexpected block argument"); } if (isBlockGiven()) { result = getRuby().getNil(); // Create Proc object ruby.getRubyScope().setLocalVars(node.nd_cnt(), result); return result; } else { return getRuby().getNil(); } case NODE_COLON2: value = eval(self, node.nd_head()); if (value instanceof RubyModule) { return ((RubyModule)value).getConstant((RubyId)node.nd_mid()); } else { return value.funcall((RubyId)node.nd_mid()); } case NODE_COLON3: return getRuby().getClasses().getObjectClass().getConstant((RubyId)node.nd_mid()); case NODE_NTH_REF: // return rom.rb_reg_nth_match(node.nd_nth(), MATCH_DATA); return null; case NODE_BACK_REF: /*switch ((char)node.nd_nth()) { case '&': return rom.rb_reg_last_match(MATCH_DATA); case '`': return rom.rb_reg_match_pre(MATCH_DATA); case '\'': return rom.rb_reg_match_post(MATCH_DATA); case '+': return rom.rb_reg_match_last(MATCH_DATA); default: rom.rb_bug("unexpected back-ref"); }*/ case NODE_HASH: RubyHash hash = RubyHash.m_newHash(ruby); NODE list = node.nd_head(); while(list != null) { RubyObject key = eval(self, list.nd_head()); list = list.nd_next(); if (list == null) { // HACK +++ throw new RubyArgumentException("odd number list for Hash"); // HACK --- } value = eval(self, list.nd_head()); hash.m_aset(key, value); list = list.nd_next(); } return hash; case NODE_ZARRAY: /* zero length list */ return RubyArray.m_newArray(getRuby()); case NODE_ARRAY: ArrayList ary = new ArrayList(node.nd_alen()); for (; node != null ; node = node.nd_next()) { ary.add(eval(self, node.nd_head())); } return RubyArray.m_newArray(getRuby(), ary); case NODE_STR: return ((RubyObject)node.nd_lit()).m_to_s(); case NODE_DSTR: case NODE_DXSTR: case NODE_DREGX: case NODE_DREGX_ONCE:/* NODE list = node.nd_next(); RubyString str = RubyString.m_newString(getRuby(), (RubyObject)node.nd_lit()); RubyString str2; while (list != null) { if (list.nd_head() != null) { switch (list.nd_head().nd_type()) { case NODE_STR: str2 = (RubyString)list.nd_head().nd_lit(); break; case NODE_EVSTR: result = ruby_errinfo; ruby_errinfo = Qnil; ruby_sourceline = nd_line(node); ruby_in_eval++; list.nd_head(compile(list.nd_head().nd_lit(), ruby_sourcefile,ruby_sourceline)); ruby_eval_tree = 0; ruby_in_eval--; if (ruby_nerrs > 0) { compile_error("string expansion"); } if (!NIL_P(result)) ruby_errinfo = result; /* fall through *//* default: str2 = (RubyString)rom.rb_obj_as_string(eval(list.nd_head())); break; } str.append(str2); str.infectObject(str2); } list = list.nd_next(); } switch (node.nd_type()) { case NODE_DREGX: return rom.rb_reg_new(str.getString(), str.getString().length(), node.nd_cflag()); case NODE_DREGX_ONCE: /* regexp expand once *//* VALUE result = rom.rb_reg_new(str.getString(), str.getString().length(), node.nd_cflag()); node.nd_set_type(NODE_LIT); node.nd_lit(result); return result; case NODE_DXSTR: return rom.rb_funcall(this, '`', 1, str); default: return str; }*/ return null; case NODE_XSTR: return self.funcall(getRuby().intern("`"), (RubyObject)node.nd_lit()); case NODE_LIT: return (RubyObject)node.nd_lit(); case NODE_ATTRSET: if (getRubyFrame().getArgs().size() != 1) { throw new RubyArgumentException("wrong # of arguments(" + rubyFrame.getArgs().size() + "for 1)"); } return self.setInstanceVar((RubyId)node.nd_vid(), (RubyObject)rubyFrame.getArgs().get(0)); case NODE_DEFN: if (node.nd_defn() != null) { int noex; if (ruby_class == null) { throw new RubyTypeException("no class to add method"); } //if (ruby_class == getRuby().getObjectClass() && node.nd_mid() == init) { // rom.rb_warn("redefining Object#initialize may cause infinite loop"); //} //if (node.nd_mid() == __id__ || node.nd_mid() == __send__) { // rom.rb_warn("redefining `%s' may cause serious problem", ((RubyId)node.nd_mid()).toName()); //} // ruby_class.setFrozen(true); SearchMethodResult smr = ruby_class.searchMethod((RubyId)node.nd_mid()); NODE body = smr.getBody(); RubyObject origin = smr.getOrigin(); if (body != null){ // if (ruby_verbose.isTrue() && ruby_class == origin && body.nd_cnt() == 0) { // rom.rb_warning("discarding old %s", ((RubyId)node.nd_mid()).toName()); // } // if (node.nd_noex() != 0) { /* toplevel */ /* should upgrade to rb_warn() if no super was called inside? */ // rom.rb_warning("overriding global function `%s'", ((RubyId)node.nd_mid()).toName()); // } } if (isScope(SCOPE_PRIVATE) || node.nd_mid().equals(ruby.intern("initialize"))) { noex = NOEX_PRIVATE; } else if (isScope(SCOPE_PROTECTED)) { noex = NOEX_PROTECTED; } else if (ruby_class == getRuby().getClasses().getObjectClass()) { noex = node.nd_noex(); } else { noex = NOEX_PUBLIC; } if (body != null && origin == ruby_class && (body.nd_noex() & NOEX_UNDEF) != 0) { noex |= NOEX_UNDEF; } NODE defn = node.nd_defn().copyNodeScope(ruby_cref); ruby_class.addMethod((RubyId)node.nd_mid(), defn, noex); // rb_clear_cache_by_id(node.nd_mid()); if (actMethodScope == SCOPE_MODFUNC) { ruby_class.getSingletonClass().addMethod((RubyId)node.nd_mid(), defn, NOEX_PUBLIC); ruby_class.funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } if (ruby_class.isSingleton()) { ruby_class.getInstanceVar("__attached__").funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } else { ruby_class.funcall(getRuby().intern("method_added"), ((RubyId)node.nd_mid()).toSymbol()); } } return getRuby().getNil(); case NODE_DEFS: if (node.nd_defn() != null) { recv = eval(self, node.nd_recv()); if (getRuby().getSecurityLevel() >= 4 && !recv.isTaint()) { throw new RubySecurityException("Insecure; can't define singleton method"); } /*if (FIXNUM_P(recv) || SYMBOL_P(recv)) { rb_raise(rb_eTypeError, "can't define singleton method \"%s\" for %s", rb_id2name(node.nd_mid()), rb_class2name(CLASS_OF(recv))); }*/ // not needed in jruby if (recv.isFrozen()) { throw new RubyFrozenException("object"); } rubyClass = recv.getSingletonClass(); NODE body = (NODE)rubyClass.getMethods().get((RubyId)node.nd_mid()); if (body != null) { if (getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException("redefining method prohibited"); } /*if (RTEST(ruby_verbose)) { rb_warning("redefine %s", rb_id2name(node.nd_mid())); }*/ } NODE defn = node.nd_defn().copyNodeScope(ruby_cref); defn.nd_rval(ruby_cref); rubyClass.addMethod((RubyId)node.nd_mid(), defn, NOEX_PUBLIC | (body != null ? body.nd_noex() & NOEX_UNDEF : 0)); // rb_clear_cache_by_id(node.nd_mid()); recv.funcall(getRuby().intern("singleton_method_added"), ((RubyId)node.nd_mid()).toSymbol()); } return getRuby().getNil(); case NODE_UNDEF: if (ruby_class == null) { throw new RubyTypeException("no class to undef method"); } ruby_class.undef((RubyId)node.nd_mid()); return getRuby().getNil(); case NODE_ALIAS: if (ruby_class == null) { throw new RubyTypeException("no class to make alias"); } ruby_class.aliasMethod((RubyId)node.nd_new(), (RubyId)node.nd_old()); ruby_class.funcall(getRuby().intern("method_added"), ((RubyId)node.nd_mid()).toSymbol()); return getRuby().getNil(); case NODE_VALIAS: RubyGlobalEntry.getGlobalEntry((RubyId)node.nd_old()).alias((RubyId)node.nd_new()); return getRuby().getNil(); case NODE_CLASS: RubyModule superClass; if (ruby_class == null) { throw new RubyTypeException("no outer class/module"); } if (node.nd_super() != null) { superClass = getSuperClass(self, node.nd_super()); } else { superClass = null; } rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (ruby_class.isConstantDefined((RubyId)node.nd_cname())) { rubyClass = (RubyClass)ruby_class.getConstant((RubyId)node.nd_cname()); } if (rubyClass != null) { if (!rubyClass.isClass()) { throw new RubyTypeException(((RubyId)node.nd_cname()).toName() + " is not a class"); } if (superClass != null) { RubyModule tmp = rubyClass.getSuperClass(); if (tmp.isSingleton()) { tmp = tmp.getSuperClass(); } while (tmp.isIncluded()) { tmp = tmp.getSuperClass(); } if (tmp != superClass) { superClass = tmp; //goto override_class; if (superClass == null) { superClass = getRuby().getClasses().getObjectClass(); } rubyClass = getRuby().defineClassId((RubyId)node.nd_cname(), (RubyClass)superClass); ruby_class.setConstant((RubyId)node.nd_cname(), rubyClass); rubyClass.setClassPath((RubyClass)ruby_class, ((RubyId)node.nd_cname()).toName()); // end goto } } if (getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException("extending class prohibited"); } // rb_clear_cache(); } else { //override_class: if (superClass == null) { superClass = getRuby().getClasses().getObjectClass(); } rubyClass = getRuby().defineClassId((RubyId)node.nd_cname(), (RubyClass)superClass); ruby_class.setConstant((RubyId)node.nd_cname(), rubyClass); rubyClass.setClassPath((RubyClass)ruby_class, ((RubyId)node.nd_cname()).toName()); } if (ruby_wrapper != null) { rubyClass.getSingletonClass().includeModule(ruby_wrapper); rubyClass.includeModule(ruby_wrapper); } return setupModule(rubyClass, node.nd_body()); case NODE_MODULE: if (ruby_class == null) { throw new RubyTypeException("no outer class/module"); } RubyModule module = null; if ((ruby_class == getRuby().getClasses().getObjectClass()) && getRuby().isAutoloadDefined((RubyId)node.nd_cname())) { // getRuby().rb_autoload_load(node.nd_cname()); } if (ruby_class.isConstantDefined((RubyId)node.nd_cname())) { module = (RubyModule)ruby_class.getConstant((RubyId)node.nd_cname()); } if (module != null) { if (!(module instanceof RubyModule)) { throw new RubyTypeException(((RubyId)node.nd_cname()).toName() + " is not a module"); } if (getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException("extending module prohibited"); } } else { module = getRuby().defineModuleId((RubyId)node.nd_cname()); ruby_class.setConstant((RubyId)node.nd_cname(), module); module.setClassPath(ruby_class, ((RubyId)node.nd_cname()).toName()); } if (ruby_wrapper != null) { module.getSingletonClass().includeModule(ruby_wrapper); module.includeModule(ruby_wrapper); } return setupModule(module, node.nd_body()); case NODE_SCLASS: rubyClass = (RubyClass)eval(self, node.nd_recv()); if (rubyClass.isSpecialConst()) { throw new RubyTypeException("no virtual class for " + rubyClass.getRubyClass().toName()); } if (getRuby().getSecurityLevel() >= 4 && !rubyClass.isTaint()) { throw new RubySecurityException("Insecure: can't extend object"); } if (rubyClass.getRubyClass().isSingleton()) { // rb_clear_cache(); } rubyClass = rubyClass.getSingletonClass(); if (ruby_wrapper != null) { rubyClass.getSingletonClass().includeModule(ruby_wrapper); rubyClass.includeModule(ruby_wrapper); } return setupModule(rubyClass, node.nd_body()); case NODE_DEFINED: // String buf; // String desc = is_defined(self, node.nd_head(), buf); // // if (desc) { // result = rb_str_new2(desc); // } else { // result = Qnil; // } case NODE_NEWLINE: // ruby_sourcefile = node.nd_file; // ruby_sourceline = node.nd_nth(); // if (trace_func) { // call_trace_func("line", ruby_sourcefile, ruby_sourceline, self, // ruby_frame.last_func(), // ruby_frame.last_class()); // } node = node.nd_next(); break; default: // rom.rb_bug("unknown node type %d", nd_type(node)); } } } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/a2024bddc1b8e83f4e8075d2080935c221a833fe/RubyInterpreter.java/clean/org/jruby/interpreter/RubyInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
5302,
12,
54,
10340,
921,
365,
16,
11922,
290,
13,
288,
3639,
11922,
756,
273,
290,
31,
7734,
19817,
921,
6941,
273,
446,
31,
3639,
19817,
921,
8526,
833,
273,
446,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
5302,
12,
54,
10340,
921,
365,
16,
11922,
290,
13,
288,
3639,
11922,
756,
273,
290,
31,
7734,
19817,
921,
6941,
273,
446,
31,
3639,
19817,
921,
8526,
833,
273,
446,
31... |
if( executable == null || executable.length() == 0 ) | if( executable == null || executable.length() == 0 ) { | public void setExecutable( final String executable ) { if( executable == null || executable.length() == 0 ) return; m_executable = executable.replace( '/', File.separatorChar ) .replace( '\\', File.separatorChar ); } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/b95d90a13da3fb8d362982bc84652f1e03e8325e/Commandline.java/clean/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Commandline.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
17709,
12,
727,
514,
9070,
262,
565,
288,
3639,
309,
12,
9070,
422,
446,
747,
9070,
18,
2469,
1435,
422,
374,
262,
288,
5411,
327,
31,
3639,
312,
67,
17751,
273,
9070,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17709,
12,
727,
514,
9070,
262,
565,
288,
3639,
309,
12,
9070,
422,
446,
747,
9070,
18,
2469,
1435,
422,
374,
262,
288,
5411,
327,
31,
3639,
312,
67,
17751,
273,
9070,
... |
assertEqualContent(new File(System.getProperty("root"), "src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.dos"), new File(System.getProperty("root"), "src/etc/testcases/taskdefs/fixcrlf/result/crcrlf")); | public void testCrCrLfSequenceDos() throws IOException { executeTarget("testCrCrLfSequence-dos"); assertEqualContent(new File(System.getProperty("root"), "src/etc/testcases/taskdefs/fixcrlf/expected/crcrlf.dos"), new File(System.getProperty("root"), "src/etc/testcases/taskdefs/fixcrlf/result/crcrlf")); } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/0fb6ce69c29faf80158c280c98e57e08327dd576/FixCrLfTest.java/buggy/src/testcases/org/apache/tools/ant/taskdefs/FixCrLfTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
12893,
12893,
48,
74,
4021,
40,
538,
1435,
1216,
1860,
288,
3639,
1836,
2326,
2932,
3813,
12893,
12893,
48,
74,
4021,
17,
19219,
8863,
3639,
1815,
5812,
1350,
12,
2704,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12893,
12893,
48,
74,
4021,
40,
538,
1435,
1216,
1860,
288,
3639,
1836,
2326,
2932,
3813,
12893,
12893,
48,
74,
4021,
17,
19219,
8863,
3639,
1815,
5812,
1350,
12,
2704,
1... | |
for ( int i = 0; i < totalRestores && current < needed; ++i ) { currentTechnique = getMethod.invoke( null, new Integer [] { new Integer(i) } ); currentTechniqueName = currentTechnique.toString(); | if ( scriptPath.equals( "" ) && restoreSetting.equals( "" ) ) updateDisplay( ERROR_STATE, "No auto-restore settings found." ); | private final boolean recover( int needed, String settingName, String currentName, String maximumName, String scriptProperty, String listProperty, Class techniqueList ) { try { Object [] empty = new Object[0]; Method currentMethod, maximumMethod; currentMethod = KoLCharacter.class.getMethod( currentName, new Class[0] ); maximumMethod = KoLCharacter.class.getMethod( maximumName, new Class[0] ); int maximum = ((Number)maximumMethod.invoke( null, empty )).intValue(); // First, check against the restore trigger to see if // any restoration needs to take place. double setting = Double.parseDouble( settings.getProperty( settingName ) ); if ( !BuffBotHome.isBuffBotActive() ) { needed = setting < 0 ? -1 : (int) Math.max( setting * (double) maximum, (double) needed ); if ( needed < 0 ) return true; } int last = -1; int current = ((Number)currentMethod.invoke( null, empty )).intValue(); // If a buffbot is currently running, only restore MP to // max when what you have is less than what you need. if ( BuffBotHome.isBuffBotActive() ) { if ( current < needed ) needed = maximum - 1; } else needed = needed >= maximum ? maximum - 1 : needed + 1; if ( current > needed ) return true; // Next, check against the restore target to see how // far you need to go. setting = Double.parseDouble( settings.getProperty( settingName + "Target" ) ); if ( !BuffBotHome.isBuffBotActive() ) { needed = setting < 0 ? -1 : (int) Math.max( setting * (double) maximum, (double) needed ); if ( needed < 0 ) return true; } last = -1; current = ((Number)currentMethod.invoke( null, empty )).intValue(); // If a buffbot is currently running, only restore MP to // max when what you have is less than what you need. if ( BuffBotHome.isBuffBotActive() ) { if ( current < needed ) needed = maximum - 1; } else needed = needed >= maximum ? maximum - 1 : needed + 1; if ( current > needed ) return true; // First, attempt to recover using the appropriate script, if it exists. // This uses a lot of excessive reflection, but the idea is that it // checks the current value of the stat against the needed value of // the stat and makes sure that there's a change with every iteration. // If there is no change, it exists the loop. String scriptPath = settings.getProperty( scriptProperty ).trim(); if ( !scriptPath.equals( "" ) ) { last = -1; while ( current < needed && last != current && !refusesContinue() ) { last = current; DEFAULT_SHELL.executeLine( scriptPath ); current = ((Number)currentMethod.invoke( null, empty )).intValue(); } } // If it gets this far, then you should attempt to recover // using the selected items. This involves a few extra // reflection methods. String restoreSetting = settings.getProperty( listProperty ).trim(); int totalRestores = ((Number)techniqueList.getMethod( "size", new Class[0] ).invoke( null, empty )).intValue(); Method getMethod = techniqueList.getMethod( "get", new Class [] { Integer.TYPE } ); // Iterate through every single restore item, checking to // see if the settings wish to use this item. If so, go ahead // and process the item's usage. Object currentTechnique; String currentTechniqueName; for ( int i = 0; i < totalRestores && current < needed; ++i ) { currentTechnique = getMethod.invoke( null, new Integer [] { new Integer(i) } ); currentTechniqueName = currentTechnique.toString(); if ( restoreSetting.indexOf( currentTechniqueName ) != -1 ) { last = -1; while ( current < needed && last != current && !refusesContinue() ) { last = current; recoverOnce( currentTechnique, currentTechniqueName, !restoreSetting.endsWith( currentTechniqueName ), needed ); current = ((Number)currentMethod.invoke( null, empty )).intValue(); } } } // Fall-through check, just in case you've reached the // desired value. if ( current >= needed && !refusesContinue() ) return true; // If you failed to auto-recover and there are no settings, // make sure the user is aware of this. if ( scriptPath.equals( "" ) && restoreSetting.equals( "" ) ) updateDisplay( ERROR_STATE, "No auto-restore settings found." ); // Now you know for certain that you did not reach the // desired value. There will be an error message that // is left over from previous attempts. this.currentState = ERROR_STATE; return false; } catch ( Exception e ) { // This should not happen. Therefore, print // a stack trace for debug purposes. StaticEntity.printStackTrace( e ); return false; } } | 50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/dfb35d63002d9877a80e45d82c6f27528b4d76e2/KoLmafia.java/buggy/src/net/sourceforge/kolmafia/KoLmafia.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
1250,
5910,
12,
509,
3577,
16,
514,
3637,
461,
16,
514,
783,
461,
16,
514,
4207,
461,
16,
514,
2728,
1396,
16,
514,
666,
1396,
16,
1659,
17734,
2161,
682,
262,
202,
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,
1152,
727,
1250,
5910,
12,
509,
3577,
16,
514,
3637,
461,
16,
514,
783,
461,
16,
514,
4207,
461,
16,
514,
2728,
1396,
16,
514,
666,
1396,
16,
1659,
17734,
2161,
682,
262,
202,
95... |
log.debug("xpath size:" + list.size()); | public void setFeedback(ArrayList itemTextList, Item itemXml) { log.debug("item text size: " + itemTextList.size()); log.debug("item answer type: " + itemXml.getItemType()); // for any answers that are now in the template, create a feedback String xpath = "item/itemfeedback/flow/response_lid/render_choice"; int xpathIndex = 1; List list = itemXml.selectNodes(xpath); log.debug("xpath size:" + list.size()); Iterator nodeIter = list.iterator(); Iterator iter = itemTextList.iterator(); Set answerSet = new HashSet(); char label = 'A'; boolean first = true; while (iter.hasNext()) { ItemTextIfc itemTextIfc = (ItemTextIfc) iter.next(); if (first) // then do once { addCorrectAndIncorrectFeedback(itemXml, itemTextIfc); xpathIndex = 3; first = false; } answerSet = itemTextIfc.getAnswerSet(); Iterator aiter = answerSet.iterator(); while (aiter.hasNext()) { AnswerIfc answer = (AnswerIfc) aiter.next(); addAnswerFeedback(itemXml, xpathIndex, nodeIter, label, answer); label++; xpathIndex++; } addGeneralFeedback(itemXml, xpathIndex, itemTextIfc); } } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/3f81d8a6d9a7c69c2709822170aa047b899334ae/ItemHelper12Impl.java/buggy/samigo/src/org/sakaiproject/tool/assessment/business/entity/helper/item/ItemHelper12Impl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
15888,
12,
19558,
761,
1528,
682,
16,
4342,
761,
4432,
13,
225,
288,
565,
613,
18,
4148,
2932,
1726,
977,
963,
30,
315,
397,
761,
1528,
682,
18,
1467,
10663,
565,
613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
15888,
12,
19558,
761,
1528,
682,
16,
4342,
761,
4432,
13,
225,
288,
565,
613,
18,
4148,
2932,
1726,
977,
963,
30,
315,
397,
761,
1528,
682,
18,
1467,
10663,
565,
613,
... | |
while(!start.isZero()) { scanRegion(scanner, start); | while (!start.isZero()) { scanRegion(scanner, start); | public void linearScan(LinearScan scanner) throws InlinePragma { if (Assert.VERIFY_ASSERTIONS) Assert._assert(allowScanning); /* Has this allocator ever allocated anything? */ if (initialRegion.isZero()) return; /* Loop through active regions or until the last region */ Address start = initialRegion; while(!start.isZero()) { scanRegion(scanner, start); // Scan this region start = start.plus(NEXT_REGION_OFFSET).loadAddress(); // Move on to next } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/BumpPointer.java/buggy/MMTk/src/org/mmtk/utility/alloc/BumpPointer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
9103,
7972,
12,
15982,
7972,
7683,
13,
1216,
16355,
2050,
9454,
288,
565,
309,
261,
8213,
18,
23756,
67,
8423,
11539,
1146,
55,
13,
5452,
6315,
11231,
12,
5965,
1541,
10903,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
9103,
7972,
12,
15982,
7972,
7683,
13,
1216,
16355,
2050,
9454,
288,
565,
309,
261,
8213,
18,
23756,
67,
8423,
11539,
1146,
55,
13,
5452,
6315,
11231,
12,
5965,
1541,
10903,
17... |
return _createMethod; | return createMethod; | public String getCreateMethod() { return _createMethod; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/56eeb0d4d18fb3e553e32d15e2c45dccd76eb958/UmlFactory.java/clean/src_new/org/argouml/model/uml/UmlFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
25667,
1305,
1435,
288,
5411,
327,
752,
1305,
31,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
25667,
1305,
1435,
288,
5411,
327,
752,
1305,
31,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
out.println("rc += tightMarshalString1(" + getter + ", bs);"); | out.println(" rc += tightMarshalString1(" + getter + ", bs);"); | protected int generateTightMarshal1Body(PrintWriter out) { List properties = getProperties(); int baseSize = 0; for (Iterator iter = properties.iterator(); iter.hasNext();) { JProperty property = (JProperty) iter.next(); JAnnotation annotation = property.getAnnotation("openwire:property"); JAnnotationValue size = annotation.getValue("size"); JClass propertyType = property.getType(); String type = propertyType.getSimpleName(); String getter = "info." + property.getGetter().getSimpleName() + "()"; out.print(indent); if (type.equals("boolean")) { out.println("bs.writeBoolean(" + getter + ");"); } else if (type.equals("byte")) { baseSize += 1; } else if (type.equals("char")) { baseSize += 2; } else if (type.equals("short")) { baseSize += 2; } else if (type.equals("int")) { baseSize += 4; } else if (type.equals("long")) { out.println("rc+=tightMarshalLong1(wireFormat, " + getter + ", bs);"); } else if (type.equals("String")) { out.println("rc += tightMarshalString1(" + getter + ", bs);"); } else if (type.equals("byte[]")) { if (size == null) { out.println("rc += tightMarshalByteArray1(" + getter + ", bs);"); } else { out.println("rc += tightMarshalConstByteArray1(" + getter + ", bs, "+size.asInt()+");"); } } else if (type.equals("ByteSequence")) { out.println("rc += tightMarshalByteSequence1(" + getter + ", bs);"); } else if (propertyType.isArrayType()) { if (size != null) { out.println("rc += tightMarshalObjectArrayConstSize1(wireFormat, " + getter + ", bs, " + size.asInt() + ");"); } else { out.println("rc += tightMarshalObjectArray1(wireFormat, " + getter + ", bs);"); } } else if (isThrowable(propertyType)) { out.println("rc += tightMarshalThrowable1(wireFormat, " + getter + ", bs);"); } else { if (isCachedProperty(property)) { out.println("rc += tightMarshalCachedObject1(wireFormat, (DataStructure)" + getter + ", bs);"); } else { out.println("rc += tightMarshalNestedObject1(wireFormat, (DataStructure)" + getter + ", bs);"); } } } return baseSize; } | 11783 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11783/cd0fb615deb6accf8dfdc07fbe58b53cf6b972a2/OpenWireJavaMarshallingScript.java/buggy/activemq-core/src/gram/java/org/apache/activemq/openwire/tool/OpenWireJavaMarshallingScript.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
2103,
56,
750,
8105,
21,
2250,
12,
5108,
2289,
596,
13,
288,
3639,
987,
1790,
273,
9392,
5621,
3639,
509,
1026,
1225,
273,
374,
31,
3639,
364,
261,
3198,
1400,
273,
1790,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
2103,
56,
750,
8105,
21,
2250,
12,
5108,
2289,
596,
13,
288,
3639,
987,
1790,
273,
9392,
5621,
3639,
509,
1026,
1225,
273,
374,
31,
3639,
364,
261,
3198,
1400,
273,
1790,
18,... |
_loop1526: | _loop1530: | public final void io_phrase(AST _t) throws RecognitionException { AST io_phrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OSDIR: { AST __t1516 = _t; AST tmp1940_AST_in = (AST)_t; match(_t,OSDIR); _t = _t.getFirstChild(); AST tmp1941_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); expression(_t); _t = _retTree; AST tmp1942_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOATTRLIST: { AST tmp1943_AST_in = (AST)_t; match(_t,NOATTRLIST); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1516; _t = _t.getNextSibling(); break; } case PRINTER: { AST __t1518 = _t; AST tmp1944_AST_in = (AST)_t; match(_t,PRINTER); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if (((_t.getType() >= LEXDATE && _t.getType() <= SYMMETRICENCRYPTIONALGORITHM))) { AST tmp1945_AST_in = (AST)_t; if ( _t==null ) throw new MismatchedTokenException(); _t = _t.getNextSibling(); } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t1518; _t = _t.getNextSibling(); break; } case TERMINAL: { AST tmp1946_AST_in = (AST)_t; match(_t,TERMINAL); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case APPEND: case BINARY: case COLLATE: case CONVERT: case ECHO: case FILENAME: case KEEPMESSAGES: case LANDSCAPE: case MAP: case NOCONVERT: case NOECHO: case NOMAP: case NUMCOPIES: case PAGESIZE_KW: case PAGED: case PORTRAIT: case UNBUFFERED: case VALUE: case LOBDIR: { { _loop1521: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALUE: { valueexpression(_t); _t = _retTree; break; } case FILENAME: { AST tmp1947_AST_in = (AST)_t; match(_t,FILENAME); _t = _t.getNextSibling(); break; } default: { break _loop1521; } } } while (true); } break; } default: { throw new NoViableAltException(_t); } } } { _loop1531: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case APPEND: { AST tmp1948_AST_in = (AST)_t; match(_t,APPEND); _t = _t.getNextSibling(); break; } case BINARY: { AST tmp1949_AST_in = (AST)_t; match(_t,BINARY); _t = _t.getNextSibling(); break; } case COLLATE: { AST tmp1950_AST_in = (AST)_t; match(_t,COLLATE); _t = _t.getNextSibling(); break; } case CONVERT: { AST __t1523 = _t; AST tmp1951_AST_in = (AST)_t; match(_t,CONVERT); _t = _t.getFirstChild(); { _loop1526: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==SOURCE||_t.getType()==TARGET)) { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case SOURCE: { AST tmp1952_AST_in = (AST)_t; match(_t,SOURCE); _t = _t.getNextSibling(); break; } case TARGET: { AST tmp1953_AST_in = (AST)_t; match(_t,TARGET); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } expression(_t); _t = _retTree; } else { break _loop1526; } } while (true); } _t = __t1523; _t = _t.getNextSibling(); break; } case LOBDIR: { AST __t1527 = _t; AST tmp1954_AST_in = (AST)_t; match(_t,LOBDIR); _t = _t.getFirstChild(); filenameorvalue(_t); _t = _retTree; _t = __t1527; _t = _t.getNextSibling(); break; } case NOCONVERT: { AST tmp1955_AST_in = (AST)_t; match(_t,NOCONVERT); _t = _t.getNextSibling(); break; } case ECHO: { AST tmp1956_AST_in = (AST)_t; match(_t,ECHO); _t = _t.getNextSibling(); break; } case NOECHO: { AST tmp1957_AST_in = (AST)_t; match(_t,NOECHO); _t = _t.getNextSibling(); break; } case KEEPMESSAGES: { AST tmp1958_AST_in = (AST)_t; match(_t,KEEPMESSAGES); _t = _t.getNextSibling(); break; } case LANDSCAPE: { AST tmp1959_AST_in = (AST)_t; match(_t,LANDSCAPE); _t = _t.getNextSibling(); break; } case MAP: { AST __t1528 = _t; AST tmp1960_AST_in = (AST)_t; match(_t,MAP); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t1528; _t = _t.getNextSibling(); break; } case NOMAP: { AST tmp1961_AST_in = (AST)_t; match(_t,NOMAP); _t = _t.getNextSibling(); break; } case NUMCOPIES: { AST __t1529 = _t; AST tmp1962_AST_in = (AST)_t; match(_t,NUMCOPIES); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t1529; _t = _t.getNextSibling(); break; } case PAGED: { AST tmp1963_AST_in = (AST)_t; match(_t,PAGED); _t = _t.getNextSibling(); break; } case PAGESIZE_KW: { AST __t1530 = _t; AST tmp1964_AST_in = (AST)_t; match(_t,PAGESIZE_KW); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t1530; _t = _t.getNextSibling(); break; } case PORTRAIT: { AST tmp1965_AST_in = (AST)_t; match(_t,PORTRAIT); _t = _t.getNextSibling(); break; } case UNBUFFERED: { AST tmp1966_AST_in = (AST)_t; match(_t,UNBUFFERED); _t = _t.getNextSibling(); break; } default: { break _loop1531; } } } while (true); } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2527,
67,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2527,
67,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2527,
67,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2527,
67,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
... |
public StaticTagScript(TagFactory tagFactory) { super(tagFactory); | public StaticTagScript() { | public StaticTagScript(TagFactory tagFactory) { super(tagFactory); } | 51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/1d15e9a4daaf2cf5d10d0ffc119a8c036740cceb/StaticTagScript.java/buggy/src/java/org/apache/commons/jelly/impl/StaticTagScript.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10901,
1805,
3651,
12,
1805,
1733,
1047,
1733,
13,
288,
3639,
2240,
12,
2692,
1733,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10901,
1805,
3651,
12,
1805,
1733,
1047,
1733,
13,
288,
3639,
2240,
12,
2692,
1733,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
assertEquals("[\"foo\", \"bar\"]", eval("$h.each_pair {|pair| p pair}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_pair {|pair| }")); | assertTrue(eval("$h.each_pair {|pair| p pair}").indexOf("[\"foo\", \"bar\"]") != -1); assertTrue(eval("p $h.each_pair {|pair| }").indexOf("{\"foo\"=>\"bar\"}") != -1); | public void testIterating() throws Exception { assertEquals("[\"foo\", \"bar\"]", eval("$h.each {|pair| p pair}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each {|pair| }")); assertEquals("[\"foo\", \"bar\"]", eval("$h.each_pair {|pair| p pair}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_pair {|pair| }")); assertEquals("\"foo\"", eval("$h.each_key {|k| p k}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_key {|k| }")); assertEquals("\"bar\"", eval("$h.each_value {|v| p v}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_value {|v| }")); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b87fee1b90fc7a4ff567235e2fc1387d035bbf31/TestRubyHash.java/buggy/test/org/jruby/test/TestRubyHash.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2360,
1776,
1435,
1216,
1185,
288,
3639,
1815,
8867,
2932,
63,
2412,
11351,
22564,
1239,
3215,
2412,
65,
3113,
5302,
2932,
8,
76,
18,
13798,
288,
96,
6017,
96,
293,
3082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2360,
1776,
1435,
1216,
1185,
288,
3639,
1815,
8867,
2932,
63,
2412,
11351,
22564,
1239,
3215,
2412,
65,
3113,
5302,
2932,
8,
76,
18,
13798,
288,
96,
6017,
96,
293,
3082,... |
public RubyString id2name() { return RubySymbol.getSymbol(runtime, value).to_s(); | public IRubyObject id2name() { return RubySymbol.getSymbol(runtime, value).convertToString(); | public RubyString id2name() { return RubySymbol.getSymbol(runtime, value).to_s(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/cc20d41e6031b7e9c9ed46676d32e45334ed0d53/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
612,
22,
529,
1435,
288,
3639,
327,
19817,
5335,
18,
588,
5335,
12,
9448,
16,
460,
2934,
869,
67,
87,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
19817,
780,
612,
22,
529,
1435,
288,
3639,
327,
19817,
5335,
18,
588,
5335,
12,
9448,
16,
460,
2934,
869,
67,
87,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Object result = client.execute("login", v); | Object result = getClientByUrl(url).execute("login", v); | public UserContext login(String userName, String password) { Vector v = new Vector(); v.add(userName); v.add(password); try { Object result = client.execute("login", v); if (!((String)result).equals(IKoboldServer.NO_RESULT)) { Element element = RPCMessageTransformer.decode((String)result); return new UserContext(element); } } catch (Exception exception) { log.error("login()", exception); } return null; } | 9773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9773/c458fa0998db96545b3f2a5a2f8b3f21770c4023/SecureKoboldClient.java/clean/kobold/src/kobold.client.plam/src/kobold/client/plam/controller/SecureKoboldClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2177,
1042,
3925,
12,
780,
12065,
16,
514,
2201,
13,
288,
202,
202,
5018,
331,
273,
394,
5589,
5621,
202,
202,
90,
18,
1289,
12,
1355,
461,
1769,
202,
202,
90,
18,
1289,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2177,
1042,
3925,
12,
780,
12065,
16,
514,
2201,
13,
288,
202,
202,
5018,
331,
273,
394,
5589,
5621,
202,
202,
90,
18,
1289,
12,
1355,
461,
1769,
202,
202,
90,
18,
1289,
12,... |
String safeId = id.replace('\\', '_').replace('/', '_'); | protected final XmlFile getConfigFile() { String safeId = id.replace('\\', '_').replace('/', '_'); return new XmlFile(XSTREAM,new File(Hudson.getInstance().getRootDir(),"users/"+ safeId +"/config.xml")); } | 33411 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/33411/8477eb1a8b63ae642c6436a06f1f5c6802ae65f9/User.java/buggy/core/src/main/java/hudson/model/User.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
5714,
812,
4367,
812,
1435,
288,
9079,
327,
394,
5714,
812,
12,
60,
13693,
16,
2704,
1387,
12,
44,
1100,
816,
18,
588,
1442,
7675,
588,
27322,
9334,
6,
5577,
4898,
15,
4183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
5714,
812,
4367,
812,
1435,
288,
9079,
327,
394,
5714,
812,
12,
60,
13693,
16,
2704,
1387,
12,
44,
1100,
816,
18,
588,
1442,
7675,
588,
27322,
9334,
6,
5577,
4898,
15,
4183,
... | |
catch (IOException e) | catch ( IOException e ) | public void writeImage( File dest ) throws IOException { if ( source == IImage.INVALID_IMAGE ) { logger.log( Level.SEVERE, "image source {0} is not valid!", id ); //$NON-NLS-1$ return; } InputStream input = getImageStream(); if ( null == input ) { logger.log( Level.SEVERE, "image source {0} is not found!", id ); //$NON-NLS-1$ return; } // if(!dest.exists()) // { String parent = new File( dest.getAbsolutePath( ) ).getParent( ); File parentDir = new File( parent ); if ( !parentDir.exists( ) ) parentDir.mkdirs( ); OutputStream output = null; try { output = new BufferedOutputStream( new FileOutputStream( dest ) ); copyStream( input, output ); } catch ( IOException ex ) { logger.log( Level.SEVERE, ex.getMessage( ), ex ); } finally { if ( input != null ) { try { input.close( ); } catch (IOException e) { logger.log( Level.SEVERE, e.getMessage( ), e ); } } if ( output != null ) { try { output.close( ); } catch (IOException e) { logger.log( Level.SEVERE, e.getMessage( ), e ); } } } // } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/4e5bdbf4992d60d94c4838190ed496a349f82918/Image.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/Image.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1045,
2040,
12,
1387,
1570,
262,
1216,
1860,
202,
95,
202,
202,
430,
261,
1084,
422,
467,
2040,
18,
9347,
67,
13603,
262,
202,
202,
95,
1082,
202,
4901,
18,
1330,
12,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1045,
2040,
12,
1387,
1570,
262,
1216,
1860,
202,
95,
202,
202,
430,
261,
1084,
422,
467,
2040,
18,
9347,
67,
13603,
262,
202,
202,
95,
1082,
202,
4901,
18,
1330,
12,
4... |
bugTask.setSyncState(state); MylarTaskListPlugin.getTaskListManager().getTaskList().notifyRepositoryInfoChanged(bugTask); | if (bugTask.getSyncState() != state) { bugTask.setSyncState(state); MylarTaskListPlugin.getTaskListManager().getTaskList().notifyRepositoryInfoChanged(bugTask); } | private static void offlineStatusChange(AbstractRepositoryReport report, BugzillaOfflineStatus status, boolean forceSynch) { RepositoryTaskSyncState state = null; if (status == BugzillaOfflineStatus.SAVED_WITH_OUTGOING_CHANGES) { state = RepositoryTaskSyncState.OUTGOING; } else if (status == BugzillaOfflineStatus.SAVED) { state = RepositoryTaskSyncState.SYNCHRONIZED; } else if (status == BugzillaOfflineStatus.SAVED_WITH_INCOMMING_CHANGES) { // if (forceSynch) { state = RepositoryTaskSyncState.INCOMING; // } else { // User opened (forceSynch = false) so no need to denote // incomming // state = RepositoryTaskSyncState.SYNCHRONIZED; // } } else if (status == BugzillaOfflineStatus.CONFLICT) { state = RepositoryTaskSyncState.CONFLICT; } else if (status == BugzillaOfflineStatus.DELETED) { state = RepositoryTaskSyncState.SYNCHRONIZED; } if (state == null) { // this means that we got a status that we didn't understand return; } String handle = AbstractRepositoryTask.getHandle(report.getRepositoryUrl(), report.getId()); ITask task = MylarTaskListPlugin.getTaskListManager().getTaskList().getTask(handle); if (task != null && task instanceof BugzillaTask) { final BugzillaTask bugTask = (BugzillaTask) task; bugTask.setSyncState(state); // PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {// public void run() { MylarTaskListPlugin.getTaskListManager().getTaskList().notifyRepositoryInfoChanged(bugTask);// }// }); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/a085e9ee5a3a4fa782be35cbc4ee144d08925a8a/BugzillaRepositoryConnector.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
13493,
1482,
3043,
12,
7469,
3305,
4820,
2605,
16,
16907,
15990,
23106,
1482,
1267,
16,
1082,
202,
6494,
2944,
55,
2515,
13,
288,
202,
202,
3305,
2174,
4047,
1119,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
13493,
1482,
3043,
12,
7469,
3305,
4820,
2605,
16,
16907,
15990,
23106,
1482,
1267,
16,
1082,
202,
6494,
2944,
55,
2515,
13,
288,
202,
202,
3305,
2174,
4047,
1119,
91... |
showType = ShowPluginsMenu.SHOW_RUNNING_PLUGINS; | this.showRunning = showRunning; | public RegistryBrowserContentProvider(TreeViewer viewer){ super(); this.viewer = viewer; showType = ShowPluginsMenu.SHOW_RUNNING_PLUGINS; } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/da9411dec7054667c47dca3c2ca1644866de8d9b/RegistryBrowserContentProvider.java/buggy/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5438,
9132,
1350,
2249,
12,
2471,
18415,
14157,
15329,
202,
202,
9565,
5621,
202,
202,
2211,
18,
25256,
273,
14157,
31,
202,
202,
4500,
559,
273,
9674,
9461,
4599,
18,
16677,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5438,
9132,
1350,
2249,
12,
2471,
18415,
14157,
15329,
202,
202,
9565,
5621,
202,
202,
2211,
18,
25256,
273,
14157,
31,
202,
202,
4500,
559,
273,
9674,
9461,
4599,
18,
16677,
67... |
} catch (Exception e) { ZimbraLog.mailbox.info( "Unable to convert TNEF attachment for message " + getId(), e); | } catch (Throwable t) { ZimbraLog.mailbox.warn( "MIME converter failed for message " + getId(), t); | public MimeMessage getMimeMessage() throws ServiceException { InputStream is = null; MimeMessage mm = null; try { is = getRawMessage(); mm = new MimeMessage(JMSession.getSession(), is); is.close(); try { for (Class visitor : MimeVisitor.getConverters()) ((MimeVisitor) visitor.newInstance()).accept(mm); } catch (Exception e) { // If the conversion bombs for any reason, revert to the original ZimbraLog.mailbox.info( "Unable to convert TNEF attachment for message " + getId(), e); is = getRawMessage(); mm = new MimeMessage(JMSession.getSession(), is); is.close(); } return mm; } catch (IOException e) { throw ServiceException.FAILURE("IOException while getting MimeMessage for item " + mId, e); } catch (MessagingException e) { throw ServiceException.FAILURE("MessagingException while getting MimeMessage for item " + mId, e); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/f2c35ee7fd864bd76c6892508fbb3491ef2f75b4/Appointment.java/buggy/ZimbraServer/src/java/com/zimbra/cs/mailbox/Appointment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
22059,
1079,
2108,
494,
1079,
1435,
1216,
16489,
288,
3639,
5037,
353,
273,
446,
31,
3639,
22059,
1079,
9740,
273,
446,
31,
3639,
775,
288,
5411,
353,
273,
10547,
1079,
5621,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
22059,
1079,
2108,
494,
1079,
1435,
1216,
16489,
288,
3639,
5037,
353,
273,
446,
31,
3639,
22059,
1079,
9740,
273,
446,
31,
3639,
775,
288,
5411,
353,
273,
10547,
1079,
5621,
5411,
... |
setUserStatus(admin, username, UserDataConstants.STATUS_REVOKED,false); | setUserStatus(admin, username, UserDataConstants.STATUS_REVOKED); | public void revokeUser(Admin admin, String username, int reason) throws AuthorizationDeniedException, FinderException { debug(">revokeUser(" + username + ")"); UserDataPK pk = new UserDataPK(username); UserDataLocal data; try { data = home.findByPrimaryKey(pk); } catch (ObjectNotFoundException oe) { throw new EJBException(oe); } int caid = data.getCaId(); if (!authorizedToCA(admin, caid)) { logsession.log(admin, caid, LogEntry.MODULE_RA, new java.util.Date(), username, null, LogEntry.EVENT_ERROR_REVOKEDENDENTITY, "Administrator not authorized to revoke user with given CA."); throw new AuthorizationDeniedException("Administrator not authorized to revoke user with given CA."); } if (getGlobalConfiguration(admin).getEnableEndEntityProfileLimitations()) { if (!authorizedToEndEntityProfile(admin, data.getEndEntityProfileId(), AvailableAccessRules.REVOKE_RIGHTS)) { logsession.log(admin, caid, LogEntry.MODULE_RA, new java.util.Date(), username, null, LogEntry.EVENT_ERROR_REVOKEDENDENTITY, "Administrator not authorized"); throw new AuthorizationDeniedException("Not authorized to revoke user : " + username + "."); } } CertificateProfile prof = this.certificatesession.getCertificateProfile(admin, data.getCertificateProfileId()); Collection publishers; if (prof == null) { publishers = new ArrayList(); } else { publishers = prof.getPublisherList(); } try { setUserStatus(admin, username, UserDataConstants.STATUS_REVOKED,false); } catch (ApprovalException e) { throw new EJBException("This should never happen",e); } catch (WaitingForApprovalException e) { throw new EJBException("This should never happen",e); } certificatesession.setRevokeStatus(admin, username, publishers, reason); logsession.log(admin, caid, LogEntry.MODULE_RA, new java.util.Date(), username, null, LogEntry.EVENT_INFO_REVOKEDENDENTITY, ""); debug("<revokeUser()"); } // revokeUser | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/28e5842c88b16b61b311f03767ce3d06870ca00e/LocalUserAdminSessionBean.java/buggy/src/java/org/ejbca/core/ejb/ra/LocalUserAdminSessionBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
18007,
1299,
12,
4446,
3981,
16,
514,
2718,
16,
509,
3971,
13,
1216,
10234,
15877,
16,
19307,
503,
288,
3639,
1198,
2932,
34,
9083,
3056,
1299,
2932,
397,
2718,
397,
7310,
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,
918,
18007,
1299,
12,
4446,
3981,
16,
514,
2718,
16,
509,
3971,
13,
1216,
10234,
15877,
16,
19307,
503,
288,
3639,
1198,
2932,
34,
9083,
3056,
1299,
2932,
397,
2718,
397,
7310,
1769... |
if (jj_3R_291()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_300()) jj_scanpos = xsp; | if (jj_scan_token(BIT_OR)) return true; if (jj_3R_226()) return true; | final private boolean jj_3R_279() { if (jj_3R_291()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_300()) jj_scanpos = xsp; return false; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/ac9207dcb7a8bbf54f85da7f1bdae7d7162b86b3/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5324,
29,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
5540,
21,
10756,
327,
638,
31,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5324,
29,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
5540,
21,
10756,
327,
638,
31,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
106... |
if (allowNewContainerName) containerNameField.setFocus(); else treeViewer.getTree().setFocus(); | if (allowNewContainerName) { containerNameField.setFocus(); } else { treeViewer.getTree().setFocus(); } | public void setInitialFocus() { if (allowNewContainerName) containerNameField.setFocus(); else treeViewer.getTree().setFocus(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ContainerSelectionGroup.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/ContainerSelectionGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4435,
9233,
1435,
288,
3639,
309,
261,
5965,
1908,
2170,
461,
13,
5411,
20408,
974,
18,
542,
9233,
5621,
3639,
469,
5411,
2151,
18415,
18,
588,
2471,
7675,
542,
9233,
5621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4435,
9233,
1435,
288,
3639,
309,
261,
5965,
1908,
2170,
461,
13,
5411,
20408,
974,
18,
542,
9233,
5621,
3639,
469,
5411,
2151,
18415,
18,
588,
2471,
7675,
542,
9233,
5621... |
smtp.sendMailWait( fromEmail, toEmail ,header ,replyHeader+"\n"+text+"\n\n"+fromEmail ); | smtp.sendMailWait( fromEmail, toEmail ,header ,replyHeader+"\n"+text ); | public void sendReplieEmail( HttpServletRequest req, HttpServletResponse res, String toEmail, String fromEmail, String header, String text, String replyHeader) throws ServletException, IOException { String emptyString = ""; /* server info */ String host = req.getHeader("Host") ; String hostName = emptyString; try { hostName = InetAddress.getLocalHost().getHostName(); } catch ( SecurityException e ) { log( "checkConnect doesn't allow the operation" ); } /* mailserver info */ String mailserver = Utility.getDomainPref( "smtp_server", host ); String stringMailPort = Utility.getDomainPref( "smtp_port", host ); String stringMailtimeout = Utility.getDomainPref( "smtp_timeout", host ); // Handling of default-values is another area where java can't hold a candle to perl. int mailport = 25 ; try { mailport = Integer.parseInt( stringMailPort ); } catch (NumberFormatException ignored) { // Do nothing, let mailport stay at default. } int mailtimeout = 10000 ; try { mailtimeout = Integer.parseInt( stringMailtimeout ); } catch (NumberFormatException ignored) { // Do nothing, let mailtimeout stay at default. } SMTP smtp = new SMTP( mailserver, mailport, mailtimeout ); smtp.sendMailWait( fromEmail, toEmail ,header ,replyHeader+"\n"+text+"\n\n"+fromEmail ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/8af9574dd41c2dda3799702e91a1aad228c89352/BillBoardAdd.java/clean/servlets/billBoard/BillBoardAdd.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1366,
20043,
1385,
4134,
12,
9984,
1111,
16,
6862,
6862,
12446,
400,
16,
6862,
6862,
514,
358,
4134,
16,
6862,
6862,
514,
628,
4134,
16,
6862,
6862,
514,
1446,
16,
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,
918,
1366,
20043,
1385,
4134,
12,
9984,
1111,
16,
6862,
6862,
12446,
400,
16,
6862,
6862,
514,
358,
4134,
16,
6862,
6862,
514,
628,
4134,
16,
6862,
6862,
514,
1446,
16,
6862,
... |
int testMetaId = Integer.parseInt( params.getProperty("META_ID") ); if ( !isUserAuthorized( req, res, testMetaId, user ) ) { return; } | int testMetaId = Integer.parseInt( params.getProperty("META_ID") ); if ( !isUserAuthorized( req, res, testMetaId, user ) ) { return; } | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { // Lets validate the session, e.g has the user logged in to Janus? if (super.checkSession(req,res) == false) return ; // Lets get the standard parameters and validate them Properties params = super.getParameters(req) ; if (super.checkParameters(req, res, params) == false) return ; // Lets get an user object imcode.server.User user = super.getUserObj(req,res) ; if(user == null) return ; int testMetaId = Integer.parseInt( params.getProperty("META_ID") ); if ( !isUserAuthorized( req, res, testMetaId, user ) ) { return; } String action = req.getParameter("action") ; //log("ConfManager is in action...") ; if(action == null) { action = "" ; String header = "ConfManager servlet. " ; ConfError err = new ConfError(req,res,header,3) ; log(header + err.getErrorMsg()) ; return ; } // ********* NEW ******** if(action.equalsIgnoreCase("NEW")) { log("Lets add a conference"); HttpSession session = req.getSession(false) ; if (session != null) { // log("Ok nu stter vi metavrdena"); session.setAttribute("Conference.meta_id", params.getProperty("META_ID")) ; session.setAttribute("Conference.parent_meta_id", params.getProperty("PARENT_META_ID")) ; session.setAttribute("Conference.cookie_id", params.getProperty("COOKIE_ID")) ; } String url = "ConfCreator?action=NEW" ; //log("Redirect till:" + url) ; res.sendRedirect(url) ; return ; } // ********* VIEW ******** if(action.equalsIgnoreCase("VIEW")) { // Lets get userparameters Properties userParams = super.getUserParameters(user) ; String metaId = params.getProperty("META_ID") ; String userId = userParams.getProperty("USER_ID") ; RmiConf rmi = new RmiConf(user) ; // Lets detect which type of user we got String userType = userParams.getProperty("USER_TYPE") ; String loginType = userParams.getProperty("LOGIN_TYPE") ; // log("Usertype:" + userType) ; // log("loginType:" + userType) ; // We got 3 usertypes: 0= specialusers, 1=normal, 2=confernce // We got 3 logintypes: "Extern"=web users, "ip_access"= people from a certain ip nbr // and "verify" = people who has logged into the system if(! loginType.equalsIgnoreCase("VERIFY")) { // Lets store the standard metavalues in his session object HttpSession session = req.getSession(false) ; if (session != null) { // log("Ok nu stter vi metavrdena"); session.setAttribute("Conference.meta_id", params.getProperty("META_ID")) ; session.setAttribute("Conference.parent_meta_id", params.getProperty("PARENT_META_ID")) ; session.setAttribute("Conference.cookie_id", params.getProperty("COOKIE_ID")) ; session.setAttribute("Conference.viewedDiscList", new Properties()) ; log("OK, nu stter vi viewedDiscList") ; } String loginPage = MetaInfo.getServletPath(req) + "ConfLogin?login_type=login" ; //log("Redirect till:" + loginPage) ; res.sendRedirect(loginPage) ; return ; } log("Ok, anvndaren har loggat in, frbered honom fr konferensen" ) ; // Lets update the users sessionobject with a with a ok login to the conference // Send him to the manager with the ability to get in if(!super.prepareUserForConf(req, res, params, userId) ) { log("Error in prepareUserFor Conf" ) ; } return ; } // End of View // ********* CHANGE ******** if(action.equalsIgnoreCase("CHANGE")) { MetaInfo mInfo = new MetaInfo() ; String url = MetaInfo.getServletPath(req) + "ChangeExternalDoc2?" + mInfo.passMeta(params) + "&metadata=meta" ; //this.log("Redirects to:" + url) ; res.sendRedirect(url) ; return ; } // End if // ********* STATISTICS OBS. NOT USED IN PROGRAM, ONLY FOR TEST ******** if(action.equalsIgnoreCase("STATISTICS")) { // Lets get serverinformation String host = req.getHeader("Host") ; String imcServer = Utility.getDomainPref("userserver",host) ; String ConfPoolServer = Utility.getDomainPref("conference_server",host) ; log("confpoolserver " + ConfPoolServer ) ; String metaId = req.getParameter("meta_id") ; String frDate = req.getParameter("from_date") ; String toDate = req.getParameter("to_date") ; String mode = req.getParameter("list_mode") ; // Lets fix the date stuff if( frDate.equals("0")) frDate = "1991-01-01 00:00" ; if( toDate.equals("0")) toDate = "2070-01-01 00:00" ; if( mode == null) mode = "1" ; StringBuffer sql = new StringBuffer() ; sql.append("AdminStatistics1" + " " + metaId + ", '" + frDate + "', '" ); sql.append(toDate + "', " + mode) ; log("AdminStatistics sql: " + sql.toString()) ; String[][] arr = ConfManager.getStatistics(ConfPoolServer, sql.toString()) ; log("AdminStatistics sql: " + arr.length) ; } // End if} // End doGet | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a270627916b37a677a391dd9f45c54d3d6f12503/ConfManager.java/clean/servlets/conf/ConfManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
202,
15069,
16517,
16,
1860,
288,
202,
759,
511,
2413,
1954,
326,
1339,
16,
425,
18,
75,
711,
326,
729,
7545,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
202,
15069,
16517,
16,
1860,
288,
202,
759,
511,
2413,
1954,
326,
1339,
16,
425,
18,
75,
711,
326,
729,
7545,
316,
... |
Asserts.notNull(name); Asserts.notNull(oldName); Asserts.isTrue(name.startsWith("$")); Asserts.isTrue(oldName.startsWith("$")); | assert name != null; assert oldName != null; assert name.startsWith("$"); assert oldName.startsWith("$"); | public void alias(String name, String oldName) { Asserts.notNull(name); Asserts.notNull(oldName); Asserts.isTrue(name.startsWith("$")); Asserts.isTrue(oldName.startsWith("$")); if (runtime.getSafeLevel() >= 4) { throw new SecurityError(runtime, "Insecure: can't alias global variable"); } GlobalVariable oldVariable = createIfNotDefined(oldName); GlobalVariable variable = (GlobalVariable)globalVariables.get(name); if (variable != null && oldVariable != variable && variable.isTracing()) { throw new RaiseException(runtime, "RuntimeError", "can't alias in tracer"); } globalVariables.put(name, oldVariable); } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/b72a2862ae5b2f01f9a767ef2ce248fd785857c4/GlobalVariables.java/buggy/src/org/jruby/internal/runtime/GlobalVariables.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2308,
12,
780,
508,
16,
514,
22916,
13,
288,
3639,
5452,
87,
18,
902,
2041,
12,
529,
1769,
3639,
5452,
87,
18,
902,
2041,
12,
1673,
461,
1769,
3639,
5452,
87,
18,
291,
5510... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2308,
12,
780,
508,
16,
514,
22916,
13,
288,
3639,
5452,
87,
18,
902,
2041,
12,
529,
1769,
3639,
5452,
87,
18,
902,
2041,
12,
1673,
461,
1769,
3639,
5452,
87,
18,
291,
5510... |
JExpression[] args = new JExpression[params.length]; for (int i=0; i<args.length; i++) { args[i] = new JLocalVariableExpression(null, params[i]); | LinkedList args = new LinkedList(); for (int i=0; i<params.length; i++) { args.add(new JLocalVariableExpression(null, params[i])); | private JMethodDeclaration makeSJInit() { // start by cloning the original init function, so we can get // the signature right JMethodDeclaration result = (JMethodDeclaration) ObjectDeepCloner.deepCopy(origFilter.getInit()); // get the parameters JFormalParameter[] params = result.getParameters(); // now build up the body as a series of calls to the sub-streams LinkedList bodyList = new LinkedList(); for (ListIterator it = newFilters.listIterator(); it.hasNext(); ) { // build up the argument list JExpression[] args = new JExpression[params.length]; for (int i=0; i<args.length; i++) { args[i] = new JLocalVariableExpression(null, params[i]); } // make an init statement for the child bodyList.add(new SIRInitStatement(null, null, args, (SIRStream)it.next())); } // replace the body of the init function with statement list // we just made result.setBody(new JBlock(null, bodyList, null)); // return result return result; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/cd3a4a304cc69f1483b11cec633fae09177ffc92/StatelessDuplicate.java/clean/streams/src/at/dms/kjc/sir/lowering/fission/StatelessDuplicate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
804,
1305,
6094,
1221,
55,
46,
2570,
1435,
288,
202,
759,
787,
635,
927,
22470,
326,
2282,
1208,
445,
16,
1427,
732,
848,
336,
202,
759,
326,
3372,
2145,
202,
46,
1305,
6094,
563,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
804,
1305,
6094,
1221,
55,
46,
2570,
1435,
288,
202,
759,
787,
635,
927,
22470,
326,
2282,
1208,
445,
16,
1427,
732,
848,
336,
202,
759,
326,
3372,
2145,
202,
46,
1305,
6094,
563,... |
return noex; } | return noex; } | public int getNoex() { return noex; } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
336,
2279,
338,
1435,
288,
1082,
202,
2463,
1158,
338,
31,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
336,
2279,
338,
1435,
288,
1082,
202,
2463,
1158,
338,
31,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sform.reflow(true); | form.reflow(true); | public void expansionStateChanged(ExpansionEvent e) { sform.reflow(true); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/9b13d7f9bed1baf18f525af681ce9d7de181aea2/TaskSummaryEditor.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
17965,
1119,
5033,
12,
2966,
12162,
1133,
425,
13,
288,
9506,
202,
87,
687,
18,
1734,
821,
12,
3767,
1769,
1082,
202,
97,
9506,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
17965,
1119,
5033,
12,
2966,
12162,
1133,
425,
13,
288,
9506,
202,
87,
687,
18,
1734,
821,
12,
3767,
1769,
1082,
202,
97,
9506,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
protected void int2alphaCount(int val, char [] aTable, FastStringBuffer stringBuf) { int radix = aTable.length; char[] table = new char[aTable.length]; // start table at 1, add last char at index 0. Reason explained above and below. int i; for (i=0; i<aTable.length-1;i++) table[i+1] = aTable[i]; table[0] = aTable[i]; // Create a buffer to hold the result // TODO: size of the table can be detereined by computing // logs of the radix. For now, we fake it. char buf[] = new char[100]; //some languages go left to right(ie. english), right to left (ie. Hebrew), //top to bottom (ie.Japanese), etc... Handle them differently //String orientation = thisBundle.getString(Constants.LANG_ORIENTATION); // next character to set in the buffer int charPos; charPos= buf.length -1 ; // work backward through buf[] // index in table of the last character that we stored int lookupIndex = 1; // start off with anything other than zero to make correction work // Correction number // // Correction can take on exactly two values: // // 0 if the next character is to be emitted is usual // // radix - 1 // if the next char to be emitted should be one less than // you would expect // // For example, consider radix 10, where 1="A" and 10="J" // // In this scheme, we count: A, B, C ... H, I, J (not A0 and certainly // not AJ), A1 // // So, how do we keep from emitting AJ for 10? After correctly emitting the // J, lookupIndex is zero. We now compute a correction number of 9 (radix-1). // In the following line, we'll compute (val+correction) % radix, which is, // (val+9)/10. By this time, val is 1, so we compute (1+9) % 10, which // is 10 % 10 or zero. So, we'll prepare to emit "JJ", but then we'll // later suppress the leading J as representing zero (in the mod system, // it can represent either 10 or zero). In summary, the correction value of // "radix-1" acts like "-1" when run through the mod operator, but with the // desireable characteristic that it never produces a negative number. int correction = 0; // TODO: throw error on out of range input do { // most of the correction calculation is explained above, the reason for the // term after the "|| " is that it correctly propagates carries across // multiple columns. correction = ((lookupIndex == 0) || (correction != 0 && lookupIndex == radix-1 )) ? (radix-1) : 0; // index in "table" of the next char to emit lookupIndex = (val+correction) % radix; // shift input by one "column" val = (val / radix); // if the next value we'd put out would be a leading zero, we're done. if (lookupIndex == 0 && val == 0) break; // put out the next character of output buf[charPos--] = table[lookupIndex]; // left to right or top to bottom } while (val > 0); stringBuf.append(buf, charPos+1, (buf.length - charPos -1)); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/77ad973f1d6ad8f28fd358f2ba4d4c63da65d953/ElemNumber.java/buggy/src/org/apache/xalan/templates/ElemNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
509,
22,
5429,
1380,
12,
474,
1244,
16,
1149,
5378,
279,
1388,
16,
9545,
780,
1892,
533,
5503,
13,
225,
288,
225,
509,
19015,
273,
279,
1388,
18,
2469,
31,
225,
1149,
8526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
509,
22,
5429,
1380,
12,
474,
1244,
16,
1149,
5378,
279,
1388,
16,
9545,
780,
1892,
533,
5503,
13,
225,
288,
225,
509,
19015,
273,
279,
1388,
18,
2469,
31,
225,
1149,
8526,
... | ||
case Id_charCodeAt: return wrap_double( jsFunction_charCodeAt(ScriptRuntime.toString(thisObj), args)); | case Id_indexOf: return wrap_int(jsFunction_indexOf (ScriptRuntime.toString(thisObj), args)); | public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case ConstructorId_fromCharCode: return jsStaticFunction_fromCharCode(args); case Id_constructor: return jsConstructor(args, thisObj == null); case Id_toString: return realThis(thisObj, f). jsFunction_toString(); case Id_valueOf: return realThis(thisObj, f). jsFunction_valueOf(); case Id_charAt: return jsFunction_charAt(ScriptRuntime.toString(thisObj), args); case Id_charCodeAt: return wrap_double( jsFunction_charCodeAt(ScriptRuntime.toString(thisObj), args)); case Id_indexOf: return wrap_int( jsFunction_indexOf(ScriptRuntime.toString(thisObj), args)); case Id_lastIndexOf: return wrap_int( jsFunction_lastIndexOf(ScriptRuntime.toString(thisObj), args)); case Id_split: return jsFunction_split(cx, ScriptRuntime.toString(thisObj), args, f); case Id_substring: return jsFunction_substring(cx, ScriptRuntime.toString(thisObj), args); case Id_toLowerCase: return jsFunction_toLowerCase(ScriptRuntime.toString(thisObj)); case Id_toUpperCase: return jsFunction_toUpperCase(ScriptRuntime.toString(thisObj)); case Id_substr: return jsFunction_substr(ScriptRuntime.toString(thisObj), args); case Id_concat: return jsFunction_concat(ScriptRuntime.toString(thisObj), args); case Id_slice: return jsFunction_slice(ScriptRuntime.toString(thisObj), args); case Id_bold: return realThis(thisObj, f). jsFunction_bold(); case Id_italics: return realThis(thisObj, f). jsFunction_italics(); case Id_fixed: return realThis(thisObj, f). jsFunction_fixed(); case Id_strike: return realThis(thisObj, f). jsFunction_strike(); case Id_small: return realThis(thisObj, f). jsFunction_small(); case Id_big: return realThis(thisObj, f). jsFunction_big(); case Id_blink: return realThis(thisObj, f). jsFunction_blink(); case Id_sup: return realThis(thisObj, f). jsFunction_sup(); case Id_sub: return realThis(thisObj, f). jsFunction_sub(); case Id_fontsize: return realThis(thisObj, f). jsFunction_fontsize(ScriptRuntime.toString(args, 0)); case Id_fontcolor: return realThis(thisObj, f). jsFunction_fontcolor(ScriptRuntime.toString(args, 0)); case Id_link: return realThis(thisObj, f). jsFunction_link(ScriptRuntime.toString(args, 0)); case Id_anchor: return realThis(thisObj, f). jsFunction_anchor(ScriptRuntime.toString(args, 0)); case Id_equals: return wrap_boolean( jsFunction_equals(ScriptRuntime.toString(thisObj), ScriptRuntime.toString(args, 0))); case Id_equalsIgnoreCase: return wrap_boolean( jsFunction_equalsIgnoreCase(ScriptRuntime.toString(thisObj), ScriptRuntime.toString(args, 0))); case Id_match: return jsFunction_match(cx, thisObj, args, f); case Id_search: return jsFunction_search(cx, thisObj, args, f); case Id_replace: return jsFunction_replace(cx, thisObj, args, f); } return super.execMethod(methodId, f, cx, scope, thisObj, args); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/35caf7c2bb93872680ae16e34746d94fe1e533e3/NativeString.java/clean/js/rhino/src/org/mozilla/javascript/NativeString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... |
final String tName = CoreUtility.replaceFirst(info, LIST_TOKEN_REPLACEMENT, anObj.getAssociated(i, true)); | final String tName = CoreUtility.replaceFirst(info, VALUE_TOKEN_REPLACEMENT, anObj.getAssociated(i, true)); | public List<String> getStringListFromBonus(final PObject anObj) { final List<String> aList = new ArrayList<String>(); final String bInfoString = getBonusInfo(); final StringTokenizer aTok = new StringTokenizer(bInfoString, ","); int listindex = 0; while (aTok.hasMoreTokens()) { final String info = aTok.nextToken(); // Some BONUS statements use %LIST to represent // a possible list or selection made // Need to deconstruct for proper bonus stacking if (anObj.getAssociatedCount() > 0) { // There are three forms: // 1) has %LIST in the bonusName // 2) has %LIST in the bonusInfo // 3) has no %LIST at all // Must use getBonusName because it // contains the unaltered bonusType final String name = getBonusName(); if (name.indexOf(LIST_TOKEN_REPLACEMENT) >= 0) { for (int i = 0; i < anObj.getAssociatedCount(); ++i) { final StringBuffer ab = new StringBuffer(); final String tName = CoreUtility.replaceFirst(name, LIST_TOKEN_REPLACEMENT, anObj.getAssociated(i)); ab.append(tName).append('.'); ab.append(info); if (hasTypeString()) { ab.append(':').append(getTypeString()); } aList.add(ab.toString().toUpperCase()); } } else if (info.indexOf(LIST_TOKEN_REPLACEMENT) >= 0) { for (int i = 0; i < anObj.getAssociatedCount(true); ++i) { final StringBuffer ab = new StringBuffer(); final String tName = CoreUtility.replaceFirst(info, LIST_TOKEN_REPLACEMENT, anObj.getAssociated(i, true)); ab.append(getTypeOfBonus()).append('.'); ab.append(tName); if (hasTypeString()) { ab.append(':').append(getTypeString()); } aList.add(ab.toString().toUpperCase()); } } else { final int cnt = anObj.getAssociatedCount(); if (cnt <= listindex && info.equals(VALUE_TOKEN_REPLACEMENT)) { continue; } while (true) { final StringBuffer ab = new StringBuffer(); ab.append(getTypeOfBonus()).append('.'); if (info.equals(VALUE_TOKEN_REPLACEMENT)) { ab.append(anObj.getAssociated(listindex)); } else { ab.append(info); } if (hasTypeString()) { ab.append(':').append(getTypeString()); } listindex++; aList.add(ab.toString().toUpperCase()); // If we have processed all of the entries, or if this object // has multiple bonuses, don't add any more copies. if (aTok.countTokens() > 0 || listindex >= cnt || anObj.getBonusList().size() > 1) { break; } } } } else if (hasVariable()) { // Some bonuses have a variable as part // of their name, such as // BONUS:WEAPONPROF=AbcXyz|TOHIT|3 // so parse out the correct value final StringBuffer ab = new StringBuffer(); ab.append(getTypeOfBonus()); ab.append(getVariable()).append('.'); ab.append(info); if (hasTypeString()) { ab.append(':').append(getTypeString()); } aList.add(ab.toString().toUpperCase()); } else { final StringBuffer ab = new StringBuffer(); ab.append(getTypeOfBonus()).append('.'); ab.append(info); if (hasTypeString()) { ab.append(':').append(getTypeString()); } aList.add(ab.toString().toUpperCase()); } } return aList; } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/088c15261d01327bce6f44925516d0287dc266cb/BonusObj.java/buggy/code/src/java/pcgen/core/bonus/BonusObj.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
780,
34,
4997,
682,
1265,
38,
22889,
12,
6385,
453,
921,
392,
2675,
13,
202,
95,
202,
202,
6385,
987,
32,
780,
34,
279,
682,
273,
394,
2407,
32,
780,
34,
5621,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
780,
34,
4997,
682,
1265,
38,
22889,
12,
6385,
453,
921,
392,
2675,
13,
202,
95,
202,
202,
6385,
987,
32,
780,
34,
279,
682,
273,
394,
2407,
32,
780,
34,
5621,
20... |
GradientPaint gp = (GradientPaint)paint; | GradientPaint gp = (GradientPaint) paint; | public void writeString(String string, double x, double y) throws IOException { Color color; Paint paint = getPaint(); if (paint instanceof Color) { color = (Color)paint; } else if (paint instanceof GradientPaint) { GradientPaint gp = (GradientPaint)paint; color = PrintColor.mixColor(gp.getColor1(), gp.getColor2()); } else { Color bkg = getBackground(); if (bkg == null) { color = Color.BLACK; } else { color = PrintColor.invert(bkg); } } if (!color.equals(textColor)) { textColor = color; os.writeTag(new SetTextColor(textColor)); } Font font = getFont(); Font unitFont = (Font)unitFontTable.get(font); if (!fontSet) { Integer fontIndex = (Integer) fontTable.get(font); if (fontIndex == null) { // for special fonts (Symbol, ZapfDingbats) we choose a standard font and // encode using unicode. String fontName = font.getName(); string = FontEncoder.getEncodedString(string, fontName); fontName = replaceFonts.getProperty(fontName, fontName); String windowsFontName = FontUtilities.getWindowsFontName(fontName); unitFont = new Font(windowsFontName, font.getStyle(), font.getSize()); unitFont = unitFont.deriveFont(font.getSize2D()*UNITS_PER_PIXEL*TWIPS); unitFontTable.put(font, unitFont); ExtLogFontW logFontW = new ExtLogFontW(unitFont); int handle = handleManager.getHandle(); os.writeTag(new ExtCreateFontIndirectW(handle,logFontW)); fontIndex = new Integer(handle); fontTable.put(font, fontIndex); } os.writeTag(new SelectObject(fontIndex.intValue())); fontSet = true; } int[] widths = new int[string.length()]; for (int i=0; i<widths.length; i++) { double w = unitFont.getStringBounds(string, i, i+1, getFontRenderContext()).getWidth(); widths[i] = (int)w; } AffineTransform t = font.getTransform(); if (!t.isIdentity()) { writeGraphicsSave(); writeTransform(t); } TextW text = new TextW(new Point(toUnit(x),toUnit(y)),string,0,dummy,widths); os.writeTag(new ExtTextOutW(imageBounds,EMFConstants.GM_ADVANCED,1,1,text)); if (!t.isIdentity()) { writeGraphicsRestore(); } } | 57341 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57341/de061d5977b00047b242b52aea5bc47538b063c5/EMFGraphics2D.java/buggy/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFGraphics2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
12967,
12,
780,
533,
16,
1645,
619,
16,
1645,
677,
13,
1216,
1860,
288,
7734,
5563,
2036,
31,
3639,
30001,
12574,
273,
1689,
1598,
5621,
3639,
309,
261,
84,
1598,
1276,
5563,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
12967,
12,
780,
533,
16,
1645,
619,
16,
1645,
677,
13,
1216,
1860,
288,
7734,
5563,
2036,
31,
3639,
30001,
12574,
273,
1689,
1598,
5621,
3639,
309,
261,
84,
1598,
1276,
5563,
... |
} | void handleStateRsp(Object sender, Digest digest, byte[] state) { if(digest == null) { if(log.isWarnEnabled()) log.warn("digest received from " + sender + " is null, skipping setting digest !"); } else { passDown(new Event(Event.SET_DIGEST, digest)); // set the digest (e.g. in NAKACK) } stop=System.currentTimeMillis(); if(state == null) { if(log.isWarnEnabled()) log.warn("state received from " + sender + " is null, will return null state to application"); } else log.debug("received state, size=" + state.length + " bytes. Time=" + (stop-start) + " milliseconds"); passUp(new Event(Event.GET_STATE_OK, state)); } | 49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/3dbf2221432e58f7e5f2cbbc8d9711ec4787fa46/STATE_TRANSFER.java/buggy/src/org/jgroups/protocols/pbcast/STATE_TRANSFER.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1640,
1119,
54,
1752,
12,
921,
5793,
16,
15864,
5403,
16,
1160,
8526,
919,
13,
288,
3639,
309,
12,
10171,
422,
446,
13,
288,
5411,
309,
12,
1330,
18,
291,
3160,
1526,
10756,
7734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1640,
1119,
54,
1752,
12,
921,
5793,
16,
15864,
5403,
16,
1160,
8526,
919,
13,
288,
3639,
309,
12,
10171,
422,
446,
13,
288,
5411,
309,
12,
1330,
18,
291,
3160,
1526,
10756,
7734,
... | |
old = opt.getBackCol(); | old = opt.getColorValueForKey("BACKGROUND_COLOR", Color.WHITE); | public AppOptions run() { Container content; JPanel genOpts, buttons, colours, options; content = getContentPane(); content.setLayout(new BorderLayout()); askSave = new JCheckBox(java.util.ResourceBundle.getBundle("global").getString("askSave")); askSave.setToolTipText(java.util.ResourceBundle.getBundle("global").getString("askSaveTT")); askSave.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { opt.setAskSave(askSave.isSelected()); } }); // Panel erzeugen, Border hinzufgen, allgemeine Optionen genOpts = new JPanel(); genOpts.setBorder(new TitledBorder(java.util.ResourceBundle.getBundle("global").getString("common"))); genOpts.setLayout(new GridLayout(1,1)); genOpts.add(askSave); // Panel fr die Farboptionen colours = new JPanel(); colours.setBorder(new TitledBorder(java.util.ResourceBundle.getBundle("global").getString("colors"))); colours.setLayout(new GridLayout(5,2)); JButton lineCol, backCol, charCol, markCol, transCol; lineCol = new JButton(java.util.ResourceBundle.getBundle("global").getString("lineColor")); lineCol.setToolTipText(java.util.ResourceBundle.getBundle("global").getString("lineColorTT")); currLineCol = new JPanel(); currLineCol.setBackground(opt.getLineCol()); backCol = new JButton(java.util.ResourceBundle.getBundle("global").getString("bg")); backCol.setToolTipText(java.util.ResourceBundle.getBundle("global").getString("bgTT")); currBackCol = new JPanel(); charCol = new JButton(java.util.ResourceBundle.getBundle("global").getString("transChars")); charCol.setToolTipText(java.util.ResourceBundle.getBundle("global").getString("transCharsTT")); currCharCol = new JPanel(); markCol = new JButton(java.util.ResourceBundle.getBundle("global").getString("markedState")); markCol.setToolTipText(java.util.ResourceBundle.getBundle("global").getString("markedStateTT")); currMarkCol = new JPanel(); transCol = new JButton(java.util.ResourceBundle.getBundle("global").getString("specMark")); transCol.setToolTipText(java.util.ResourceBundle.getBundle("global").getString("specMarkTT")); currTransCol = new JPanel(); colours.add(lineCol); colours.add(currLineCol); colours.add(backCol); colours.add(currBackCol); colours.add(charCol); colours.add(currCharCol); colours.add(markCol); colours.add(currMarkCol); colours.add(transCol); colours.add(currTransCol); lineCol.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Color c, old; old = opt.getLineCol(); c = getColor(old); if (c!=null) { opt.setLineCol(c); update(); } } }); charCol.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Color c, old; old = opt.getCharCol(); c = getColor(old); if (c!=null) { opt.setCharCol(c); update(); } } }); markCol.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Color c, old; old = opt.getMarkCol(); c = getColor(old); if (c!=null) { opt.setMarkCol(c); update(); } } }); transCol.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Color c, old; old = opt.getTransCol(); c = getColor(old); if (c!=null) { opt.setTransCol(c); update(); } } }); backCol.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Color c, old; old = opt.getBackCol(); c = getColor(old); if (c!=null) { opt.setBackCol(c); update(); } } }); // ok und cancel butten buttons = new JPanel(); buttons.setLayout(new GridLayout(1,3)); JButton okButton, defaultButton, cancelButton; // Optionen anzeigen update(); okButton = new JButton(java.util.ResourceBundle.getBundle("global").getString("OK")); defaultButton = new JButton(java.util.ResourceBundle.getBundle("global").getString("default")); cancelButton = new JButton(java.util.ResourceBundle.getBundle("global").getString("cancel")); defaultButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { opt.setDefault(); update(); } }); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { opt.setOptionsFrom(old_opt); dispose(); } }); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dispose(); } }); buttons.add(okButton); buttons.add(defaultButton); buttons.add(cancelButton); options = new JPanel(); options.setLayout(new GridLayout(2,1)); options.add(genOpts); options.add(colours); content.add(options, BorderLayout.CENTER); content.add(buttons, BorderLayout.SOUTH); setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); pack(); setLocation(70,70); setVisible(true); return opt; } | 11750 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11750/e52bc9bb7a81f5b8a747c29cc00e1456e4c54c6e/OptionDlg.java/buggy/src/gui/dialogs/OptionDlg.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4677,
1320,
1086,
1435,
288,
3639,
4039,
913,
31,
3639,
24048,
3157,
5476,
16,
9502,
16,
645,
4390,
16,
702,
31,
7734,
913,
273,
5154,
8485,
5621,
7734,
913,
18,
542,
3744,
12,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4677,
1320,
1086,
1435,
288,
3639,
4039,
913,
31,
3639,
24048,
3157,
5476,
16,
9502,
16,
645,
4390,
16,
702,
31,
7734,
913,
273,
5154,
8485,
5621,
7734,
913,
18,
542,
3744,
12,
27... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.