rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
private synchronized void loadHeaders() throws MessagingException { if (headers != null) { return; } try { InputStream in = source.getInputStream(); try { headers = new MailHeaders(in); } finally { IOUtil.shutdownStream(in); } } catch (IOException ioe) { throw new MessagingException("Unable to parse headers from stream: " + ioe.getMessage(), ioe); } | private synchronized MailHeaders loadHeaders(InputStream is) throws MessagingException { headers = new MailHeaders(new ByteArrayInputStream((RFC2822Headers.RETURN_PATH + ": placeholder").getBytes())); headers.setHeader(RFC2822Headers.RETURN_PATH, null); headers.load(is); return headers; | private synchronized void loadHeaders() throws MessagingException { if (headers != null) { //Another thread has already loaded these headers return; } try { InputStream in = source.getInputStream(); try { headers = new MailHeaders(in); } finally { IOUtil.shutdownStream(in); } } catch (IOException ioe) { throw new MessagingException("Unable to parse headers from stream: " + ioe.getMessage(), ioe); } } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/da754849918f34e133a8f60e9919ae1af63cc3c7/MimeMessageWrapper.java/buggy/branches/branch_2_1_fcs/src/java/org/apache/james/core/MimeMessageWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
1262,
3121,
1435,
1216,
23794,
503,
288,
3639,
309,
261,
2485,
480,
446,
13,
288,
5411,
368,
37,
24413,
2650,
711,
1818,
4203,
4259,
1607,
5411,
327,
31,
3639,
289,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
1262,
3121,
1435,
1216,
23794,
503,
288,
3639,
309,
261,
2485,
480,
446,
13,
288,
5411,
368,
37,
24413,
2650,
711,
1818,
4203,
4259,
1607,
5411,
327,
31,
3639,
289,
3639,... |
splitPane.setDividerLocation(.8); | public OMEMetaPanel(Frame frame, int imageplusID, Object[] obmeta){ imagePID=imageplusID; meta=obmeta; //Create the tree root= (DefaultMutableTreeNode)obmeta[1]; tree=new JTree(root); tree.getSelectionModel().setSelectionMode (TreeSelectionModel.SINGLE_TREE_SELECTION); tree.addTreeSelectionListener(this); JScrollPane treeView = new JScrollPane(tree); treeView.setPreferredSize(new Dimension(200, 200)); //creates the dialog box dia=new JDialog(frame, "OME Image Attributes", true); JPanel pane=new JPanel(); pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); customPane=new JPanel(); customField=new JTextArea(2,20); customField.setLineWrap(true); customField.setWrapStyleWord(true); JScrollPane customScroll=new JScrollPane(customField); //this caused the window to not have anything in it// customScroll.setPreferredSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE)); customPane.add(customScroll); splitPane=new JSplitPane(JSplitPane.VERTICAL_SPLIT, treeView, customPane); //try splitPane.setDividerLocation(.8); pane.add(splitPane); JPanel paneButtons=new JPanel(); paneButtons.setLayout(new BoxLayout(paneButtons, BoxLayout.X_AXIS)); paneButtons.setBorder(new EmptyBorder(5,5,5,5)); paneButtons.setAlignmentX(JPanel.LEFT_ALIGNMENT); pane.add(paneButtons); dia.setContentPane(pane); cancel=new JButton("Close"); cancel.setActionCommand("cancel"); paneButtons.add(cancel); cancel.addActionListener(this); dia.pack(); centerWindow(frame, dia); }//end of public constructor | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/ab4795658e7c3d0e40c0f31d5eb323194a8d23fb/OMEMetaPanel.java/buggy/loci/ome/ij/OMEMetaPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
531,
958,
2781,
5537,
12,
3219,
2623,
16,
509,
1316,
10103,
734,
16,
1033,
8526,
3768,
3901,
15329,
565,
1316,
16522,
33,
2730,
10103,
734,
31,
565,
2191,
33,
947,
3901,
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,
1071,
531,
958,
2781,
5537,
12,
3219,
2623,
16,
509,
1316,
10103,
734,
16,
1033,
8526,
3768,
3901,
15329,
565,
1316,
16522,
33,
2730,
10103,
734,
31,
565,
2191,
33,
947,
3901,
31,
565,
... | |
public boolean isGroup(@NotNull String actionId) { return getActionImpl(actionId, true) instanceof ActionGroup; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/4972de74093751aa507c641e7a852c8feb15d5e3/ActionManagerImpl.java/clean/action-system/impl/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6494,
291,
1114,
26964,
5962,
780,
1128,
548,
15329,
2463,
588,
1803,
2828,
12,
1128,
548,
16,
3767,
13,
1336,
792,
1803,
1114,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6494,
291,
1114,
26964,
5962,
780,
1128,
548,
15329,
2463,
588,
1803,
2828,
12,
1128,
548,
16,
3767,
13,
1336,
792,
1803,
1114,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | ||
if (descriptor.getConfigurationElement().getAttribute(NavigatorContentDescriptor.ATT_ACTION_PROVIDER) == null) { | if (descriptor.getConfigurationElement().getAttribute( NavigatorContentDescriptor.ATT_ACTION_PROVIDER) == null) { | public ICommonActionProvider getActionProvider(INavigatorActionService theActionService) { if (actionProvider != null || actionProviderInitializationFailed) return actionProvider; if (descriptor.getConfigurationElement().getAttribute(NavigatorContentDescriptor.ATT_ACTION_PROVIDER) == null) { actionProvider = SkeletonActionProvider.INSTANCE; return actionProvider; } synchronized (this) { try { if (actionProvider == null) { actionProvider = (ICommonActionProvider) descriptor.getConfigurationElement().createExecutableExtension(NavigatorContentDescriptor.ATT_ACTION_PROVIDER); if(actionProvider == null) actionProvider = SkeletonActionProvider.INSTANCE; else if(theActionService != null) theActionService.initialize(descriptor.getId(), actionProvider); } } catch (CoreException e) { actionProviderInitializationFailed = true; e.printStackTrace(); } catch (RuntimeException e) { actionProviderInitializationFailed = true; e.printStackTrace(); } if (actionProviderInitializationFailed) actionProvider = SkeletonActionProvider.INSTANCE; } return actionProvider; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e0b46ec766fbc7b3887a89a3b90905046c7610c3/NavigatorContentExtension.java/buggy/bundles/org.eclipse.ui.navigator/src-navigator/org/eclipse/ui/navigator/internal/extensions/NavigatorContentExtension.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
6517,
1803,
2249,
12473,
2249,
12,
706,
13061,
1803,
1179,
326,
1803,
1179,
13,
288,
202,
202,
430,
261,
1128,
2249,
480,
446,
747,
1301,
2249,
17701,
2925,
13,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
6517,
1803,
2249,
12473,
2249,
12,
706,
13061,
1803,
1179,
326,
1803,
1179,
13,
288,
202,
202,
430,
261,
1128,
2249,
480,
446,
747,
1301,
2249,
17701,
2925,
13,
1082,
202,
... |
entry = (Map.Entry) it.next(); Set values = (Set) entry.getValue(); | Map.Entry entry = (Map.Entry) it.next(); Collection values = (Collection) entry.getValue(); | public void execute() throws MojoExecutionException { if ( templateDirectory == null ) { siteRenderer.setTemplateClassLoader( DoxiaMojo.class.getClassLoader() ); } else { try { URL templateDirectoryUrl = new URL( templateDirectory ); URL[] urls = {templateDirectoryUrl}; URLClassLoader urlClassloader = new URLClassLoader( urls ); siteRenderer.setTemplateClassLoader( urlClassloader ); } catch ( MalformedURLException e ) { throw new MojoExecutionException( templateDirectory + " isn't a valid URL.", e ); } } List reports = getReports(); if ( attributes == null ) { attributes = new HashMap(); } if ( attributes.get( "project" ) == null ) { attributes.put( "project", project ); } try { categorizeReports( reports ); if ( locales == null ) { localesList.add( defaultLocale ); } else { StringTokenizer st = new StringTokenizer( locales, "," ); while ( st.hasMoreTokens() ) { localesList.add( new Locale( st.nextToken().trim() ) ); } } Locale locale; for ( Iterator iterator = localesList.iterator(); iterator.hasNext(); ) { locale = (Locale) iterator.next(); File localeOutputDirectory = getOuputDirectory( locale ); // Safety if ( !localeOutputDirectory.exists() ) { localeOutputDirectory.mkdirs(); } //Generate reports if ( reports != null ) { MavenReport report; for ( Iterator j = reports.iterator(); j.hasNext(); ) { report = (MavenReport) j.next(); getLog().info( "Generate \"" + report.getName( locale ) + "\" report." ); report.setReportOutputDirectory( localeOutputDirectory ); String outputFileName = report.getOutputName() + ".html"; SiteRendererSink sink = siteRenderer.createSink( new File( siteDirectory ), outputFileName, getSiteDescriptor( reports, locale ) ); report.generate( sink, locale ); if ( !report.isExternalReport() ) { File outputFile = new File( localeOutputDirectory, outputFileName ); if ( !outputFile.getParentFile().exists() ) { outputFile.getParentFile().mkdirs(); } siteRenderer.generateDocument( new FileWriter( outputFile ), template, attributes, sink, locale ); } } } //Generate overview pages if ( projectInfos.size() > 0 ) { try { generateProjectInfoPage( getSiteDescriptor( reports, locale ), locale ); } catch ( Exception e ) { throw new MojoExecutionException( "An error is occurred in project info page generation.", e ); } } if ( projectReports.size() > 0 ) { try { generateProjectReportsPage( getSiteDescriptor( reports, locale ), locale ); } catch ( Exception e ) { throw new MojoExecutionException( "An error is occurred in project reports page generation.", e ); } } // Handle the GeneratedSite Directory File generatedSiteFile = new File( generatedSiteDirectory ); if ( generatedSiteFile.exists() ) { siteRenderer.render( generatedSiteFile, localeOutputDirectory, getSiteDescriptor( reports, locale ), template, attributes, locale ); } // Generate static site File siteDirectoryFile; Locale firstLocale = (Locale) localesList.get( 0 ); if ( locale.equals( firstLocale ) ) { siteDirectoryFile = new File( siteDirectory ); } else { siteDirectoryFile = new File( siteDirectory, locale.getLanguage() ); } // Try to find duplicate files Map duplicate = new LinkedHashMap(); if ( siteDirectoryFile.exists() ) { tryToFindDuplicates( siteDirectoryFile, duplicate ); } if ( generatedSiteFile.exists() ) { tryToFindDuplicates( generatedSiteFile, duplicate ); } // Exception if a file is duplicate if ( duplicate.size() > 0 ) { StringBuffer sb = null; Map.Entry entry; for ( Iterator it = duplicate.entrySet().iterator(); it.hasNext(); ) { entry = (Map.Entry) it.next(); Set values = (Set) entry.getValue(); if ( values.size() > 1 ) { if ( sb == null ) { sb = new StringBuffer( "Some files are duplicates in the site directory or in the generated-site directory. " + "Review the following files:" ); } sb.append( "\n" ).append( entry.getKey() ).append( "\n" ); for ( Iterator it2 = values.iterator(); it2.hasNext(); ) { String current = (String) it2.next(); sb.append( "\t" ).append( current ); if ( it2.hasNext() ) { sb.append( "\n" ); } } } } if ( sb != null ) { throw new MavenReportException( sb.toString() ); } } // Try to generate the index.html if ( duplicate.get( "index" ) != null ) { getLog().info( "Ignoring the index file generation." ); } else { getLog().info( "Generate an index file." ); generateIndexPage( getSiteDescriptor( reports, locale ), locale ); } // Log if a user override a project info report file for ( int i = 0; i < PROJECT_INFO_FILES.length; i++ ) { if ( projectInfos.size() > 0 ) { if ( duplicate.get( PROJECT_INFO_FILES[i] ) != null ) { getLog().info( "Override the generated files \"" + PROJECT_INFO_FILES[i] + "\"." ); } } } siteRenderer.render( siteDirectoryFile, localeOutputDirectory, getSiteDescriptor( reports, locale ), template, attributes, locale ); siteRenderer.render( siteDirectoryFile, localeOutputDirectory, getSiteDescriptor( reports, locale ), template, attributes, locale ); File cssDirectory = new File( siteDirectory, "css" ); File imagesDirectory = new File( siteDirectory, "images" ); // special case for backwards compatibility if ( cssDirectory.exists() || imagesDirectory.exists() ) { getLog().warn( "DEPRECATED: the css and images directories are deprecated, please use resources" ); copyDirectory( cssDirectory, new File( localeOutputDirectory, "css" ) ); copyDirectory( imagesDirectory, new File( localeOutputDirectory, "images" ) ); } copyResources( localeOutputDirectory ); // Copy site resources if ( resourcesDirectory != null && resourcesDirectory.exists() ) { copyDirectory( resourcesDirectory, localeOutputDirectory ); } // Copy the generated site in parent site if needed to provide module links if ( addModules ) { MavenProject parentProject = project.getParent(); if ( parentProject != null ) {/* Not working: 1) parentProject.getBasedir() returns the current basedir for some reason, so it copies inside itselfwhich loops forever, and 2) this might be better working as a top-level aggregation rather than pushing from thesubprojects... // TODO Handle user plugin configuration File parentSiteDir = new File( parentProject.getBasedir(), parentProject.getBuild().getDirectory() + File.separator + "site" + File.separator + project.getArtifactId() ); if ( !parentSiteDir.exists() ) { parentSiteDir.mkdirs(); } File siteDir = new File( outputDirectory ); FileUtils.copyDirectoryStructure( siteDir, parentSiteDir );*/ } } } } catch ( MavenReportException e ) { throw new MojoExecutionException( "Error during report generation", e ); } catch ( RendererException e ) { throw new MojoExecutionException( "Error during page generation", e ); } catch ( Exception e ) { throw new MojoExecutionException( "Error during site generation", e ); } } | 7444 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7444/0100df041fcde4ad386f65568ac70320dcaf2d25/DoxiaMojo.java/buggy/maven-site-plugin/src/main/java/org/apache/maven/doxia/DoxiaMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
3639,
1216,
18780,
565,
288,
3639,
309,
261,
1542,
2853,
422,
446,
262,
3639,
288,
5411,
2834,
6747,
18,
542,
2283,
7805,
12,
2256,
92,
1155,
49,
10007,
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,
1071,
918,
1836,
1435,
3639,
1216,
18780,
565,
288,
3639,
309,
261,
1542,
2853,
422,
446,
262,
3639,
288,
5411,
2834,
6747,
18,
542,
2283,
7805,
12,
2256,
92,
1155,
49,
10007,
18,
1106,
... |
Asserts.isTrue(isCurrent()); | assert isCurrent(); | public void notifyStarted() { Asserts.isTrue(isCurrent()); synchronized (hasStartedLock) { hasStarted = true; hasStartedLock.notifyAll(); } } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/b72a2862ae5b2f01f9a767ef2ce248fd785857c4/RubyThread.java/clean/src/org/jruby/RubyThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5066,
9217,
1435,
288,
3639,
1815,
25694,
5621,
3639,
3852,
261,
5332,
9217,
2531,
13,
288,
5411,
711,
9217,
273,
638,
31,
5411,
711,
9217,
2531,
18,
12336,
1595,
5621,
3639,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5066,
9217,
1435,
288,
3639,
1815,
25694,
5621,
3639,
3852,
261,
5332,
9217,
2531,
13,
288,
5411,
711,
9217,
273,
638,
31,
5411,
711,
9217,
2531,
18,
12336,
1595,
5621,
3639,
2... |
if (children.length == 0) | if (numChildren == 0) | public Enumeration children() { if (children.length == 0) return null; Vector tmp = new Vector(); for (int index = 0; index < children.length; ++index) tmp.add(children[index]); return tmp.elements(); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/AbstractDocument.java/buggy/core/src/classpath/javax/javax/swing/text/AbstractDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13864,
2325,
1435,
565,
288,
1377,
309,
261,
2107,
4212,
422,
374,
13,
3639,
327,
446,
31,
1377,
5589,
1853,
273,
394,
5589,
5621,
1377,
364,
261,
474,
770,
273,
374,
31,
770,
411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13864,
2325,
1435,
565,
288,
1377,
309,
261,
2107,
4212,
422,
374,
13,
3639,
327,
446,
31,
1377,
5589,
1853,
273,
394,
5589,
5621,
1377,
364,
261,
474,
770,
273,
374,
31,
770,
411... |
AST __t748 = _t; AST tmp1214_AST_in = (AST)_t; | AST __t753 = _t; AST tmp1224_AST_in = (AST)_t; | public final void fieldoption(AST _t) throws RecognitionException { AST fieldoption_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST as = null; AST li = null; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case AS: { AST __t743 = _t; as = _t==ASTNULL ? null :(AST)_t; match(_t,AS); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CLASS: { AST tmp1208_AST_in = (AST)_t; match(_t,CLASS); _t = _t.getNextSibling(); AST tmp1209_AST_in = (AST)_t; match(_t,TYPE_NAME); _t = _t.getNextSibling(); break; } case CHARACTER: case COMHANDLE: case DATE: case DECIMAL: case HANDLE: case INTEGER: case LOGICAL: case MEMPTR: case RAW: case RECID: case ROWID: case WIDGETHANDLE: case BLOB: case CLOB: case DATETIME: case DATETIMETZ: case LONGCHAR: case TYPE_NAME: { datatype_field(_t); _t = _retTree; break; } default: { throw new NoViableAltException(_t); } } } _t = __t743; _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.defAs(as); } break; } case CASESENSITIVE: case Not_casesens: { casesens_or_not(_t); _t = _retTree; break; } case BGCOLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { color_expr(_t); _t = _retTree; break; } case COLUMNCODEPAGE: { AST __t745 = _t; AST tmp1210_AST_in = (AST)_t; match(_t,COLUMNCODEPAGE); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t745; _t = _t.getNextSibling(); break; } case CONTEXTHELPID: { AST __t746 = _t; AST tmp1211_AST_in = (AST)_t; match(_t,CONTEXTHELPID); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t746; _t = _t.getNextSibling(); break; } case DECIMALS: { AST __t747 = _t; AST tmp1212_AST_in = (AST)_t; match(_t,DECIMALS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t747; _t = _t.getNextSibling(); break; } case DROPTARGET: { AST tmp1213_AST_in = (AST)_t; match(_t,DROPTARGET); _t = _t.getNextSibling(); break; } case EXTENT: { extentphrase(_t); _t = _retTree; break; } case FONT: { AST __t748 = _t; AST tmp1214_AST_in = (AST)_t; match(_t,FONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t748; _t = _t.getNextSibling(); break; } case FORMAT: { AST __t749 = _t; AST tmp1215_AST_in = (AST)_t; match(_t,FORMAT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t749; _t = _t.getNextSibling(); break; } case HELP: { AST __t750 = _t; AST tmp1216_AST_in = (AST)_t; match(_t,HELP); _t = _t.getFirstChild(); constant(_t); _t = _retTree; _t = __t750; _t = _t.getNextSibling(); break; } case INITIAL: { initial_constant(_t); _t = _retTree; break; } case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case LIKE: { AST __t751 = _t; li = _t==ASTNULL ? null :(AST)_t; match(_t,LIKE); _t = _t.getFirstChild(); fld(_t,CQ.SYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALIDATE: { AST tmp1217_AST_in = (AST)_t; match(_t,VALIDATE); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t751; _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.defLike(li); } break; } case MOUSEPOINTER: { AST __t753 = _t; AST tmp1218_AST_in = (AST)_t; match(_t,MOUSEPOINTER); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t753; _t = _t.getNextSibling(); break; } case NOUNDO: { AST tmp1219_AST_in = (AST)_t; match(_t,NOUNDO); _t = _t.getNextSibling(); break; } case VIEWAS: { viewasphrase(_t); _t = _retTree; break; } case TTCODEPAGE: { AST tmp1220_AST_in = (AST)_t; match(_t,TTCODEPAGE); _t = _t.getNextSibling(); break; } case XMLDATATYPE: { xml_data_type(_t); _t = _retTree; break; } case XMLNODETYPE: { xml_node_type(_t); _t = _retTree; break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
652,
3482,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
652,
3482,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
652,
3482,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
652,
3482,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... |
Boolean isDesignerBoolean = ( Boolean ) options | Boolean isDesignerBoolean = (Boolean) options | private Map getParsedParameters( IViewerReportDesignHandle design, InputOptions options, Map parameters ) throws ReportServiceException { Locale locale = ( Locale ) options.getOption( InputOptions.OPT_LOCALE ); Collection parameterList = getParameterDefinitions( design, options ); Map paramMap = new HashMap( ); IGetParameterDefinitionTask task = null; Map configMap = null; Boolean isDesignerBoolean = ( Boolean ) options .getOption( InputOptions.OPT_IS_DESIGNER ); boolean isDesigner = ( isDesignerBoolean != null ? isDesignerBoolean .booleanValue( ) : false ); try { task = getParameterDefinitionTask( design.getFileName( ) ); IReportRunnable runnable = ReportEngineService.getInstance( ) .openReportDesign( design.getFileName( ) ); configMap = runnable.getTestConfig( ); } catch ( EngineException e ) { throw new ReportServiceException( e.getLocalizedMessage( ) ); } for ( Iterator iter = parameterList.iterator( ); iter.hasNext( ); ) { ScalarParameterDefn parameterObj = ( ScalarParameterDefn )iter.next( ); String paramValue = null; Object paramValueObj = null; ScalarParameterHandle paramHandle = ( ScalarParameterHandle ) parameterObj .getHandle( ); String paramName = paramHandle.getName( ); String format = paramHandle.getPattern( ); ReportParameterConverter converter = new ReportParameterConverter( format, locale ); Set paramNames = parameters.keySet( ); if ( parameters != null && paramName != null ) { boolean found = false; for ( Iterator it = paramNames.iterator( ); it.hasNext( ); ) { String name = ( String ) it.next( ); if ( paramName.equals( name ) ) { paramValue = ( String ) parameters.get( name ); paramValueObj = converter.parse( paramValue, ParameterDataTypeConverter .getEngineDataType( paramHandle .getDataType( ) ) ); paramMap.put( paramName, paramValueObj ); found = true; break; } } if ( !found && configMap.containsKey( paramName ) && isDesigner ) { // Get value from test config String configValue = ( String ) configMap.get( paramName ); ReportParameterConverter cfgConverter = new ReportParameterConverter( format, Locale.US ); paramValueObj = cfgConverter.parse( configValue, parameterObj.getDataType( ) ); } else if ( !found ) { // Get default value from task paramValueObj = task.getDefaultValue( parameterObj .getName( ) ); } } } return paramMap; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/4f2d0a24ff9ec8881defea107bb54374df18cb9c/BirtViewerReportService.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1635,
25406,
2402,
12,
467,
18415,
4820,
15478,
3259,
8281,
16,
1082,
202,
1210,
1320,
702,
16,
1635,
1472,
262,
1082,
202,
15069,
8706,
15133,
202,
95,
202,
202,
3916,
2573,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1635,
25406,
2402,
12,
467,
18415,
4820,
15478,
3259,
8281,
16,
1082,
202,
1210,
1320,
702,
16,
1635,
1472,
262,
1082,
202,
15069,
8706,
15133,
202,
95,
202,
202,
3916,
2573,
2... |
public String generateClassifier(Object cls); | String generateClassifier(Object cls); | public String generateClassifier(Object cls); | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/e731149c55337fa442f598b6b0bcea95cdaa8dd5/NotationProvider2.java/clean/src_new/org/argouml/application/api/NotationProvider2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
13860,
12,
921,
2028,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
13860,
12,
921,
2028,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
} | }*/ | private void adjustWidth(Context c, Box block) { if (!(block.getContent() instanceof BlockContent)) {//then it must be anonymous return; } // initalize the width to all the available space //block.width = c.getExtents().width; Element elem = block.getElement(); CalculatedStyle style = block.getContent().getStyle(); //if (c.css.hasProperty(elem, "width", false)) { if (style.hasProperty("width")) { // if it is a sub block then don't mess with the width if (c.isSubBlock()) { if (!elem.getNodeName().equals("td")) { u.p("ERRRRRRRRRRORRRR!!! in a sub block that's not a TD!!!!"); } return; } //float new_width = c.css.getFloatProperty(elem, "width", c.getExtents().width, false); float new_width = style.getFloatPropertyRelative("width", c.getExtents().width); c.getExtents().width = (int) new_width; block.width = (int) new_width; block.auto_width = false; } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e65470765b9501b251ba6faf1734b383bb9b1578/BoxLayout.java/buggy/src/java/org/xhtmlrenderer/layout/BoxLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5765,
2384,
12,
1042,
276,
16,
8549,
1203,
13,
288,
3639,
309,
16051,
12,
2629,
18,
588,
1350,
1435,
1276,
3914,
1350,
3719,
288,
759,
15991,
518,
1297,
506,
13236,
5411,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5765,
2384,
12,
1042,
276,
16,
8549,
1203,
13,
288,
3639,
309,
16051,
12,
2629,
18,
588,
1350,
1435,
1276,
3914,
1350,
3719,
288,
759,
15991,
518,
1297,
506,
13236,
5411,
327,
... |
throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ."); } | throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ."); } | public float left() { throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ."); } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/f82915686e9b5f4c554a5d954f60c86d2892af42/Table.java/buggy/itext/src/com/lowagie/text/Table.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
1431,
2002,
1435,
288,
4202,
604,
394,
13172,
2932,
10796,
434,
279,
3555,
848,
1404,
506,
8894,
18,
2164,
326,
15064,
53,
1199,
1769,
282,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
565,
1071,
1431,
2002,
1435,
288,
4202,
604,
394,
13172,
2932,
10796,
434,
279,
3555,
848,
1404,
506,
8894,
18,
2164,
326,
15064,
53,
1199,
1769,
282,
289,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
String rubyDir = jrubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; | char sep = File.separatorChar; String rubyDir = jrubyHome + sep + "lib" + sep + "ruby" + sep; | public void init(Ruby runtime, List additionalDirectories) { for (Iterator iter = additionalDirectories.iterator(); iter.hasNext();) { addPath((String)iter.next()); } if (runtime.getSafeLevel() == 0) { String jrubyLib = System.getProperty("jruby.lib"); if (jrubyLib != null) { addPath(jrubyLib); } } String jrubyHome = System.getProperty("jruby.home"); if (jrubyHome != null) { String rubyDir = jrubyHome + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; addPath(rubyDir + "site_ruby" + File.separatorChar + Constants.RUBY_MAJOR_VERSION); addPath(rubyDir + "site_ruby" + File.separatorChar + Constants.RUBY_MAJOR_VERSION + File.separatorChar + "java"); addPath(rubyDir + "site_ruby"); addPath(rubyDir + Constants.RUBY_MAJOR_VERSION); addPath(rubyDir + Constants.RUBY_MAJOR_VERSION + File.separatorChar + "java"); } if (runtime.getSafeLevel() == 0) { addPath("."); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/61503e7396c70acb6ed9f50922ff044d1fcc4bcc/LoadService.java/clean/src/org/jruby/internal/runtime/load/LoadService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
54,
10340,
3099,
16,
987,
3312,
13071,
13,
288,
3639,
364,
261,
3198,
1400,
273,
3312,
13071,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
5411,
25505,
12443,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
54,
10340,
3099,
16,
987,
3312,
13071,
13,
288,
3639,
364,
261,
3198,
1400,
273,
3312,
13071,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
5411,
25505,
12443,... |
else if ( event.widget.equals( txtInnerRadius ) ) { ( (DialRegion) ( getDialForProcessing( ).getDialRegions( ) ).get( getMarkerIndex( ) ) ).setInnerRadius( Double.parseDouble( trimString( txtInnerRadius.getText( ) ) ) ); } else if ( event.widget.equals( txtOuterRadius ) ) { ( (DialRegion) ( getDialForProcessing( ).getDialRegions( ) ).get( getMarkerIndex( ) ) ).setOuterRadius( Double.parseDouble( trimString( txtOuterRadius.getText( ) ) ) ); } | public void handleEvent( Event event ) { // if ( event.widget.equals( lacLabel ) ) // { // if ( this.lstMarkers.getSelection( ).length != 0 ) // { // switch ( event.type ) // { // case LabelAttributesComposite.FONT_CHANGED_EVENT : // getSelectedMarkerLabel( ).getCaption( ) // .setFont( (FontDefinition) ( (Object[]) event.data )[0] ); // getSelectedMarkerLabel( ).getCaption( ) // .setColor( (ColorDefinition) ( (Object[]) event.data )[1] ); // break; // case LabelAttributesComposite.BACKGROUND_CHANGED_EVENT : // getSelectedMarkerLabel( ).setBackground( (Fill) event.data ); // break; // case LabelAttributesComposite.OUTLINE_STYLE_CHANGED_EVENT : // getSelectedMarkerLabel( ).getOutline( ) // .setStyle( (LineStyle) event.data ); // break; // case LabelAttributesComposite.OUTLINE_WIDTH_CHANGED_EVENT : // getSelectedMarkerLabel( ).getOutline( ) // .setThickness( ( (Integer) event.data ).intValue( ) ); // break; // case LabelAttributesComposite.OUTLINE_COLOR_CHANGED_EVENT : // getSelectedMarkerLabel( ).getOutline( ) // .setColor( (ColorDefinition) event.data ); // break; // case LabelAttributesComposite.OUTLINE_VISIBILITY_CHANGED_EVENT : // getSelectedMarkerLabel( ).getOutline( ) // .setVisible( ( (Boolean) event.data ).booleanValue( ) ); // break; // } // } // } if ( event.widget.equals( fccRange ) ) { ( (DialRegion) ( getDialForProcessing( ).getDialRegions( ) ).get( getMarkerIndex( ) ) ).setFill( (Fill) event.data ); } else if ( event.widget.equals( txtStartValue ) ) { int iMarkerIndex = getMarkerIndex( ); ( (DialRegion) ( getDialForProcessing( ).getDialRegions( ) ).get( iMarkerIndex ) ).setStartValue( this.getTypedDataElement( txtStartValue.getText( ) ) ); } else if ( event.widget.equals( txtEndValue ) ) { int iMarkerIndex = getMarkerIndex( ); ( (DialRegion) ( getDialForProcessing( ).getDialRegions( ) ).get( iMarkerIndex ) ).setEndValue( this.getTypedDataElement( txtEndValue.getText( ) ) ); } else if ( event.widget.equals( txtInnerRadius ) ) { ( (DialRegion) ( getDialForProcessing( ).getDialRegions( ) ).get( getMarkerIndex( ) ) ).setInnerRadius( Double.parseDouble( trimString( txtInnerRadius.getText( ) ) ) ); } else if ( event.widget.equals( txtOuterRadius ) ) { ( (DialRegion) ( getDialForProcessing( ).getDialRegions( ) ).get( getMarkerIndex( ) ) ).setOuterRadius( Double.parseDouble( trimString( txtOuterRadius.getText( ) ) ) ); } else if ( event.widget.equals( liacMarkerRange ) ) { if ( event.type == LineAttributesComposite.STYLE_CHANGED_EVENT ) { ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).getOutline( ) .setStyle( (LineStyle) event.data ); } else if ( event.type == LineAttributesComposite.WIDTH_CHANGED_EVENT ) { ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).getOutline( ) .setThickness( ( (Integer) event.data ).intValue( ) ); } else if ( event.type == LineAttributesComposite.COLOR_CHANGED_EVENT ) { ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).getOutline( ) .setColor( (ColorDefinition) event.data ); } else { ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).getOutline( ) .setVisible( ( (Boolean) event.data ).booleanValue( ) ); } } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d2b70963deda52802fb91e4162be11f6dfa733e4/SeriesRegionSheet.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/popup/series/SeriesRegionSheet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
1133,
12,
2587,
871,
262,
202,
95,
202,
202,
759,
309,
261,
871,
18,
6587,
18,
14963,
12,
328,
1077,
2224,
262,
262,
202,
202,
759,
288,
202,
202,
759,
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,
225,
202,
482,
918,
1640,
1133,
12,
2587,
871,
262,
202,
95,
202,
202,
759,
309,
261,
871,
18,
6587,
18,
14963,
12,
328,
1077,
2224,
262,
262,
202,
202,
759,
288,
202,
202,
759,
309,
261,
... | |
vPhaseReport.addElement(r); | addReport(r); | private void processMovement(Entity entity, MovePath md) { Report r; boolean sideslipped = false; // for VTOL sideslipping // check for fleeing if (md.contains(MovePath.STEP_FLEE)) { // Unit has fled the battlefield. r = new Report(2005, Report.PUBLIC); r.addDesc(entity); vPhaseReport.addElement(r); // Is the unit carrying passengers? final Vector passengers = entity.getLoadedUnits(); if ( !passengers.isEmpty() ) { final Enumeration iter = passengers.elements(); while ( iter.hasMoreElements() ) { final Entity passenger = (Entity) iter.nextElement(); // Unit has fled the battlefield. r = new Report(2010, Report.PUBLIC); r.indent(); r.addDesc(passenger); vPhaseReport.addElement(r); game.removeEntity( passenger.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT ); send( createRemoveEntityPacket(passenger.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT) ); } } // Handle any picked up MechWarriors Enumeration iter = entity.getPickedUpMechWarriors().elements(); while (iter.hasMoreElements() ) { Integer mechWarriorId = (Integer)iter.nextElement(); Entity mw = game.getEntity(mechWarriorId.intValue()); // Is the MechWarrior an enemy? int condition = IEntityRemovalConditions.REMOVE_IN_RETREAT; r = new Report(2010); if (mw.isCaptured()) { r = new Report(2015); condition = IEntityRemovalConditions.REMOVE_CAPTURED; } game.removeEntity( mw.getId(), condition ); send( createRemoveEntityPacket(mw.getId(), condition) ); r.addDesc(mw); r.indent(); vPhaseReport.addElement(r); } // Is the unit being swarmed? final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); // Has the swarmer taken a turn? if ( !swarmer.isDone() ) { // Dead entities don't take turns. game.removeTurnFor(swarmer); send(createTurnVectorPacket()); } // End swarmer-still-to-move // Unit has fled the battlefield. swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); r = new Report(2015, Report.PUBLIC); r.indent(); r.addDesc(swarmer); vPhaseReport.addElement(r); game.removeEntity( swarmerId, IEntityRemovalConditions.REMOVE_CAPTURED ); send( createRemoveEntityPacket(swarmerId, IEntityRemovalConditions.REMOVE_CAPTURED) ); } game.removeEntity( entity.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT ); send( createRemoveEntityPacket(entity.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT) ); return; } if (md.contains(MovePath.STEP_EJECT)) { if (entity instanceof Mech) { r = new Report(2020); r.subject = entity.getId(); r.add(entity.getCrew().getName()); r.addDesc(entity); vPhaseReport.addElement(r); } else if (entity instanceof Tank) { r = new Report(2025); r.subject = entity.getId(); r.addDesc(entity); vPhaseReport.addElement(r); } vPhaseReport.addAll( ejectEntity(entity, false)); return; } // okay, proceed with movement calculations Coords lastPos = entity.getPosition(); Coords curPos = entity.getPosition(); int curFacing = entity.getFacing(); int curVTOLElevation = entity.getElevation(); int distance = 0; int mpUsed = 0; int moveType = IEntityMovementType.MOVE_NONE; int overallMoveType = IEntityMovementType.MOVE_NONE; // if the entity already used some MPs, // it previously tried to get up and fell, // and then got another turn. set moveType // and overallMoveType accordingly if (entity.mpUsed > 0) { moveType = IEntityMovementType.MOVE_WALK; overallMoveType = IEntityMovementType.MOVE_WALK; if (entity.mpUsed > entity.getWalkMP()) { moveType = IEntityMovementType.MOVE_RUN; overallMoveType = IEntityMovementType.MOVE_RUN; } } boolean firstStep; boolean wasProne; boolean fellDuringMovement; int prevFacing = curFacing; IHex prevHex = null; final boolean isInfantry = (entity instanceof Infantry); AttackAction charge = null; PilotingRollData rollTarget; // cache this here, otherwise changing MP in the turn causes // errorneous gravity PSRs int cachedGravityLimit = (IEntityMovementType.MOVE_JUMP == moveType)? entity.getOriginalJumpMP() : entity.getRunMP(false); // Compile the move md.compile(game, entity); if (md.contains(MovePath.STEP_CLEAR_MINEFIELD)) { ClearMinefieldAction cma = new ClearMinefieldAction(entity.getId()); entity.setClearingMinefield(true); game.addAction(cma); } // check for MASC failure if (entity instanceof Mech) { Vector crits = new Vector(); if (((Mech)entity).checkForMASCFailure(md, vPhaseReport, crits)) { CriticalSlot cs = null; int loc = Entity.LOC_NONE; for(Enumeration e = crits.elements();e.hasMoreElements();) { Object o = e.nextElement(); if(o instanceof Integer) loc = (Integer) o; else if (o instanceof CriticalSlot) { cs = (CriticalSlot) o; applyCriticalHit(entity, loc, cs, true); } } // no movement after that md.clear(); } } overallMoveType = md.getLastStepMovementType(); //check for starting in liquid magma if(game.getBoard().getHex(entity.getPosition()).terrainLevel(Terrains.MAGMA) == 2 && entity.getElevation() == 0) { doMagmaDamage(entity, false); } // iterate through steps firstStep = true; fellDuringMovement = false; /* Bug 754610: Revert fix for bug 702735. */ MoveStep prevStep = null; Vector movePath = new Vector(); for (final Enumeration i = md.getSteps(); i.hasMoreElements();) { final MoveStep step = (MoveStep)i.nextElement(); wasProne = entity.isProne(); boolean isPavementStep = step.isPavementStep(); boolean entityFellWhileAttemptingToStand = false; // stop for illegal movement if (step.getMovementType() == IEntityMovementType.MOVE_ILLEGAL) { break; } //stop if the entity already killed itself if(entity.isDestroyed() || entity.isDoomed()) { break; } // check piloting skill for getting up rollTarget = entity.checkGetUp(step); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { entity.heatBuildup += 1; entity.setProne(false); entity.setHullDown(false); wasProne = false; game.resetPSRs(entity); entityFellWhileAttemptingToStand = !doSkillCheckInPlace(entity, rollTarget); } // did the entity just fall? if (entityFellWhileAttemptingToStand) { moveType = step.getMovementType(); curFacing = entity.getFacing(); curPos = entity.getPosition(); mpUsed = step.getMpUsed(); fellDuringMovement = true; break; } if (step.getType() == MovePath.STEP_UNJAM_RAC) { entity.setUnjammingRAC(true); game.addAction(new UnjamAction(entity.getId())); break; } if (step.getType() == MovePath.STEP_LAY_MINE) { LayMinefieldAction lma = new LayMinefieldAction(entity.getId(), step.getMineToLay()); game.addLayMinefieldAction(lma); entity.setLayingMines(true); break; } if (step.getType() == MovePath.STEP_SEARCHLIGHT && entity.hasSpotlight()) { final boolean SearchOn = !entity.isUsingSpotlight(); entity.setSpotlightState(SearchOn); sendServerChat(entity.getDisplayName() + " switched searchlight "+(SearchOn?"on":"off")+"."); } // set most step parameters moveType = step.getMovementType(); distance = step.getDistance(); mpUsed = step.getMpUsed(); // check for charge if (step.getType() == MovePath.STEP_CHARGE) { if (entity.canCharge()) { checkExtremeGravityMovement(entity, step, curPos, cachedGravityLimit); Targetable target = step.getTarget( game ); ChargeAttackAction caa = new ChargeAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); entity.setDisplacementAttack(caa); game.addCharge(caa); charge = caa; } else { sendServerChat("Illegal charge!! I don't think "+entity.getDisplayName() +" should be allowed to charge,"+ " but the client of "+entity.getOwner().getName()+" disagrees."); sendServerChat("Please make sure "+entity.getOwner().getName()+" is running MegaMek "+MegaMek.VERSION+ ", or if that is already the case, submit a bug report at http://megamek.sf.net/"); return; } break; } // check for dfa if (step.getType() == MovePath.STEP_DFA) { if (entity.canDFA()) { checkExtremeGravityMovement(entity, step, curPos, cachedGravityLimit); Targetable target = step.getTarget( game ); DfaAttackAction daa = new DfaAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); entity.setDisplacementAttack(daa); game.addCharge(daa); charge = daa; } else { sendServerChat("Illegal DFA!! I don't think "+entity.getDisplayName() +" should be allowed to DFA,"+ " but the client of "+entity.getOwner().getName()+" disagrees."); sendServerChat("Please make sure "+entity.getOwner().getName()+" is running MegaMek "+MegaMek.VERSION+ ", or if that is already the case, submit a bug report at http://megamek.sf.net/"); return; } break; } // set last step parameters curPos = step.getPosition(); if(moveType != IEntityMovementType.MOVE_JUMP || entity.getJumpType() != Mech.JUMP_BOOSTER) curFacing = step.getFacing(); curVTOLElevation = step.getElevation(); //set elevation in case of collapses entity.setElevation(step.getElevation()); final IHex curHex = game.getBoard().getHex(curPos); // check for automatic unstick if(entity.canUnstickByJumping() && entity.isStuck() && moveType == IEntityMovementType.MOVE_JUMP) { entity.setStuck(false); entity.setCanUnstickByJumping(false); } // Check for skid. rollTarget = entity.checkSkid(moveType, prevHex, overallMoveType, prevStep, prevFacing, curFacing, lastPos, curPos, isInfantry, distance); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { // Have an entity-meaningful PSR message. boolean psrPassed = true; if ( entity instanceof Mech ) { psrPassed = doSkillCheckWhileMoving( entity, lastPos, lastPos, rollTarget, true ); } else { psrPassed = doSkillCheckWhileMoving( entity, lastPos, lastPos, rollTarget, false ); } // Does the entity skid? if ( !psrPassed ){ curPos = lastPos; Coords nextPos = curPos; IHex nextHex = null; int skidDistance = 0; Enumeration targets = null; Entity target = null; int curElevation; int nextElevation; int skidDirection = prevFacing; // All charge damage is based upon // the pre-skid move distance. entity.delta_distance = distance-1; // Attacks against a skidding target have additional +2. moveType = IEntityMovementType.MOVE_SKID; // What is the first hex in the skid? if(step.isThisStepBackwards()) { skidDirection = (skidDirection + 3) % 6; } nextPos = curPos.translated( skidDirection ); nextHex = game.getBoard().getHex( nextPos ); // Move the entity a number hexes from curPos in the // skidDirection direction equal to half the distance moved // this turn (rounded up), unless something intervenes. for ( skidDistance = 0; skidDistance < (int) Math.ceil(entity.delta_distance / 2.0); skidDistance++ ) { // Is the next hex off the board? if ( !game.getBoard().contains(nextPos) ) { // Can the entity skid off the map? if (game.getOptions().booleanOption("push_off_board")) { // Yup. One dead entity. game.removeEntity(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED); send(createRemoveEntityPacket(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED)); r = new Report(2030, Report.PUBLIC); r.addDesc(entity); vPhaseReport.addElement(r); // TODO: remove passengers and swarmers. // The entity's movement is completed. return; } else { // Nope. Update the report. r = new Report(2035); r.subject = entity.getId(); r.indent(); vPhaseReport.addElement(r); } // Stay in the current hex and stop skidding. break; } // Can the skiding entity enter the next hex from this? // N.B. can skid along roads. if ( ( entity.isHexProhibited(curHex) || entity.isHexProhibited(nextHex) ) && !Compute.canMoveOnPavement(game, curPos, nextPos) ) { // Update report. r = new Report(2040); r.subject = entity.getId(); r.indent(); r.add(nextPos.getBoardNum(), true); vPhaseReport.addElement(r); // N.B. the BMRr pg. 22 says that the unit // "crashes" into the terrain but it doesn't // mention any damage. // Stay in the current hex and stop skidding. break; } // Hovercraft can "skid" over water. // all units can skid over ice. // TODO: allow entities to occupy different levels of // buildings. curElevation = curHex.floor(); nextElevation = nextHex.floor(); if ( entity instanceof Tank && entity.getMovementMode() == IEntityMovementMode.HOVER ) { if ( curHex.containsTerrain(Terrains.WATER) ) { curElevation = curHex.surface(); } if ( nextHex.containsTerrain(Terrains.WATER) ) { nextElevation += nextHex.surface(); } } else { if(curHex.containsTerrain(Terrains.ICE)) { curElevation = curHex.surface(); } if(nextHex.containsTerrain(Terrains.ICE)) { nextElevation = nextHex.surface(); } } // BMRr pg. 22 - Can't skid uphill, // but can skid downhill. if ( curElevation < nextElevation ) { r = new Report(2045); r.subject = entity.getId(); r.indent(); r.add(nextPos.getBoardNum(), true); vPhaseReport.addElement(r); // Stay in the current hex and stop skidding. break; } // Have skidding units suffer falls. else if ( curElevation > nextElevation + 1 ) { doEntityFallsInto( entity, curPos, nextPos, entity.getBasePilotingRoll() ); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); // Stay in the current hex and stop skidding. break; } // Get any building in the hex. Building bldg = game.getBoard().getBuildingAt(nextPos); boolean bldgSuffered = false; boolean stopTheSkid = false; // Does the next hex contain an entities? // ASSUMPTION: hurt EVERYONE in the hex. // TODO: allow entities to occupy different levels of // buildings, and only skid into a single level. targets = game.getEntities( nextPos ); if ( targets.hasMoreElements()) { boolean skidChargeHit = false; while ( targets.hasMoreElements() ) { target = (Entity) targets.nextElement(); // TODO : allow ready targets to move out of way // Mechs and vehicles get charged, // but need to make a to-hit roll if ( target instanceof Mech || target instanceof Tank ) { ChargeAttackAction caa = new ChargeAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); ToHitData toHit = caa.toHit(game, true); // Calculate hit location. if ( entity instanceof Tank && ((entity.getMovementMode() == IEntityMovementMode.HOVER) || (entity.getMovementMode() == IEntityMovementMode.NAVAL) || (entity.getMovementMode() == IEntityMovementMode.HYDROFOIL)) && 0 < nextHex.terrainLevel(Terrains.WATER) && target.getElevation() < 0) { if ( 2 <= nextHex.terrainLevel(Terrains.WATER) || target.isProne() ) { // Hovercraft/Naval Craft can't hit the Mek. continue; } else { toHit.setHitTable(ToHitData.HIT_PUNCH); } } else if ( entity.getHeight() < target.getHeight() ) { toHit.setHitTable(ToHitData.HIT_KICK); } else { toHit.setHitTable(ToHitData.HIT_NORMAL); } toHit.setSideTable (Compute.targetSideTable(entity, target)); // roll int roll = Compute.d6(2); // Update report. r = new Report(2050); r.subject = entity.getId(); r.indent(); r.add(target.getShortName(), true); r.add(nextPos.getBoardNum(), true); r.newlines = 0; vPhaseReport.addElement(r); if (toHit.getValue() == ToHitData.IMPOSSIBLE) { roll = -12; r = new Report(2055); r.subject = entity.getId(); r.add(toHit.getDesc()); r.newlines = 0; vPhaseReport.addElement(r); } else if (toHit.getValue() == ToHitData.AUTOMATIC_SUCCESS) { r = new Report(2060); r.subject = entity.getId(); r.add(toHit.getDesc()); r.newlines = 0; vPhaseReport.addElement(r); roll = Integer.MAX_VALUE; } else { // report the roll r = new Report(2065); r.subject = entity.getId(); r.add(toHit.getValue()); r.add(roll); r.newlines = 0; vPhaseReport.addElement(r); } // Resolve a charge against the target. // ASSUMPTION: buildings block damage for // *EACH* entity charged. if (roll < toHit.getValue()) { r = new Report(2070); r.subject = entity.getId(); vPhaseReport.addElement(r); } else { // Resolve the charge. resolveChargeDamage (entity, target, toHit, skidDirection); // HACK: set the entity's location // to the original hex again, for the other targets if (targets.hasMoreElements()) { entity.setPosition(curPos); } bldgSuffered = true; skidChargeHit = true; } // The skid ends here if the target lives. if ( !target.isDoomed() && !target.isDestroyed() && !game.isOutOfGame(target) ) { stopTheSkid = true; } // if we don't do this here, // we can have a mech without a leg // standing on the field and moving // as if it still had his leg after // getting skid-charged. if (!target.isDone()) { resolvePilotingRolls(target); game.resetPSRs(target); target.applyDamage(); Report.addNewline(vPhaseReport); } } // Resolve "move-through" damage on infantry. // Infantry inside of a building don't get a // move-through, but suffer "bleed through" // from the building. else if ( target instanceof Infantry && bldg != null ) { // Update report. r = new Report(2075); r.subject = entity.getId(); r.indent(); r.add(target.getShortName(), true); r.add(nextPos.getBoardNum(), true); r.newlines = 0; vPhaseReport.addElement(r); // Infantry don't have different // tables for punches and kicks HitData hit = target.rollHitLocation( ToHitData.HIT_NORMAL, Compute.targetSideTable(entity, target) ); // Damage equals tonnage, divided by 5. // ASSUMPTION: damage is applied in one hit. vPhaseReport.addAll( damageEntity(target, hit, Math.round(entity.getWeight()/5))); Report.addNewline(vPhaseReport); } // Has the target been destroyed? if ( target.isDoomed() ) { // Has the target taken a turn? if ( !target.isDone() ) { // Dead entities don't take turns. game.removeTurnFor(target); send(createTurnVectorPacket()); } // End target-still-to-move // Clean out the entity. target.setDestroyed(true); game.moveToGraveyard(target.getId()); send(createRemoveEntityPacket(target.getId())); } // Update the target's position, // unless it is off the game map. if ( !game.isOutOfGame(target) ) { entityUpdate( target.getId() ); } } // Check the next entity in the hex. // if we missed all the entities in the hex, // move attacker to side hex if (!skidChargeHit) { Coords src = entity.getPosition(); Coords dest = Compute.getMissedChargeDisplacement (game, entity.getId(), src, skidDirection); doEntityDisplacement(entity, src, dest, null); } else { // HACK: otherwise, set the entities position to that // hex's coords, because we had to move the entity // back earlier for the other targets entity.setPosition(nextPos); } } // Handle the building in the hex. // TODO : BMRr pg. 22, only count buildings that are // higher than our starting terrain height. // TODO: allow units to skid on top of buildings. if ( bldg != null ) { // Report that the entity has entered the bldg. r = new Report(2080); r.subject = entity.getId(); r.indent(); r.add(bldg.getName()); r.add(nextPos.getBoardNum(), true); vPhaseReport.addElement(r); // If the building hasn't already suffered // damage, then apply charge damage to the // building and displace the entity inside. // ASSUMPTION: you don't charge the building // if Tanks or Mechs were charged. int chargeDamage = ChargeAttackAction.getDamageFor ( entity ); if ( !bldgSuffered ) { Report buildingReport = damageBuilding( bldg, chargeDamage ); buildingReport.indent(2); buildingReport.subject = entity.getId(); vPhaseReport.addElement(buildingReport); // Apply damage to the attacker. int toAttacker = ChargeAttackAction.getDamageTakenBy ( entity, bldg ); HitData hit = entity.rollHitLocation( ToHitData.HIT_NORMAL, entity.sideTable(nextPos) ); vPhaseReport.addAll( damageEntity( entity, hit, toAttacker )); Report.addNewline(vPhaseReport); entity.setPosition( nextPos ); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); curPos = nextPos; } // End buildings-suffer-too // Any infantry in the building take damage // equal to the building being charged. // ASSUMPTION: infantry take no damage from the // building absorbing damage from // Tanks and Mechs being charged. damageInfantryIn( bldg, chargeDamage ); // If a building still stands, then end the skid, // and add it to the list of affected buildings. if ( bldg.getCurrentCF() > 0 ) { stopTheSkid = true; this.addAffectedBldg( bldg, false ); } } // End handle-building. // Do we stay in the current hex and stop skidding? if ( stopTheSkid ) { break; } // is the next hex a rubble hex? rollTarget = entity.checkRubbleMove(step, nextHex, curPos, nextPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckWhileMoving(entity, curPos, nextPos, rollTarget, true); if (entity.isProne()) { // if we fell, stop the skid (see bug 1115608) break; } } //check for breaking magma crust if(curHex.terrainLevel(Terrains.MAGMA) == 1) { int roll = Compute.d6(1); r = new Report(2395); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); vPhaseReport.addElement(r); if(roll == 6) { curHex.removeTerrain(Terrains.MAGMA); curHex.addTerrain(Terrains.getTerrainFactory().createTerrain(Terrains.MAGMA, 2)); sendChangedHex(curPos); for(Enumeration e=game.getEntities(curPos);e.hasMoreElements();) { Entity en = (Entity)e.nextElement(); if(en != entity) doMagmaDamage(en, false); } } } //check for entering liquid magma if(curHex.terrainLevel(Terrains.MAGMA) == 2) { doMagmaDamage(entity, false); } // is the next hex a swamp? rollTarget = entity.checkSwampMove(step, nextHex, curPos, nextPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { if (!doSkillCheckWhileMoving(entity, curPos, nextPos, rollTarget, false)){ entity.setStuck(true); r = new Report(2081); r.subject = entity.getId(); r.add(entity.getDisplayName(), true); // stay here and stop skidding, see bug 1115608 break; } } // Update the position and keep skidding. entity.setPosition( nextPos ); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); curPos = nextPos; r = new Report(2085); r.subject = entity.getId(); r.indent(); r.add(curPos.getBoardNum(), true); vPhaseReport.addElement(r); // Get the next hex in the skid? nextPos = nextPos.translated( skidDirection ); nextHex = game.getBoard().getHex( nextPos ); } // Handle the next skid hex. // If the skidding entity violates stacking, // displace targets until it doesn't. curPos = entity.getPosition(); target = Compute.stackingViolation (game, entity.getId(), curPos); while (target != null) { nextPos = Compute.getValidDisplacement (game, target.getId(), target.getPosition(), skidDirection); // ASSUMPTION // There should always be *somewhere* that // the target can go... last skid hex if // nothing else is available. if ( null == nextPos ) { // But I don't trust the assumption fully. // Report the error and try to continue. System.err.println( "The skid of " + entity.getShortName() + " should displace " + target.getShortName() + " in hex " + curPos.getBoardNum() + " but there is nowhere to go." ); break; } // indent displacement r = new Report(1210, Report.PUBLIC); r.indent(); r.newlines = 0; vPhaseReport.addElement(r); doEntityDisplacement(target, curPos, nextPos, null); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); target = Compute.stackingViolation( game, entity.getId(), curPos ); } // Mechs suffer damage for every hex skidded. if ( entity instanceof Mech ) { // Calculate one half falling damage times skid length. int damage = skidDistance * (int) Math.ceil(Math.round(entity.getWeight() / 10.0) / 2.0); // report skid damage r = new Report(2090); r.subject = entity.getId(); r.indent(); r.addDesc(entity); r.add(damage); vPhaseReport.addElement(r); // standard damage loop // All skid damage is to the front. while (damage > 0) { int cluster = Math.min(5, damage); HitData hit = entity.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT); vPhaseReport.addAll( damageEntity(entity, hit, cluster)); damage -= cluster; } Report.addNewline(vPhaseReport); } // Clean up the entity if it has been destroyed. if ( entity.isDoomed() ) { entity.setDestroyed(true); game.moveToGraveyard(entity.getId()); send(createRemoveEntityPacket(entity.getId())); // The entity's movement is completed. return; } // Let the player know the ordeal is over. r = new Report(2095); r.subject = entity.getId(); r.indent(); vPhaseReport.addElement(r); // set entity parameters curFacing = entity.getFacing(); curPos = entity.getPosition(); entity.setSecondaryFacing( curFacing ); // skid consumes all movement if (md.hasActiveMASC()) { mpUsed = entity.getRunMP(); } else { mpUsed = entity.getRunMPwithoutMASC(); } entity.moved = moveType; fellDuringMovement = true; distance = entity.delta_distance; break; } // End failed-skid-psr } // End need-skid-psr if(entity instanceof VTOL) { rollTarget = ((VTOL)entity).checkSideSlip(moveType, prevHex, overallMoveType, prevStep, prevFacing, curFacing, lastPos, curPos, distance); if(rollTarget.getValue() != TargetRoll.CHECK_FALSE) { if(!doSkillCheckWhileMoving(entity,lastPos,curPos,rollTarget, false)) { //report sideslip sideslipped = true; r = new Report(2100); r.subject = entity.getId(); r.addDesc(entity); vPhaseReport.addElement(r); Coords newPos = lastPos.translated((prevFacing));//does this work for opposing hex? // Is the next hex off the board? if ( !game.getBoard().contains(newPos) ) { // Can the entity skid off the map? if (game.getOptions().booleanOption("push_off_board")) { // Yup. One dead entity. game.removeEntity(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED); send(createRemoveEntityPacket(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED)); r = new Report(2030); r.subject = entity.getId(); r.addDesc(entity); vPhaseReport.addElement(r); // TODO: remove passengers and swarmers. // The entity's movement is completed. return; } else { // Nope. Update the report. r = new Report(2035); r.subject = entity.getId(); vPhaseReport.addElement(r); } // Stay in the current hex and stop skidding. break; } int newElevation=(entity.calcElevation(game.getBoard().getHex(curPos),game.getBoard().getHex(newPos),curVTOLElevation,step.climbMode())); if(newElevation<=0) { r = new Report(2105); r.subject = entity.getId(); r.add(newPos.getBoardNum(), true); vPhaseReport.addElement(r); int hitSide=curFacing-prevFacing+6; hitSide=hitSide % 6; int table=0; switch(hitSide) {//quite hackish...I think it ought to work, though. case 0://can this happen? table=ToHitData.SIDE_FRONT; break; case 1: case 2: table=ToHitData.SIDE_LEFT; break; case 3: table=ToHitData.SIDE_REAR; break; case 4: case 5: table=ToHitData.SIDE_RIGHT; break; } curPos=newPos; curVTOLElevation=newElevation; vPhaseReport.addAll( crashVTOL(((VTOL)entity),true,distance,curPos,curVTOLElevation,table)); curVTOLElevation=0; IHex hex = game.getBoard().getHex(newPos); if((hex.containsTerrain(Terrains.WATER) && !hex.containsTerrain(Terrains.ICE)) || hex.containsTerrain(Terrains.WOODS) || hex.containsTerrain(Terrains.JUNGLE)) { vPhaseReport.addAll( destroyEntity(entity,"could not land in crash site")); } else { } } else { r = new Report(2110); r.subject = entity.getId(); r.add(newPos.getBoardNum(), true); vPhaseReport.addElement(r); entity.setElevation(entity.calcElevation(game.getBoard().getHex(curPos),game.getBoard().getHex(newPos),curVTOLElevation,step.climbMode())); curPos=newPos; } if(!entity.isDestroyed() && !entity.isDoomed()) { fellDuringMovement= true; //No, but it should work... } break; } } } // check if we've moved into rubble rollTarget = entity.checkRubbleMove(step, curHex, lastPos, curPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckWhileMoving(entity, lastPos, curPos, rollTarget, true); } //check for breaking magma crust if(curHex.terrainLevel(Terrains.MAGMA) == 1 && step.getElevation() == 0 && step.getMovementType() != IEntityMovementType.MOVE_JUMP) { int roll = Compute.d6(1); r = new Report(2395); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); vPhaseReport.addElement(r); if(roll == 6) { curHex.removeTerrain(Terrains.MAGMA); curHex.addTerrain(Terrains.getTerrainFactory().createTerrain(Terrains.MAGMA, 2)); sendChangedHex(curPos); for(Enumeration e=game.getEntities(curPos);e.hasMoreElements();) { Entity en = (Entity)e.nextElement(); if(en != entity) doMagmaDamage(en, false); } } } //check for entering liquid magma if(curHex.terrainLevel(Terrains.MAGMA) == 2 && step.getElevation() == 0 && step.getMovementType() != IEntityMovementType.MOVE_JUMP) { doMagmaDamage(entity, false); } // check if we've moved into a swamp rollTarget = entity.checkSwampMove(step, curHex, lastPos, curPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { if (!doSkillCheckWhileMoving(entity, lastPos, curPos, rollTarget, false)){ entity.setStuck(true); entity.setCanUnstickByJumping(true); r = new Report(2081); r.add(entity.getDisplayName()); r.subject = entity.getId(); vPhaseReport.addElement(r); break; } } // check to see if we are a mech and we've moved OUT of fire IHex lastHex = game.getBoard().getHex(lastPos); if (entity instanceof Mech) { if ( !lastPos.equals(curPos) && (lastHex.containsTerrain(Terrains.FIRE) || lastHex.containsTerrain(Terrains.MAGMA)) && ( step.getMovementType() != IEntityMovementType.MOVE_JUMP // Bug #828741 -- jumping bypasses fire, but not on the first step // getMpUsed -- total MP used to this step // getMp -- MP used in this step // the difference will always be 0 on the "first step" of a jump, // and >0 on a step in the midst of a jump || ( 0 == step.getMpUsed() - step.getMp() ) ) ) { int heat=0; if(lastHex.containsTerrain(Terrains.FIRE)) heat+=2; if(lastHex.terrainLevel(Terrains.MAGMA) == 1) { heat+=2; } else if(lastHex.terrainLevel(Terrains.MAGMA) == 2) { heat+=5; } entity.heatBuildup+=heat; r = new Report(2115); r.subject = entity.getId(); r.addDesc(entity); r.add(heat); vPhaseReport.addElement(r); } } // check to see if we are not a mech and we've moved INTO fire if (!(entity instanceof Mech)) { if ( game.getBoard().getHex(curPos).containsTerrain(Terrains.FIRE) && !lastPos.equals(curPos) && step.getMovementType() != IEntityMovementType.MOVE_JUMP && step.getElevation() <= 1 ) { if(game.getOptions().booleanOption("vehicle_fires") && entity instanceof Tank) { checkForVehicleFire((Tank)entity, false); } else { doFlamingDeath(entity); } } } // check for extreme gravity movement if (!i.hasMoreElements() && !firstStep) { checkExtremeGravityMovement(entity, step, curPos, cachedGravityLimit); } // check for minefields. if ((!lastPos.equals(curPos) && (step.getMovementType() != IEntityMovementType.MOVE_JUMP)) || ((overallMoveType == IEntityMovementType.MOVE_JUMP) && (!i.hasMoreElements()))) { checkVibrabombs(entity, curPos, false, lastPos, curPos); if (game.containsMinefield(curPos)) { Enumeration minefields = game.getMinefields(curPos).elements(); while (minefields.hasMoreElements()) { Minefield mf = (Minefield) minefields.nextElement(); boolean isOnGround = (!i.hasMoreElements()); isOnGround |= (step.getMovementType() != IEntityMovementType.MOVE_JUMP); isOnGround &= step.getElevation() == 0; if (isOnGround) { enterMinefield(entity, mf, curPos, curPos, true); } else if (mf.getType() == Minefield.TYPE_THUNDER_ACTIVE) { enterMinefield(entity, mf, curPos, curPos, true, 2); } } } } // infantry discovers minefields if they end their move // in a minefield. if (!lastPos.equals(curPos) && !i.hasMoreElements() && isInfantry) { if (game.containsMinefield(curPos)) { Player owner = entity.getOwner(); Enumeration minefields = game.getMinefields(curPos).elements(); while (minefields.hasMoreElements()) { Minefield mf = (Minefield) minefields.nextElement(); if (!owner.containsMinefield(mf)) { r = new Report(2120); r.subject = entity.getId(); r.add(entity.getShortName(), true); vPhaseReport.addElement(r); revealMinefield(owner, mf); } } } } // check if we've moved into water rollTarget = entity.checkWaterMove(step, curHex, lastPos, curPos, isPavementStep); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { // Swarmers need special handling. final int swarmerId = entity.getSwarmAttackerId(); boolean swarmerDone = true; Entity swarmer = null; if (Entity.NONE != swarmerId) { swarmer = game.getEntity( swarmerId ); swarmerDone = swarmer.isDone(); } // Now do the skill check. doSkillCheckWhileMoving(entity, lastPos, curPos, rollTarget, true); // Swarming infantry platoons may drown. if (curHex.terrainLevel(Terrains.WATER) > 1) { drownSwarmer(entity, curPos); } // Do we need to remove a game turn for the swarmer if (!swarmerDone && ( swarmer.isDoomed() || swarmer.isDestroyed() )) { // We have to diddle with the swarmer's // status to get its turn removed. swarmer.setDone( false ); swarmer.setUnloaded( false ); // Dead entities don't take turns. game.removeTurnFor( swarmer ); send( createTurnVectorPacket() ); // Return the original status. swarmer.setDone( true ); swarmer.setUnloaded( true ); } // check for inferno wash-off checkForWashedInfernos(entity, curPos); } // In water, may or may not be a new hex, neccessary to // check during movement, for breach damage, and always // set dry if appropriate //TODO: possibly make the locations local and set later doSetLocationsExposure(entity, curHex, step.getMovementType() == IEntityMovementType.MOVE_JUMP, step.getElevation()); //check for breaking ice by breaking through from below if(prevHex != null && prevStep != null && prevStep.getElevation() < 0 && step.getElevation() == 0 && prevHex.containsTerrain(Terrains.ICE) && prevHex.containsTerrain(Terrains.WATER) && step.getMovementType() != IEntityMovementType.MOVE_JUMP && !(lastPos.equals(curPos))) { r = new Report(2410); r.addDesc(entity); vPhaseReport.add(r); resolveIceBroken(lastPos); } //check for breaking ice by stepping on it if(curHex.containsTerrain(Terrains.ICE) && curHex.containsTerrain(Terrains.WATER) && step.getMovementType() != IEntityMovementType.MOVE_JUMP && !(lastPos.equals(curPos))) { if(step.getElevation() == 0 ) { int roll = Compute.d6(1); r = new Report(2118); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); vPhaseReport.addElement(r); if(roll == 6) { resolveIceBroken(curPos); doEntityFallsInto(entity, lastPos, curPos, entity.getBasePilotingRoll(), false); } } //or intersecting it else if(step.getElevation() + entity.height() == 0) { r = new Report(2410); r.addDesc(entity); vPhaseReport.add(r); resolveIceBroken(curPos); } } // Handle loading units. if ( step.getType() == MovePath.STEP_LOAD ) { // Find the unit being loaded. Entity loaded = null; Enumeration entities = game.getEntities( curPos ); while ( entities.hasMoreElements() ) { // Is the other unit friendly and not the current entity? loaded = (Entity)entities.nextElement(); if ( entity.getOwner() == loaded.getOwner() && !entity.equals(loaded) ) { // The moving unit should be able to load the other // unit and the other should be able to have a turn. if ( !entity.canLoad(loaded) || !loaded.isSelectableThisTurn() ) { // Something is fishy in Denmark. System.err.println( entity.getShortName() + " can not load " + loaded.getShortName() ); loaded = null; } else { // Have the deployed unit load the indicated unit. this.loadUnit( entity, loaded ); // Stop looking. break; } } else { // Nope. Discard it. loaded = null; } } // Handle the next entity in this hex. // We were supposed to find someone to load. if ( loaded == null ) { System.err.println( "Could not find unit for " + entity.getShortName() + " to load in " + curPos ); } } // End STEP_LOAD // Handle unloading units. if ( step.getType() == MovePath.STEP_UNLOAD ) { Targetable unloaded = step.getTarget( game ); if ( !this.unloadUnit( entity, unloaded, curPos, curFacing, step.getElevation() ) ) { System.err.println( "Error! Server was told to unload " + unloaded.getDisplayName() + " from " + entity.getDisplayName() + " into " + curPos.getBoardNum() ); } } // Handle non-infantry moving into a building. int buildingMove = entity.checkMovementInBuilding(step, prevStep, curHex, prevHex); if (buildingMove > 0) { // Get the building being exited. Building bldgExited = null; if((buildingMove & 1) == 1) bldgExited = game.getBoard().getBuildingAt( lastPos ); // Get the building being entered. Building bldgEntered = null; if((buildingMove & 2) == 2) bldgEntered = game.getBoard().getBuildingAt( curPos ); // Get the building being stepped on. Building bldgStepped = null; if((buildingMove & 4) == 4) bldgStepped = game.getBoard().getBuildingAt( curPos ); boolean collapsed = false; //are we passing through a building wall? if(bldgEntered != null || bldgExited != null) { // If we're not leaving a building, just handle the "entered". if ( bldgExited == null) { collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "entering" ); this.addAffectedBldg( bldgEntered, collapsed ); } // If we're moving withing the same building, just handle // the "within". else if ( bldgExited.equals( bldgEntered ) ) { collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "moving in" ); this.addAffectedBldg( bldgEntered, collapsed ); } // If we have different buildings, roll for each. else if ( bldgExited != null && bldgEntered != null ) { collapsed = passBuildingWall( entity, bldgExited, lastPos, curPos, distance, "exiting" ); this.addAffectedBldg( bldgExited, collapsed ); collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "entering" ); this.addAffectedBldg( bldgEntered, collapsed ); } // Otherwise, just handle the "exited". else if (bldgExited != null){ collapsed = passBuildingWall( entity, bldgExited, lastPos, curPos, distance, "exiting" ); this.addAffectedBldg( bldgExited, collapsed ); } } //stepping on roof, no PSR just check for over weight if(bldgStepped != null) { collapsed = checkBuildingCollapseWhileMoving(bldgStepped, entity, curPos); this.addAffectedBldg( bldgStepped, collapsed ); } // Clean up the entity if it has been destroyed. if ( entity.isDoomed() ) { entity.setDestroyed(true); game.moveToGraveyard(entity.getId()); send(createRemoveEntityPacket(entity.getId())); // The entity's movement is completed. return; } // TODO: what if a building collapses into rubble? } // did the entity just fall? if (!wasProne && entity.isProne()) { curFacing = entity.getFacing(); curPos = entity.getPosition(); mpUsed = step.getMpUsed(); fellDuringMovement = true; break; } // dropping prone intentionally? if (step.getType() == MovePath.STEP_GO_PRONE) { mpUsed = step.getMpUsed(); rollTarget = entity.checkDislodgeSwarmers(step); if (rollTarget.getValue() == TargetRoll.CHECK_FALSE) { // Not being swarmed entity.setProne(true); // check to see if we washed off infernos checkForWashedInfernos(entity, curPos); break; } else { // Being swarmed entity.setPosition(curPos); if (doDislodgeSwarmerSkillCheck(entity, rollTarget, curPos)) { // Entity falls curFacing = entity.getFacing(); curPos = entity.getPosition(); fellDuringMovement = true; break; } } } //going hull down if(step.getType() == MovePath.STEP_HULL_DOWN) { mpUsed = step.getMpUsed(); entity.setHullDown(true); } // Track this step's location. movePath.addElement( new UnitLocation( entity.getId(), curPos, curFacing ) ); // update lastPos, prevStep, prevFacing & prevHex lastPos = new Coords(curPos); prevStep = step; /* Bug 754610: Revert fix for bug 702735. if (prevHex != null && !curHex.equals(prevHex)) { */ if (!curHex.equals(prevHex)) { prevFacing = curFacing; } prevHex = curHex; firstStep = false; } // set entity parameters entity.setPosition(curPos); entity.setFacing(curFacing); entity.setSecondaryFacing(curFacing); entity.delta_distance = distance; entity.moved = moveType; entity.mpUsed = mpUsed; if (!sideslipped && !fellDuringMovement) { entity.setElevation(curVTOLElevation); } entity.setClimbMode(md.getFinalClimbMode()); // if we ran with destroyed hip or gyro, we need a psr rollTarget = entity.checkRunningWithDamage(overallMoveType); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckInPlace(entity, rollTarget); } // but the danger isn't over yet! landing from a jump can be risky! if (overallMoveType == IEntityMovementType.MOVE_JUMP && !entity.isMakingDfa()) { final IHex curHex = game.getBoard().getHex(curPos); // check for damaged criticals rollTarget = entity.checkLandingWithDamage(); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckInPlace(entity, rollTarget); } // jumped into water? int waterLevel = curHex.terrainLevel(Terrains.WATER); if(curHex.containsTerrain(Terrains.ICE) && waterLevel > 0) { waterLevel = 0; //check for breaking ice int roll = Compute.d6(1); r = new Report(2122); r.add(entity.getDisplayName(), true); r.add(roll); r.subject = entity.getId(); vPhaseReport.addElement(r); if(roll >= 4) { //oops! resolveIceBroken(curPos); doEntityFallsInto(entity, lastPos, curPos, entity.getBasePilotingRoll(), false); } } rollTarget = entity.checkWaterMove(waterLevel); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckInPlace(entity, rollTarget); } if (waterLevel > 1) { // Any swarming infantry will be destroyed. drownSwarmer(entity, curPos); } //check for building collapse Building bldg = game.getBoard().getBuildingAt(curPos); if(bldg != null) { checkForCollapse( bldg, game.getPositionMap() ); } //check for breaking magma crust if(curHex.terrainLevel(Terrains.MAGMA) == 1) { int roll = Compute.d6(1); r = new Report(2395); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); vPhaseReport.addElement(r); if(roll == 6) { curHex.removeTerrain(Terrains.MAGMA); curHex.addTerrain(Terrains.getTerrainFactory().createTerrain(Terrains.MAGMA, 2)); sendChangedHex(curPos); for(Enumeration e=game.getEntities(curPos);e.hasMoreElements();) { Entity en = (Entity)e.nextElement(); if(en != entity) doMagmaDamage(en, false); } } } //check for entering liquid magma if(curHex.terrainLevel(Terrains.MAGMA) == 2) { doMagmaDamage(entity, false); } // jumped into swamp? maybe stuck! if (curHex.containsTerrain(Terrains.SWAMP) || curHex.containsTerrain(Terrains.MAGMA) || curHex.containsTerrain(Terrains.SNOW) || curHex.containsTerrain(Terrains.MUD) || curHex.containsTerrain(Terrains.TUNDRA)) { if (entity instanceof Mech) { entity.setStuck(true); r = new Report(2121); r.add(entity.getDisplayName(), true); r.subject = entity.getId(); vPhaseReport.addElement(r); } else if (entity instanceof Infantry) { PilotingRollData roll = entity.getBasePilotingRoll(); roll.addModifier(5, "infantry jumping into swamp"); if (!doSkillCheckWhileMoving(entity, curPos, curPos, roll, false)) { entity.setStuck(true); r = new Report(2081); r.add(entity.getDisplayName()); r.subject = entity.getId(); vPhaseReport.addElement(r); } } } // If the entity is being swarmed, jumping may dislodge the fleas. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); final PilotingRollData roll = entity.getBasePilotingRoll(); entity.addPilotingModifierForTerrain(roll); // Add a +4 modifier. roll.addModifier( 4, "dislodge swarming infantry" ); // If the swarmer has Assault claws, give a 1 modifier. // We can stop looking when we find our first match. for ( Enumeration iter = swarmer.getMisc(); iter.hasMoreElements(); ) { Mounted mount = (Mounted) iter.nextElement(); EquipmentType equip = mount.getType(); if ( BattleArmor.ASSAULT_CLAW.equals (equip.getInternalName()) ) { roll.addModifier( 1, "swarmer has assault claws" ); break; } } // okay, print the info r = new Report(2125); r.subject = entity.getId(); r.addDesc(entity); vPhaseReport.addElement(r); // roll final int diceRoll = Compute.d6(2); r = new Report(2130); r.subject = entity.getId(); r.add(roll.getValueAsString()); r.add(roll.getDesc()); r.add(diceRoll); if (diceRoll < roll.getValue()) { r.choose(false); vPhaseReport.addElement(r); } else { // Dislodged swarmers don't get turns. game.removeTurnFor( swarmer ); send( createTurnVectorPacket() ); // Update the report and the swarmer's status. r.choose(true); vPhaseReport.addElement(r); entity.setSwarmAttackerId( Entity.NONE ); swarmer.setSwarmTargetId( Entity.NONE ); // Did the infantry fall into water? if ( curHex.terrainLevel(Terrains.WATER) > 0 ) { // Swarming infantry die. swarmer.setPosition( curPos ); r = new Report(2135); r.subject = entity.getId(); r.indent(); r.addDesc(swarmer); vPhaseReport.addElement(r); vPhaseReport.addAll( destroyEntity(swarmer, "a watery grave", false)); } else { // Swarming infantry take an 11 point hit. // ASSUMPTION : damage should not be doubled. r = new Report(2140); r.subject = entity.getId(); r.indent(); r.addDesc(swarmer); vPhaseReport.addElement(r); vPhaseReport.addAll(damageEntity(swarmer, swarmer.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT), 11)); Report.addNewline(vPhaseReport); swarmer.setPosition( curPos ); } entityUpdate( swarmerId ); } // End successful-PSR } // End try-to-dislodge-swarmers // one more check for inferno wash-off checkForWashedInfernos(entity, curPos); } // End entity-is-jumping // update entity's locations' exposure doSetLocationsExposure(entity, game.getBoard().getHex(curPos), false, entity.getElevation()); // should we give another turn to the entity to keep moving? if (fellDuringMovement && entity.mpUsed < entity.getRunMP() && entity.isSelectableThisTurn() && !entity.isDoomed()) { entity.applyDamage(); entity.setDone(false); GameTurn newTurn = new GameTurn.SpecificEntityTurn(entity.getOwner().getId(), entity.getId()); game.insertNextTurn(newTurn); // brief everybody on the turn update send(createTurnVectorPacket()); // let everyone know about what just happened send(entity.getOwner().getId(), createSpecialReportPacket()); } else { entity.setDone(true); } // If the entity is being swarmed, update the attacker's position. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); swarmer.setPosition( curPos ); // If the hex is on fire, and the swarming infantry is // *not* Battle Armor, it drops off. if ( !(swarmer instanceof BattleArmor) && game.getBoard().getHex(curPos).containsTerrain(Terrains.FIRE) ) { swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); r = new Report(2145); r.subject = entity.getId(); r.indent(); r.add(swarmer.getShortName(), true); vPhaseReport.addElement(r); } entityUpdate( swarmerId ); } // Update the entitiy's position, // unless it is off the game map. if (!game.isOutOfGame(entity)) { entityUpdate( entity.getId(), movePath ); if (entity.isDoomed()) { send(createRemoveEntityPacket(entity.getId(), entity.getRemovalCondition())); } } // if using double blind, update the player on new units he might see if (doBlind()) { send(entity.getOwner().getId(), createFilteredEntitiesPacket(entity.getOwner())); } // if we generated a charge attack, report it now if (charge != null) { send(createAttackPacket(charge, 1)); } } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/0259d527ea17f9b6ac49ee6eb9adc9e0d12e163f/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
49,
26140,
12,
1943,
1522,
16,
9933,
743,
3481,
13,
288,
3639,
8706,
436,
31,
3639,
1250,
22423,
3169,
1845,
273,
629,
31,
368,
364,
22944,
1741,
22423,
3169,
1382,
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,
3238,
918,
1207,
49,
26140,
12,
1943,
1522,
16,
9933,
743,
3481,
13,
288,
3639,
8706,
436,
31,
3639,
1250,
22423,
3169,
1845,
273,
629,
31,
368,
364,
22944,
1741,
22423,
3169,
1382,
7734,... |
result = resolver.removeFileTypeAssociation(tha); | result = workspaceResolver.removeAssociation(tha); | public final void testAdd() { boolean result = false; // Languages ICLanguage langIn = new CLanguage(LANG_TEST, "Test Language"); result = resolver.removeLanguage(langIn); assertFalse(result); result = resolver.addLanguage(langIn); assertTrue(result); ICLanguage langOut = resolver.getLanguageById(LANG_TEST); assertNotNull(langOut); assertEquals(langIn, langOut); // File types ICFileType th = new CFileType(FT_TEST_HEADER, langIn, "Test Language Header", ICFileType.TYPE_HEADER); ICFileType ts = new CFileType(FT_TEST_SOURCE, langIn, "Test Language Source", ICFileType.TYPE_SOURCE); ICFileType tu = new CFileType(FT_TEST_WHASAT, langIn, "Test Language Unknown", ICFileType.TYPE_UNKNOWN); // -- header result = resolver.removeFileType(th); assertFalse(result); result = resolver.addFileType(th); assertTrue(result); ICFileType thOut = resolver.getFileTypeById(FT_TEST_HEADER); assertNotNull(thOut); assertEquals(th, thOut); // -- source result = resolver.removeFileType(ts); assertFalse(result); result = resolver.addFileType(ts); assertTrue(result); ICFileType tsOut = resolver.getFileTypeById(FT_TEST_SOURCE); assertNotNull(tsOut); assertEquals(ts, tsOut); // -- unknown result = resolver.removeFileType(tu); assertFalse(result); result = resolver.addFileType(tu); assertTrue(result); ICFileType tuOut = resolver.getFileTypeById(FT_TEST_WHASAT); assertNotNull(tuOut); assertEquals(tu, tuOut); // File type associations ICFileTypeAssociation tha = new CFileTypeAssociation("*.aest", th); ICFileTypeAssociation tsa = new CFileTypeAssociation("*.test", th); ICFileTypeAssociation tua = new CFileTypeAssociation("*.zest", th); // -- header result = resolver.removeFileTypeAssociation(tha); assertFalse(result); result = resolver.addFileTypeAssociation(tha); assertTrue(result); ICFileType thaOut = resolver.getFileType("file.aest"); assertNotNull(thaOut); assertEquals(tha.getType(), thaOut); // -- source result = resolver.removeFileTypeAssociation(tsa); assertFalse(result); result = resolver.addFileTypeAssociation(tsa); assertTrue(result); ICFileType tsaOut = resolver.getFileType("file.test"); assertNotNull(tsaOut); assertEquals(tsa.getType(), tsaOut); // -- unknown result = resolver.removeFileTypeAssociation(tua); assertFalse(result); result = resolver.addFileTypeAssociation(tua); assertTrue(result); ICFileType tuaOut = resolver.getFileType("file.zest"); assertNotNull(tuaOut); assertEquals(tua.getType(), tuaOut); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/285254ad4e9bc51ea2483287742812f092c60d3b/ResolverTests.java/buggy/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/filetype/tests/ResolverTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1842,
986,
1435,
288,
202,
202,
6494,
563,
273,
629,
31,
9506,
202,
759,
511,
5443,
9506,
202,
2871,
3779,
3303,
382,
273,
394,
385,
3779,
12,
10571,
67,
16961,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1842,
986,
1435,
288,
202,
202,
6494,
563,
273,
629,
31,
9506,
202,
759,
511,
5443,
9506,
202,
2871,
3779,
3303,
382,
273,
394,
385,
3779,
12,
10571,
67,
16961,
16,
... |
public boolean equals(Object o) { assert o instanceof Range; Range rhs = (Range) o; return rhs.lo == lo && rhs.hi == hi; } | public abstract boolean equals(Object o); | public boolean equals(Object o) { assert o instanceof Range; Range rhs = (Range) o; return rhs.lo == lo && rhs.hi == hi; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/55eeb4921f8e95dcf2bd0aa0d38d776bfe05ff3b/Range.java/clean/x10.runtime/src/x10/array/Range.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1606,
12,
921,
320,
13,
288,
202,
202,
11231,
320,
1276,
8086,
31,
202,
202,
2655,
7711,
273,
261,
2655,
13,
320,
31,
202,
202,
2463,
7711,
18,
383,
422,
437,
597,
771... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1606,
12,
921,
320,
13,
288,
202,
202,
11231,
320,
1276,
8086,
31,
202,
202,
2655,
7711,
273,
261,
2655,
13,
320,
31,
202,
202,
2463,
7711,
18,
383,
422,
437,
597,
771... |
return Map.getSpaceForAddress(address) != null; | return Map.getSpaceForAddress(address) != null && Mmapper.addressIsMapped(address); | public static final boolean isMappedAddress(Address address) throws InlinePragma { return Map.getSpaceForAddress(address) != null; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/4eedf794c439fbd5145b70510d9d15f141da4b7f/Space.java/buggy/MMTk/src/org/mmtk/policy/Space.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
727,
1250,
353,
12868,
1887,
12,
1887,
1758,
13,
1377,
1216,
16355,
2050,
9454,
288,
565,
327,
1635,
18,
588,
3819,
1290,
1887,
12,
2867,
13,
480,
446,
597,
490,
13919,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
727,
1250,
353,
12868,
1887,
12,
1887,
1758,
13,
1377,
1216,
16355,
2050,
9454,
288,
565,
327,
1635,
18,
588,
3819,
1290,
1887,
12,
2867,
13,
480,
446,
597,
490,
13919,
18,
2... |
new Object[] { attValue }, | new Object[] { attValue}, | private void validateDTDattribute(QName element, String attValue, XMLAttributeDecl attributeDecl) throws XNIException { switch (attributeDecl.simpleType.type) { case XMLSimpleType.TYPE_ENTITY: { // NOTE: Save this information because invalidStandaloneAttDef boolean isAlistAttribute = attributeDecl.simpleType.list; try { if (isAlistAttribute) { fValENTITIES.validate(attValue, null); } else { fValENTITY.validate(attValue, null); } } catch (InvalidDatatypeValueException ex) { String key = ex.getKeyIntoReporter(); fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, key, new Object[]{ ex.getMessage()}, XMLErrorReporter.SEVERITY_ERROR ); } break; } case XMLSimpleType.TYPE_NOTATION: case XMLSimpleType.TYPE_ENUMERATION: { boolean found = false; String [] enumVals = attributeDecl.simpleType.enumeration; if (enumVals == null) { found = false; } else for (int i = 0; i < enumVals.length; i++) { if (attValue == enumVals[i] || attValue.equals(enumVals[i])) { found = true; break; } } if (!found) { StringBuffer enumValueString = new StringBuffer(); if (enumVals != null) for (int i = 0; i < enumVals.length; i++) { enumValueString.append(enumVals[i]+" "); } fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "MSG_ATTRIBUTE_VALUE_NOT_IN_LIST", new Object[]{attributeDecl.name.rawname, attValue, enumValueString}, XMLErrorReporter.SEVERITY_ERROR); } break; } case XMLSimpleType.TYPE_ID: { try { fValID.validate(attValue, null); } catch (InvalidDatatypeValueException ex) { String key = ex.getKeyIntoReporter(); fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, key, new Object[] { ex.getMessage() }, XMLErrorReporter.SEVERITY_ERROR ); } break; } case XMLSimpleType.TYPE_IDREF: { boolean isAlistAttribute = attributeDecl.simpleType.list;//Caveat - Save this information because invalidStandaloneAttDef try { if (isAlistAttribute) { //System.out.println("values = >>" + value + "<<" ); fValIDRefs.validate(attValue, null); } else { fValIDRef.validate(attValue, null); } } catch (InvalidDatatypeValueException ex) { String key = ex.getKeyIntoReporter(); if (key == null){ key = "IDREFSInvalid"; } fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, key, new Object[]{ ex.getMessage()}, XMLErrorReporter.SEVERITY_ERROR ); } break; } case XMLSimpleType.TYPE_NMTOKEN: { boolean isAlistAttribute = attributeDecl.simpleType.list;//Caveat - Save this information because invalidStandaloneAttDef //changes fTempAttDef try { if (isAlistAttribute) { fValNMTOKENS.validate(attValue, null); } else { fValNMTOKEN.validate(attValue, null); } } catch (InvalidDatatypeValueException ex) { if (isAlistAttribute){ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "NMTOKENSInvalid", new Object[] { attValue }, XMLErrorReporter.SEVERITY_ERROR); } else { fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "NMTOKENInvalid", new Object[] { attValue }, XMLErrorReporter.SEVERITY_ERROR); } } break; } } // switch } // validateDTDattribute(QName,String,XMLAttributeDecl) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/1281996de10d3af1b51f0b4d78cfcd75d8ade6fe/XMLDTDValidator.java/clean/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1954,
25728,
4589,
12,
13688,
930,
16,
514,
2403,
620,
16,
4766,
1377,
3167,
1499,
3456,
1566,
3456,
13,
540,
1216,
1139,
50,
45,
503,
288,
3639,
1620,
261,
4589,
3456,
18,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1954,
25728,
4589,
12,
13688,
930,
16,
514,
2403,
620,
16,
4766,
1377,
3167,
1499,
3456,
1566,
3456,
13,
540,
1216,
1139,
50,
45,
503,
288,
3639,
1620,
261,
4589,
3456,
18,
9... |
resLength = val.numberLength + 1; resDigits = new int[resLength]; BitLevel.setTrueCoded(valNeg, val.numberLength); bitOperation(resDigits, that.digits, val.numberLength, valNeg, val.numberLength, 3); resDigits[resLength - 1] = -1; | if (that.sign > 0) { return orDiffSigns(that, val); } else if (that.getFirstNonzeroDigit() > val.getFirstNonzeroDigit()) { return orNegative(that, val); } else { return orNegative(val, that); | static BigInteger or(BigInteger val, BigInteger that) { if (that.sign == 0) { return val; } if (val.sign == 0) { return that; } int resSign = (val.sign | that.sign); int resLength; int resDigits[]; int valNeg[] = null; int thatNeg[] = null; // some cases when either val or that is negative if ((val.sign < 0) || (that.sign < 0)) { if (val.sign < 0) { valNeg = new int[val.numberLength]; System.arraycopy(val.digits, 0, valNeg, 0, val.numberLength); } if (that.sign < 0) { thatNeg = new int[that.numberLength]; System.arraycopy(that.digits, 0, thatNeg, 0, that.numberLength); } if ((val.sign < 0) && (that.sign < 0)) { // both are negative int orLen = Math.min(val.numberLength, that.numberLength); resLength = orLen + 1; resDigits = new int[resLength]; BitLevel.setTrueCoded(valNeg, orLen); BitLevel.setTrueCoded(thatNeg, orLen); bitOperation(resDigits, valNeg, orLen, thatNeg, orLen, 3); resDigits[resLength - 1] = -1; } else { if (val.numberLength > that.numberLength) { // val is longer than that if (val.sign > 0) { // val is positive and that is negative resLength = that.numberLength + 1; resDigits = new int[resLength]; BitLevel.setTrueCoded(thatNeg, that.numberLength); bitOperation(resDigits, val.digits, that.numberLength, thatNeg, that.numberLength, 3); resDigits[resLength - 1] = -1; } else { // val is negative and that is positive resLength = val.numberLength; resDigits = new int[resLength]; BitLevel.setTrueCoded(valNeg, val.numberLength); bitOperation(resDigits, valNeg, val.numberLength, that.digits, that.numberLength, 3); } } else { // that is longer than val if (val.sign > 0) { // val is positive and that is negative resLength = that.numberLength; // + 1? resDigits = new int[resLength]; BitLevel.setTrueCoded(thatNeg, that.numberLength); bitOperation(resDigits, thatNeg, that.numberLength, val.digits, val.numberLength, 3); } else { // that is positive and val is negative resLength = val.numberLength + 1; resDigits = new int[resLength]; BitLevel.setTrueCoded(valNeg, val.numberLength); bitOperation(resDigits, that.digits, val.numberLength, valNeg, val.numberLength, 3); resDigits[resLength - 1] = -1; } } } } else { // cases when both numbers are positive and // either val or that is negative but both are of the same length resLength = Math.max(val.numberLength, that.numberLength); resDigits = new int[resLength]; if (val.numberLength >= that.numberLength) { bitOperation(resDigits, (valNeg == null) ? val.digits : valNeg, val.numberLength, (thatNeg == null) ? that.digits : thatNeg, that.numberLength, 3); } else { bitOperation(resDigits, (thatNeg == null) ? that.digits : thatNeg, that.numberLength, (valNeg == null) ? val.digits : valNeg, val.numberLength, 3); } } if (resSign < 0) { BitLevel.setTrueCoded(resDigits, resLength); } BigInteger result = new BigInteger(resSign, resLength, resDigits); result.cutOffLeadingZeroes(); return result; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/60fc441485c7a022bf610dfb0c986e395a2545d7/Logical.java/clean/modules/math/src/main/java/java/math/Logical.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
10246,
578,
12,
24198,
1244,
16,
10246,
716,
13,
288,
3639,
309,
261,
19056,
18,
2977,
422,
374,
13,
288,
5411,
327,
1244,
31,
3639,
289,
3639,
309,
261,
1125,
18,
2977,
422,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
10246,
578,
12,
24198,
1244,
16,
10246,
716,
13,
288,
3639,
309,
261,
19056,
18,
2977,
422,
374,
13,
288,
5411,
327,
1244,
31,
3639,
289,
3639,
309,
261,
1125,
18,
2977,
422,
374,
... |
jj_la1[47] = jj_gen; | jj_la1[48] = jj_gen; | final public void Initializer() throws ParseException { /*@bgen(jjtree) Initializer */ ASTInitializer jjtn000 = new ASTInitializer(this, JJTINITIALIZER); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); jjtn000.setStatic(); break; default: jj_la1[47] = jj_gen; ; } Block(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/ac9207dcb7a8bbf54f85da7f1bdae7d7162b86b3/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
4378,
3926,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
4378,
3926,
1195,
225,
9183,
14729,
10684,
5088,
3784,
273,
394,
9183,
14729,
12,
2211,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
4378,
3926,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
4378,
3926,
1195,
225,
9183,
14729,
10684,
5088,
3784,
273,
394,
9183,
14729,
12,
2211,
16,
... |
public Number border() { Number result=(Number) (hasBinding("border") ? valueForBinding("border") : null); | public Object border() { Object result = (hasBinding("border") ? valueForBinding("border") : null); | public Number border() { Number result=(Number) (hasBinding("border") ? valueForBinding("border") : null); if (result==null) result=ERXConstant.OneInteger; return result; } | 22541 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22541/89163a329eed911e5f63645efa3eb6481627b166/ERXTableWithBorder.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXTableWithBorder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3588,
5795,
1435,
288,
3639,
3588,
563,
28657,
1854,
13,
261,
5332,
5250,
2932,
8815,
7923,
692,
460,
1290,
5250,
2932,
8815,
7923,
294,
446,
1769,
3639,
309,
261,
2088,
631,
2011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3588,
5795,
1435,
288,
3639,
3588,
563,
28657,
1854,
13,
261,
5332,
5250,
2932,
8815,
7923,
692,
460,
1290,
5250,
2932,
8815,
7923,
294,
446,
1769,
3639,
309,
261,
2088,
631,
2011,
... |
recordProcessor.writeRecordHeader( offset, totalWritten, recordLength, first_record ); | recordProcessor.writeRecordHeader( offset, totalWritten, recordDataLength, first_record ); | private void serializeLargeRecord( int record_size, int record_length_index, byte[] buffer, int offset ) { startOfSST = offset; byte[] stringReminant = null; int stringIndex = 0; boolean lastneedcontinue = false; boolean first_record = true; int totalWritten = 0; while ( totalWritten != record_size ) { int recordLength = ( (Integer) recordLengths.get( record_length_index++ ) ).intValue(); RecordProcessor recordProcessor = new RecordProcessor( buffer, recordLength, numStrings, numUniqueStrings ); // write the appropriate header startOfRecord = offset + totalWritten; recordProcessor.writeRecordHeader( offset, totalWritten, recordLength, first_record ); first_record = false; // now, write the rest of the data into the current // record space if ( lastneedcontinue ) { lastneedcontinue = stringReminant.length > recordProcessor.getAvailable(); // the last string in the previous record was not written out completely stringReminant = recordProcessor.writeStringRemainder( lastneedcontinue, stringReminant, offset, totalWritten ); } // last string's remnant, if any, is cleaned up as best as can be done ... now let's try and write // some more strings for ( ; stringIndex < strings.size(); stringIndex++ ) { UnicodeString unistr = getUnicodeString( stringIndex ); if (stringIndex % ExtSSTRecord.DEFAULT_BUCKET_SIZE == 0) { int index = stringIndex / ExtSSTRecord.DEFAULT_BUCKET_SIZE; if (index < ExtSSTRecord.MAX_BUCKETS) { bucketAbsoluteOffsets[index] = offset + totalWritten + recordProcessor.getRecordOffset() - startOfSST; bucketRelativeOffsets[index] = offset + totalWritten + recordProcessor.getRecordOffset() - startOfRecord; } } if ( unistr.getRecordSize() <= recordProcessor.getAvailable() ) { recordProcessor.writeWholeString( unistr, offset, totalWritten ); } else { // can't write the entire string out if ( recordProcessor.getAvailable() >= SSTRecord.STRING_MINIMAL_OVERHEAD ) { // we can write some of it stringReminant = recordProcessor.writePartString( unistr, offset, totalWritten ); lastneedcontinue = true; stringIndex++; } break; } } totalWritten += recordLength + SSTRecord.STD_RECORD_OVERHEAD; } } | 509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/0a8cadc08a7d67e35548506b36f8b03872d6c415/SSTSerializer.java/clean/src/java/org/apache/poi/hssf/record/SSTSerializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4472,
20020,
2115,
12,
509,
1409,
67,
1467,
16,
509,
1409,
67,
2469,
67,
1615,
16,
1160,
8526,
1613,
16,
509,
1384,
262,
565,
288,
3639,
787,
951,
55,
882,
273,
1384,
31,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4472,
20020,
2115,
12,
509,
1409,
67,
1467,
16,
509,
1409,
67,
2469,
67,
1615,
16,
1160,
8526,
1613,
16,
509,
1384,
262,
565,
288,
3639,
787,
951,
55,
882,
273,
1384,
31,
3... |
public final Scriptable construct(Context arg0, Scriptable arg1, Object[] arg2) throws JavaScriptException { | public final Scriptable construct( final Context arg0, final Scriptable arg1, final Object[] arg2) throws JavaScriptException { | public final Scriptable construct(Context arg0, Scriptable arg1, Object[] arg2) throws JavaScriptException { return null; } | 3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/bfbb9e2a2e54bf7040308f5f0b4fd744c80370c8/ElementArray.java/clean/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/ElementArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
22780,
4872,
12,
1042,
1501,
20,
16,
22780,
1501,
21,
16,
1033,
8526,
1501,
22,
13,
565,
1216,
11905,
503,
288,
3639,
327,
446,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
727,
22780,
4872,
12,
1042,
1501,
20,
16,
22780,
1501,
21,
16,
1033,
8526,
1501,
22,
13,
565,
1216,
11905,
503,
288,
3639,
327,
446,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,... |
assertFalse("Node Modifications have not been flushed after Node.refresh(false)", testNode1Session1.hasNodes()); | assertFalse("Node Modifications have not been flushed after Node.refresh(false)", testNode1Session1.hasNodes()); | public void testRefreshBooleanFalse() throws RepositoryException { // get default workspace test root node using superuser session Node defaultRootNode = (Node) superuser.getItem(testRootNode.getPath()); // create a node Node testNode1Session1 = defaultRootNode.addNode(nodeName1, testNodeType); // create a second node Node testNode2Session1 = defaultRootNode.addNode(nodeName2, testNodeType); // save the new nodes defaultRootNode.save(); // add child node to test node 1 using session 1 testNode1Session1.addNode(nodeName2, testNodeType); // get session 2 Session session2 = helper.getReadWriteSession(); // get the second node Node testNode2Session2 = (Node) session2.getItem(testNode2Session1.getPath()); // adds a child node testNode2Session2.addNode(nodeName3, testNodeType); // save the changes session2.save(); // call refresh on session 1 defaultRootNode.refresh(false); // check if session 1 flag has been cleared assertFalse("Session should have no pending changes recorded after Node.refresh(false)!", superuser.hasPendingChanges()); // check if added child node for node 1 by session 1 has been removed assertFalse("Node Modifications have not been flushed after Node.refresh(false)", testNode1Session1.hasNodes()); // check if added child node for node 2 by session 2 has become visible in session 1 assertTrue("Node modified by a different session has not been updated after Node.refresh(false)", testNode2Session1.hasNodes()); } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/a70220ce21821950174edcf6b4370f7215d33b9f/NodeTest.java/buggy/src/test/org/apache/jackrabbit/test/api/NodeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
8323,
5507,
8381,
1435,
1216,
13367,
288,
3639,
368,
336,
805,
6003,
1842,
1365,
756,
1450,
2240,
1355,
1339,
3639,
2029,
805,
29658,
273,
261,
907,
13,
2240,
1355,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
8323,
5507,
8381,
1435,
1216,
13367,
288,
3639,
368,
336,
805,
6003,
1842,
1365,
756,
1450,
2240,
1355,
1339,
3639,
2029,
805,
29658,
273,
261,
907,
13,
2240,
1355,
18,
5... |
item.setEnabled(false); | interruptOnlyItems.add(item); } else { runOnlyItems.add(item); | Menubar(DebugGui debugGui) { super(); this.debugGui = debugGui; String[] fileItems = {"Open...", "Run...", "", "Exit"}; String[] fileCmds = {"Open", "Load", "", "Exit"}; char[] fileShortCuts = {'0', 'N', '\0', 'X'}; int[] fileAccelerators = {KeyEvent.VK_O, KeyEvent.VK_N, 0, KeyEvent.VK_Q}; String[] editItems = {"Cut", "Copy", "Paste", "Go to function..."}; char[] editShortCuts = {'T', 'C', 'P', 'F'}; String[] debugItems = {"Break", "Go", "Step Into", "Step Over", "Step Out"}; char[] debugShortCuts = {'B', 'G', 'I', 'O', 'T'}; String[] plafItems = {"Metal", "Windows", "Motif"}; char [] plafShortCuts = {'M', 'W', 'F'}; int[] debugAccelerators = {KeyEvent.VK_PAUSE, KeyEvent.VK_F5, KeyEvent.VK_F11, KeyEvent.VK_F7, KeyEvent.VK_F8, 0, 0}; JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic('F'); JMenu editMenu = new JMenu("Edit"); editMenu.setMnemonic('E'); JMenu plafMenu = new JMenu("Platform"); plafMenu.setMnemonic('P'); JMenu debugMenu = new JMenu("Debug"); debugMenu.setMnemonic('D'); windowMenu = new JMenu("Window"); windowMenu.setMnemonic('W'); for (int i = 0; i < fileItems.length; ++i) { if (fileItems[i].length() == 0) { fileMenu.addSeparator(); } else { JMenuItem item = new JMenuItem(fileItems[i], fileShortCuts[i]); item.setActionCommand(fileCmds[i]); item.addActionListener(this); fileMenu.add(item); if (fileAccelerators[i] != 0) { KeyStroke k = KeyStroke.getKeyStroke(fileAccelerators[i], Event.CTRL_MASK); item.setAccelerator(k); } } } for (int i = 0; i < editItems.length; ++i) { JMenuItem item = new JMenuItem(editItems[i], editShortCuts[i]); item.addActionListener(this); editMenu.add(item); } for (int i = 0; i < plafItems.length; ++i) { JMenuItem item = new JMenuItem(plafItems[i], plafShortCuts[i]); item.addActionListener(this); plafMenu.add(item); } for (int i = 0; i < debugItems.length; ++i) { JMenuItem item = new JMenuItem(debugItems[i], debugShortCuts[i]); item.addActionListener(this); if (debugAccelerators[i] != 0) { KeyStroke k = KeyStroke.getKeyStroke(debugAccelerators[i], 0); item.setAccelerator(k); } if (i != 0) { item.setEnabled(false); } debugMenu.add(item); } breakOnExceptions = new JCheckBoxMenuItem("Break on Exceptions"); breakOnExceptions.setMnemonic('X'); breakOnExceptions.addActionListener(this); breakOnExceptions.setSelected(false); debugMenu.add(breakOnExceptions); breakOnEnter = new JCheckBoxMenuItem("Break on Function Enter"); breakOnEnter.setMnemonic('E'); breakOnEnter.addActionListener(this); breakOnEnter.setSelected(false); debugMenu.add(breakOnEnter); breakOnReturn = new JCheckBoxMenuItem("Break on Function Return"); breakOnReturn.setMnemonic('R'); breakOnReturn.addActionListener(this); breakOnReturn.setSelected(false); debugMenu.add(breakOnReturn); add(fileMenu); add(editMenu); //add(plafMenu); add(debugMenu); JMenuItem item; windowMenu.add(item = new JMenuItem("Cascade", 'A')); item.addActionListener(this); windowMenu.add(item = new JMenuItem("Tile", 'T')); item.addActionListener(this); windowMenu.addSeparator(); windowMenu.add(item = new JMenuItem("Console", 'C')); item.addActionListener(this); add(windowMenu); } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/012fd059015fa654428b0b45979a41d4b4108437/DebugGui.java/clean/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/DebugGui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
490,
275,
373,
297,
12,
2829,
18070,
1198,
18070,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
4148,
18070,
273,
1198,
18070,
31,
3639,
514,
8526,
585,
3126,
225,
273,
12528,
3678,
7070,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
490,
275,
373,
297,
12,
2829,
18070,
1198,
18070,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
4148,
18070,
273,
1198,
18070,
31,
3639,
514,
8526,
585,
3126,
225,
273,
12528,
3678,
7070,
16,... |
InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkMulticast(addr); else s.checkConnect(addr.getHostAddress(), p.getPort()); | InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkMulticast(addr); else s.checkConnect(addr.getHostAddress(), p.getPort()); | public void send(DatagramPacket p) throws IOException { // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null) { InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkMulticast(addr); else s.checkConnect(addr.getHostAddress(), p.getPort()); } // FIXME: if this is a subclass of MulticastSocket, // use getTimeToLive for TTL val. impl.send(p); } | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/36e953e19158aa2f7e16ad8534450b58f07fea36/DatagramSocket.java/buggy/libjava/java/net/DatagramSocket.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1366,
12,
5139,
17049,
6667,
293,
13,
1216,
1860,
225,
288,
565,
368,
24387,
21,
18,
22,
30,
7615,
1404,
741,
4373,
4271,
309,
2987,
353,
5840,
31,
2621,
525,
2883,
21,
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,
282,
1071,
918,
1366,
12,
5139,
17049,
6667,
293,
13,
1216,
1860,
225,
288,
565,
368,
24387,
21,
18,
22,
30,
7615,
1404,
741,
4373,
4271,
309,
2987,
353,
5840,
31,
2621,
525,
2883,
21,
18,
... |
taskSummaryEditor.init(this.getEditorSite(), this.getEditorInput()); taskSummaryEditor.setTask(task); | taskInfoEditor.init(this.getEditorSite(), this.getEditorInput()); taskInfoEditor.setTask(task); | public void init(IEditorSite site, IEditorInput input) throws PartInitException { taskEditorInput = (TaskEditorInput) input; super.init(site, input); setSite(site); site.setSelectionProvider(new TaskEditorSelectionProvider(this)); /* * The task data is saved only once, at the initialization of the * editor. This is then passed to each of the child editors. This way, * only one instance of the task data is stored for each editor opened. */ task = taskEditorInput.getTask(); try { taskSummaryEditor.init(this.getEditorSite(), this.getEditorInput()); taskSummaryEditor.setTask(task); // Set the title on the editor's tab this.setPartName(taskEditorInput.getLabel()); } catch (Exception e) { throw new PartInitException(e.getMessage()); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b380ea052e535a9796ce74a73e94c971859b45d0/MylarTaskEditor.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/MylarTaskEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
12,
45,
6946,
4956,
2834,
16,
467,
6946,
1210,
810,
13,
1216,
6393,
2570,
503,
288,
202,
202,
4146,
6946,
1210,
273,
261,
2174,
6946,
1210,
13,
810,
31,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
12,
45,
6946,
4956,
2834,
16,
467,
6946,
1210,
810,
13,
1216,
6393,
2570,
503,
288,
202,
202,
4146,
6946,
1210,
273,
261,
2174,
6946,
1210,
13,
810,
31,
202,
202,
... |
if((result == null) || !isAutoUpdateAllowed || hasBeenBlown) | Logger.minor(this, "Update() called"); if((result == null) || hasBeenBlown) { Logger.minor(this, "Returning: result="+result+", isAutoUpdateAllowed="+isAutoUpdateAllowed+", hasBeenBlown="+hasBeenBlown); | public synchronized void Update(){ if((result == null) || !isAutoUpdateAllowed || hasBeenBlown) return; this.revocationDNFCounter = 0; this.finalCheck = true; this.queueFetchRevocation(100); while(revocationDNFCounter < 3) { if(this.hasBeenBlown) { Logger.error(this, "The revocation key has been found on the network : blocking auto-update"); return; } try { wait(100*1000); } catch (InterruptedException e) { // Ignore } } Logger.normal(this, "Update in progress"); try{ ArrayBucket bucket = (ArrayBucket) result.asBucket(); byte[] data = bucket.toByteArray(); File f = new File("freenet-cvs-snapshot.jar.new"); f.delete(); FileOutputStream fos = new FileOutputStream(f); fos.write(data); fos.flush(); fos.close(); System.out.println("################## File written! "+cg.getURI().getSuggestedEdition()+ " " +f.getAbsolutePath()); File f2 = new File("freenet-cvs-snapshot.jar"); f2.delete(); if(f.renameTo(f2)){ if(node.getNodeStarter()!=null) node.getNodeStarter().restart(); else{ System.out.println("New version has been downloaded: please restart your node!"); node.exit(); } }else System.out.println("ERROR renaming the file!"); }catch(Exception e){ Logger.error(this, "Error while updating the node : "+e); System.out.println("Exception : "+e); e.printStackTrace(); } } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/6f21340eca1c1c262cd376ecf14bd03d2fc8caeb/NodeUpdater.java/clean/src/freenet/node/updater/NodeUpdater.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
2315,
1435,
95,
202,
202,
430,
12443,
2088,
422,
446,
13,
747,
401,
291,
4965,
1891,
5042,
747,
711,
25931,
38,
821,
82,
13,
1082,
202,
2463,
31,
202,
202,
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,
225,
202,
482,
3852,
918,
2315,
1435,
95,
202,
202,
430,
12443,
2088,
422,
446,
13,
747,
401,
291,
4965,
1891,
5042,
747,
711,
25931,
38,
821,
82,
13,
1082,
202,
2463,
31,
202,
202,
2211,
... |
public GVTLineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc); | public GVTLineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc); | public GVTLineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc); | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/4869183dd452b1d4d6d9508ed6ab36070c6f2b0c/GVTFont.java/buggy/sources/org/apache/batik/gvt/font/GVTFont.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
611,
58,
56,
1670,
5653,
9851,
5653,
12,
3001,
8526,
5230,
16,
509,
30929,
16,
509,
1800,
16,
4766,
1377,
10063,
3420,
1042,
284,
1310,
1769,
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,
377,
1071,
611,
58,
56,
1670,
5653,
9851,
5653,
12,
3001,
8526,
5230,
16,
509,
30929,
16,
509,
1800,
16,
4766,
1377,
10063,
3420,
1042,
284,
1310,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
canvas.scrollTo(0, 0); | public void run() { canvas.scrollTo(0, 0); canvas.setContents(figure); } | 4785 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4785/f1ff17c10f26593171720cbf13bc7cc2316aa3e5/GraphWindow.java/buggy/src/net/ggtools/grand/ui/widgets/GraphWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
1171,
9079,
5953,
18,
542,
6323,
12,
19675,
1769,
5411,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
1171,
9079,
5953,
18,
542,
6323,
12,
19675,
1769,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if( sm_logger.isLoggable( Level.FINER ) ) | if( sm_logger.isLoggingEnterExitLevel() ) | private boolean supportsNamedResults() throws DataException { String methodName = "supportsNamedResults"; sm_logger.entering( sm_className, methodName ); if( m_supportsNamedResults != UNKNOWN ) { boolean ret = ( m_supportsNamedResults == TRUE ); if( sm_logger.isLoggable( Level.FINER ) ) sm_logger.exiting( sm_className, methodName, Boolean.valueOf( ret ) ); return ret; } // else it's unknown right now boolean b = m_connection.getMetaData( m_dataSetType ).supportsNamedResultSets( ); m_supportsNamedResults = b ? TRUE : FALSE; if( sm_logger.isLoggable( Level.FINER ) ) sm_logger.exiting( sm_className, methodName, Boolean.valueOf( b ) ); return b; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/2ac885878a23bee92cd501683619a083c7b0e41d/PreparedStatement.java/clean/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/odaconsumer/PreparedStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
6146,
7604,
3447,
1435,
1216,
1910,
503,
202,
95,
202,
202,
780,
4918,
273,
315,
28064,
7604,
3447,
14432,
202,
202,
4808,
67,
4901,
18,
2328,
310,
12,
3029,
67,
12434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
6146,
7604,
3447,
1435,
1216,
1910,
503,
202,
95,
202,
202,
780,
4918,
273,
315,
28064,
7604,
3447,
14432,
202,
202,
4808,
67,
4901,
18,
2328,
310,
12,
3029,
67,
12434,
... |
for (int nX = 0; nX < sortedCategories.length; nX ++) { Category cat = ((CategoryNode)sortedCategories[nX]).getCategory(); | for (int nX = 0; nX < flatArray.length; nX ++) { Category cat = ((CategoryNode)flatArray[nX]).getCategory(); | private void finishCategories() { // If no categories just return. if (deferCategories == null) return; // Sort categories by flattened name. CategoryNode [] flatArray = new CategoryNode[deferCategories.size()]; for (int i=0; i < deferCategories.size(); i++) { flatArray[i] = new CategoryNode((Category)deferCategories.get(i)); } // @issue replace with Collection sort? Sorter sorter = new Sorter() { private Collator collator = Collator.getInstance(); public boolean compare(Object o1, Object o2) { String s1 = ((CategoryNode)o1).getPath(); String s2 = ((CategoryNode)o2).getPath(); return collator.compare(s2, s1) > 0; } }; Object [] sortedCategories = sorter.sort(flatArray); // Add each category. for (int nX = 0; nX < sortedCategories.length; nX ++) { Category cat = ((CategoryNode)sortedCategories[nX]).getCategory(); finishCategory(cat); } // Cleanup. deferCategories = null;} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/0fa35df3b822ccc8ca5e89821fdb912a9a5695b5/NewWizardsRegistryReader.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/registry/NewWizardsRegistryReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
4076,
10487,
1435,
288,
202,
759,
971,
1158,
6477,
2537,
327,
18,
202,
430,
261,
18974,
10487,
422,
446,
13,
202,
202,
2463,
31,
202,
759,
5928,
6477,
635,
14171,
508,
18,
202,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
4076,
10487,
1435,
288,
202,
759,
971,
1158,
6477,
2537,
327,
18,
202,
430,
261,
18974,
10487,
422,
446,
13,
202,
202,
2463,
31,
202,
759,
5928,
6477,
635,
14171,
508,
18,
202,
44... |
for (int n = _position - 1; n-- > 0;) { | final int pos = _position; for (int n = pos - 1; n-- > 0;) { | public int next() { if (_ready && _position > 0) { _ready = false; // skip N-1 nodes for (int n = _position - 1; n-- > 0;) { if (_source.next() == NodeIterator.END) { return NodeIterator.END; } } return _source.next(); } return NodeIterator.END; } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/706695bb745afd0f8ce5340c5e9a23c2e11db914/NthIterator.java/buggy/src/org/apache/xalan/xsltc/dom/NthIterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1024,
1435,
288,
202,
430,
261,
67,
1672,
597,
389,
3276,
405,
374,
13,
288,
202,
565,
389,
1672,
273,
629,
31,
202,
565,
368,
2488,
423,
17,
21,
2199,
202,
565,
364,
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,
509,
1024,
1435,
288,
202,
430,
261,
67,
1672,
597,
389,
3276,
405,
374,
13,
288,
202,
565,
389,
1672,
273,
629,
31,
202,
565,
368,
2488,
423,
17,
21,
2199,
202,
565,
364,
261,
... |
Sequence r = whereExpr.eval(context, docs, contextSequence); if (r.effectiveBooleanValue()) return r; else return Sequence.EMPTY_SEQUENCE; | NodeSet result = new ExtArrayNodeSet(); int p = 0; context.setContextPosition(0); for (SequenceIterator i = contextSequence.iterate(); i.hasNext(); p++) { Item item = i.nextItem(); context.setContextPosition(p); Sequence innerSeq = whereExpr.eval(docs, contextSequence, item); if (innerSeq.effectiveBooleanValue()) result.add(item); } return result; | protected Sequence applyWhereExpression( StaticContext context, DocumentSet docs, Sequence contextSequence) throws XPathException { whereExpr.setInPredicate(true); if (Type.subTypeOf(whereExpr.returnsType(), Type.NODE)) { // if the where expression returns a node set, check the context // node of each node in the set NodeSet temp = whereExpr.eval(context, docs, contextSequence).toNodeSet(); LOG.debug("found " + temp.getLength()); NodeProxy current; ContextItem contextNode; NodeProxy next; DocumentImpl lastDoc = null; int count = 0, sizeHint = -1; NodeSet result = new ExtArrayNodeSet(); for (Iterator i = temp.iterator(); i.hasNext(); count++) { current = (NodeProxy) i.next(); if (lastDoc == null || current.doc != lastDoc) { lastDoc = current.doc; sizeHint = temp.getSizeHint(lastDoc); } contextNode = current.getContext(); if (contextNode == null) { throw new XPathException("Internal evaluation error: context node is missing!"); } while (contextNode != null) { next = contextNode.getNode(); next.addMatches(current.match); if (!result.contains(next)) result.add(next, sizeHint); contextNode = contextNode.getNextItem(); } } return result; } else { // general where clause: just check the effective boolean value Sequence r = whereExpr.eval(context, docs, contextSequence); if (r.effectiveBooleanValue()) return r; else return Sequence.EMPTY_SEQUENCE; } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/991914fac6d8ec32704e1e021ab6bf8707ee56ec/BindingExpression.java/buggy/src/org/exist/xpath/BindingExpression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8370,
2230,
5262,
2300,
12,
202,
202,
5788,
1042,
819,
16,
202,
202,
2519,
694,
3270,
16,
202,
202,
4021,
819,
4021,
13,
202,
202,
15069,
10172,
503,
288,
202,
202,
6051,
474... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8370,
2230,
5262,
2300,
12,
202,
202,
5788,
1042,
819,
16,
202,
202,
2519,
694,
3270,
16,
202,
202,
4021,
819,
4021,
13,
202,
202,
15069,
10172,
503,
288,
202,
202,
6051,
474... |
dialog.setPreferredSize(new Dimension(500, 150)); | private void jbInit() throws Exception { setIconImage(Env.getImage("mProcess.gif")); // dialog.setLayout(mainLayout); bOK.addActionListener(this); bPrint.addActionListener(this); // southPanel.setLayout(southLayout); southLayout.setAlignment(FlowLayout.RIGHT); dialog.setPreferredSize(new Dimension(500, 150)); message.setContentType("text/html"); message.setEditable(false); message.setBackground(AdempierePLAF.getFieldBackground_Inactive()); message.setFocusable(false); getContentPane().add(dialog); dialog.add(southPanel, BorderLayout.SOUTH); southPanel.add(bPrint, null); southPanel.add(bOK, null); dialog.add(messagePane, BorderLayout.CENTER); // this.getRootPane().setDefaultButton(bOK); } // jbInit | 50520 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50520/498ca4a5dc68f9bd083032fb4c41762d1b282231/ProcessDialog.java/clean/client/src/org/compiere/apps/ProcessDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
20515,
2570,
1435,
1216,
1185,
202,
95,
202,
202,
542,
5554,
2040,
12,
3491,
18,
588,
2040,
2932,
81,
2227,
18,
13905,
7923,
1769,
202,
202,
759,
202,
202,
12730,
18,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
20515,
2570,
1435,
1216,
1185,
202,
95,
202,
202,
542,
5554,
2040,
12,
3491,
18,
588,
2040,
2932,
81,
2227,
18,
13905,
7923,
1769,
202,
202,
759,
202,
202,
12730,
18,
54... | |
private UserTransaction startUserTransaction() { if (wrapInUserTransaction == false) { | private UserTransaction startUserTransaction() { if (wrapInUserTransaction == false) { | private UserTransaction startUserTransaction() { if (wrapInUserTransaction == false) { return null; } UserTransaction userTransaction = null; try { userTransaction = UserTransactionHelper.lookupUserTransaction(); userTransaction.begin(); } catch (Throwable t) { UserTransactionHelper.returnUserTransaction(userTransaction); userTransaction = null; getLog().error("Failed to start UserTransaction for plugin: " + getName(), t); } return userTransaction; } | 15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/f6eeea5a952e67d6b7fc8b54ae64d0b9e7098a98/SchedulerPluginWithUserTransactionSupport.java/buggy/src/java/org/quartz/plugins/SchedulerPluginWithUserTransactionSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2177,
3342,
787,
1299,
3342,
1435,
565,
288,
3639,
309,
261,
4113,
382,
1299,
3342,
422,
629,
13,
3639,
288,
5411,
327,
446,
31,
3639,
289,
7734,
2177,
3342,
729,
3342,
273,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2177,
3342,
787,
1299,
3342,
1435,
565,
288,
3639,
309,
261,
4113,
382,
1299,
3342,
422,
629,
13,
3639,
288,
5411,
327,
446,
31,
3639,
289,
7734,
2177,
3342,
729,
3342,
273,
446,
... |
heredoc_restore(); | int hereDocument() { HereDocNode here = (HereDocNode) lex_strterm; char c; String eos = here.getValue(); long len = eos.length(); int func = here.getFunc(); boolean indent = (func & STR_FUNC_INDENT) != 0; StringBuffer str = new StringBuffer(); if ((c = support.read()) == EOF) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } if (was_bol() && whole_match_p(eos, indent)) { heredoc_restore(); return Token.tSTRING_END; } if ((func & STR_FUNC_EXPAND) == 0) { if (c == '\n') { support.unread(); } int lastLineLength = here.getLastLineLength(); if (lastLineLength > 0) { // It looks like I needed to append last line as well... support.unreadMany(here.getLastLineLength()); str.append(support.readLine()); str.append("\n"); } do { str.append(support.readLine()); str.append("\n"); if (support.isEOF()) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } } while (!whole_match_p(eos, indent)); } else { newToken(); if (c == '#') { switch (c = support.read()) { case '$': case '@': support.unread(); return Token.tSTRING_DVAR; case '{': return Token.tSTRING_DBEG; } tokadd('#'); } support.unread(); do { if ((c = tokadd_string(new StrTermNode(support.getPosition(), func, '\n', 0))) == EOF) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } if (c != '\n') { yaccValue = tok(); return Token.tSTRING_CONTENT; } tokadd(support.read()); if ((c = support.read()) == EOF) { rb_compile_error("can't find string \"" + eos + "\" anywhere before EOF"); heredoc_restore(); lex_strterm = null; return 0; } // We need to pushback so when whole match looks it did not // lose a char during last EOF support.unread(); } while (!whole_match_p(eos, indent)); str = new StringBuffer(tok()); } //heredoc_restore(); lex_strterm = new StrTermNode(support.getPosition(), -1, 0, 0); yaccValue = str.toString(); return Token.tSTRING_CONTENT; } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/e3f1342402481ba0beeee24e139dfeaf1f0125a8/RubyYaccLexer.java/clean/src/org/jruby/lexer/yacc/RubyYaccLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
316,
1136,
329,
504,
67,
13991,
5621,
2674,
2519,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
22336,
329,
504,
67,
13991,
5621,
316,
1136,
329,
504,
67,
13991,
5621,
2674,
2519,
1435,
... | |
if (messageReadWrite) | if (bodyWriteOnly) | private void checkRead() throws JMSException { if (messageReadWrite) { throw new MessageNotReadableException("readByte while the buffer is writeonly"); } // We have just received/reset() the message, and the client is trying to // read it if (istream == null || m == null) { if (log.isTraceEnabled()) { log.trace("internalArray:" + internalArray); } istream = new ByteArrayInputStream(internalArray); m = new DataInputStream(istream); } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/f7221d281ba7a07fb4ac87aab18e01ea4018e629/JBossBytesMessage.java/clean/src/main/org/jboss/jms/message/JBossBytesMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
866,
1994,
1435,
1216,
20343,
282,
288,
1377,
309,
261,
3432,
3067,
3386,
13,
1377,
288,
540,
604,
394,
2350,
1248,
14151,
503,
2932,
896,
3216,
1323,
326,
1613,
353,
1045,
370... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
866,
1994,
1435,
1216,
20343,
282,
288,
1377,
309,
261,
3432,
3067,
3386,
13,
1377,
288,
540,
604,
394,
2350,
1248,
14151,
503,
2932,
896,
3216,
1323,
326,
1613,
353,
1045,
370... |
protected void initMenus() { int menuShortcut = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); // These are currently not used./* KeyStroke ctrlMinus = KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, menuShortcut); KeyStroke ctrlEquals = KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, menuShortcut); KeyStroke f3 = KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0); KeyStroke altLeft = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.ALT_MASK); KeyStroke altRight = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.ALT_MASK);*/ // ------------------------------------- File Menu initMenuFile(menuShortcut); // ------------------------------------- Edit Menu initMenuEdit(menuShortcut); // ------------------------------------- View Menu initMenuView(menuShortcut); // ------------------------------------- Create Menu initMenuCreate(); // ------------------------------------- Arrange Menu initMenuArrange(); // ------------------------------------- Generation Menu initMenuGeneration(); // ------------------------------------- Critique Menu initMenuCritique(); // ------------------------------------- Tools Menu initMenuTools(); // ------------------------------------- Help Menu initMenuHelp(); ArgoEventPump.addListener(ArgoEventTypes.ANY_MODULE_EVENT, this); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/3f8cef8e048f8f5d92a6acc4a8970542cd2c274b/GenericArgoMenuBar.java/buggy/src_new/org/argouml/ui/cmd/GenericArgoMenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
29755,
1435,
288,
3639,
509,
3824,
15576,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
588,
4599,
15576,
653,
5796,
5621,
3639,
368,
8646,
854,
4551,
486,
1399,
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,
918,
1208,
29755,
1435,
288,
3639,
509,
3824,
15576,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
588,
4599,
15576,
653,
5796,
5621,
3639,
368,
8646,
854,
4551,
486,
1399,
18,
... | ||
return resolution; | return resolution; | public Resolution intercept(ExecutionContext context) throws Exception { LifecycleStage stage = context.getLifecycleStage(); ActionBeanContext abc = context.getActionBeanContext(); String event = abc == null ? null : abc.getEventName(); Resolution resolution = null; // Run @Before methods, as long as there's a bean to run them on if (context.getActionBean() != null) { ActionBean bean = context.getActionBean(); FilterMethods filterMethods = getFilterMethods(bean.getClass()); List<Method> beforeMethods = filterMethods.getBeforeMethods(stage); for (Method method : beforeMethods) { String[] on = method.getAnnotation(Before.class).on(); if (event == null || CollectionUtil.applies(on, event)) { resolution = invoke(bean, method, stage, Before.class); if (resolution != null) { return resolution; } } } } // Continue on and execute other filters and the lifecycle code resolution = context.proceed(); // Run After filter methods (if any) ActionBean bean = context.getActionBean(); FilterMethods filterMethods = getFilterMethods(bean.getClass()); List<Method> afterMethods = filterMethods.getAfterMethods(stage); // Re-get the event name in case we're executing after handler resolution // in which case the name will have been null before, and non-null now event = abc == null ? null : abc.getEventName(); Resolution overrideResolution = null; for (Method method : afterMethods) { String[] on = method.getAnnotation(After.class).on(); if (event == null || CollectionUtil.applies(on, event)) { overrideResolution = invoke(bean, method, stage, After.class); if (overrideResolution != null) { return overrideResolution; } } } return resolution; } | 9306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9306/af80a348dda5027f70b0eb9cfb2583959647ec01/BeforeAfterMethodInterceptor.java/clean/stripes/src/net/sourceforge/stripes/controller/BeforeAfterMethodInterceptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
24933,
10883,
12,
3210,
1042,
819,
13,
1216,
1185,
288,
202,
202,
9977,
8755,
6009,
273,
819,
18,
588,
9977,
8755,
5621,
3639,
4382,
3381,
1042,
20011,
273,
819,
18,
588,
1803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
24933,
10883,
12,
3210,
1042,
819,
13,
1216,
1185,
288,
202,
202,
9977,
8755,
6009,
273,
819,
18,
588,
9977,
8755,
5621,
3639,
4382,
3381,
1042,
20011,
273,
819,
18,
588,
1803,
... |
setReturnCode(CANCEL); close(); } | setReturnCode(CANCEL); close(); } | protected void handleShellCloseEvent() { setReturnCode(CANCEL); close(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/981750d591ad92d3cf184a5ea61ad6b63139a974/Window.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1640,
13220,
4605,
1133,
1435,
288,
3639,
444,
990,
1085,
12,
25268,
1769,
3639,
1746,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1640,
13220,
4605,
1133,
1435,
288,
3639,
444,
990,
1085,
12,
25268,
1769,
3639,
1746,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void markForDisposal() { // Decrement the request count (negative number means dispose) synchronized(this) { this.requestCount--; } if (this.requestCount < 0) { // No more users : dispose right now dispose(); } } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/c787c9db6ca1bdd57cf2923006f3cf1b375910d1/ConcreteTreeProcessor.java/clean/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2267,
1290,
1669,
8016,
1435,
288,
202,
202,
759,
31073,
475,
326,
590,
1056,
261,
13258,
1300,
4696,
15825,
13,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
2211,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2267,
1290,
1669,
8016,
1435,
288,
202,
202,
759,
31073,
475,
326,
590,
1056,
261,
13258,
1300,
4696,
15825,
13,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
2211,
18,
... | ||
return super.isEnabled( ) && getSelectedElement() instanceof ReportItemHandle; | return super.isEnabled( ) && getSelectedElement( ) instanceof ReportItemHandle && !(getSelectedElement().getContainer() instanceof SimpleMasterPageHandle); | public boolean isEnabled( ) { return super.isEnabled( ) && getSelectedElement() instanceof ReportItemHandle; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/cbd5d8da15bbbbfb6f685d32f52cc55c77297835/CreatePlaceHolderAction.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/views/actions/CreatePlaceHolderAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
12047,
12,
262,
202,
95,
202,
202,
2463,
2240,
18,
291,
1526,
12,
262,
597,
16625,
1046,
1435,
1276,
8706,
1180,
3259,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
12047,
12,
262,
202,
95,
202,
202,
2463,
2240,
18,
291,
1526,
12,
262,
597,
16625,
1046,
1435,
1276,
8706,
1180,
3259,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
_t = __t661; | _t = __t665; | public final void compile_append(AST _t) throws RecognitionException { AST compile_append_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t659 = _t; AST tmp2090_AST_in = (AST)_t; match(_t,APPEND); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EQUAL: { AST __t661 = _t; AST tmp2091_AST_in = (AST)_t; match(_t,EQUAL); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t661; _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t659; _t = _t.getNextSibling(); _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,
4074,
67,
6923,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4074,
67,
6923,
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,
4074,
67,
6923,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4074,
67,
6923,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
... |
int scrollRightIndex = getScrollRightIndex(table); if (scrollRightIndex < table.getColumnCount()) { table.changeSelection(currentRow, scrollRightIndex, false, true); } else { table.changeSelection(currentRow, table.getColumnCount() - 1, false, true); | if (table.isEditing()) { table.getCellEditor().stopCellEditing(); } else if (table.editCellAt(currentRow, currentColumn)) { table.getEditorComponent().requestFocus(); | protected void processRowColumn(final JTable table, final int currentRow, final int currentColumn) { int scrollRightIndex = getScrollRightIndex(table); if (scrollRightIndex < table.getColumnCount()) { table.changeSelection(currentRow, scrollRightIndex, false, true); } else { table.changeSelection(currentRow, table.getColumnCount() - 1, false, true); } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/9b00f971bab2256d913aec1b141462a929f6e182/BasicTableKeyboardActions.java/buggy/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableKeyboardActions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
1207,
1999,
1494,
12,
6385,
804,
1388,
1014,
16,
727,
509,
31185,
16,
727,
509,
783,
1494,
13,
288,
5411,
509,
5532,
4726,
1016,
273,
11971,
2693,
4726,
1016,
12,
2121,
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,
540,
4750,
918,
1207,
1999,
1494,
12,
6385,
804,
1388,
1014,
16,
727,
509,
31185,
16,
727,
509,
783,
1494,
13,
288,
5411,
509,
5532,
4726,
1016,
273,
11971,
2693,
4726,
1016,
12,
2121,
1769,
... |
recruit.getHintedRecruitmentValue(hintSectionUsed)); | ghrv(recruit, legion, hintSectionUsed)); | private Creature getBestRecruitmentOneTurnAhead(LegionInfo legion, MasterHex hex, List recruits) { Creature recruit = (Creature)recruits.get(recruits.size() - 1); String basic = recruit.getName(); int r[] = getNumberAndPVForBestNextTurnRecruitment(legion,hex,recruit); // say the best we can do ATM is either what we can recruit next // turn, or the value of the recruit itself; int maxPV = ((r[0] == (1 + legion.numCreature(recruit))) ? r[1] : recruit.getHintedRecruitmentValue(hintSectionUsed)); Iterator it = recruits.iterator(); while (it.hasNext()) { Creature base = (Creature)it.next(); r = getNumberAndPVForBestNextTurnRecruitment(legion,hex,base); if ((r[0] == (1 + legion.numCreature(base))) && (r[1] > maxPV) && (base != recruit)) { // by recruiting one more "base", we could have a better // recruit next turn than what our best this turn could do. // So we recruit. Example: instead of recruiting a 18pts // Gorgon we'll get a third Cyclops if the 24pts Behemoth // is in range. Ditto for the third Lion/Troll if we can // reach a Griffon/Wywern (20/21pts) instead of a 16pts // ranger. OTOH, in a variant were the ranger can recruit, // we might take the ranger anyway (it its recruit is // better than a Griffon or Wywern). recruit = base; maxPV = r[1]; } } if (!(basic.equals(recruit.getName()))) { Log.debug("GRAPH: (" + hex.getLabel() + ") OneTurnAhead suggest recruiting " + recruit.getName() +" instead of " + basic + " because we can get better next turn"); } return recruit; } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/b64fc344bdfa99cc0c172ea3378e2ae44ee6db3b/SimpleAI.java/buggy/Colossus/net/sf/colossus/client/SimpleAI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5799,
1231,
28782,
426,
3353,
14945,
475,
3335,
15858,
24250,
12,
8329,
285,
966,
4553,
285,
16,
4766,
5397,
13453,
7037,
3827,
16,
4766,
10792,
987,
1950,
8653,
1282,
13,
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,
3238,
5799,
1231,
28782,
426,
3353,
14945,
475,
3335,
15858,
24250,
12,
8329,
285,
966,
4553,
285,
16,
4766,
5397,
13453,
7037,
3827,
16,
4766,
10792,
987,
1950,
8653,
1282,
13,
565,
288,
... |
queue.clear(); } | mesList.clear(); } | public void run() { if (trace) { log.trace("running connection consumer"); } try { LinkedList queue = new LinkedList(); while (true) { if (closed) { if (trace) { log.trace("Connection consumer is closed, breaking"); } break; } if (queue.isEmpty()) { // Remove up to maxMessages messages from the consumer for (int i = 0; i < maxMessages; i++) { // receiveNoWait if (trace) { log.trace(this + " attempting to get message with receiveNoWait"); } Message m = null; if (!closed) { m = cons.receive(-1); } if (m == null) { if (trace) { log.trace("receiveNoWait did not retrieve any message"); } break; } if (trace) { log.trace("receiveNoWait got message " + m + " adding to queue"); } queue.addLast(m); } if (queue.isEmpty()) { // We didn't get any messages doing receiveNoWait, so let's wait. This returns if // a message is received or by the consumer closing. if (trace) { log.trace(this + " attempting to get message with blocking receive (no timeout)"); } Message m = null; if (!closed) { m = cons.receive(0); } if (m != null) { if (trace) { log.trace("receive (no timeout) got message " + m + " adding to queue"); } queue.addLast(m); } else { // The consumer must have closed if (trace) { log.trace("blocking receive returned null, consumer must have closed"); } break; } } } if (!queue.isEmpty()) { if (trace) { log.trace("there are " + queue.size() + " messages to send to session"); } ServerSession serverSession = serverSessionPool.getServerSession(); JBossSession session = (JBossSession)serverSession.getSession(); MessageListener listener = session.getMessageListener(); if (listener == null) { // Sanity check if (trace) { log.trace(this + ": session " + session + " did not have a set MessageListener"); } } for (int i = 0; i < queue.size(); i++) { MessageProxy m = (MessageProxy)queue.get(i); session.addAsfMessage(m, consumerID, cons); if (trace) { log.trace("added " + m + " to session"); } } if (trace) { log.trace(this + " starting serverSession " + serverSession); } serverSession.start(); if (trace) { log.trace(this + "'s serverSession processed messages"); } queue.clear(); } } if (trace) { log.trace("ConnectionConsumer run() exiting"); } } catch (JMSException e) { //Receive interrupted - ignore } catch (Throwable t) { log.error("Caught Throwable in processing run()", t); } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/07e374de7de6b7e5b2cc24cb9721dda2c85d257e/JBossConnectionConsumer.java/buggy/src/main/org/jboss/jms/client/JBossConnectionConsumer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1086,
1435,
282,
288,
1377,
309,
261,
5129,
13,
288,
613,
18,
5129,
2932,
8704,
1459,
4765,
8863,
289,
1377,
775,
1377,
288,
540,
10688,
2389,
273,
394,
10688,
5621,
540,
1323,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
282,
288,
1377,
309,
261,
5129,
13,
288,
613,
18,
5129,
2932,
8704,
1459,
4765,
8863,
289,
1377,
775,
1377,
288,
540,
10688,
2389,
273,
394,
10688,
5621,
540,
1323,... |
addChangeToList(readChange(changeNode), list); | list.addChange(readChange(changeNode)); | public void readExternal(Element element) throws InvalidDataException { final List<Element> listNodes = (List<Element>)element.getChildren(NODE_LIST); for (Element listNode : listNodes) { // workaround for loading incorrect settings (with duplicate changelist names) final String changeListName = listNode.getAttributeValue(ATT_NAME); LocalChangeList list = findChangeList(changeListName); if (list == null) { list = addChangeList(changeListName, listNode.getAttributeValue(ATT_COMMENT)); } final List<Element> changeNodes = (List<Element>)listNode.getChildren(NODE_CHANGE); for (Element changeNode : changeNodes) { try { addChangeToList(readChange(changeNode), list); } catch (OutdatedFakeRevisionException e) { // Do nothing. Just skip adding outdated revisions to the list. } } if (ATT_VALUE_TRUE.equals(listNode.getAttributeValue(ATT_DEFAULT))) { setDefaultChangeList(list); } if (ATT_VALUE_TRUE.equals(listNode.getAttributeValue(ATT_READONLY))) { list.setReadOnly(true); } } if (myChangeLists.size() > 0 && myDefaultChangelist == null) { setDefaultChangeList(myChangeLists.get(0)); } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/76927d3bce85543dca96e11474392ca317d3f68f/ChangeListManagerImpl.java/buggy/source/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
855,
6841,
12,
1046,
930,
13,
1216,
1962,
22480,
288,
565,
727,
987,
32,
1046,
34,
666,
3205,
273,
261,
682,
32,
1046,
23429,
2956,
18,
588,
4212,
12,
8744,
67,
7085,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
855,
6841,
12,
1046,
930,
13,
1216,
1962,
22480,
288,
565,
727,
987,
32,
1046,
34,
666,
3205,
273,
261,
682,
32,
1046,
23429,
2956,
18,
588,
4212,
12,
8744,
67,
7085,
1769,
... |
protected QueryOperation getQueryOperation(boolean truth) { DBQueryOperation op = DBQueryOperation.Create(); truth = calcTruth(truth); long highest = -1, lowest = -1; switch (getQueryType()) { case ZimbraQueryParser.BIGGER: highest = -1; lowest = mSize; break; case ZimbraQueryParser.SMALLER: highest = mSize; lowest = -1; break; case ZimbraQueryParser.SIZE: highest = mSize; lowest = mSize; break; default: assert(false); } op.addSizeClause(lowest, highest, truth); return op; } | 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,
540,
4750,
2770,
2988,
6041,
2988,
12,
6494,
16512,
13,
540,
288,
5411,
2383,
1138,
2988,
1061,
273,
2383,
1138,
2988,
18,
1684,
5621,
13491,
16512,
273,
7029,
1070,
795,
12,
313,
795,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
2770,
2988,
6041,
2988,
12,
6494,
16512,
13,
540,
288,
5411,
2383,
1138,
2988,
1061,
273,
2383,
1138,
2988,
18,
1684,
5621,
13491,
16512,
273,
7029,
1070,
795,
12,
313,
795,
1769,
1... | ||
_loop476: | _loop475: | public final void balancedTokens() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST balancedTokens_AST = null; { _loop476: do { if ((_tokenSet_32.member(LA(1)))) { balancedBrackets(); } else if ((_tokenSet_33.member(LA(1)))) { { match(_tokenSet_33); } } else { break _loop476; } } while (true); } returnAST = balancedTokens_AST; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/402b6bb60ff460172ee2d793373e0aa52b284687/GroovyRecognizer.java/buggy/src/main/org/codehaus/groovy/antlr/parser/GroovyRecognizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
11013,
72,
5157,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
11013,
72,
5157,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
2... |
iVisitor.visitFlip2Node(this); | iVisitor.visitFlipNode(this); | public void accept(NodeVisitor iVisitor) { iVisitor.visitFlip2Node(this); } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/d31a76ee29d5978a9bec41e3ac9134cee024bcab/FlipNode.java/buggy/org/jruby/nodes/FlipNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2791,
12,
907,
7413,
277,
7413,
13,
288,
3639,
277,
7413,
18,
11658,
28535,
907,
12,
2211,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2791,
12,
907,
7413,
277,
7413,
13,
288,
3639,
277,
7413,
18,
11658,
28535,
907,
12,
2211,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
catch (TypeCheckError e) { ErrorMsg errorMsg = e.getErrorMsg(); if (errorMsg == null) { | catch (TypeCheckError e) { ErrorMsg errorMsg = e.getErrorMsg(); if (errorMsg == null) { | public Type typeCheck(SymbolTable stable) throws TypeCheckError { if (_type != null) return _type; final String namespace = _fname.getNamespace(); final String local = _fname.getLocalPart(); if (isExtension()) { _fname = new QName(null, null, local); return typeCheckStandard(stable); } else if (isStandard()) { return typeCheckStandard(stable); } // Handle extension functions (they all have a namespace) else { try { // GTM: namespace = http://xml.apache.org/xslt/java _className = getClassNameFromUri(namespace); final int pos = local.lastIndexOf('.'); if (pos > 0) { _className = _className + local.substring(0, pos); _fname = new QName(namespace, null, local.substring(pos + 1)); } else { _fname = new QName(namespace, null, local); } return typeCheckExternal(stable); } catch (TypeCheckError e) { ErrorMsg errorMsg = e.getErrorMsg(); if (errorMsg == null) { final String name = _fname.getLocalPart(); errorMsg = new ErrorMsg(ErrorMsg.METHOD_NOT_FOUND_ERR, name); } getParser().reportError(ERROR, errorMsg); return _type = Type.Void; } } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/47232583afae3c38e775458b08f99814218b34af/FunctionCall.java/buggy/src/org/apache/xalan/xsltc/compiler/FunctionCall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1412,
618,
1564,
12,
5335,
1388,
14114,
13,
225,
202,
15069,
1412,
1564,
668,
377,
288,
202,
430,
261,
67,
723,
480,
446,
13,
327,
389,
723,
31,
202,
6385,
514,
1981,
273,
389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1412,
618,
1564,
12,
5335,
1388,
14114,
13,
225,
202,
15069,
1412,
1564,
668,
377,
288,
202,
430,
261,
67,
723,
480,
446,
13,
327,
389,
723,
31,
202,
6385,
514,
1981,
273,
389,
... |
BlockFormattingContext bfc = c.getBlockFormattingContext(); if (bfc != null) { float width = bfc.getWidth(); float height = bfc.getHeight(); | public static void paintBackground(Context c, Box box) { Box block = box; // cache the background color //no sense getBackgroundColor(c); // get the css properties CalculatedStyle style = c.getCurrentStyle(); String back_image = style.getStringProperty(CSSName.BACKGROUND_IMAGE); block.repeat = style.getIdent(CSSName.BACKGROUND_REPEAT); block.attachment = style.getIdent(CSSName.BACKGROUND_ATTACHMENT); // load the background image block.background_image = null; int backImageWidth = 0; int backImageHeight = 0; if (back_image != null && !"none".equals(back_image)) { try { block.background_image = c.getCtx().getUac().getImage(back_image); block.background_uri = back_image; backImageWidth = block.background_image.getWidth(null); backImageHeight = block.background_image.getHeight(null); } catch (Exception ex) { ex.printStackTrace(); Uu.p(ex); } } // handle image positioning issues // need to update this to support vert and horz, not just vert BlockFormattingContext bfc = c.getBlockFormattingContext(); if (bfc != null) {//this is not the root block float width = bfc.getWidth(); float height = bfc.getHeight(); Point pt = style.getBackgroundPosition(width - backImageWidth, height - backImageHeight, c.getCtx()); block.background_position_horizontal = (int) pt.getX(); block.background_position_vertical = (int) pt.getY(); } // actually paint the background BackgroundPainter.paint(c, block); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0bcb35d367c0f0b2a89eb6aabedfe9807525ad3a/BoxRendering.java/buggy/src/java/org/xhtmlrenderer/render/BoxRendering.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
12574,
8199,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
8549,
1203,
273,
3919,
31,
3639,
368,
1247,
326,
5412,
2036,
3639,
368,
2135,
12764,
336,
21699,
12,
71,
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,
760,
918,
12574,
8199,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
8549,
1203,
273,
3919,
31,
3639,
368,
1247,
326,
5412,
2036,
3639,
368,
2135,
12764,
336,
21699,
12,
71,
1769,
... | |
return false; | throw ioe; | public boolean saveSettings() { boolean successful = apply(); if (successful) { try { DrJava.CONFIG.saveConfiguration(); } catch (IOException ioe) { JOptionPane.showMessageDialog(this, "Could not save changes to your '.drjava' file \n" + "in your home directory.\n\n" + ioe, "Could Not Save Changes", JOptionPane.ERROR_MESSAGE); return false; } } return successful; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/577b4a8bad3187067d1f7c3df5ccf6c439482a05/ConfigFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/config/ConfigFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1923,
2628,
1435,
288,
565,
1250,
6873,
273,
2230,
5621,
565,
309,
261,
18418,
13,
288,
1377,
775,
288,
3639,
11473,
5852,
18,
7203,
18,
5688,
1750,
5621,
1377,
289,
1377,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
1923,
2628,
1435,
288,
565,
1250,
6873,
273,
2230,
5621,
565,
309,
261,
18418,
13,
288,
1377,
775,
288,
3639,
11473,
5852,
18,
7203,
18,
5688,
1750,
5621,
1377,
289,
1377,
104... |
private String[] getProgramArguments(ILaunchConfiguration configuration) throws CoreException { ArrayList programArgs = new ArrayList(); // If a product is specified, then add it to the program args if (configuration.getAttribute(USE_PRODUCT, false)) { programArgs.add("-product"); //$NON-NLS-1$ programArgs.add(configuration.getAttribute(PRODUCT, "")); //$NON-NLS-1$ } else { // specify the application to launch programArgs.add("-application"); //$NON-NLS-1$ programArgs.add(configuration.getAttribute(APPLICATION, LauncherUtils.getDefaultApplicationName())); } // specify the workspace location for the runtime workbench String targetWorkspace = configuration.getAttribute(LOCATION + "0", LauncherUtils.getDefaultPath().append("runtime-workbench-workspace").toOSString()); //$NON-NLS-1$ //$NON-NLS-2$ programArgs.add("-data"); //$NON-NLS-1$ programArgs.add(targetWorkspace); boolean isOSGI = PDECore.getDefault().getModelManager().isOSGiRuntime(); if (configuration.getAttribute(USEFEATURES, false)) { validateFeatures(); IPath installPath = PDEPlugin.getWorkspace().getRoot().getLocation(); programArgs.add("-install"); //$NON-NLS-1$ programArgs.add("file:" + installPath.removeLastSegments(1).addTrailingSeparator().toString()); //$NON-NLS-1$ programArgs.add("-update"); //$NON-NLS-1$ } else { TreeMap pluginMap = LauncherUtils.getPluginsToRun(configuration); if (pluginMap == null) return null; String primaryFeatureId = LauncherUtils.getPrimaryFeatureId(); TargetPlatform.createPlatformConfigurationArea( pluginMap, getConfigDir(configuration), primaryFeatureId, ReportLauncherUtils.getAutoStartPlugins(configuration)); programArgs.add("-configuration"); //$NON-NLS-1$ if (isOSGI) programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$ else programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).append("platform.cfg").toString()); //$NON-NLS-1$ //$NON-NLS-2$ if (!isOSGI) { if (primaryFeatureId != null) { programArgs.add("-feature"); //$NON-NLS-1$ programArgs.add(primaryFeatureId); } IPluginModelBase bootModel = (IPluginModelBase)pluginMap.get("org.eclipse.core.boot"); //$NON-NLS-1$ String bootPath = LauncherUtils.getBootPath(bootModel); if (bootPath != null && !bootPath.endsWith(".jar")) { //$NON-NLS-1$ programArgs.add("-boot"); //$NON-NLS-1$ programArgs.add("file:" + bootPath); //$NON-NLS-1$ } } } // add the output folder names programArgs.add("-dev"); //$NON-NLS-1$ if (PDECore.getDefault().getModelManager().isOSGiRuntime()) programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigDir(configuration).toString() + "/dev.properties", true)); //$NON-NLS-1$ else programArgs.add(ClasspathHelper.getDevEntries(true)); // necessary for PDE to know how to load plugins when target platform = host platform // see PluginPathFinder.getPluginPaths() programArgs.add("-pdelaunch"); //$NON-NLS-1$ // add tracing, if turned on if (configuration.getAttribute(TRACING, false) && !TRACING_NONE.equals(configuration.getAttribute(TRACING_CHECKED, (String) null))) { programArgs.add("-debug"); //$NON-NLS-1$ programArgs.add( LauncherUtils.getTracingFileArgument( configuration, getConfigDir(configuration).toString() + Path.SEPARATOR + ".options")); //$NON-NLS-1$ } // add the program args specified by the user StringTokenizer tokenizer = new StringTokenizer(configuration.getAttribute(PROGARGS, "")); //$NON-NLS-1$ while (tokenizer.hasMoreTokens()) { programArgs.add(tokenizer.nextToken()); } // show splash only if we are launching the default application boolean showSplash = true; int index = programArgs.indexOf("-application"); //$NON-NLS-1$ if (index != -1 && index <= programArgs.size() - 2) { if (!programArgs.get(index + 1).equals(LauncherUtils.getDefaultApplicationName())) { showSplash = false; } } if (showSplash && !programArgs.contains("-nosplash")) { //$NON-NLS-1$ programArgs.add(0, "-showsplash"); //$NON-NLS-1$ programArgs.add(1, computeShowsplashArgument()); } return (String[])programArgs.toArray(new String[programArgs.size()]); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/84984bdff51060b92abfead47bb784698b54f38d/ReportLaunchConfigurationDelegate.java/buggy/UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/ui/launcher/ReportLaunchConfigurationDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
8526,
3570,
3295,
4628,
12,
2627,
4760,
1750,
1664,
13,
1216,
30015,
288,
202,
202,
19558,
5402,
2615,
273,
394,
2407,
5621,
9506,
202,
759,
971,
279,
3017,
353,
1269,
16,
1508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
8526,
3570,
3295,
4628,
12,
2627,
4760,
1750,
1664,
13,
1216,
30015,
288,
202,
202,
19558,
5402,
2615,
273,
394,
2407,
5621,
9506,
202,
759,
971,
279,
3017,
353,
1269,
16,
1508... | ||
asm.emitCMPI (reg, 0); | asm.emitCMPI (reg, NEEDS_DYNAMIC_LINK); | private void emitDynamicLinkingSequence(int reg, VM_MemberReference ref, boolean couldBeZero) { int memberId = ref.getId(); int memberOffset = memberId << LOG_BYTES_IN_INT; int tableOffset = VM_Entrypoints.memberOffsetsField.getOffset(); if (couldBeZero) { int resolverOffset = VM_Entrypoints.resolveMemberMethod.getOffset(); int label = asm.getMachineCodeIndex(); // load offset table asm.emitLAddrToc (reg, tableOffset); asm.emitLWZoffset(reg, reg, memberOffset); // test for non-zero offset and branch around call to resolver asm.emitCMPI (reg, 0); // reg ?= 0, is field's class loaded? VM_ForwardReference fr1 = asm.emitForwardBC(NE); asm.emitLAddrToc (T0, resolverOffset); asm.emitMTCTR (T0); asm.emitLVAL(T0, memberId); // id of member we are resolving asm.emitBCCTRL (); // link; will throw exception if link error asm.emitB (label); // go back and try again fr1.resolve(asm); } else { // load offset table asm.emitLAddrToc (reg, tableOffset); asm.emitLWZoffset(reg, reg, memberOffset); } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/fae9eb341c70d1a6982f4a5246a042e6e7f82fce/VM_Compiler.java/buggy/rvm/src/vm/arch/powerPC/compilers/baseline/VM_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
3626,
9791,
2098,
310,
4021,
12,
474,
960,
16,
8251,
67,
4419,
2404,
1278,
16,
1250,
3377,
1919,
7170,
13,
288,
565,
509,
3140,
548,
273,
1278,
18,
26321,
5621,
565,
509,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3626,
9791,
2098,
310,
4021,
12,
474,
960,
16,
8251,
67,
4419,
2404,
1278,
16,
1250,
3377,
1919,
7170,
13,
288,
565,
509,
3140,
548,
273,
1278,
18,
26321,
5621,
565,
509,
314... |
String temp[] = ( new ExecutionArguments( configuration.getAttribute( "vmargs", "" ), "" ) ).getVMArgumentsArray( ); | String temp[] = ( new ExecutionArguments( configuration.getAttribute( "vmargs", "" ), "" ) ).getVMArgumentsArray( ); | private String[] getVMArguments( ILaunchConfiguration configuration ) throws CoreException { String temp[] = ( new ExecutionArguments( configuration.getAttribute( "vmargs", "" ), "" ) ).getVMArgumentsArray( ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String path = configuration.getAttribute( IMPORTPROJECT, "" ); //$NON-NLS-1$ String append = "-D" + PROJECT_NAMES_KEY + "=" + path; //$NON-NLS-1$ //$NON-NLS-2$ String projectClassPaths = finder.getClassPath( configuration .getAttribute( IMPORTPROJECTNAMES, "" ) ); //$NON-NLS-1$ String classPath = ""; //$NON-NLS-1$ // String sourcePath = ""; if ( projectClassPaths != null && projectClassPaths.length( ) != 0 ) { classPath = "-D" + PROJECT_CLASSPATH_KEY + "=" + projectClassPaths; //$NON-NLS-1$ //$NON-NLS-2$ } if ( temp == null ) { temp = ( new String[] { append, classPath } ); } else { List list = new ArrayList( ); int size = temp.length; for ( int i = 0; i < size; i++ ) list.add( temp[i] ); list.add( append ); list.add( classPath ); temp = ( String[] ) list.toArray( temp ); } return temp; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/93f83d28c012c9318e61bf947b01279cec0512a3/ReportLaunchConfigurationDelegate.java/clean/UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/ui/launcher/ReportLaunchConfigurationDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
8526,
336,
7397,
4628,
12,
467,
9569,
1750,
1664,
262,
1082,
202,
15069,
30015,
202,
95,
202,
202,
780,
1906,
8526,
273,
261,
394,
8687,
4628,
12,
1664,
18,
588,
1499,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
8526,
336,
7397,
4628,
12,
467,
9569,
1750,
1664,
262,
1082,
202,
15069,
30015,
202,
95,
202,
202,
780,
1906,
8526,
273,
261,
394,
8687,
4628,
12,
1664,
18,
588,
1499,
1... |
public org.quickfix.field.UnderlyingRedemptionDate getUnderlyingRedemptionDate() throws FieldNotFound { org.quickfix.field.UnderlyingRedemptionDate value = new org.quickfix.field.UnderlyingRedemptionDate(); | public quickfix.field.UnderlyingRedemptionDate getUnderlyingRedemptionDate() throws FieldNotFound { quickfix.field.UnderlyingRedemptionDate value = new quickfix.field.UnderlyingRedemptionDate(); | public org.quickfix.field.UnderlyingRedemptionDate getUnderlyingRedemptionDate() throws FieldNotFound { org.quickfix.field.UnderlyingRedemptionDate value = new org.quickfix.field.UnderlyingRedemptionDate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderList.java/clean/src/java/src/quickfix/fix44/NewOrderList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
426,
19117,
375,
1626,
10833,
765,
6291,
426,
19117,
375,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
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,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
426,
19117,
375,
1626,
10833,
765,
6291,
426,
19117,
375,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18... |
Connection connection = getConnection(); Query query = connection.parseQuery( "with member [Measures].[Rendite] as " + nl + " '(([Measures].[Store Sales] - [Measures].[Store Cost])) / [Measures].[Store Cost]'," + nl + " format_string = iif(([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost] * 100 > " + nl + " Parameter (\"UpperLimit\", NUMERIC, 151, \"Obere Grenze\"), " + nl + " \"|#.00%|arrow='up'\"," + nl + " iif(([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost] * 100 < " + nl + " Parameter(\"LowerLimit\", NUMERIC, 150, \"Untere Grenze\")," + nl + " \"|#.00%|arrow='down'\"," + nl + " \"|#.00%|arrow='right'\"))" + nl + "select {[Measures].members} on columns" + nl + "from Sales"); final String s = query.toString(); | Connection connection = getConnection(); Query query = connection.parseQuery( "with member [Measures].[Rendite] as " + nl + " '(([Measures].[Store Sales] - [Measures].[Store Cost])) / [Measures].[Store Cost]'," + nl + " format_string = iif(([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost] * 100 > " + nl + " Parameter (\"UpperLimit\", NUMERIC, 151, \"Obere Grenze\"), " + nl + " \"|#.00%|arrow='up'\"," + nl + " iif(([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost] * 100 < " + nl + " Parameter(\"LowerLimit\", NUMERIC, 150, \"Untere Grenze\")," + nl + " \"|#.00%|arrow='down'\"," + nl + " \"|#.00%|arrow='right'\"))" + nl + "select {[Measures].members} on columns" + nl + "from Sales"); final String s = query.toString(); | public void testUnparse() { Connection connection = getConnection(); Query query = connection.parseQuery( "with member [Measures].[Rendite] as " + nl + " '(([Measures].[Store Sales] - [Measures].[Store Cost])) / [Measures].[Store Cost]'," + nl + " format_string = iif(([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost] * 100 > " + nl + " Parameter (\"UpperLimit\", NUMERIC, 151, \"Obere Grenze\"), " + nl + " \"|#.00%|arrow='up'\"," + nl + " iif(([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost] * 100 < " + nl + " Parameter(\"LowerLimit\", NUMERIC, 150, \"Untere Grenze\")," + nl + " \"|#.00%|arrow='down'\"," + nl + " \"|#.00%|arrow='right'\"))" + nl + "select {[Measures].members} on columns" + nl + "from Sales"); final String s = query.toString(); // Parentheses are added to reflect operator precedence, but that's ok. // Note that the doubled parentheses in line #2 of the query have been // reduced to a single level. assertEquals("with member [Measures].[Rendite] as '(([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost])', " + "format_string = IIf((((([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost]) * 100.0) > Parameter(\"UpperLimit\", NUMERIC, 151.0, \"Obere Grenze\")), " + "\"|#.00%|arrow='up'\", " + "IIf((((([Measures].[Store Sales] - [Measures].[Store Cost]) / [Measures].[Store Cost]) * 100.0) < Parameter(\"LowerLimit\", NUMERIC, 150.0, \"Untere Grenze\")), " + "\"|#.00%|arrow='down'\", \"|#.00%|arrow='right'\"))" + nl + "select {[Measures].Members} ON columns" + nl + "from [Sales]" + nl, s); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/BasicQueryTest.java/clean/testsrc/main/mondrian/test/BasicQueryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
984,
2670,
1435,
288,
202,
202,
1952,
1459,
273,
6742,
5621,
202,
202,
1138,
843,
273,
1459,
18,
2670,
1138,
12,
9506,
202,
6,
1918,
3140,
306,
23177,
1823,
8009,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
984,
2670,
1435,
288,
202,
202,
1952,
1459,
273,
6742,
5621,
202,
202,
1138,
843,
273,
1459,
18,
2670,
1138,
12,
9506,
202,
6,
1918,
3140,
306,
23177,
1823,
8009,
6... |
return scannerData.getContextStack().getMostRelevantFileContext() != null ? scannerData.getContextStack().getMostRelevantFileContext().getFilename() : ""; | return scannerData.getContextStack().getMostRelevantFileContext() != null ? scannerData.getContextStack().getMostRelevantFileContext().getFilename() : ""; | protected String getCurrentFile() { return scannerData.getContextStack().getMostRelevantFileContext() != null ? scannerData.getContextStack().getMostRelevantFileContext().getFilename() : ""; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/95f42aeb9e7f38db093795981bd7c7300a3eeeb6/Scanner.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
5175,
812,
1435,
202,
95,
202,
202,
2463,
7683,
751,
18,
29120,
2624,
7675,
588,
18714,
17018,
7445,
812,
1042,
1435,
480,
446,
692,
7683,
751,
18,
29120,
2624,
7675,
588,
1871... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
514,
5175,
812,
1435,
202,
95,
202,
202,
2463,
7683,
751,
18,
29120,
2624,
7675,
588,
18714,
17018,
7445,
812,
1042,
1435,
480,
446,
692,
7683,
751,
18,
29120,
2624,
7675,
588,
1871... |
runEvaluation( testPerson_, "$not_exist == 3", "FALSE"); runEvaluation( testPerson_, "3 == $not_exist", "FALSE"); | try { runEvaluation( testPerson_, "$.not_exist"); fail(); } catch (EvaluationException e) {} | public void testAccessNonExistingStructMember() throws Exception { runEvaluation( testPerson_, "$not_exist == 3", "FALSE"); runEvaluation( testPerson_, "3 == $not_exist", "FALSE"); } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/a61da9e94e1e48433b07b3d4806331609bc4ff80/TCLTest.java/buggy/test/regression/src/org/jacorb/test/notification/node/TCLTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1862,
3989,
9895,
3823,
4419,
1435,
1216,
1185,
565,
288,
3639,
1086,
13468,
12,
1842,
8346,
67,
16,
4662,
902,
67,
7398,
422,
890,
3113,
315,
21053,
8863,
3639,
1086,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1862,
3989,
9895,
3823,
4419,
1435,
1216,
1185,
565,
288,
3639,
1086,
13468,
12,
1842,
8346,
67,
16,
4662,
902,
67,
7398,
422,
890,
3113,
315,
21053,
8863,
3639,
1086,
13... |
Logger.getLogger().logError("Error loading nested archive: "+temp.getURI()); | Logger.getLogger().logError("Error loading nested archive: " + temp.getURI()); | private List getModuleModels() { if (getArchiveFile() == null) return Collections.EMPTY_LIST; cachedLoadError = null; List moduleFiles = getEARFile().getModuleFiles(); List moduleModels = new ArrayList(); List clientJarArchives = new ArrayList(); IDataModel localModel; // String earProjectName = getStringProperty(PROJECT_NAME); String earProjectName = getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME); List defaultModuleNames = new ArrayList(); IProject[] currentProjects = ProjectUtilities.getAllProjects(); for (int i = 0; i < currentProjects.length; i++) { // defaultModuleNames.add(currentProjects[i].getName()); } defaultModuleNames.add(earProjectName); List collidingModuleNames = null; Hashtable ejbJarsWithClients = new Hashtable(); for (int i = 0; i < moduleFiles.size(); i++) { localModel = null; ModuleFile temp = (ModuleFile) moduleFiles.get(i); try { if (temp.isApplicationClientFile()) { localModel = DataModelFactory.createDataModel(new AppClientComponentImportDataModelProvider()); } else if (temp.isWARFile()) { WebModuleExtension webExt = EarModuleManager.getWebModuleExtension(); if (webExt != null) { localModel = webExt.createImportDataModel(); WebModule webModule = (WebModule) getEARFile().getModule(temp.getURI(), null); if (null != webModule && null != webModule.getContextRoot()) { localModel.setProperty(IAddWebComponentToEnterpriseApplicationDataModelProperties.CONTEXT_ROOT, webModule.getContextRoot()); } } } else if (temp.isEJBJarFile()) { EjbModuleExtension ejbExt = EarModuleManager.getEJBModuleExtension(); if (ejbExt != null) { localModel = ejbExt.createImportDataModel(); } EJBJar jar = ((EJBJarFile) temp).getDeploymentDescriptor(); if (jar != null) { if (jar.getEjbClientJar() != null) { String clientName = jar.getEjbClientJar(); try { Archive clientArchive = (Archive) getEARFile().getFile(clientName); clientJarArchives.add(clientArchive); ejbJarsWithClients.put(localModel, clientArchive); } catch (Exception e) { // TODO: handle exception } } } } else if (temp.isRARFile()) { JcaModuleExtension rarExt = EarModuleManager.getJCAModuleExtension(); if (rarExt != null) { localModel = rarExt.createImportDataModel(); } } if (localModel != null) { localModel.setProperty(FILE, temp); localModel.setProperty(IJ2EEFacetProjectCreationDataModelProperties.EAR_PROJECT_NAME, earProjectName); localModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME)); localModel.addListener(this); localModel.addListener(nestedListener); moduleModels.add(localModel); String moduleName = localModel.getStringProperty(IJ2EEFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME); if (defaultModuleNames.contains(moduleName)) { if (collidingModuleNames == null) { collidingModuleNames = new ArrayList(); } collidingModuleNames.add(moduleName); } else { defaultModuleNames.add(moduleName); } } } catch (Exception e) { Logger.getLogger().logError("Error loading nested archive: "+temp.getURI()); //$NON-NLS-1$ Logger.getLogger().logError(e); cachedLoadError = temp; } } updateUtilityModels(clientJarArchives, EJB_CLIENT_LIST, EJB_CLIENT_LIST); List clientModelList = (List) getProperty(EJB_CLIENT_LIST); Enumeration ejbModels = ejbJarsWithClients.keys(); ejbJarToClientJarModels.clear(); clientJarToEjbJarModels.clear(); while (ejbModels.hasMoreElements()) { Object ejbModel = ejbModels.nextElement(); Object archive = ejbJarsWithClients.get(ejbModel); Object clientModel = null; for (int i = 0; clientModel == null && i < clientModelList.size(); i++) { if (((IDataModel) clientModelList.get(i)).getProperty(FILE) == archive) { clientModel = clientModelList.get(i); } } ejbJarToClientJarModels.put(ejbModel, clientModel); clientJarToEjbJarModels.put(clientModel, ejbModel); } for (int i = 0; collidingModuleNames != null && i < moduleModels.size(); i++) { localModel = (IDataModel) moduleModels.get(i); String moduleName = localModel.getStringProperty(IJ2EEModuleImportDataModelProperties.PROJECT_NAME); if (collidingModuleNames.contains(moduleName)) { ModuleFile module = (ModuleFile) localModel.getProperty(IJ2EEModuleImportDataModelProperties.FILE); String suffix = null; if (module.isApplicationClientFile()) { suffix = "_AppClient"; //$NON-NLS-1$ } else if (module.isWARFile()) { suffix = "_WEB"; //$NON-NLS-1$ } else if (module.isEJBJarFile()) { suffix = "_EJB"; //$NON-NLS-1$ } else if (module.isRARFile()) { suffix = "_JCA"; //$NON-NLS-1$ } if (defaultModuleNames.contains(moduleName + suffix)) { int count = 1; for (; defaultModuleNames.contains(moduleName + suffix + count) && count < 10; count++); suffix += count; } localModel.setProperty(IJ2EEModuleImportDataModelProperties.PROJECT_NAME, moduleName + suffix); } } return moduleModels; } | 8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/d35cfd1fa80f00c9c8748724ba4cd166935675c9/EARComponentImportDataModelProvider.java/buggy/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/EARComponentImportDataModelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
987,
11251,
8430,
1435,
288,
202,
202,
430,
261,
588,
7465,
812,
1435,
422,
446,
13,
1082,
202,
2463,
5737,
18,
13625,
67,
7085,
31,
202,
202,
7097,
2563,
668,
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,
225,
202,
1152,
987,
11251,
8430,
1435,
288,
202,
202,
430,
261,
588,
7465,
812,
1435,
422,
446,
13,
1082,
202,
2463,
5737,
18,
13625,
67,
7085,
31,
202,
202,
7097,
2563,
668,
273,
446,
31,
... |
break; } boLegend.setTop( bo.getTop( ) ); boLegend.setLeft( bo.getLeft( ) + bo.getWidth( ) - szLegend.getWidth( ) ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); boLegend.setLeft( boTitle.getLeft( ) - szLegend.getWidth( ) ); | boTitle.setWidth( bo.getWidth( ) ); | private void doLayout_tmp( IDisplayServer xs, Chart cm, Bounds boFull, RunTimeContext rtc ) throws ChartException { final boolean isRightToLeft = rtc.isRightToLeft( ); Block bl = cm.getBlock( ); bl.setBounds( boFull ); Insets ins = bl.getInsets( ); Bounds bo = boFull.adjustedInstance( ins ); Legend lg = cm.getLegend( ); Plot p = cm.getPlot( ); TitleBlock tb = cm.getTitle( ); Size szTitle = ( !tb.isVisible( ) ) ? SizeImpl.create( 0, 0 ) : tb.getPreferredSize( xs, cm, rtc ); Bounds boPlot = p.getBounds( ); Bounds boLegend = lg.getBounds( ); // Layout title in North Anchor by default. Bounds boTitle = tb.getBounds( ); Anchor titleAnchor = tb.getAnchor( ); boTitle.setLeft( bo.getLeft( ) ); boTitle.setWidth( bo.getWidth( ) ); boTitle.setTop( bo.getTop( ) ); boTitle.setHeight( szTitle.getHeight( ) ); Size szLegend = ( !lg.isVisible( ) ) ? SizeImpl.create( 0, 0 ) : lg.getPreferredSize( xs, cm, rtc ); if ( !lg.isSetPosition( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, Messages.getString( "error.legend.position", //$NON-NLS-1$ ULocale.getDefault( ) ) ); } double plotWidthHint = -1, plotHeightHint = -1; if ( p.isSetWidthHint( ) ) { plotWidthHint = p.getWidthHint( ); } if ( p.isSetHeightHint( ) ) { plotHeightHint = p.getHeightHint( ); } double plotLeft, plotTop; // SETUP THE POSITION OF THE LEGEND AND THE PLOT Position po = lg.getPosition( ); // swap right/left if ( isRightToLeft ) { if ( po == Position.RIGHT_LITERAL ) { po = Position.LEFT_LITERAL; } else if ( po == Position.LEFT_LITERAL ) { po = Position.RIGHT_LITERAL; } } // restrict lenged size to 1/3 of the total block size. // TODO use better layout solution final double renderLegendHeight = szLegend.getHeight( ); final double renderLegendWidth = szLegend.getWidth( ); switch ( po.getValue( ) ) { case Position.ABOVE : case Position.BELOW : // restrict height if ( szLegend.getHeight( ) > bo.getHeight( ) / 3 ) { szLegend.setHeight( bo.getHeight( ) / 3 ); } break; case Position.LEFT : case Position.RIGHT : case Position.OUTSIDE : // restrict width if ( szLegend.getWidth( ) > bo.getWidth( ) / 3 ) { szLegend.setWidth( bo.getWidth( ) / 3 ); } break; default : // ignore other cases break; } Anchor anchor = p.getAnchor( ); // swap west/east if ( isRightToLeft ) { switch ( anchor.getValue( ) ) { case Anchor.EAST : anchor = Anchor.WEST_LITERAL; break; case Anchor.NORTH_EAST : anchor = Anchor.NORTH_WEST_LITERAL; break; case Anchor.SOUTH_EAST : anchor = Anchor.SOUTH_WEST_LITERAL; break; case Anchor.WEST : anchor = Anchor.EAST_LITERAL; break; case Anchor.NORTH_WEST : anchor = Anchor.NORTH_EAST_LITERAL; break; case Anchor.SOUTH_WEST : anchor = Anchor.SOUTH_EAST_LITERAL; break; } } switch ( po.getValue( ) ) { case Position.INSIDE : boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? bo.getHeight( ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } plotLeft = bo.getLeft( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); boLegend.set( 0, 0, szLegend.getWidth( ), szLegend.getHeight( ) ); break; case Position.RIGHT : case Position.OUTSIDE : boLegend.setWidth( szLegend.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) - szTitle.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? bo.getHeight( ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) ); boLegend.setLeft( bo.getLeft( ) + bo.getWidth( ) - szLegend.getWidth( ) ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); boLegend.setLeft( boTitle.getLeft( ) - szLegend.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.LEFT : boLegend.setWidth( renderLegendWidth ); boLegend.setHeight( bo.getHeight( ) - szTitle.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? bo.getHeight( ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) ); boLegend.setLeft( bo.getLeft( ) + szLegend.getWidth( ) - renderLegendWidth ); plotLeft = bo.getLeft( ) + szLegend.getWidth( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : boLegend.setLeft( bo.getLeft( ) + szTitle.getWidth( ) + szLegend.getWidth( ) - renderLegendWidth ); plotLeft = bo.getLeft( ) + szTitle.getWidth( ) + szLegend.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.ABOVE : boLegend.setWidth( bo.getWidth( ) ); boLegend.setHeight( renderLegendHeight ); boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) - szLegend.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setWidth( bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) + szLegend.getHeight( ) - renderLegendHeight ); boLegend.setLeft( bo.getLeft( ) ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ) + szLegend.getHeight( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : boLegend.setLeft( bo.getLeft( ) + szTitle.getWidth( ) ); plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szLegend.getHeight( ) + szTitle.getHeight( ); boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) + szLegend.getHeight( ) - renderLegendHeight ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.BELOW : boLegend.setWidth( bo.getWidth( ) ); boLegend.setHeight( szLegend.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - boTitle.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); switch ( titleAnchor.getValue( ) ) { case Anchor.EAST : case Anchor.WEST : boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - szTitle.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); boTitle.setHeight( bo.getHeight( ) ); boTitle.setWidth( szTitle.getWidth( ) ); boLegend.setWidth( bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boTitle.setTop( bo.getTop( ) + bo.getHeight( ) - szTitle.getHeight( ) ); break; } boLegend.setTop( bo.getTop( ) + bo.getHeight( ) - szLegend.getHeight( ) ); boLegend.setLeft( bo.getLeft( ) ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : boLegend.setLeft( bo.getLeft( ) + szTitle.getWidth( ) ); plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boLegend.setTop( boTitle.getTop( ) - szLegend.getHeight( ) ); break; } // adjust left. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - szTitle.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } break; } // adjust top. switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : case Anchor.EAST : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; default : switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; } // layout custom blocks. for ( Iterator itr = bl.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); if ( cbl != lg && cbl != p && cbl != tb ) { layoutBlock( xs, cm, bl.getBounds( ), bl.getInsets( ), cbl, rtc ); } } // layout custom legend blocks. for ( Iterator itr = lg.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, lg.getBounds( ), lg.getInsets( ), cbl, rtc ); } // layout custom title blocks. for ( Iterator itr = tb.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, tb.getBounds( ), tb.getInsets( ), cbl, rtc ); } // layout custom plot blocks. for ( Iterator itr = p.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, p.getBounds( ), p.getInsets( ), cbl, rtc ); } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/bdbe857d641e2e27600409e7bb20f1950ed1536b/LayoutManager.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/internal/layout/LayoutManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
3744,
67,
5645,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
20382,
800,
5080,
16,
1082,
202,
1997,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
3744,
67,
5645,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
20382,
800,
5080,
16,
1082,
202,
1997,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
2... |
if (len == 0) return ScriptRuntime.NaNobj; | int start = 0; char c; for (;;) { if (start == len) { return ScriptRuntime.NaNobj; } c = s.charAt(start); if (!TokenStream.isJSSpace(c)) { break; } ++start; } | private Object js_parseFloat(Context cx, Object[] args) { if (args.length < 1) return ScriptRuntime.NaNobj; String s = ScriptRuntime.toString(args[0]); int len = s.length(); if (len == 0) return ScriptRuntime.NaNobj; int i; char c; // Scan forward to the first digit or . for (i=0; TokenStream.isJSSpace(c = s.charAt(i)) && i+1 < len; i++) /* empty */ ; int start = i; if (c == '+' || c == '-') c = s.charAt(++i); if (c == 'I') { // check for "Infinity" double d; if (i+8 <= len && s.substring(i, i+8).equals("Infinity")) d = s.charAt(start) == '-' ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY; else return ScriptRuntime.NaNobj; return new Double(d); } // Find the end of the legal bit int decimal = -1; int exponent = -1; for (; i < len; i++) { switch (s.charAt(i)) { case '.': if (decimal != -1) // Only allow a single decimal point. break; decimal = i; continue; case 'e': case 'E': if (exponent != -1) break; exponent = i; continue; case '+': case '-': // Only allow '+' or '-' after 'e' or 'E' if (exponent != i-1) break; continue; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': continue; default: break; } break; } s = s.substring(start, i); try { return Double.valueOf(s); } catch (NumberFormatException ex) { return ScriptRuntime.NaNobj; } } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/0b056816ae240bd12d40a9a4926520fc5cf9299b/NativeGlobal.java/clean/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3828,
67,
2670,
4723,
12,
1042,
9494,
16,
1033,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
5411,
327,
7739,
5576,
18,
24101,
2279,
441,
31,
3639,
514,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3828,
67,
2670,
4723,
12,
1042,
9494,
16,
1033,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
5411,
327,
7739,
5576,
18,
24101,
2279,
441,
31,
3639,
514,... |
protected int first_date_index() { int result; ArrayList dates = dates(); ArrayList times = times(); if (indicator_dates == null ||//!!Check on ^^^^^^^^^^^^^^^^^^^^^^ indicator_dates.get(0).equals(dates.get(0))) {if (indicator_dates == null) {System.out.println("Is this a bug?: 'indicator_dates == null'"+"\nIndicatorDrawer line 73");} result = 0; } else { result = Utilities.index_at_date((String) indicator_dates.get(0), dates, 1, 0, dates.size() - 1); } if (indicator_times != null && indicator_times.size() > 0) { // Since the data is intraday, there are duplicate dates in // the dates array. Find the first element of dates that // matches indicator_dates.get(0). while (result > 0 && dates.get(result-1).equals( indicator_dates.get(0))) { --result; } if (! indicator_times.get(0).equals( times.get(result))) { // If indicator_times.get(0) is less than // times.get(result), increment result until // times.get(result) is the first time of the // following day. while (result < times.size() && ((String) indicator_times.get(0)).compareTo( times.get(result)) < 0) { ++result; } result = first_time_match(indicator_times.get(0), times, result); } } return result; } | 13245 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13245/4ead31f78160e6a06d1841484878a0f2386a0fff/IndicatorDrawer.java/buggy/src/clients/graph/IndicatorDrawer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
474,
3645,
67,
712,
67,
1615,
1435,
95,
202,
202,
474,
2088,
31,
202,
202,
19558,
9683,
33,
9683,
5621,
202,
202,
19558,
8293,
33,
8293,
5621,
202,
202,
430,
12,
18741,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
474,
3645,
67,
712,
67,
1615,
1435,
95,
202,
202,
474,
2088,
31,
202,
202,
19558,
9683,
33,
9683,
5621,
202,
202,
19558,
8293,
33,
8293,
5621,
202,
202,
430,
12,
18741,
67,
... | ||
public static void debug(String msg) | public static void debug(Throwable th) | public static void debug(String msg) { if (log==null) return; log.debug(msg,null,null); } | 13242 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13242/02afc3afb955558e0f52959974573cdb0b61f6f4/Log.java/buggy/trunk/modules/util/src/main/java/org/mortbay/log/Log.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1198,
12,
15155,
286,
13,
565,
288,
3639,
309,
261,
1330,
631,
2011,
13,
5411,
327,
31,
3639,
613,
18,
4148,
12,
3576,
16,
2011,
16,
2011,
1769,
565,
289,
2,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1198,
12,
15155,
286,
13,
565,
288,
3639,
309,
261,
1330,
631,
2011,
13,
5411,
327,
31,
3639,
613,
18,
4148,
12,
3576,
16,
2011,
16,
2011,
1769,
565,
289,
2,
-100,
-10... |
log.error( "Failed on " + className + ".stop()", e ); | log.error( "Failed on " + stopClassName + ".stop()", e ); | public void callStop( String className ) { Class clazz = null; Method op = null; try { clazz = appLoader.loadClass( className ); } catch ( ClassNotFoundException e ) { log.error( "Could not find " + className, e ); System.exit( ExitCodes.CLASS_LOOKUP ); } try { bootstrapped = clazz.newInstance(); } catch ( Exception e ) { log.error( "Could not instantiate " + className, e ); System.exit( ExitCodes.INSTANTIATION ); } try { op = clazz.getMethod( "stop", new Class[] { EMPTY_STRARRY.getClass() } ); } catch ( Exception e ) { log.error( "Could not find stop() method for " + className, e ); System.exit( ExitCodes.METHOD_LOOKUP ); } try { op.invoke( bootstrapped, new Object[] { EMPTY_STRARRY } ); } catch ( Exception e ) { log.error( "Failed on " + className + ".stop()", e ); System.exit( ExitCodes.STOP ); } } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/4350c947119a3f2bb5047cf41c1cca097a80b46b/Bootstrapper.java/clean/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/Bootstrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
4947,
12,
514,
2658,
262,
565,
288,
3639,
1659,
4003,
273,
446,
31,
3639,
2985,
1061,
273,
446,
31,
7734,
775,
3639,
288,
5411,
4003,
273,
595,
2886,
18,
945,
797,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
4947,
12,
514,
2658,
262,
565,
288,
3639,
1659,
4003,
273,
446,
31,
3639,
2985,
1061,
273,
446,
31,
7734,
775,
3639,
288,
5411,
4003,
273,
595,
2886,
18,
945,
797,
12,
... |
Address addr = Address.fromIntZeroExtend(ival); | private static Address getReferenceAddr(Offset jtocOff, boolean fatalIfNotFound) { int ival = getIVal(jtocOff); Address addr = Address.fromIntZeroExtend(ival); if (ival != 0) { Object jdkObject = BootImageMap.getObject(ival); if (jdkObject instanceof VM_CodeArray) { jdkObject = ((VM_CodeArray)jdkObject).getBacking(); } else if (jdkObject instanceof AddressArray) { jdkObject = ((AddressArray)jdkObject).getBacking(); } else if (jdkObject instanceof ObjectReferenceArray) { jdkObject = ((ObjectReferenceArray)jdkObject).getBacking(); } else if (jdkObject instanceof ExtentArray) { jdkObject = ((ExtentArray)jdkObject).getBacking(); } else if (jdkObject instanceof OffsetArray) { jdkObject = ((OffsetArray)jdkObject).getBacking(); } else if (jdkObject instanceof WordArray) { jdkObject = ((WordArray)jdkObject).getBacking(); } addr = BootImageMap.getImageAddress(jdkObject, fatalIfNotFound); } return addr; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/7602774297ec03e7800add308846318abb2d6a3e/BootImageWriter.java/buggy/tools/bootImageWriter/BootImageWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
5267,
13223,
3178,
12,
2335,
525,
1391,
7210,
16,
1250,
10081,
2047,
2768,
13,
288,
565,
509,
277,
1125,
273,
8974,
3053,
12,
78,
1391,
7210,
1769,
4202,
309,
261,
5162,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
5267,
13223,
3178,
12,
2335,
525,
1391,
7210,
16,
1250,
10081,
2047,
2768,
13,
288,
565,
509,
277,
1125,
273,
8974,
3053,
12,
78,
1391,
7210,
1769,
4202,
309,
261,
5162,
480,
... | |
fileName = fileName.trim( ); | filePath = createAbsolutePath( filePath ); | public static String getReportDocument( HttpServletRequest request ) { String fileName = getParameter( request, PARAM_REPORT_DOCUMENT ); if ( fileName == null ) { fileName = ""; //$NON-NLS-1$ } else { fileName = fileName.trim( ); } if ( fileName == null || fileName.length() <= 0 ) { fileName = getReport( request ); fileName = fileName.substring( 0, fileName.lastIndexOf( '.' ) ) + ".rptdocument"; //$NON-NLS-1$ } if ( fileName != null && fileName.length() > 0 ) { // Get absolute report location. if ( isRelativePath( fileName ) ) { if ( fileName.startsWith( File.separator ) ) { fileName = workingFolder + fileName; } else { fileName = workingFolder + File.separator + fileName; } } } return fileName; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/4f8d9ec70a9a4bdebe627870db17ed54ddb4e8ef/ParameterAccessor.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterAccessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
22452,
2519,
12,
9984,
590,
262,
202,
95,
202,
202,
780,
3968,
273,
5575,
12,
590,
16,
4655,
67,
22710,
67,
18450,
11272,
9506,
202,
430,
261,
3968,
422,
446,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
22452,
2519,
12,
9984,
590,
262,
202,
95,
202,
202,
780,
3968,
273,
5575,
12,
590,
16,
4655,
67,
22710,
67,
18450,
11272,
9506,
202,
430,
261,
3968,
422,
446,
262,
... |
log.debug("AjaxFilterService found regions = " + commaSeparatedRegions); | if (log.isDebugEnabled()) log.debug("AjaxFilterService found regions = " + commaSeparatedRegions); | protected void action(Path path, InputData input, OutputData output) throws Exception { AtomicResponseHelper arUtil = new AtomicResponseHelper(output); try { HttpOutputData httpOutput = (HttpOutputData) output; String commaSeparatedRegions = (String)input.getGlobalData().get(UPDATE_REGIONS_KEY); log.debug("AjaxFilterService found regions = " + commaSeparatedRegions); super.action(path, input, output); if(commaSeparatedRegions != null) { String response = new String(arUtil.getData(), characterEncoding); log.info("It was Ajax request. Rollbacking current response."); arUtil.rollback(); String transactionElement = getTransactionElement(response); httpOutput.getOutputStream().write(transactionElement.getBytes(characterEncoding)); String[] regions = commaSeparatedRegions.split(","); // adding the regions that may appear in the response but // we're not present in the request if (existingRegions != null) { for (Iterator iter = existingRegions.iterator(); iter.hasNext();) { regions = (String[])ArrayUtils.add(regions, iter.next()); } } for (int i = 0; i < regions.length; i++) { String regionId = regions[i]; String regionContent = getContentById(response, regionId); httpOutput.getOutputStream().write(regionContent.getBytes(characterEncoding)); } } } finally { log.info("Ajax filter commits response."); arUtil.commit(); } } | 53585 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53585/ad0af2022e5921dc9a36d0d5cf62e390b55b6743/StandardAjaxFilterService.java/buggy/src/org/araneaframework/http/filter/StandardAjaxFilterService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1301,
12,
743,
589,
16,
2741,
751,
810,
16,
3633,
751,
876,
13,
1216,
1185,
288,
202,
202,
23102,
1064,
2276,
419,
1304,
273,
1082,
202,
2704,
11553,
1064,
2276,
12,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1301,
12,
743,
589,
16,
2741,
751,
810,
16,
3633,
751,
876,
13,
1216,
1185,
288,
202,
202,
23102,
1064,
2276,
419,
1304,
273,
1082,
202,
2704,
11553,
1064,
2276,
12,
284... |
return validateUnitsOfMeasurement( (Object) value, | return validateUnitsOfMeasurement( (UnitsOfMeasurement) value, | protected boolean validate( int classifierID, Object value, DiagnosticChain diagnostics, Map context ) { switch ( classifierID ) { case AttributePackage.ACTION_VALUE : return validateActionValue( (ActionValue) value, diagnostics, context ); case AttributePackage.ANGLE3_D : return validateAngle3D( (Angle3D) value, diagnostics, context ); case AttributePackage.AXIS_ORIGIN : return validateAxisOrigin( (AxisOrigin) value, diagnostics, context ); case AttributePackage.BOUNDS : return validateBounds( (Bounds) value, diagnostics, context ); case AttributePackage.CALL_BACK_VALUE : return validateCallBackValue( (CallBackValue) value, diagnostics, context ); case AttributePackage.COLOR_DEFINITION : return validateColorDefinition( (ColorDefinition) value, diagnostics, context ); case AttributePackage.DATA_POINT : return validateDataPoint( (DataPoint) value, diagnostics, context ); case AttributePackage.DATA_POINT_COMPONENT : return validateDataPointComponent( (DataPointComponent) value, diagnostics, context ); case AttributePackage.DATE_FORMAT_SPECIFIER : return validateDateFormatSpecifier( (DateFormatSpecifier) value, diagnostics, context ); case AttributePackage.EMBEDDED_IMAGE : return validateEmbeddedImage( (EmbeddedImage) value, diagnostics, context ); case AttributePackage.EXTENDED_PROPERTY : return validateExtendedProperty( (ExtendedProperty) value, diagnostics, context ); case AttributePackage.FILL : return validateFill( (Fill) value, diagnostics, context ); case AttributePackage.FONT_DEFINITION : return validateFontDefinition( (FontDefinition) value, diagnostics, context ); case AttributePackage.FORMAT_SPECIFIER : return validateFormatSpecifier( (FormatSpecifier) value, diagnostics, context ); case AttributePackage.GRADIENT : return validateGradient( (Gradient) value, diagnostics, context ); case AttributePackage.IMAGE : return validateImage( (Image) value, diagnostics, context ); case AttributePackage.INSETS : return validateInsets( (Insets) value, diagnostics, context ); case AttributePackage.INTERACTIVITY : return validateInteractivity( (Interactivity) value, diagnostics, context ); case AttributePackage.JAVA_DATE_FORMAT_SPECIFIER : return validateJavaDateFormatSpecifier( (JavaDateFormatSpecifier) value, diagnostics, context ); case AttributePackage.JAVA_NUMBER_FORMAT_SPECIFIER : return validateJavaNumberFormatSpecifier( (JavaNumberFormatSpecifier) value, diagnostics, context ); case AttributePackage.LINE_ATTRIBUTES : return validateLineAttributes( (LineAttributes) value, diagnostics, context ); case AttributePackage.LOCATION : return validateLocation( (Location) value, diagnostics, context ); case AttributePackage.LOCATION3_D : return validateLocation3D( (Location3D) value, diagnostics, context ); case AttributePackage.MARKER : return validateMarker( (Marker) value, diagnostics, context ); case AttributePackage.NUMBER_FORMAT_SPECIFIER : return validateNumberFormatSpecifier( (NumberFormatSpecifier) value, diagnostics, context ); case AttributePackage.PALETTE : return validatePalette( (Palette) value, diagnostics, context ); case AttributePackage.ROTATION3_D : return validateRotation3D( (Rotation3D) value, diagnostics, context ); case AttributePackage.SCRIPT_VALUE : return validateScriptValue( (ScriptValue) value, diagnostics, context ); case AttributePackage.SERIES_VALUE : return validateSeriesValue( (SeriesValue) value, diagnostics, context ); case AttributePackage.SIZE : return validateSize( (Size) value, diagnostics, context ); case AttributePackage.STYLE : return validateStyle( (Style) value, diagnostics, context ); case AttributePackage.STYLE_MAP : return validateStyleMap( (StyleMap) value, diagnostics, context ); case AttributePackage.TEXT : return validateText( (Text) value, diagnostics, context ); case AttributePackage.TEXT_ALIGNMENT : return validateTextAlignment( (TextAlignment) value, diagnostics, context ); case AttributePackage.TOOLTIP_VALUE : return validateTooltipValue( (TooltipValue) value, diagnostics, context ); case AttributePackage.URL_VALUE : return validateURLValue( (URLValue) value, diagnostics, context ); case AttributePackage.ACTION_TYPE : return validateActionType( (Object) value, diagnostics, context ); case AttributePackage.ANCHOR : return validateAnchor( (Object) value, diagnostics, context ); case AttributePackage.ANGLE_TYPE : return validateAngleType( (Object) value, diagnostics, context ); case AttributePackage.AXIS_TYPE : return validateAxisType( (Object) value, diagnostics, context ); case AttributePackage.CHART_DIMENSION : return validateChartDimension( (Object) value, diagnostics, context ); case AttributePackage.CHART_TYPE : return validateChartType( (Object) value, diagnostics, context ); case AttributePackage.DATA_POINT_COMPONENT_TYPE : return validateDataPointComponentType( (Object) value, diagnostics, context ); case AttributePackage.DATA_TYPE : return validateDataType( (Object) value, diagnostics, context ); case AttributePackage.DATE_FORMAT_DETAIL : return validateDateFormatDetail( (Object) value, diagnostics, context ); case AttributePackage.DATE_FORMAT_TYPE : return validateDateFormatType( (Object) value, diagnostics, context ); case AttributePackage.DIRECTION : return validateDirection( (Object) value, diagnostics, context ); case AttributePackage.GROUPING_UNIT_TYPE : return validateGroupingUnitType( (Object) value, diagnostics, context ); case AttributePackage.HORIZONTAL_ALIGNMENT : return validateHorizontalAlignment( (Object) value, diagnostics, context ); case AttributePackage.INTERSECTION_TYPE : return validateIntersectionType( (Object) value, diagnostics, context ); case AttributePackage.LEADER_LINE_STYLE : return validateLeaderLineStyle( (Object) value, diagnostics, context ); case AttributePackage.LEGEND_BEHAVIOR_TYPE : return validateLegendBehaviorType( (Object) value, diagnostics, context ); case AttributePackage.LEGEND_ITEM_TYPE : return validateLegendItemType( (Object) value, diagnostics, context ); case AttributePackage.LINE_DECORATOR : return validateLineDecorator( (Object) value, diagnostics, context ); case AttributePackage.LINE_STYLE : return validateLineStyle( (Object) value, diagnostics, context ); case AttributePackage.MARKER_TYPE : return validateMarkerType( (Object) value, diagnostics, context ); case AttributePackage.ORIENTATION : return validateOrientation( (Object) value, diagnostics, context ); case AttributePackage.POSITION : return validatePosition( (Object) value, diagnostics, context ); case AttributePackage.RISER_TYPE : return validateRiserType( (Object) value, diagnostics, context ); case AttributePackage.RULE_TYPE : return validateRuleType( (Object) value, diagnostics, context ); case AttributePackage.SCALE_UNIT_TYPE : return validateScaleUnitType( (Object) value, diagnostics, context ); case AttributePackage.SORT_OPTION : return validateSortOption( (Object) value, diagnostics, context ); case AttributePackage.STRETCH : return validateStretch( (Object) value, diagnostics, context ); case AttributePackage.STYLED_COMPONENT : return validateStyledComponent( (Object) value, diagnostics, context ); case AttributePackage.TICK_STYLE : return validateTickStyle( (Object) value, diagnostics, context ); case AttributePackage.TRIGGER_CONDITION : return validateTriggerCondition( (Object) value, diagnostics, context ); case AttributePackage.TRIGGER_FLOW : return validateTriggerFlow( (Object) value, diagnostics, context ); case AttributePackage.UNITS_OF_MEASUREMENT : return validateUnitsOfMeasurement( (Object) value, diagnostics, context ); case AttributePackage.VERTICAL_ALIGNMENT : return validateVerticalAlignment( (Object) value, diagnostics, context ); case AttributePackage.ACTION_TYPE_OBJECT : return validateActionTypeObject( (ActionType) value, diagnostics, context ); case AttributePackage.ANCHOR_OBJECT : return validateAnchorObject( (Anchor) value, diagnostics, context ); case AttributePackage.ANGLE_TYPE_OBJECT : return validateAngleTypeObject( (AngleType) value, diagnostics, context ); case AttributePackage.AXIS_TYPE_OBJECT : return validateAxisTypeObject( (AxisType) value, diagnostics, context ); case AttributePackage.CHART_DIMENSION_OBJECT : return validateChartDimensionObject( (ChartDimension) value, diagnostics, context ); case AttributePackage.CHART_TYPE_OBJECT : return validateChartTypeObject( (ChartType) value, diagnostics, context ); case AttributePackage.DATA_POINT_COMPONENT_TYPE_OBJECT : return validateDataPointComponentTypeObject( (DataPointComponentType) value, diagnostics, context ); case AttributePackage.DATA_TYPE_OBJECT : return validateDataTypeObject( (DataType) value, diagnostics, context ); case AttributePackage.DATE_FORMAT_DETAIL_OBJECT : return validateDateFormatDetailObject( (DateFormatDetail) value, diagnostics, context ); case AttributePackage.DATE_FORMAT_TYPE_OBJECT : return validateDateFormatTypeObject( (DateFormatType) value, diagnostics, context ); case AttributePackage.DIRECTION_OBJECT : return validateDirectionObject( (Direction) value, diagnostics, context ); case AttributePackage.GROUPING_UNIT_TYPE_OBJECT : return validateGroupingUnitTypeObject( (GroupingUnitType) value, diagnostics, context ); case AttributePackage.HORIZONTAL_ALIGNMENT_OBJECT : return validateHorizontalAlignmentObject( (HorizontalAlignment) value, diagnostics, context ); case AttributePackage.ID : return validateID( (String) value, diagnostics, context ); case AttributePackage.INTERSECTION_TYPE_OBJECT : return validateIntersectionTypeObject( (IntersectionType) value, diagnostics, context ); case AttributePackage.LEADER_LINE_STYLE_OBJECT : return validateLeaderLineStyleObject( (LeaderLineStyle) value, diagnostics, context ); case AttributePackage.LEGEND_BEHAVIOR_TYPE_OBJECT : return validateLegendBehaviorTypeObject( (LegendBehaviorType) value, diagnostics, context ); case AttributePackage.LEGEND_ITEM_TYPE_OBJECT : return validateLegendItemTypeObject( (LegendItemType) value, diagnostics, context ); case AttributePackage.LINE_DECORATOR_OBJECT : return validateLineDecoratorObject( (LineDecorator) value, diagnostics, context ); case AttributePackage.LINE_STYLE_OBJECT : return validateLineStyleObject( (LineStyle) value, diagnostics, context ); case AttributePackage.MARKER_TYPE_OBJECT : return validateMarkerTypeObject( (MarkerType) value, diagnostics, context ); case AttributePackage.ORIENTATION_OBJECT : return validateOrientationObject( (Orientation) value, diagnostics, context ); case AttributePackage.PERCENTAGE : return validatePercentage( ( (Double) value ).doubleValue( ), diagnostics, context ); case AttributePackage.PERCENTAGE_OBJECT : return validatePercentageObject( (Double) value, diagnostics, context ); case AttributePackage.POSITION_OBJECT : return validatePositionObject( (Position) value, diagnostics, context ); case AttributePackage.RGB_VALUE : return validateRGBValue( ( (Integer) value ).intValue( ), diagnostics, context ); case AttributePackage.RGB_VALUE_OBJECT : return validateRGBValueObject( (Integer) value, diagnostics, context ); case AttributePackage.RISER_TYPE_OBJECT : return validateRiserTypeObject( (RiserType) value, diagnostics, context ); case AttributePackage.RULE_TYPE_OBJECT : return validateRuleTypeObject( (RuleType) value, diagnostics, context ); case AttributePackage.SCALE_UNIT_TYPE_OBJECT : return validateScaleUnitTypeObject( (ScaleUnitType) value, diagnostics, context ); case AttributePackage.SORT_OPTION_OBJECT : return validateSortOptionObject( (SortOption) value, diagnostics, context ); case AttributePackage.STRETCH_OBJECT : return validateStretchObject( (Stretch) value, diagnostics, context ); case AttributePackage.STYLED_COMPONENT_OBJECT : return validateStyledComponentObject( (StyledComponent) value, diagnostics, context ); case AttributePackage.TICK_STYLE_OBJECT : return validateTickStyleObject( (TickStyle) value, diagnostics, context ); case AttributePackage.TRIGGER_CONDITION_OBJECT : return validateTriggerConditionObject( (TriggerCondition) value, diagnostics, context ); case AttributePackage.TRIGGER_FLOW_OBJECT : return validateTriggerFlowObject( (TriggerFlow) value, diagnostics, context ); case AttributePackage.UNITS_OF_MEASUREMENT_OBJECT : return validateUnitsOfMeasurementObject( (UnitsOfMeasurement) value, diagnostics, context ); case AttributePackage.VERTICAL_ALIGNMENT_OBJECT : return validateVerticalAlignmentObject( (VerticalAlignment) value, diagnostics, context ); default : return true; } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/036e8c78765730b146e5854b9d6c397a296fed86/AttributeValidator.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/util/AttributeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
1954,
12,
509,
14622,
734,
16,
1033,
460,
16,
1082,
202,
26836,
3893,
22568,
16,
1635,
819,
262,
202,
95,
202,
202,
9610,
261,
14622,
734,
262,
202,
202,
95,
1082,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
1954,
12,
509,
14622,
734,
16,
1033,
460,
16,
1082,
202,
26836,
3893,
22568,
16,
1635,
819,
262,
202,
95,
202,
202,
9610,
261,
14622,
734,
262,
202,
202,
95,
1082,
202,... |
buf.append('.'); | buf = frac_buf = new StringBuffer(); frac_buf.append('.'); | public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new StringBuffer (); // We have to check both prefixes, because one might be empty. We // want to pick the longest prefix that matches. boolean got_pos = str.startsWith(positivePrefix, index); String np = (negativePrefix != null ? negativePrefix : positivePrefix + symbols.getMinusSign()); boolean got_neg = str.startsWith(np, index); if (got_pos && got_neg) { // By checking this way, we preserve ambiguity in the case // where the negative format differs only in suffix. We // check this again later. if (np.length() > positivePrefix.length()) { is_neg = true; index += np.length(); } else index += positivePrefix.length(); } else if (got_neg) { is_neg = true; index += np.length(); } else if (got_pos) index += positivePrefix.length(); else { pos.setErrorIndex (index); return null; } // FIXME: handle Inf and NaN. // FIXME: do we have to respect minimum digits? // What about leading zeros? What about multiplier? int start_index = index; int max = str.length(); int last = index + maximumIntegerDigits; if (last > 0 && max > last) max = last; char zero = symbols.getZeroDigit(); int last_group = -1; boolean int_part = true; boolean exp_part = false; for (; index < max; ++index) { char c = str.charAt(index); // FIXME: what about grouping size? if (groupingUsed && c == symbols.getGroupingSeparator()) { if (last_group != -1 && groupingSize != 0 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } last_group = index; } else if (c >= zero && c <= zero + 9) { buf.append((char) (c - zero + '0')); exp_part = false; } else if (parseIntegerOnly) break; else if (c == symbols.getDecimalSeparator()) { if (last_group != -1 && groupingSize != 0 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } buf.append('.'); int_part = false; } else if (c == symbols.getExponential()) { buf.append('E'); int_part = false; exp_part = true; } else if (exp_part && (c == '+' || c == '-' || c == symbols.getMinusSign())) { // For exponential notation. buf.append(c); } else break; } if (index == start_index) { // Didn't see any digits. pos.setErrorIndex(index); return null; } // Check the suffix. We must do this before converting the // buffer to a number to handle the case of a number which is // the most negative Long. boolean got_pos_suf = str.startsWith(positiveSuffix, index); String ns = (negativePrefix == null ? positiveSuffix : negativeSuffix); boolean got_neg_suf = str.startsWith(ns, index); if (is_neg) { if (! got_neg_suf) { pos.setErrorIndex(index); return null; } } else if (got_pos && got_neg && got_neg_suf) { is_neg = true; } else if (got_pos != got_pos_suf && got_neg != got_neg_suf) { pos.setErrorIndex(index); return null; } String suffix = is_neg ? ns : positiveSuffix; if (is_neg) buf.insert(0, '-'); String t = buf.toString(); Number result = null; try { result = new Long (t); } catch (NumberFormatException x1) { try { result = new Double (t); } catch (NumberFormatException x2) { } } if (result == null) { pos.setErrorIndex(index); return null; } pos.setIndex(index + suffix.length()); return result; } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/34290161e7c358c11bc837788b6e95a9d3b39f49/DecimalFormat.java/buggy/libjava/java/text/DecimalFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3588,
1109,
261,
780,
609,
16,
2884,
2555,
949,
13,
225,
288,
565,
368,
29613,
6252,
353,
4143,
30,
1610,
326,
977,
1368,
279,
1613,
16,
565,
368,
2162,
1776,
578,
14088,
1787,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3588,
1109,
261,
780,
609,
16,
2884,
2555,
949,
13,
225,
288,
565,
368,
29613,
6252,
353,
4143,
30,
1610,
326,
977,
1368,
279,
1613,
16,
565,
368,
2162,
1776,
578,
14088,
1787,
25... |
/* if(indx < size) { System.out.println("indx = " + indx); System.out.println("dim = " + dim); System.out.println("value = " + value); System.out.println("current key = " + keys[indx]); System.out.println("current val = " + values[indx]); System.out.println("last key = " + keys[size-1]); System.out.println("last val = " + values[size-1]); } */ | public void put(int dim, double value) { // find index of key nearest dim int indx = Arrays.binarySearch(keys, dim); if(indx >= 0) { // found entry for dim values[indx] = value; } else { // need to create entry for dim indx = -(indx + 1);/* if(indx < size) { System.out.println("indx = " + indx); System.out.println("dim = " + dim); System.out.println("value = " + value); System.out.println("current key = " + keys[indx]); System.out.println("current val = " + values[indx]); System.out.println("last key = " + keys[size-1]); System.out.println("last val = " + values[size-1]); } */ if ((size + 1) >= keys.length) { // growing arrays int[] nKeys = new int[keys.length * 2]; Arrays.fill(nKeys, 0, nKeys.length, Integer.MAX_VALUE); System.arraycopy(keys, 0, nKeys, 0, indx); System.arraycopy(keys, indx, nKeys, indx+1, size-indx); keys = nKeys; double[] nValues = new double[values.length * 2]; System.arraycopy(values, 0, nValues, 0, indx); System.arraycopy(values, indx, nValues, indx+1, size-indx); values = nValues; } else { System.arraycopy(keys, indx, keys, indx+1, size-indx); System.arraycopy(values, indx, values, indx+1, size-indx); } keys[indx] = dim; values[indx] = value; ++size; /* if(indx < size-1) { System.out.println("new key = " + keys[indx+1]); System.out.println("new val = " + values[indx+1]); System.out.println("last key = " + keys[size-1]); System.out.println("last val = " + values[size-1]); } */ } } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/0d10c781990e57f687c38201808be3cff8f7d798/SparseVector.java/buggy/src/org/biojava/stats/svm/SparseVector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
12,
474,
2464,
16,
1645,
460,
13,
288,
1377,
368,
1104,
770,
434,
498,
11431,
2464,
1377,
509,
24732,
273,
5647,
18,
8578,
2979,
12,
2452,
16,
2464,
1769,
5411,
309,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
12,
474,
2464,
16,
1645,
460,
13,
288,
1377,
368,
1104,
770,
434,
498,
11431,
2464,
1377,
509,
24732,
273,
5647,
18,
8578,
2979,
12,
2452,
16,
2464,
1769,
5411,
309,
12... | |
log().debug("Received a tracker pdu from "+getAddress()+" of size "+response.size()+" errorStatus = "+response.getErrorStatusText()+" errorIndex = "+response.getErrorIndex()); | log().debug("Received a tracker pdu of type "+PDU.getTypeString(response.getType())+" from "+getAddress()+" of size "+response.size()+" errorStatus = "+response.getErrorStatusText()+" errorIndex = "+response.getErrorIndex()); | public void processResponse(PDU response) { try { log().debug("Received a tracker pdu from "+getAddress()+" of size "+response.size()+" errorStatus = "+response.getErrorStatusText()+" errorIndex = "+response.getErrorIndex()); if (!processErrors(response.getErrorStatus(), response.getErrorIndex())) { for(int i = 0; i < response.size(); i++) { VariableBinding vb = response.get(i); SnmpObjId receivedOid = SnmpObjId.get(vb.getOid().getValue()); SnmpValue val = new Snmp4JValue(vb.getVariable()); Snmp4JWalker.this.processResponse(receivedOid, val); } } buildAndSendNextPdu(); } catch (Throwable e) { handleFatalError(e); } } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/af173b82dc8e9ec6b8759a2b8705eef1f348557b/Snmp4JWalker.java/clean/src/services/org/opennms/netmgt/snmp/snmp4j/Snmp4JWalker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1207,
1064,
12,
52,
16214,
766,
13,
288,
13491,
775,
288,
7734,
613,
7675,
4148,
2932,
8872,
279,
9745,
21160,
434,
618,
13773,
52,
16214,
18,
588,
559,
780,
12,
2740,
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,
540,
1071,
918,
1207,
1064,
12,
52,
16214,
766,
13,
288,
13491,
775,
288,
7734,
613,
7675,
4148,
2932,
8872,
279,
9745,
21160,
434,
618,
13773,
52,
16214,
18,
588,
559,
780,
12,
2740,
18,
58... |
m_driverManager.unlockResource(m_context, addSiteRoot(resource)); | m_driverManager.unlockResource(m_context, addSiteRoot(resource), false); | protected void doUnlockResource(String resource) throws CmsException { m_driverManager.unlockResource(m_context, addSiteRoot(resource)); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/13800bc9901ef233804cde14a40105c18bf67203/CmsObject.java/buggy/src/com/opencms/file/CmsObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
7087,
1420,
12,
780,
1058,
13,
1216,
11228,
288,
3639,
312,
67,
7407,
1318,
18,
26226,
1420,
12,
81,
67,
2472,
16,
527,
21889,
12,
3146,
3631,
629,
1769,
565,
289,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
7087,
1420,
12,
780,
1058,
13,
1216,
11228,
288,
3639,
312,
67,
7407,
1318,
18,
26226,
1420,
12,
81,
67,
2472,
16,
527,
21889,
12,
3146,
3631,
629,
1769,
565,
289,
2,
... |
gms.becomeCoordinator(); | gms.becomeCoordinator(); | void becomeSingletonMember(Address mbr) { Digest initial_digest; ViewId view_id=null; Vector mbrs=new Vector(1); // set the initial digest (since I'm the first member) initial_digest=new Digest(1); // 1 member (it's only me) initial_digest.add(gms.local_addr, 0, 0); // initial seqno mcast by me will be 1 (highest seen +1) gms.setDigest(initial_digest); view_id=new ViewId(mbr); // create singleton view with mbr as only member mbrs.addElement(mbr); gms.installView(new View(view_id, mbrs)); gms.becomeCoordinator(); gms.passUp(new Event(Event.BECOME_SERVER)); gms.passDown(new Event(Event.BECOME_SERVER)); if(log.isDebugEnabled()) log.debug("created group (first member). My view is " + gms.view_id + ", impl is " + gms.getImpl().getClass().getName()); } | 50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/6fb09c82ef4207cebcaea41da8650b37c61bc21d/ClientGmsImpl.java/buggy/src/org/jgroups/protocols/pbcast/ClientGmsImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
12561,
19571,
4419,
12,
1887,
312,
2848,
13,
288,
3639,
15864,
2172,
67,
10171,
31,
3639,
4441,
548,
1476,
67,
350,
33,
2011,
31,
3639,
5589,
312,
2848,
87,
33,
2704,
5589,
12,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
12561,
19571,
4419,
12,
1887,
312,
2848,
13,
288,
3639,
15864,
2172,
67,
10171,
31,
3639,
4441,
548,
1476,
67,
350,
33,
2011,
31,
3639,
5589,
312,
2848,
87,
33,
2704,
5589,
12,
21,... |
x = Support.convert(x, targetSqlType, connection.getCharSet()); | x = Support.convert(this, x, targetSqlType, connection.getCharSet()); | public void setObjectBase(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException { if (targetSqlType == java.sql.Types.CLOB) { targetSqlType = java.sql.Types.LONGVARCHAR; } else if (targetSqlType == java.sql.Types.BLOB) { targetSqlType = java.sql.Types.LONGVARBINARY; } if (x != null) { x = Support.convert(x, targetSqlType, connection.getCharSet()); if (scale >= 0) { if (x instanceof BigDecimal) { x = ((BigDecimal) x).setScale(scale, BigDecimal.ROUND_HALF_UP); } else if (x instanceof Number) { f.setMaximumFractionDigits(scale); x = Support.convert(f.format(x), targetSqlType, connection.getCharSet()); } } } setParameter(parameterIndex, x, targetSqlType, scale, 0); } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/56e9068ec616c6c95052dc39dce12c98471a778c/JtdsPreparedStatement.java/buggy/src/main/net/sourceforge/jtds/jdbc/JtdsPreparedStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
20530,
2171,
12,
474,
25412,
16,
1033,
619,
16,
509,
1018,
5101,
559,
16,
509,
3159,
13,
540,
1216,
6483,
288,
540,
309,
261,
3299,
5101,
559,
422,
2252,
18,
4669,
18,
2016,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20530,
2171,
12,
474,
25412,
16,
1033,
619,
16,
509,
1018,
5101,
559,
16,
509,
3159,
13,
540,
1216,
6483,
288,
540,
309,
261,
3299,
5101,
559,
422,
2252,
18,
4669,
18,
2016,
... |
return getDateTime(datePattern, aDate); | return getDateTime(getDatePattern(), aDate); | public static final String convertDateToString(Date aDate) { return getDateTime(datePattern, aDate); } | 30015 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/30015/b2bc2294c6bc5fd45eb48774a3356b447c9beb71/DateUtil.java/clean/src/service/org/appfuse/util/DateUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
514,
1765,
1626,
5808,
12,
1626,
279,
1626,
13,
288,
3639,
327,
25562,
12,
588,
1626,
3234,
9334,
279,
1626,
1769,
565,
289,
2,
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,
760,
727,
514,
1765,
1626,
5808,
12,
1626,
279,
1626,
13,
288,
3639,
327,
25562,
12,
588,
1626,
3234,
9334,
279,
1626,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.core.tests").find(new Path("/")).getFile(); | pluginRoot = Platform.asLocalURL(Platform.getPlugin("org.eclipse.cdt.core.tests").getDescriptor().getInstallURL()).getFile(); | protected void setUp() throws CoreException,FileNotFoundException { String pluginRoot; /*** * The tests assume that they have a working workspace * and workspace root object to use to create projects/files in, * so we need to get them setup first. */ workspace= ResourcesPlugin.getWorkspace(); root= workspace.getRoot(); monitor = new NullProgressMonitor(); if (workspace==null) fail("Workspace was not setup"); if (root==null) fail("Workspace root was not setup"); /*** * Setup the various files, paths and projects that are needed by the * tests */ testProject=CProjectHelper.createCProject("filetest", "none"); // since our test require that we can read the debug info from the exe whne must set the GNU elf // binary parser since the default (generic elf binary parser) does not do this. ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(testProject.getProject()); desc.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID); desc.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, "org.eclipse.cdt.core.GNU_ELF"); // Reset the binary parser the paths may have change. CCorePlugin.getDefault().getCoreModel().resetBinaryParser(testProject.getProject()); if (testProject==null) fail("Unable to create project"); pluginRoot=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.core.tests").find(new Path("/")).getFile(); cfile = testProject.getProject().getFile("exetest.c"); if (!cfile.exists()) { cfile.create(new FileInputStream(pluginRoot+"resources/exe/main.c"),false, monitor); } cpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.c"); objfile = testProject.getProject().getFile("exetest.o"); if (!objfile.exists()) { objfile.create(new FileInputStream(pluginRoot+"resources/exe/x86/o.g/main.o"),false, monitor); } objpath=new Path(workspace.getRoot().getLocation()+"/filetest/exetest.o"); exefile = testProject.getProject().getFile("test_g"); if (!exefile.exists()) { exefile.create(new FileInputStream(pluginRoot+"resources/exe/x86/o.g/exe_g"),false, monitor); } exepath=new Path(workspace.getRoot().getLocation()+"/filetest/exe_g"); ppcexefile = testProject.getProject().getFile("ppctest_g"); if (!ppcexefile.exists()) { ppcexefile.create(new FileInputStream(pluginRoot+"resources/exe/ppc/be.g/exe_g"),false, monitor); } ndexe = testProject.getProject().getFile("exetest"); if (!ndexe.exists()) { ndexe.create(new FileInputStream(pluginRoot+"resources/exe/x86/o/exe"),false, monitor); } bigexe = testProject.getProject().getFile("exebig_g"); if (!bigexe.exists()) { bigexe.create(new FileInputStream(pluginRoot+"resources/exebig/x86/o.g/exebig_g"),false, monitor); } archfile = testProject.getProject().getFile("libtestlib_g.a"); if (!archfile.exists()) { archfile.create(new FileInputStream(pluginRoot+"resources/testlib/x86/a.g/libtestlib_g.a"),false, monitor); } libpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.so"); libfile = testProject.getProject().getFile("libtestlib_g.so"); if (!libfile.exists()) { libfile.create(new FileInputStream(pluginRoot+"resources/testlib/x86/so.g/libtestlib_g.so"),false, monitor); } archpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.a"); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/c7241a4d1a2b349995391ece481e9305cd30072c/BinaryTests.java/buggy/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
225,
1216,
30015,
16,
812,
3990,
225,
288,
3639,
514,
1909,
2375,
31,
3639,
1783,
14,
540,
380,
1021,
7434,
6750,
716,
2898,
1240,
279,
5960,
6003,
540,
380,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24292,
1435,
225,
1216,
30015,
16,
812,
3990,
225,
288,
3639,
514,
1909,
2375,
31,
3639,
1783,
14,
540,
380,
1021,
7434,
6750,
716,
2898,
1240,
279,
5960,
6003,
540,
380,
471,
... |
System.out.println("received"); | if (debug) {System.out.println("received");} | private Response receiveResponse(isc_db_handle_impl db) throws GDSException { try { System.out.print("op_response "); int op = readOperation(db); if (op == op_response) { Response r = new Response(); r.resp_object = db.in.readInt(); System.out.println("op_response resp_object: " + r.resp_object); r.resp_blob_id = db.in.readLong(); System.out.println("op_response resp_blob_id: " + r.resp_blob_id); r.resp_data = db.in.readBuffer(); System.out.println("op_response resp_data size: " + r.resp_data.length); /* for (int i = 0; i < Math.min(r.resp_data.length, 16); i++) { System.out.println("byte: " + r.resp_data[i]); }*/ readStatusVector(db); System.out.println("received"); checkAllRead(db.in);//DEBUG return r; } else { System.out.println("not received: op is " + op); checkAllRead(db.in); return null;// throw new GDSException(isc_net_read_err); } } catch (IOException ex) { ex.printStackTrace(); throw new GDSException(isc_net_read_err, ex.toString()); } } | 6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/f95bfd6ee37ab19e341d5544efb72e22f83ecff2/GDS_Impl.java/buggy/src/org/firebirdsql/jgds/GDS_Impl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2306,
6798,
1064,
12,
291,
71,
67,
1966,
67,
4110,
67,
11299,
1319,
13,
1216,
611,
3948,
503,
288,
3639,
775,
288,
5411,
2332,
18,
659,
18,
1188,
2932,
556,
67,
2740,
315,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2306,
6798,
1064,
12,
291,
71,
67,
1966,
67,
4110,
67,
11299,
1319,
13,
1216,
611,
3948,
503,
288,
3639,
775,
288,
5411,
2332,
18,
659,
18,
1188,
2932,
556,
67,
2740,
315,
1769,
... |
currentArchiveFile.setClassLoader(); ArchiveReader archiveReader = new ArchiveReader(); String serviceStatus = ""; | ArchiveReader archiveReader; | public void doDeploy() { if (wsToDeploy.size() > 0) { for (int i = 0; i < wsToDeploy.size(); i++) { currentArchiveFile = (ArchiveFileData) wsToDeploy.get(i); int type = currentArchiveFile.getType(); try { currentArchiveFile.setClassLoader(); ArchiveReader archiveReader = new ArchiveReader(); String serviceStatus = ""; StringWriter errorWriter = new StringWriter(); switch (type) { case SERVICE: try { // ServiceDescription service = archiveReader.createService(currentArchiveFile.getAbsolutePath()); ServiceDescription service = archiveReader.createService(currentArchiveFile); service.setClassLoader(currentArchiveFile.getClassLoader()); archiveReader.processServiceDescriptor(currentArchiveFile.getAbsolutePath(), this, service);// archiveReader.readServiceArchive(currentArchiveFile.getAbsolutePath(),// this,// service); addnewService(service); log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS, currentArchiveFile.getName())); } catch (DeploymentException de) { log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE, currentArchiveFile.getName()));// log.info("DeploymentException " + de); PrintWriter error_ptintWriter = new PrintWriter(errorWriter); de.printStackTrace(error_ptintWriter); serviceStatus = "Error:\n" + errorWriter.toString();// de.printStackTrace(); } catch (AxisFault axisFault) {// axisFault.printStackTrace(); log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE, currentArchiveFile.getName()));// log.info("AxisFault " + axisFault); PrintWriter error_ptintWriter = new PrintWriter(errorWriter); axisFault.printStackTrace(error_ptintWriter); serviceStatus = "Error:\n" + errorWriter.toString(); } catch (Exception e) {// e.printStackTrace(); log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE, currentArchiveFile.getName()));// log.info("Exception " + e); PrintWriter error_ptintWriter = new PrintWriter(errorWriter); e.printStackTrace(error_ptintWriter); serviceStatus = "Error:\n" + errorWriter.toString(); } finally { if (serviceStatus.startsWith("Error:")) { axisConfig.getFaulytServices().put(getAxisServiceName(currentArchiveFile.getName()), serviceStatus); } currentArchiveFile = null; } break; case MODULE: String moduleStatus = ""; try { ModuleDescription metaData = new ModuleDescription(); archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(), this, metaData); addNewModule(metaData); log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE, metaData.getName().getLocalPart()));// "Moduel WS Name " +// currentArchiveFile.getName() +// " modulename :" +// metaData.getName()); } catch (DeploymentException e) {// e.printStackTrace(); log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE, currentArchiveFile.getName(), e.getMessage()));// "Invalid module" +// currentArchiveFile.getName());// log.info("DeploymentException " + e); PrintWriter error_ptintWriter = new PrintWriter(errorWriter); e.printStackTrace(error_ptintWriter); moduleStatus = "Error:\n" + errorWriter.toString(); } catch (AxisFault axisFault) {// axisFault.printStackTrace(); log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE, currentArchiveFile.getName(), axisFault.getMessage())); PrintWriter error_ptintWriter = new PrintWriter(errorWriter); axisFault.printStackTrace(error_ptintWriter); moduleStatus = "Error:\n" + errorWriter.toString(); } finally { if (moduleStatus.startsWith("Error:")) { axisConfig.getFaulytModules().put(getAxisServiceName(currentArchiveFile.getName()), moduleStatus); } currentArchiveFile = null; } break; } } catch (AxisFault axisFault) { log.info(Messages.getMessage(DeploymentErrorMsgs.SETTING_CL, axisFault.getMessage())); continue; } } } wsToDeploy.clear(); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/3389c598027d995e6c4f7c76b9e3d182cedba072/DeploymentEngine.java/clean/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
10015,
1435,
288,
3639,
309,
261,
4749,
774,
10015,
18,
1467,
1435,
405,
374,
13,
288,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
4945,
774,
10015,
18,
1467,
5621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
10015,
1435,
288,
3639,
309,
261,
4749,
774,
10015,
18,
1467,
1435,
405,
374,
13,
288,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
4945,
774,
10015,
18,
1467,
5621... |
OutputStream outputStream = response.getOutputStream(); | protected void marshallSoapMessage( HttpServletResponse response, byte[][] responseSoapParts) throws XmlaException { // Regardless of whats been put into the response so far, clear // it out. response.reset(); response.setStatus(HttpServletResponse.SC_OK); try { OutputStream outputStream = response.getOutputStream(); // If CharacterEncoding was set in web.xml, use this value String encoding = (charEncoding != null) ? charEncoding : response.getCharacterEncoding(); /* * Since we just reset response, encoding and content-type were * reset too */ if (charEncoding != null) { response.setCharacterEncoding(charEncoding); } response.setContentType("text/xml"); byte[] soapHeader = responseSoapParts[0]; byte[] soapBody = responseSoapParts[1]; Object[] byteChunks = new Object[5]; try { StringBuffer buf = new StringBuffer(500); buf.append("<?xml version=\"1.0\" encoding=\""); buf.append(encoding); buf.append("\"?>"); buf.append(nl); buf.append("<"); buf.append(SOAP_PREFIX); buf.append(":Envelope xmlns:"); buf.append(SOAP_PREFIX); buf.append("=\""); buf.append(NS_SOAP_ENV_1_1); buf.append("\" "); buf.append(SOAP_PREFIX); buf.append(":encodingStyle=\""); buf.append(NS_SOAP_ENC_1_1); buf.append("\" >"); buf.append(nl); buf.append("<"); buf.append(SOAP_PREFIX); buf.append(":Header>"); buf.append(nl); byteChunks[0] = buf.toString().getBytes(encoding); byteChunks[1] = soapHeader; buf.setLength(0); buf.append("</"); buf.append(SOAP_PREFIX); buf.append(":Header>"); buf.append(nl); buf.append("<"); buf.append(SOAP_PREFIX); buf.append(":Body>"); buf.append(nl); byteChunks[2] = buf.toString().getBytes(encoding); byteChunks[3] = soapBody; buf.setLength(0); buf.append(nl); buf.append("</"); buf.append(SOAP_PREFIX); buf.append(":Body>"); buf.append(nl); buf.append("</"); buf.append(SOAP_PREFIX); buf.append(":Envelope>"); buf.append(nl); byteChunks[4] = buf.toString().getBytes(encoding); } catch (UnsupportedEncodingException uee) { LOGGER.warn("This should be handled at begin of processing request", uee); } if (LOGGER.isDebugEnabled()) { StringBuffer buf = new StringBuffer(100); buf.append("XML/A response content").append(nl); try { for (int i = 0; i < byteChunks.length; i++) { byte[] chunk = (byte[]) byteChunks[i]; if (chunk != null && chunk.length > 0) { buf.append(new String(chunk, encoding)); } } } catch (UnsupportedEncodingException uee) { LOGGER.warn("This should be handled at begin of processing request", uee); } LOGGER.debug(buf.toString()); } if (LOGGER.isDebugEnabled()) { StringBuffer buf = new StringBuffer(); buf.append("XML/A response content").append(nl); } try { int bufferSize = 4096; ByteBuffer buffer = ByteBuffer.allocate(bufferSize); WritableByteChannel wch = Channels.newChannel(outputStream); ReadableByteChannel rch = null; for (int i = 0; i < byteChunks.length; i++) { if (byteChunks[i] == null || ((byte[]) byteChunks[i]).length == 0) continue; rch = Channels.newChannel(new ByteArrayInputStream((byte[]) byteChunks[i])); int readSize = 0; do { buffer.clear(); readSize = rch.read(buffer); buffer.flip(); int writeSize = 0; while((writeSize += wch.write(buffer)) < readSize); } while (readSize == bufferSize); rch.close(); } outputStream.flush(); } catch(IOException ioe) { LOGGER.error("Damn exception when transferring bytes over sockets", ioe); } } catch (XmlaException xex) { throw xex; } catch (Exception ex) { throw new XmlaException( SERVER_FAULT_FC, MSM_UNKNOWN_CODE, MSM_UNKNOWN_FAULT_FS, ex); } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/3660032154aa64408399bb342e3a3a4e2bad1098/DefaultXmlaServlet.java/clean/src/main/mondrian/xmla/impl/DefaultXmlaServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1833,
20601,
1079,
12,
5411,
12446,
766,
16,
5411,
1160,
63,
6362,
65,
766,
20601,
4305,
13,
2398,
1216,
5714,
69,
503,
288,
3639,
368,
2526,
1060,
2656,
434,
600,
2323,
2118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1833,
20601,
1079,
12,
5411,
12446,
766,
16,
5411,
1160,
63,
6362,
65,
766,
20601,
4305,
13,
2398,
1216,
5714,
69,
503,
288,
3639,
368,
2526,
1060,
2656,
434,
600,
2323,
2118,
... | |
extractAttachments(_call); } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } | public void endProgress() throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[9]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("http://server.webservice.server.genepattern.org", "endProgress")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } extractAttachments(_call); } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException;} } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/4a820be38a9edc1276f2a21752f65f71b51690d6/TaskIntegratorSoapBindingStub.java/clean/src/org/genepattern/webservice/TaskIntegratorSoapBindingStub.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
5491,
1435,
1216,
2252,
18,
8864,
77,
18,
5169,
503,
288,
3639,
309,
261,
9565,
18,
7097,
3293,
422,
446,
13,
288,
5411,
604,
394,
2358,
18,
19211,
18,
4890,
18,
2279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
5491,
1435,
1216,
2252,
18,
8864,
77,
18,
5169,
503,
288,
3639,
309,
261,
9565,
18,
7097,
3293,
422,
446,
13,
288,
5411,
604,
394,
2358,
18,
19211,
18,
4890,
18,
2279,
... | |
ConfigElement elt = (ConfigElement)value; mElementPropSheet.setElement(elt); if (mCustomEditors != null) { for(Iterator itr = mCustomEditors.iterator() ; itr.hasNext() ; ) { CustomEditor editor = (CustomEditor)itr.next(); mTabPane.remove(mTabPane.indexOfTab(editor.getTitle())); } mCustomEditors = null; } mCustomEditors = CustomEditorRegistry.findEditors(elt.getDefinition().getToken()); if (mCustomEditors != null) { for(Iterator itr = mCustomEditors.iterator() ; itr.hasNext() ; ) { CustomEditor editor = (CustomEditor)itr.next(); editor.setConfigElement(elt); mTabPane.add(editor.getPanel(), editor.getTitle()); } } } }); | }); | public ConfigContextEditor() { // Init the GUI try { jbInit(); } catch (Exception e) { e.printStackTrace(); } // Set up the tree mContextModel = new ConfigContextModel(); mElementTree.setModel(mContextModel); mElementTree.setCellRenderer(new ConfigContextCellRenderer()); mElementTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); // Setup a listener for the tree so that when an element is selected, the // appropriate element is displayed in the property sheet. mElementTree.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent evt) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)mElementTree.getLastSelectedPathComponent(); Object value = node.getUserObject(); if (value == null || !(value instanceof ConfigElement)) { return; } ConfigElement elt = (ConfigElement)value; mElementPropSheet.setElement(elt); if (mCustomEditors != null) { for(Iterator itr = mCustomEditors.iterator() ; itr.hasNext() ; ) { CustomEditor editor = (CustomEditor)itr.next(); mTabPane.remove(mTabPane.indexOfTab(editor.getTitle())); } mCustomEditors = null; } mCustomEditors = CustomEditorRegistry.findEditors(elt.getDefinition().getToken()); if (mCustomEditors != null) { for(Iterator itr = mCustomEditors.iterator() ; itr.hasNext() ; ) { CustomEditor editor = (CustomEditor)itr.next(); editor.setConfigElement(elt); mTabPane.add(editor.getPanel(), editor.getTitle()); } } } }); } | 49828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49828/6570edc444bc3748e2629f90eab19d87e3a6de67/ConfigContextEditor.java/buggy/modules/jackal/editors/org/vrjuggler/jccl/editors/ConfigContextEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
1903,
1042,
6946,
1435,
282,
288,
1377,
368,
4378,
326,
10978,
1377,
775,
1377,
288,
540,
20515,
2570,
5621,
1377,
289,
1377,
1044,
261,
503,
425,
13,
1377,
288,
540,
425,
18,
1188,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1903,
1042,
6946,
1435,
282,
288,
1377,
368,
4378,
326,
10978,
1377,
775,
1377,
288,
540,
20515,
2570,
5621,
1377,
289,
1377,
1044,
261,
503,
425,
13,
1377,
288,
540,
425,
18,
1188,... |
public boolean contains(P2PService service) { return this.groupOfAcquaintances.contains(service); | public BooleanWrapper contains(P2PService service) { return new BooleanWrapper(this.groupOfAcquaintances.contains(service)); | public boolean contains(P2PService service) { return this.groupOfAcquaintances.contains(service); } | 58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/0aad9a60aca347dacfc0f0039dbbb1671d89cbc5/P2PAcquaintanceManager.java/buggy/src/org/objectweb/proactive/p2p/service/P2PAcquaintanceManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1914,
12,
52,
22,
52,
1179,
1156,
13,
288,
3639,
327,
333,
18,
1655,
951,
9988,
372,
1598,
6872,
18,
12298,
12,
3278,
1769,
565,
289,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1914,
12,
52,
22,
52,
1179,
1156,
13,
288,
3639,
327,
333,
18,
1655,
951,
9988,
372,
1598,
6872,
18,
12298,
12,
3278,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (!isEnabled()) { unfiltered = findMarkers(new IResource[] { ResourcesPlugin .getWorkspace().getRoot() }, IResource.DEPTH_INFINITE, -1, mon, ignoreExceptions); } else { int limit = -1; | Collection findMarkers(IProgressMonitor mon, boolean ignoreExceptions) throws CoreException { List unfiltered = Collections.EMPTY_LIST; if (!isEnabled()) { unfiltered = findMarkers(new IResource[] { ResourcesPlugin .getWorkspace().getRoot() }, IResource.DEPTH_INFINITE, -1, mon, ignoreExceptions); } else { // int limit = getFilterOnMarkerLimit() ? getMarkerLimit() + 1 : -1; int limit = -1; switch (getOnResource()) { case ON_ANY_RESOURCE: { unfiltered = findMarkers(new IResource[] { ResourcesPlugin .getWorkspace().getRoot() }, IResource.DEPTH_INFINITE, limit, mon, ignoreExceptions); break; } case ON_SELECTED_RESOURCE_ONLY: { unfiltered = findMarkers(focusResource, IResource.DEPTH_ZERO, limit, mon, ignoreExceptions); break; } case ON_SELECTED_RESOURCE_AND_CHILDREN: { unfiltered = findMarkers(focusResource, IResource.DEPTH_INFINITE, limit, mon, ignoreExceptions); break; } case ON_ANY_RESOURCE_OF_SAME_PROJECT: { unfiltered = findMarkers(getProjects(focusResource), IResource.DEPTH_INFINITE, limit, mon, ignoreExceptions); break; } case ON_WORKING_SET: { unfiltered = findMarkers(getResourcesInWorkingSet(), IResource.DEPTH_INFINITE, limit, mon, ignoreExceptions); } } } if (unfiltered == null) { unfiltered = Collections.EMPTY_LIST; } return unfiltered; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/09a4c864bb83fb62a685d497a2df9ce5451376bd/MarkerFilter.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
2532,
1104,
21644,
12,
45,
5491,
7187,
6921,
16,
1250,
2305,
11416,
13,
1082,
202,
15069,
30015,
288,
202,
202,
682,
640,
12071,
273,
5737,
18,
13625,
67,
7085,
31,
202,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
2532,
1104,
21644,
12,
45,
5491,
7187,
6921,
16,
1250,
2305,
11416,
13,
1082,
202,
15069,
30015,
288,
202,
202,
682,
640,
12071,
273,
5737,
18,
13625,
67,
7085,
31,
202,
202,
430,
... | |
runTest( "+", new int[]{ PLUS, EOF } ); | runTest( "+", new int[]{ TokenTypes.PLUS, TokenTypes.EOF } ); | public void testPlus() { runTest( "+", new int[]{ PLUS, EOF } ); } | 47970 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47970/b2f4e150ff5bae2f46e3741f6b5c806f3f9446fa/XPathLexerTokenTest.java/buggy/src/java/test/org/jaxen/saxpath/base/XPathLexerTokenTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
13207,
1435,
565,
288,
3639,
1086,
4709,
12,
13773,
3113,
394,
509,
63,
7073,
3155,
2016,
18,
6253,
3378,
16,
3155,
2016,
18,
12706,
289,
11272,
565,
289,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
13207,
1435,
565,
288,
3639,
1086,
4709,
12,
13773,
3113,
394,
509,
63,
7073,
3155,
2016,
18,
6253,
3378,
16,
3155,
2016,
18,
12706,
289,
11272,
565,
289,
2,
-100,
-100,
... |
return null; | return cs; | public CodeScheme getCodeScheme() { CodeScheme cs = null; if (codePosition instanceof CodeScheme) { cs = (CodeScheme) codePosition; } else if (parent != null) { cs = parent.getCodeScheme(); } return null; } | 3071 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3071/60bd0949a623dd205fde69555642fa259d242be4/SymbolPart.java/clean/src/openmap/com/bbn/openmap/tools/symbology/milStd2525/SymbolPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3356,
9321,
6583,
9321,
1435,
288,
3639,
3356,
9321,
2873,
273,
446,
31,
3639,
309,
261,
710,
2555,
1276,
3356,
9321,
13,
288,
5411,
2873,
273,
261,
1085,
9321,
13,
981,
2555,
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,
3356,
9321,
6583,
9321,
1435,
288,
3639,
3356,
9321,
2873,
273,
446,
31,
3639,
309,
261,
710,
2555,
1276,
3356,
9321,
13,
288,
5411,
2873,
273,
261,
1085,
9321,
13,
981,
2555,
31,
... |
containingDocument.prepareForExternalEvents(pipelineContext); | containingDocument.prepareForExternalEventsSequence(pipelineContext); | private void executeExternalEventPrepareIfNecessary(PipelineContext pipelineContext, XFormsContainingDocument containingDocument, int[] sentEventCount, String eventName, String controlId, String otherControlId, String contextString) { if (sentEventCount[0] == 0) { // Prepare ContainingDocument containingDocument.prepareForExternalEvents(pipelineContext); } containingDocument.executeExternalEvent(pipelineContext, eventName, controlId, otherControlId, contextString, null); sentEventCount[0]++; } | 51410 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51410/cea433d5bce9b2974177c5566f94b0414f010953/XFormsServer.java/clean/src/java/org/orbeon/oxf/xforms/processor/XFormsServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1836,
6841,
1133,
7543,
26034,
12,
8798,
1042,
5873,
1042,
16,
1139,
18529,
24344,
2519,
4191,
2519,
16,
509,
8526,
3271,
1133,
1380,
16,
514,
7933,
16,
514,
3325,
548,
16,
514... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1836,
6841,
1133,
7543,
26034,
12,
8798,
1042,
5873,
1042,
16,
1139,
18529,
24344,
2519,
4191,
2519,
16,
509,
8526,
3271,
1133,
1380,
16,
514,
7933,
16,
514,
3325,
548,
16,
514... |
if ( namePattern.lastIndexOf( '%' ) == -1 ) { namePattern = namePattern + "%"; } | namePattern = namePattern + "%"; | private String getTailoredSearchText( String namePattern ) { if ( searchTxt.getText( ).length( ) > 0 ) { namePattern = searchTxt.getText( ); // Add the % by default if there is no such pattern if ( namePattern != null ) { if ( namePattern.lastIndexOf( '%' ) == -1 ) { namePattern = namePattern + "%"; } } } return namePattern; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/dfca913ab52a1c35308def530c47013de32db0dc/SQLDataSetEditorPage.java/clean/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
3181,
671,
7653,
2979,
1528,
12,
514,
508,
3234,
262,
202,
95,
202,
202,
430,
261,
1623,
21811,
18,
588,
1528,
12,
262,
18,
2469,
12,
262,
405,
374,
262,
202,
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,
514,
3181,
671,
7653,
2979,
1528,
12,
514,
508,
3234,
262,
202,
95,
202,
202,
430,
261,
1623,
21811,
18,
588,
1528,
12,
262,
18,
2469,
12,
262,
405,
374,
262,
202,
202,
95,... |
+ " while parsing XML stream", e); | + " while parsing XML stream: " + e.toString()); | public void fatalError(SAXParseException e) throws SAXException { // log and re-throw exception log.error("fatal error encountered at line: " + e.getLineNumber() + ", column: " + e.getColumnNumber() + " while parsing XML stream", e); throw e; } | 49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/db5b6327cfca6d04f3ed00f53e133e2e0f9746e5/ImportHandler.java/clean/src/java/org/apache/jackrabbit/core/xml/ImportHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10081,
668,
12,
55,
2501,
13047,
425,
13,
1216,
14366,
288,
3639,
368,
613,
471,
283,
17,
12849,
1520,
3639,
613,
18,
1636,
2932,
30709,
555,
9919,
622,
980,
30,
315,
397,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10081,
668,
12,
55,
2501,
13047,
425,
13,
1216,
14366,
288,
3639,
368,
613,
471,
283,
17,
12849,
1520,
3639,
613,
18,
1636,
2932,
30709,
555,
9919,
622,
980,
30,
315,
397,
42... |
return null; | return "PKCS#8"; | public String getFormat() { return null; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/8d26d9d8b3f09637143115b4f409f7a777da1c33/GnuDSAPrivateKey.java/clean/libraries/javalib/gnu/java/security/provider/GnuDSAPrivateKey.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
10959,
1435,
225,
288,
565,
327,
315,
26044,
7,
28,
14432,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
282,
1071,
514,
10959,
1435,
225,
288,
565,
327,
315,
26044,
7,
28,
14432,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
infoboxContent.addChild("#", "Are you sure you wish to unload " + request.getPartAsString("unload", MAX_PLUGIN_NAME_LENGTH) + "?"); | infoboxContent.addChild("#", "Are you sure you wish to unload " + request.getPartAsString("unload", MAX_PLUGIN_NAME_LENGTH) + '?'); | public void handlePost(URI uri, Bucket data, ToadletContext ctx) throws ToadletContextClosedException, IOException { HTTPRequest request = new HTTPRequest(uri, data, ctx); MultiValueTable headers = new MultiValueTable(); String pass = request.getPartAsString("formPassword", 32); if((pass == null) || !pass.equals(core.formPassword)) { MultiValueTable hdrs = new MultiValueTable(); headers.put("Location", "/queue/"); ctx.sendReplyHeaders(302, "Found", hdrs, null, 0); return; } if (request.isPartSet("load")) { if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "Loading "+request.getPartAsString("load", MAX_PLUGIN_NAME_LENGTH)); pm.startPlugin(request.getPartAsString("load", MAX_PLUGIN_NAME_LENGTH), true); //writeReply(ctx, 200, "text/html", "OK", mkForwardPage("Loading plugin", "Loading plugin...", ".", 5)); headers.put("Location", "."); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; }if (request.isPartSet("cancel")){ headers.put("Location", "/plugins/"); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; }if (request.getPartAsString("unloadconfirm", MAX_PLUGIN_NAME_LENGTH).length() > 0) { pm.killPlugin(request.getPartAsString("unloadconfirm", MAX_PLUGIN_NAME_LENGTH)); HTMLNode pageNode = ctx.getPageMaker().getPageNode("Plugins"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-success"); infobox.addChild("div", "class", "infobox-header", "Plugin unloaded"); HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content"); infoboxContent.addChild("#", "The plugin " + request.getPartAsString("remove", MAX_PLUGIN_NAME_LENGTH) + " has been unloaded."); infoboxContent.addChild("br"); infoboxContent.addChild("a", "href", "/plugins/", "Return to Plugin page."); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); return; }if (request.getPartAsString("unload", MAX_PLUGIN_NAME_LENGTH).length() > 0) { HTMLNode pageNode = ctx.getPageMaker().getPageNode("Plugins"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-query"); infobox.addChild("div", "class", "infobox-header", "Unload plugin?"); HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content"); infoboxContent.addChild("#", "Are you sure you wish to unload " + request.getPartAsString("unload", MAX_PLUGIN_NAME_LENGTH) + "?"); HTMLNode unloadForm = infoboxContent.addChild("form", new String[] { "action", "method" }, new String[] { "/plugins/", "post" }); unloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword }); unloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "cancel", "Cancel" }); unloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "unloadconfirm", request.getPartAsString("unload", MAX_PLUGIN_NAME_LENGTH) }); unloadForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "confirm", "Unload" }); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); return; }else if (request.getPartAsString("reload", MAX_PLUGIN_NAME_LENGTH).length() > 0) { String fn = null; Iterator it = pm.getPlugins().iterator(); while (it.hasNext()) { PluginInfoWrapper pi = (PluginInfoWrapper) it.next(); if (pi.getThreadName().equals(request.getPartAsString("reload", MAX_PLUGIN_NAME_LENGTH))) { fn = pi.getFilename(); break; } } if (fn == null) { this.sendErrorPage(ctx, 404, "Plugin Not Found", "The specified plugin could not be located in order to reload it."); //writeReply(ctx, 200, "text/html", "OK", mkForwardPage(ctx,"Error", "Plugin not found...", ".", 5)); } else { pm.killPlugin(request.getPartAsString("reload", MAX_PLUGIN_NAME_LENGTH)); pm.startPlugin(fn, true); headers.put("Location", "."); ctx.sendReplyHeaders(302, "Found", headers, null, 0); } return; }else { // Ignore headers.put("Location", "."); ctx.sendReplyHeaders(302, "Found", headers, null, 0); } } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/62fd59041864b4ed1f43adc676de6bfb5ea977f3/PproxyToadlet.java/clean/src/freenet/clients/http/PproxyToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
3349,
12,
3098,
2003,
16,
7408,
501,
16,
2974,
361,
1810,
1042,
1103,
13,
202,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
288,
9506,
202,
23891,
590,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
3349,
12,
3098,
2003,
16,
7408,
501,
16,
2974,
361,
1810,
1042,
1103,
13,
202,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
288,
9506,
202,
23891,
590,
2... |
if (blockedJobs.contains(tw.jobKey)) tw.state = TriggerWrapper.STATE_PAUSED_BLOCKED; | if (blockedJobs.contains(tw.jobKey)) { tw.state = TriggerWrapper.STATE_PAUSED_BLOCKED; } } else if (blockedJobs.contains(tw.jobKey)) { tw.state = TriggerWrapper.STATE_BLOCKED; } else { addToTimeTriggers(tw); | public void storeTrigger(SchedulingContext ctxt, Trigger newTrigger, boolean replaceExisting) throws JobPersistenceException { TriggerWrapper tw = new TriggerWrapper(newTrigger); if (tw.nextFireTime < this.nextFireTime) this.nextFireTime = tw.nextFireTime; if (triggersByFQN.get(tw.key) != null) { if (!replaceExisting) throw new ObjectAlreadyExistsException(newTrigger); removeTrigger(ctxt, newTrigger.getName(), newTrigger.getGroup()); } if (retrieveJob(ctxt, newTrigger.getJobName(), newTrigger.getJobGroup()) == null) throw new JobPersistenceException("The job (" + newTrigger.getFullJobName() + ") referenced by the trigger does not exist."); synchronized (triggerLock) { // add to triggers array triggers.add(tw); // add to triggers by group HashMap grpMap = (HashMap) triggersByGroup.get(newTrigger .getGroup()); if (grpMap == null) { grpMap = new HashMap(100); triggersByGroup.put(newTrigger.getGroup(), grpMap); } grpMap.put(newTrigger.getName(), tw); // add to triggers by FQN map triggersByFQN.put(tw.key, tw); synchronized (pausedTriggerGroups) { if (pausedTriggerGroups.contains(newTrigger.getGroup())) { tw.state = TriggerWrapper.STATE_PAUSED; if (blockedJobs.contains(tw.jobKey)) tw.state = TriggerWrapper.STATE_PAUSED_BLOCKED; } else if (blockedJobs.contains(tw.jobKey)) tw.state = TriggerWrapper.STATE_BLOCKED; else addToTimeTriggers(tw); } } } | 3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/0ca5d7d851637eb8695746dba9608de14253a225/RAMJobStore.java/buggy/src/java/org/quartz/simpl/RAMJobStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1707,
6518,
12,
25401,
1042,
14286,
16,
11321,
394,
6518,
16,
5411,
1250,
1453,
9895,
13,
1216,
3956,
13182,
503,
288,
3639,
11321,
3611,
2339,
273,
394,
11321,
3611,
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,
1707,
6518,
12,
25401,
1042,
14286,
16,
11321,
394,
6518,
16,
5411,
1250,
1453,
9895,
13,
1216,
3956,
13182,
503,
288,
3639,
11321,
3611,
2339,
273,
394,
11321,
3611,
12,
2704,
... |
m_gtp.send(cmd); | return m_gtp.send(cmd); | private void send(String cmd) throws GtpError { m_gtp.send(cmd); } | 48906 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48906/4a5428fc3fadbc79933169a0cbd21d0545a60e30/GtpAdapter.java/clean/src/net/sf/gogui/gtpadapter/GtpAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
12,
780,
1797,
13,
1216,
611,
6834,
668,
565,
288,
3639,
327,
312,
67,
4521,
84,
18,
4661,
12,
4172,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
918,
1366,
12,
780,
1797,
13,
1216,
611,
6834,
668,
565,
288,
3639,
327,
312,
67,
4521,
84,
18,
4661,
12,
4172,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
pipelinedChildren = pipelinedContentProvider.getPipelinedChildren( | pipelinedContentProvider.getPipelinedChildren( | private Set pipelineChildren(Object aParent, NavigatorContentExtension[] theOverridingExtensions, Set theCurrentChildren) { IPipelinedTreeContentProvider pipelinedContentProvider; NavigatorContentExtension[] overridingExtensions; Set pipelinedChildren = theCurrentChildren; for (int i = 0; i < theOverridingExtensions.length; i++) { pipelinedContentProvider = (IPipelinedTreeContentProvider) theOverridingExtensions[i] .getContentProvider(); pipelinedChildren = pipelinedContentProvider.getPipelinedChildren( aParent, pipelinedChildren); overridingExtensions = theOverridingExtensions[i] .getOverridingExtensionsForTriggerPoint(aParent); if (overridingExtensions.length > 0) pipelinedChildren = pipelineChildren(aParent, overridingExtensions, pipelinedChildren); } return pipelinedChildren; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/c93d807ed962723d90daba76fc2003e2c1801cbc/NavigatorContentServiceContentProvider.java/clean/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1000,
5873,
4212,
12,
921,
279,
3054,
16,
1082,
202,
22817,
1350,
3625,
8526,
326,
22042,
10415,
7513,
16,
1082,
202,
694,
326,
3935,
4212,
13,
288,
202,
202,
2579,
625,
292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1000,
5873,
4212,
12,
921,
279,
3054,
16,
1082,
202,
22817,
1350,
3625,
8526,
326,
22042,
10415,
7513,
16,
1082,
202,
694,
326,
3935,
4212,
13,
288,
202,
202,
2579,
625,
292,
... |
getFullName() + "\".", Annotate.getLineNumber(this)); | getFullName() + "\".", Annotate.getPosition(this)); | public Node removeAmbiguities( LocalContext c) throws SemanticException { Node top = null; if (prefix != null) { if (prefix instanceof TypeNode) { /* Try static fields. */ Type type = ((TypeNode) prefix).getType(); if (type.isReferenceType()) { try { ReferenceType refType = type.toReferenceType(); FieldInstance fi = c.getTypeSystem().getField(refType, name, c); top = new FieldExpression(c.getExtensionFactory(). getNewFieldExpressionExtension(), (TypeNode) prefix, fi ); } catch (SemanticException e) { } } /* Try inner classes. */ if (top == null && (type.isClassType() || type.isPackageType())) { Type topType = c.getTypeSystem().checkAndResolveType( new AmbiguousNameType(c.getTypeSystem(), name), type); top = new TypeNode(topType); } } else if (prefix instanceof Expression) { /* Try non-static fields. */ top = new FieldExpression( c.getExtensionFactory().getNewFieldExpressionExtension(), (Expression) prefix, name ); } } else { try { /* First try local variables and fields. */ VariableInstance vi = c.getVariable(name); if (vi instanceof FieldInstance) { FieldInstance fi = (FieldInstance) vi; if (fi.getAccessFlags().isStatic() ) { top = new FieldExpression(c.getExtensionFactory(). getNewFieldExpressionExtension(), new TypeNode(fi.getEnclosingType()), fi ); } else { ClassType container = c.getFieldContainingClass(name); TypeNode base = null; if (!c.getTypeSystem().isSameType(container, c.getCurrentClass())) { base = new TypeNode(container); } top = new FieldExpression(c.getExtensionFactory(). getNewFieldExpressionExtension(), new SpecialExpression(c.getExtensionFactory(). getNewSpecialExpressionExtension(), base, SpecialExpression.THIS), fi); } } else if (vi instanceof LocalInstance) { top = new LocalVariableExpression(c.getExtensionFactory(). getNewLocalVariableExpressionExtension(), name); } else { throw new SemanticException("No field or variable with name \"" + getFullName() + "\".", Annotate.getLineNumber(this)); } } catch (SemanticException e) { /* Then try types. */ Type topType = c.getType(name); if (topType != null) { top = new TypeNode(topType); } } } if( top != null) { Annotate.setLineNumber( top, Annotate.getLineNumber( this)); } else { throw new SemanticException( "No package, type, field, or variable " + "with name \"" + getFullName() + "\".", Annotate.getLineNumber(this)); } return top; } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/96c2c0f08db74e6b67885d020d1aa6b2502f09f2/AmbiguousName.java/clean/src/polyglot/ast/AmbiguousName.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2029,
1206,
30706,
8810,
1961,
12,
3566,
1042,
276,
13,
1216,
24747,
503,
225,
288,
565,
2029,
1760,
273,
446,
31,
565,
309,
261,
3239,
480,
446,
13,
288,
202,
430,
261,
3239,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2029,
1206,
30706,
8810,
1961,
12,
3566,
1042,
276,
13,
1216,
24747,
503,
225,
288,
565,
2029,
1760,
273,
446,
31,
565,
309,
261,
3239,
480,
446,
13,
288,
202,
430,
261,
3239,
127... |
LOG.debug("splits["+j+"]="+splits[j]+" count=" + count); | public void testFormat() throws Exception { JobConf job = new JobConf(conf); FileSystem fs = FileSystem.getNamed("local", conf); Path dir = new Path(System.getProperty("test.build.data",".") + "/mapred"); Path file = new Path(dir, "test.txt"); Reporter reporter = new Reporter() { public void setStatus(String status) throws IOException {} public void progress() throws IOException {} }; int seed = new Random().nextInt(); //LOG.info("seed = "+seed); Random random = new Random(seed); fs.delete(dir); job.setInputPath(dir); // for a variety of lengths for (int length = 0; length < MAX_LENGTH; length+= random.nextInt(MAX_LENGTH/10)+1) { //LOG.info("creating; entries = " + length); // create a file with length entries Writer writer = new OutputStreamWriter(fs.create(file)); try { for (int i = 0; i < length; i++) { writer.write(Integer.toString(i)); writer.write("\n"); } } finally { writer.close(); } // try splitting the file in a variety of sizes InputFormat format = new TextInputFormat(); LongWritable key = new LongWritable(); Text value = new Text(); for (int i = 0; i < 3; i++) { int numSplits = random.nextInt(MAX_LENGTH/20)+1; //LOG.info("splitting: requesting = " + numSplits); FileSplit[] splits = format.getSplits(fs, job, numSplits); //LOG.info("splitting: got = " + splits.length); // check each split BitSet bits = new BitSet(length); for (int j = 0; j < splits.length; j++) { RecordReader reader = format.getRecordReader(fs, splits[j], job, reporter); try { int count = 0; while (reader.next(key, value)) { int v = Integer.parseInt(value.toString()); // if (bits.get(v)) { // LOG.info("splits["+j+"]="+splits[j]+" : " + v); // LOG.info("@"+reader.getPos()); // } assertFalse("Key in multiple partitions.", bits.get(v)); bits.set(v); count++; } //LOG.info("splits["+j+"]="+splits[j]+" count=" + count); } finally { reader.close(); } } assertEquals("Some keys in no partition.", length, bits.cardinality()); } } } | 48130 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48130/48264173e88fdcd9b42c4d801117c3b7cb289242/TestTextInputFormat.java/clean/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2018,
18,
4148,
2932,
21902,
9614,
15,
78,
9078,
65,
1546,
15,
21902,
63,
78,
3737,
6,
1056,
1546,
397,
1056,
1769,
2018,
18,
4148,
2932,
21902,
9614,
15,
78,
9078,
65,
1546,
15,
21902,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2018,
18,
4148,
2932,
21902,
9614,
15,
78,
9078,
65,
1546,
15,
21902,
63,
78,
3737,
6,
1056,
1546,
397,
1056,
1769,
2018,
18,
4148,
2932,
21902,
9614,
15,
78,
9078,
65,
1546,
15,
21902,
63,
... | |
char [] patternArray = patternString.toCharArray(); | private static CSearchPattern createDerivedPattern(String patternString, SearchFor searchFor, LimitTo limitTo, int matchMode, boolean caseSensitive) { IScanner scanner =null; try { scanner = ParserFactory.createScanner( new CodeReader(patternString.toCharArray()), new ScannerInfo(), ParserMode.QUICK_PARSE, ParserLanguage.CPP, callback, nullLog, null); } catch (ParserFactoryError e1) { } searchFor = DERIVED; LinkedList list = scanForNames( scanner, null ); char[] name = (char [])list.removeLast(); char [][] qualifications = new char[0][]; return new DerivedTypesPattern( name, (char[][])list.toArray( qualifications ), searchFor, limitTo, matchMode, caseSensitive ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/75fee20f69852f5219e039afb6665d56da8886f9/CSearchPattern.java/clean/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3001,
5378,
1936,
1076,
273,
1936,
780,
18,
869,
15936,
5621,
760,
3001,
5378,
1936,
1076,
273,
1936,
780,
18,
869,
15936,
5621,
385,
2979,
3234,
3001,
5378,
1936,
1076,
273,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3001,
5378,
1936,
1076,
273,
1936,
780,
18,
869,
15936,
5621,
760,
3001,
5378,
1936,
1076,
273,
1936,
780,
18,
869,
15936,
5621,
385,
2979,
3234,
3001,
5378,
1936,
1076,
273,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.