rem
stringlengths
1
53.3k
add
stringlengths
0
80.5k
context
stringlengths
6
326k
meta
stringlengths
141
403
input_ids
list
attention_mask
list
labels
list
String pre = woresponse.contentString();
int offset = woresponse.contentString().length();
public void appendToResponse(WOResponse woresponse, WOContext wocontext) { String pre = woresponse.contentString(); super.appendToResponse(woresponse, wocontext); if(cleanupXHTML) correctResponse(woresponse, pre.length(), pre); }
22541 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22541/ebda80220a212da041a02659634dbf9a30a022ad/ERXPatcher.java/clean/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXPatcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 16022, 1064, 12, 59, 51, 1064, 341, 83, 2740, 16, 678, 51, 1042, 341, 16550, 955, 13, 288, 7734, 509, 1384, 273, 341, 83, 2740, 18, 1745, 780, 7675, 2469, 5621, 7734, 2240, 18, 6923, 774, 1064, 12, 6933, 2740, 16, 341, 16550, 955, 1769, 7734, 309, 12, 16732, 60, 4870, 13, 10792, 3434, 1064, 12, 6933, 2740, 16, 675, 18, 2469, 9334, 675, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 16022, 1064, 12, 59, 51, 1064, 341, 83, 2740, 16, 678, 51, 1042, 341, 16550, 955, 13, 288, 7734, 509, 1384, 273, 341, 83, 2740, 18, 1745, 780, 7675, 2469, 5621, 7734, 2240, 18, 6923, 774, 1064, 12, 6933, 2740, 16, 341, 16550, 955, 1769, 7734, 309, 12, 16732, 60, 4870, 13, 10792, 3434, 1064, 12, 6933, 2740, 16, 675, 18, 2469, 9334, 675, 1769, 5411, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if (this.buildSetting.usePolishGui() && this.styleSheetFile == null) {
if (this.buildSetting.usePolishGui() && this.styleSheetSourceFile == null) {
private void initProject() { // create debug manager: boolean isDebugEnabled = this.buildSetting.isDebugEnabled(); DebugManager debugManager = null; if (isDebugEnabled) { try { debugManager = new DebugManager( this.buildSetting.getDebugSetting() ); } catch (BuildException e) { throw new BuildException( e.getMessage(), e ); } } // create project settings: this.polishProject = new PolishProject( this.buildSetting.usePolishGui(), isDebugEnabled, debugManager ); if (debugManager != null && debugManager.isVerbose()) { this.polishProject.addFeature("debugVerbose"); } if (debugManager != null && this.buildSetting.getDebugSetting().showLogOnError()) { this.polishProject.addFeature("showLogOnError"); } this.polishProject.addCapability("license", this.infoSetting.getlicense() ); if (isDebugEnabled) { this.polishProject.addFeature("debugEnabled"); } // specify some preprocessing symbols depending on the selected features: this.polishProject.addFeature(this.buildSetting.getImageLoadStrategy()); if (debugManager != null && this.buildSetting.getDebugSetting().useGui()) { this.polishProject.addFeature("useDebugGui"); } FullScreenSetting fullScreenSetting = this.buildSetting.getFullScreenSetting(); if (fullScreenSetting != null) { if (fullScreenSetting.isMenu()) { this.polishProject.addFeature("useMenuFullScreen"); this.polishProject.addFeature("useFullScreen"); } else if (fullScreenSetting.isEnabled()) { this.polishProject.addFeature("useFullScreen"); } } // add all ant properties if desired: if (this.buildSetting.includeAntProperties()) { Hashtable antProperties = this.project.getProperties(); Set keySet = antProperties.keySet(); for (Iterator iter = keySet.iterator(); iter.hasNext();) { String key = (String) iter.next(); this.polishProject.addDirectCapability( key, (String) antProperties.get(key) ); } } // add all variables from the build.xml: Variable[] variables = this.buildSetting.getVariables(); if (variables != null) { ArrayList conditionalVarsList = new ArrayList(); for (int i = 0; i < variables.length; i++) { Variable var = variables[i]; //System.out.println("adding variable [" + var.getName() + "]." ); if (var.hasCondition()) { conditionalVarsList.add( var ); } else { this.polishProject.addDirectCapability( var ); } } this.conditionalVariables = (Variable[]) conditionalVarsList.toArray( new Variable[ conditionalVarsList.size() ]); } // add all symbols from the build.xml: String symbolDefinition = this.buildSetting.getSymbols(); if (symbolDefinition != null) { String[] symbols = TextUtil.splitAndTrim( symbolDefinition, ',' ); for (int i = 0; i < symbols.length; i++) { this.polishProject.addDirectFeature( symbols[i] ); } } // create LibraryManager: try { this.libraryManager = new LibraryManager( this.project.getProperties(), this.buildSetting.getApiDir().getAbsolutePath(), this.wtkHome, this.buildSetting.getPreverify().getAbsolutePath(), this.buildSetting.openApis() ); } catch (JDOMException e) { throw new BuildException("unable to create api manager: " + e.getMessage(), e ); } catch (IOException e) { throw new BuildException("unable to create api manager: " + e.getMessage(), e ); } catch (InvalidComponentException e) { throw new BuildException("unable to create api manager: " + e.getMessage(), e ); } // create vendor/group/device manager: try { VendorManager vendorManager = new VendorManager( this.polishProject, this.buildSetting.openVendors()); DeviceGroupManager groupManager = new DeviceGroupManager( this.buildSetting.openGroups() ); this.deviceManager = new DeviceManager( vendorManager, groupManager, this.libraryManager, this.buildSetting.openDevices() ); } catch (JDOMException e) { throw new BuildException("unable to create device manager: " + e.getMessage(), e ); } catch (IOException e) { throw new BuildException("unable to create device manager: " + e.getMessage(), e ); } catch (InvalidComponentException e) { throw new BuildException("unable to create device manager: " + e.getMessage(), e ); } // create CSS attributes manager: if (this.buildSetting.usePolishGui()) { this.cssAttributesManager = new CssAttributesManager( this.buildSetting.openStandardCssAttributes() ); InputStream is = this.buildSetting.openCustomCssAttributes(); if (is != null) { this.cssAttributesManager.addCssAttributes(is); } } // create preprocessor: this.preprocessor = new Preprocessor( this.polishProject, null, null, null, false, true, null ); // init line processors: PreprocessorSetting[] settings = this.buildSetting.getPreprocessors(); CustomPreprocessor[] processors = new CustomPreprocessor[ settings.length + 1]; // add the default line processor: CustomPreprocessor lineProcessor = new PolishPreprocessor(); lineProcessor.init(this.preprocessor); processors[0] = lineProcessor; for (int i = 0; i < settings.length; i++) { PreprocessorSetting setting = settings[i]; processors[ i + 1] = CustomPreprocessor.getInstance(setting, this.preprocessor, this.project ); } this.preprocessor.setCustomPreprocessors( processors ); // initialise the preprocessing-source-directories: DirectoryScanner dirScanner = new DirectoryScanner(); dirScanner.setIncludes( new String[]{"**/*.java"} ); File[] dirs = this.buildSetting.getSourceDirs(); this.sourceDirs = new File[ dirs.length]; this.sourceFiles = new TextFile[ dirs.length][]; if (this.buildSetting.getPolishDir() != null) { // there is an explicit J2ME Polish directory: this.polishSourceDir = this.buildSetting.getPolishDir(); dirScanner.setBasedir(this.polishSourceDir); dirScanner.scan(); this.polishSourceFiles = getTextFiles( this.polishSourceDir, dirScanner.getIncludedFiles() ); } else { // the J2ME Polish sources need to be loaded from the jar-file: long lastModificationTime = 0; File jarFile = new File( this.buildSetting.getApiDir().getAbsolutePath() + File.separator + "enough-j2mepolish-build.jar"); if (jarFile.exists()) { lastModificationTime = jarFile.lastModified(); } else { jarFile = new File("import/enough-j2mepolish-build.jar"); if (jarFile.exists()) { lastModificationTime = jarFile.lastModified(); } } this.polishSourceDir = new File("src"); try { String[] fileNames = this.resourceUtil.readTextFile( ".", "build/j2mepolish.index.txt"); this.polishSourceFiles = getTextFiles( "src", fileNames, lastModificationTime ); } catch (IOException e) { throw new BuildException("Unable to load the J2ME source files from enough-j2mepolish-build.jar: " + e.getMessage(), e ); } } // load the normal source files: for (int i = 0; i < dirs.length; i++) { File dir = dirs[i]; if (!dir.exists()) { throw new BuildException("The source-directory [" + dir.getAbsolutePath() + "] does not exist. Please check your settings in the [sourceDir] attribute of the <build> element."); } this.sourceDirs[i] = dir; dirScanner.setBasedir(dir); dirScanner.scan(); this.sourceFiles[i] = getTextFiles( dir, dirScanner.getIncludedFiles() ); } if (this.buildSetting.usePolishGui() && this.styleSheetFile == null) { throw new BuildException("Did not find the file [StyleSheet.java] of the J2ME Polish GUI framework. Please adjust the [polishDir] attribute of the <build> element in the [build.xml] file. The [polishDir]-attribute should point to the directory which contains the J2ME Polish-Java-sources."); } // load third party binary libraries, if any. // When there are third party libraries, they will all be extracted // and copied to the build/binary folder for easier integration: File[] binaryLibraries = this.buildSetting.getBinaryLibraries(); if (binaryLibraries != null) { File targetDir = new File( this.buildSetting.getWorkDir().getAbsolutePath() + File.separatorChar + "binary"); String cacheDirName = this.buildSetting.getWorkDir().getAbsolutePath() + File.separatorChar + "binarycache" + File.separatorChar; this.binaryLibrariesDir = targetDir; for (int i = 0; i < binaryLibraries.length; i++) { File lib = binaryLibraries[i]; if (lib.isDirectory()) { // a directory can contain library-files (jar, zip) as well // as plain class or resource files. Each library-file // will be extracted whereas other files will just be copied // to the build/binary folder. DirectoryScanner binaryScanner = new DirectoryScanner(); binaryScanner.setBasedir( lib ); // just include all files in the directory: binaryScanner.scan(); String[] includedFiles = binaryScanner.getIncludedFiles(); for (int j = 0; j < includedFiles.length; j++) { String fileName = includedFiles[j]; File file = new File( lib.getAbsolutePath() + File.separatorChar + fileName ); if (fileName.endsWith(".zip") || fileName.endsWith(".jar")) { // this is a library file: // only extract it when the original is newer than the copy: File cacheCopy = new File( cacheDirName + fileName ); if ( (!cacheCopy.exists()) || (file.lastModified() > cacheCopy.lastModified())) { this.binaryLibrariesUpdated = true; try { // copy the library to the cache: FileUtil.copy(file, cacheCopy ); // unzip / unjar the content: JarUtil.unjar(file, targetDir); } catch (IOException e) { e.printStackTrace(); throw new BuildException("Unable to extract the binary class files from the library [" + file.getAbsolutePath() + "]: " + e.toString(), e ); } } } else { // this is a normal class or resource file: try { File targetFile = new File( targetDir.getAbsolutePath() + File.separatorChar + fileName ); // copy the file only when it is newer // than the existing copy: if ( (!targetFile.exists()) || (file.lastModified() > targetFile.lastModified()) ) { this.binaryLibrariesUpdated = true; FileUtil.copy(file, targetFile); } } catch (IOException e) { e.printStackTrace(); throw new BuildException("Unable to copy the binary class files from the library [" + lib.getAbsolutePath() + "]: " + e.toString(), e ); } } } } else { // this is a library (jar or zip) file: // copy only when the original is newer than the cached copy: File cacheCopy = new File( cacheDirName + lib.getName() ); if ( (!cacheCopy.exists()) || (lib.lastModified() > cacheCopy.lastModified())) { try { this.binaryLibrariesUpdated = true; // copy the library to the cache: FileUtil.copy(lib, cacheCopy ); // unzip / unjar the content: JarUtil.unjar(lib, targetDir); } catch (IOException e) { e.printStackTrace(); throw new BuildException("Unable to extract the binary class files from the library [" + lib.getAbsolutePath() + "]: " + e.toString(), e ); } } } } } // done preparing of binary libraries. // init boot class path: this.midp1BootClassPath = new Path( this.project, this.buildSetting.getMidp1Path().getAbsolutePath()); this.midp2BootClassPath = new Path( this.project, this.buildSetting.getMidp2Path().getAbsolutePath()); this.midp2Cldc11BootClassPath = new Path( this.project, this.buildSetting.getMidp2Cldc11Path().getAbsolutePath()); // init obfuscators: if (this.buildSetting.doObfuscate()) { ObfuscatorSetting[] obfuscatorSettings = this.buildSetting.getObfuscatorSettings(); ArrayList obfuscatorsList = new ArrayList(); String[] keepClasses = null; for (int i = 0; i < obfuscatorSettings.length; i++) { ObfuscatorSetting obfuscatorSetting = obfuscatorSettings[i]; if (keepClasses == null && obfuscatorSetting.hasKeepDefinitions()) { keepClasses = obfuscatorSetting.getPreserveClassNames(); } if ((obfuscatorSetting.isEnabled())) { Obfuscator obfuscator = Obfuscator.getInstance( obfuscatorSetting, this.project, this.buildSetting.getApiDir(), this.libraryManager ); obfuscatorsList.add( obfuscator ); } } this.doObfuscate = (obfuscatorsList.size() > 0); if (this.doObfuscate) { this.obfuscators = (Obfuscator[]) obfuscatorsList.toArray( new Obfuscator[ obfuscatorsList.size() ] ); String[] midletClasses = this.buildSetting.getMidletClassNames(); if (keepClasses == null) { keepClasses = new String[0]; } this.preserveClasses = new String[ keepClasses.length + midletClasses.length ]; System.arraycopy( keepClasses, 0, this.preserveClasses, 0, keepClasses.length ); System.arraycopy( midletClasses, 0, this.preserveClasses, keepClasses.length, midletClasses.length ); } } // init import manager: this.importConverter = new ImportConverter(); // init base style sheet: if (this.buildSetting.usePolishGui()) { ResourceSetting resourceSetting = this.buildSetting.getResourceSetting(); File cssFile = new File( resourceSetting.getDir().getAbsolutePath() + File.separatorChar + "polish.css"); if (!cssFile.exists()) { log("Unable to find polish.css at [" + cssFile.getAbsolutePath() + "] - you should create this file when you want to make most of the J2ME Polish GUI.", Project.MSG_WARN ); this.styleSheet = new StyleSheet(); } else { CssReader cssReader = new CssReader(); try { cssReader.add(cssFile); } catch (IOException e) { throw new BuildException("Unable to load polish.css: " + e.getMessage(), e ); } this.styleSheet = cssReader.getStyleSheet(); } } // set the names of the midlets: this.midletClassesByName = new HashMap(); String[] midletClasses = this.buildSetting.getMidletClassNames(); for (int i = 0; i < midletClasses.length; i++) { this.midletClassesByName.put( midletClasses[i], Boolean.TRUE ); } // get the java-extension: this.javaExtensions = this.buildSetting.getJavaExtensions(); // get the javac-settings: this.javacTarget = this.buildSetting.getJavacTarget(); // get the resource manager: this.resourceManager = new ResourceManager( this.buildSetting.getResourceSetting(), this.project, this.preprocessor.getBooleanEvaluator() ); this.supportedLocales = this.resourceManager.getLocales(); if (this.supportedLocales != null) { // add the preprocessor for translations: PreprocessorSetting setting = new PreprocessorSetting(); setting.setClass("de.enough.polish.preprocess.custom.TranslationPreprocessor"); this.translationPreprocessor = (TranslationPreprocessor) CustomPreprocessor.getInstance(setting, this.preprocessor, this.project); this.preprocessor.addCustomPreprocessors( this.translationPreprocessor ); } //check if there has been an error at the last run: this.errorLock = new File( this.buildSetting.getWorkDir().getAbsolutePath() + File.separator + "error.lock"); if (this.errorLock.exists()) { this.lastRunFailed = true; } else { this.lastRunFailed = false; try { this.errorLock.createNewFile(); } catch (IOException e) { System.err.println("Warning: unable to create temporary lock file: " + e.toString() ); } } // set J2ME Polish specific logger, // this logger will show the original source-code positions // and remove some verbose logging from ProGuard etc: Vector buildListeners = this.project.getBuildListeners(); BuildLogger logger = null; for (Iterator iter = buildListeners.iterator(); iter.hasNext();) { BuildListener listener = (BuildListener) iter.next(); if (listener instanceof BuildLogger) { logger = (BuildLogger) listener; break; } } if (logger != null) { // prepare the classPathTranslations-Map: HashMap classPathTranslationsMap = new HashMap(); for (int i=0; i < this.sourceFiles.length; i++) { TextFile[] files = this.sourceFiles[i]; for (int j = 0; j < files.length; j++) { TextFile file = files[j]; classPathTranslationsMap.put( file.getFileName(), file.getFile().getAbsolutePath() ); } } this.polishLogger = new PolishLogger(logger, classPathTranslationsMap ); this.project.addBuildListener( this.polishLogger ); this.project.removeBuildListener(logger); } else { System.err.println("Warning: unable to replace Ant-logger. Compile errors will point to the preprocessed files instead of the original sources."); } }
9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/766e8264a4d418a6a6fa7fe9760ddec134c49163/PolishTask.java/clean/enough-polish-build/source/src/de/enough/polish/ant/PolishTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 4109, 1435, 288, 202, 202, 759, 752, 1198, 3301, 30, 202, 202, 6494, 4228, 273, 333, 18, 3510, 5568, 18, 291, 2829, 1526, 5621, 3196, 202, 2829, 1318, 1198, 1318, 273, 446, 31, 202, 202, 430, 261, 291, 2829, 1526, 13, 288, 1082, 202, 698, 288, 9506, 202, 4148, 1318, 273, 394, 4015, 1318, 12, 333, 18, 3510, 5568, 18, 588, 2829, 5568, 1435, 11272, 1082, 202, 97, 1044, 261, 3116, 503, 425, 13, 288, 9506, 202, 12849, 394, 18463, 12, 425, 18, 24906, 9334, 425, 11272, 1082, 202, 97, 202, 202, 97, 202, 202, 759, 752, 1984, 1947, 30, 202, 202, 2211, 18, 3915, 1468, 4109, 273, 394, 6730, 1468, 4109, 12, 333, 18, 3510, 5568, 18, 1202, 5850, 1468, 18070, 9334, 4228, 16, 1198, 1318, 11272, 202, 202, 430, 261, 4148, 1318, 480, 446, 597, 1198, 1318, 18, 291, 14489, 10756, 288, 1082, 202, 2211, 18, 3915, 1468, 4109, 18, 1289, 4595, 2932, 4148, 14489, 8863, 202, 202, 97, 202, 202, 430, 261, 4148, 1318, 480, 446, 597, 333, 18, 3510, 5568, 18, 588, 2829, 5568, 7675, 4500, 1343, 11427, 10756, 288, 1082, 202, 2211, 18, 3915, 1468, 4109, 18, 1289, 4595, 2932, 4500, 1343, 11427, 8863, 202, 202, 97, 202, 202, 2211, 18, 3915, 1468, 4109, 18, 1289, 17035, 2932, 12687, 3113, 333, 18, 1376, 5568, 18, 588, 12687, 1435, 11272, 202, 202, 430, 261, 291, 2829, 1526, 13, 288, 1082, 202, 2211, 18, 3915, 1468, 4109, 18, 1289, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 4109, 1435, 288, 202, 202, 759, 752, 1198, 3301, 30, 202, 202, 6494, 4228, 273, 333, 18, 3510, 5568, 18, 291, 2829, 1526, 5621, 3196, 202, 2829, 1318, 1198, 1318, 273, 446, 31, 202, 202, 430, 261, 291, 2829, 1526, 13, 288, 1082, 202, 698, 288, 9506, 202, 4148, 1318, 273, 394, 4015, 1318, 12, 333, 18, 3510, 5568, 18, 588, 2829, 5568, 1435, 11272, 1082, 202, 97, 1044, 261, 3116, 503, 425, 13, 288, 9506, 202, 12849, 394, 18463, 12, 425, 18, 24906, 9334, 425, 11272, 1082, 202, 97, 202, 202, 97, 202, 202, 759, 752, 1984, 1947, 30, 202, 202, 2211, 18, 3915, 1468, 4109, 273, 394, 6730, 1468, 4109, 12, 333, 2 ]
log.debug("field: " + fieldName); generateCodeFile(document, specificationDir + "/Fields.xsl", new String[] {"fieldName", XSLPARAM_SERIAL_UID},
log.info("field: " + fieldName); generateCodeFile(document, xformDir + "/Fields.xsl", new String[] {"fieldName", XSLPARAM_SERIAL_UID},
private void generateFieldClasses() throws ParserConfigurationException, SAXException, IOException { for (int fixMinorVersion = 4; fixMinorVersion >= 0; fixMinorVersion--) { Document document = getSpecification(fixMinorVersion); List fieldNames = getNames(document.getDocumentElement(), "fields/field"); try { for (int i = 0; i < fieldNames.size(); i++) { String fieldName = (String) fieldNames.get(i); String outputFile = outputBaseDir + "/quickfix/field/" + fieldName + ".java"; if (!new File(outputFile).exists()) { log.debug("field: " + fieldName); generateCodeFile(document, specificationDir + "/Fields.xsl", new String[] {"fieldName", XSLPARAM_SERIAL_UID}, new String[] {fieldName, SERIAL_UID_STR}, outputFile); } } } catch (Exception e) { log.error("error while generating field classes", e); } } }
52526 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52526/f310bde47742778a0a2e426d7b88ae04018c7e80/JavaCodeGenerator.java/clean/src/quickfix/codegen/JavaCodeGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 974, 4818, 1435, 1216, 6783, 10737, 16, 14366, 16, 5411, 1860, 288, 3639, 364, 261, 474, 2917, 19549, 1444, 273, 1059, 31, 2917, 19549, 1444, 1545, 374, 31, 2917, 19549, 1444, 413, 13, 288, 5411, 4319, 1668, 273, 20189, 1480, 12, 904, 19549, 1444, 1769, 5411, 987, 16902, 273, 336, 1557, 12, 5457, 18, 588, 2519, 1046, 9334, 315, 2821, 19, 1518, 8863, 5411, 775, 288, 7734, 364, 261, 474, 277, 273, 374, 31, 277, 411, 16902, 18, 1467, 5621, 277, 27245, 288, 10792, 514, 4289, 273, 261, 780, 13, 16902, 18, 588, 12, 77, 1769, 10792, 514, 15047, 273, 876, 2171, 1621, 397, 2206, 19525, 904, 19, 1518, 4898, 397, 4289, 397, 3552, 6290, 14432, 10792, 309, 16051, 2704, 1387, 12, 2844, 812, 2934, 1808, 10756, 288, 13491, 613, 18, 4148, 2932, 1518, 30, 315, 397, 4289, 1769, 13491, 2103, 1085, 812, 12, 5457, 16, 7490, 1621, 397, 2206, 2314, 18, 30903, 3113, 394, 514, 8526, 12528, 16163, 3113, 17243, 8388, 67, 2123, 6365, 67, 3060, 5779, 27573, 394, 514, 8526, 288, 16163, 16, 7758, 6365, 67, 3060, 67, 3902, 5779, 15047, 1769, 10792, 289, 7734, 289, 5411, 289, 1044, 261, 503, 425, 13, 288, 7734, 613, 18, 1636, 2932, 1636, 1323, 12516, 652, 3318, 3113, 425, 1769, 5411, 289, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 2103, 974, 4818, 1435, 1216, 6783, 10737, 16, 14366, 16, 5411, 1860, 288, 3639, 364, 261, 474, 2917, 19549, 1444, 273, 1059, 31, 2917, 19549, 1444, 1545, 374, 31, 2917, 19549, 1444, 413, 13, 288, 5411, 4319, 1668, 273, 20189, 1480, 12, 904, 19549, 1444, 1769, 5411, 987, 16902, 273, 336, 1557, 12, 5457, 18, 588, 2519, 1046, 9334, 315, 2821, 19, 1518, 8863, 5411, 775, 288, 7734, 364, 261, 474, 277, 273, 374, 31, 277, 411, 16902, 18, 1467, 5621, 277, 27245, 288, 10792, 514, 4289, 273, 261, 780, 13, 16902, 18, 588, 12, 77, 1769, 10792, 514, 15047, 273, 876, 2171, 1621, 397, 2206, 19525, 904, 19, 1518, 4898, 397, 4289, 397, 3552, 6290, 2 ]
Object[] errArgs = { formatMessage(message, sourceName, line) }; message = getMessage("msg.warning", errArgs); err.println(messagePrefix + message); if (null != lineSource) { err.println(messagePrefix + lineSource); err.println(messagePrefix + buildIndicator(lineOffset)); }
reportErrorMessage(message, sourceName, line, lineSource, lineOffset, true);
public void warning(String message, String sourceName, int line, String lineSource, int lineOffset) { if (!reportWarnings) return; Object[] errArgs = { formatMessage(message, sourceName, line) }; message = getMessage("msg.warning", errArgs); err.println(messagePrefix + message); if (null != lineSource) { err.println(messagePrefix + lineSource); err.println(messagePrefix + buildIndicator(lineOffset)); } }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/b538849b5b431bc21e58fb6e0fc818f0a017ed10/ToolErrorReporter.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 3436, 12, 780, 883, 16, 514, 28337, 16, 509, 980, 16, 13491, 514, 980, 1830, 16, 509, 980, 2335, 13, 565, 288, 3639, 309, 16051, 6006, 4312, 13, 5411, 327, 31, 3639, 1033, 8526, 393, 2615, 273, 288, 20925, 12, 2150, 16, 28337, 16, 980, 13, 289, 31, 3639, 883, 273, 2381, 2932, 3576, 18, 8551, 3113, 393, 2615, 1769, 3639, 393, 18, 8222, 12, 2150, 2244, 397, 883, 1769, 3639, 309, 261, 2011, 480, 980, 1830, 13, 288, 5411, 393, 18, 8222, 12, 2150, 2244, 397, 980, 1830, 1769, 5411, 393, 18, 8222, 12, 2150, 2244, 397, 1361, 13140, 12, 1369, 2335, 10019, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3436, 12, 780, 883, 16, 514, 28337, 16, 509, 980, 16, 13491, 514, 980, 1830, 16, 509, 980, 2335, 13, 565, 288, 3639, 309, 16051, 6006, 4312, 13, 5411, 327, 31, 3639, 1033, 8526, 393, 2615, 273, 288, 20925, 12, 2150, 16, 28337, 16, 980, 13, 289, 31, 3639, 883, 273, 2381, 2932, 3576, 18, 8551, 3113, 393, 2615, 1769, 3639, 393, 18, 8222, 12, 2150, 2244, 397, 883, 1769, 3639, 309, 261, 2011, 480, 980, 1830, 13, 288, 5411, 393, 18, 8222, 12, 2150, 2244, 397, 980, 1830, 1769, 5411, 393, 18, 8222, 12, 2150, 2244, 397, 1361, 13140, 12, 1369, 2335, 10019, 3639, 289, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100 ]
peerRow.addChild("td", "class", "peer-version").addChild("#", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion());
peerRow.addChild("td", "class", "peer-version").addChild("#", advancedEnabled ? peerNodeStatus.getVersion() : peerNodeStatus.getSimpleVersion());
public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { String path = uri.getPath(); if(path.endsWith("myref.txt")) { SimpleFieldSet fs = node.exportPublicFieldSet(); StringWriter sw = new StringWriter(); fs.writeTo(sw); this.writeReply(ctx, 200, "text/plain", "OK", sw.toString()); return; } final boolean advancedEnabled = node.getToadletContainer().isAdvancedDarknetEnabled(); /* gather connection statistics */ PeerNode[] peerNodes = node.getDarknetConnections(); Arrays.sort(peerNodes, new Comparator() { public int compare(Object first, Object second) { PeerNode firstNode = (PeerNode) first; PeerNode secondNode = (PeerNode) second; int statusDifference = firstNode.getPeerNodeStatus() - secondNode.getPeerNodeStatus(); if (statusDifference != 0) { return statusDifference; } return firstNode.getName().compareTo(secondNode.getName()); } }); /* copy peer node statuses for consistent display. */ int[] peerNodeStatuses = new int[peerNodes.length]; for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { peerNodeStatuses[peerIndex] = peerNodes[peerIndex].getPeerNodeStatus(); } int numberOfConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_CONNECTED); int numberOfRoutingBackedOff = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF); int numberOfTooNew = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_NEW); int numberOfTooOld = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_OLD); int numberOfDisconnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISCONNECTED); int numberOfNeverConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_NEVER_CONNECTED); int numberOfDisabled = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISABLED); int numberOfBursting = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_BURSTING); int numberOfListening = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTENING); int numberOfListenOnly = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTEN_ONLY); int numberOfSimpleConnected = numberOfConnected + numberOfRoutingBackedOff; int numberOfNotConnected = numberOfTooNew + numberOfTooOld + numberOfDisconnected + numberOfNeverConnected + numberOfDisabled + numberOfBursting + numberOfListening + numberOfListenOnly; String titleCountString = null; if(advancedEnabled) { titleCountString = "(" + numberOfConnected + "/" + numberOfRoutingBackedOff + "/" + numberOfTooNew + "/" + numberOfTooOld + "/" + numberOfNotConnected + ")"; } else { titleCountString = String.valueOf(numberOfSimpleConnected); } HTMLNode pageNode = ctx.getPageMaker().getPageNode(titleCountString + " Darknet Peers of " + node.getMyName()); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); // FIXME! We need some nice images long now = System.currentTimeMillis(); contentNode.addChild(node.alerts.createSummary()); /* node status values */ int bwlimitDelayTime = (int) node.getBwlimitDelayTime(); int nodeAveragePingTime = (int) node.getNodeAveragePingTime(); int networkSizeEstimate = node.getNetworkSizeEstimate(0); DecimalFormat fix4 = new DecimalFormat("0.0000"); double missRoutingDistance = node.missRoutingDistance.currentValue(); DecimalFormat fix1 = new DecimalFormat("##0.0%"); double backedoffPercent = node.backedoffPercent.currentValue(); String nodeUptimeString = timeIntervalToString(( now - node.startupTime ) / 1000); // BEGIN OVERVIEW TABLE HTMLNode overviewTable = contentNode.addChild("table", "class", "column"); HTMLNode overviewTableRow = overviewTable.addChild("tr"); HTMLNode nextTableCell = overviewTableRow.addChild("td", "class", "first"); /* node status overview box */ if(advancedEnabled) { HTMLNode overviewInfobox = nextTableCell.addChild("div", "class", "infobox"); overviewInfobox.addChild("div", "class", "infobox-header", "Node status overview"); HTMLNode overviewInfoboxContent = overviewInfobox.addChild("div", "class", "infobox-content"); HTMLNode overviewList = overviewInfoboxContent.addChild("ul"); overviewList.addChild("li", "bwlimitDelayTime:\u00a0" + bwlimitDelayTime + "ms"); overviewList.addChild("li", "nodeAveragePingTime:\u00a0" + nodeAveragePingTime + "ms"); overviewList.addChild("li", "networkSizeEstimate:\u00a0" + networkSizeEstimate + "\u00a0nodes"); overviewList.addChild("li", "nodeUptime:\u00a0" + nodeUptimeString); overviewList.addChild("li", "missRoutingDistance:\u00a0" + fix4.format(missRoutingDistance)); overviewList.addChild("li", "backedoffPercent:\u00a0" + fix1.format(backedoffPercent)); nextTableCell = overviewTableRow.addChild("td"); } // Activity box int numInserts = node.getNumInserts(); int numRequests = node.getNumRequests(); int numTransferringRequests = node.getNumTransferringRequests(); int numARKFetchers = node.getNumARKFetchers(); HTMLNode activityInfobox = nextTableCell.addChild("div", "class", "infobox"); activityInfobox.addChild("div", "class", "infobox-header", "Current activity"); HTMLNode activityInfoboxContent = activityInfobox.addChild("div", "class", "infobox-content"); if ((numInserts == 0) && (numRequests == 0) && (numTransferringRequests == 0) && (numARKFetchers == 0)) { activityInfoboxContent.addChild("#", "Your node is not processing any requests right now."); } else { HTMLNode activityList = activityInfoboxContent.addChild("ul", "id", "activity"); if (numInserts > 0) { activityList.addChild("li", "Inserts:\u00a0" + numInserts); } if (numRequests > 0) { activityList.addChild("li", "Requests:\u00a0" + numRequests); } if (numTransferringRequests > 0) { activityList.addChild("li", "Transferring\u00a0Requests:\u00a0" + numTransferringRequests); } if (advancedEnabled) { if (numARKFetchers > 0) { activityList.addChild("li", "ARK\u00a0Fetch\u00a0Requests:\u00a0" + numARKFetchers); } } } nextTableCell = advancedEnabled ? overviewTableRow.addChild("td") : overviewTableRow.addChild("td", "class", "last"); // Peer statistics box HTMLNode peerStatsInfobox = nextTableCell.addChild("div", "class", "infobox"); peerStatsInfobox.addChild("div", "class", "infobox-header", "Peer statistics"); HTMLNode peerStatsContent = peerStatsInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerStatsList = peerStatsContent.addChild("ul"); if (numberOfConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_connected", "Connected:\u00a0" + numberOfConnected); } if (numberOfRoutingBackedOff > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_backedoff", (advancedEnabled ? "Backed off" : "Busy") + ":\u00a0" + numberOfRoutingBackedOff); } if (numberOfTooNew > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_new", "Too new:\u00a0" + numberOfTooNew); } if (numberOfTooOld > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_old", "Too old:\u00a0" + numberOfTooOld); } if (numberOfDisconnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_disconnected", "Disconnected:\u00a0" + numberOfDisconnected); } if (numberOfNeverConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Never Connected:\u00a0" + numberOfNeverConnected); } if (numberOfDisabled > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Disabled:\u00a0" + numberOfDisabled); /* TODO */ } if (numberOfBursting > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Bursting:\u00a0" + numberOfBursting); /* TODO */ } if (numberOfListening > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listening:\u00a0" + numberOfListening); /* TODO */ } if (numberOfListenOnly > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listen Only:\u00a0" + numberOfListenOnly); /* TODO */ } // Peer routing backoff reason box if(advancedEnabled) { nextTableCell = overviewTableRow.addChild("td", "class", "last"); HTMLNode backoffReasonInfobox = nextTableCell.addChild("div", "class", "infobox"); backoffReasonInfobox.addChild("div", "class", "infobox-header", "Peer backoff reasons"); HTMLNode backoffReasonContent = backoffReasonInfobox.addChild("div", "class", "infobox-content"); String [] routingBackoffReasons = node.getPeerNodeRoutingBackoffReasons(); if(routingBackoffReasons.length == 0) { backoffReasonContent.addChild("#", "Good, your node is not backed off from any peers!"); } else { HTMLNode reasonList = backoffReasonContent.addChild("ul"); for(int i=0;i<routingBackoffReasons.length;i++) { int reasonCount = node.getPeerNodeRoutingBackoffReasonSize(routingBackoffReasons[i]); if(reasonCount > 0) { reasonList.addChild("li", routingBackoffReasons[i] + '\u00a0' + reasonCount); } } } } // END OVERVIEW TABLE // BEGIN PEER TABLE HTMLNode peerTableInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); HTMLNode peerTableInfoboxHeader = peerTableInfobox.addChild("div", "class", "infobox-header"); peerTableInfoboxHeader.addChild("#", "My peers"); if (advancedEnabled) { if (!path.endsWith("displaymessagetypes.html")) { peerTableInfoboxHeader.addChild("#", " "); peerTableInfoboxHeader.addChild("a", "href", "displaymessagetypes.html", "(more detailed)"); } } HTMLNode peerTableInfoboxContent = peerTableInfobox.addChild("div", "class", "infobox-content"); if (peerNodes.length == 0) { peerTableInfoboxContent.addChild("#", "Freenet can not work as you have not added any peers so far. Please go to the "); peerTableInfoboxContent.addChild("a", "href", "/", "node homepage"); peerTableInfoboxContent.addChild("#", " and read the top infobox to see how it is done."); } else { HTMLNode peerForm = peerTableInfoboxContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); HTMLNode peerTable = peerForm.addChild("table", "class", "darknet_connections"); HTMLNode peerTableHeaderRow = peerTable.addChild("tr"); peerTableHeaderRow.addChild("th"); peerTableHeaderRow.addChild("th", "Status"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Click on the nodename link to send N2NTM", "border-bottom: 1px dotted; cursor: help;" }, "Name"); if (advancedEnabled) { peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Address:Port", "border-bottom: 1px dotted; cursor: help;" }, "Address"); } peerTableHeaderRow.addChild("th", "Version"); if (advancedEnabled) { peerTableHeaderRow.addChild("th", "Location"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Temporarily disconnected. Other node busy? Wait time(s) remaining/total", "border-bottom: 1px dotted; cursor: help;" }, "Backoff"); } peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "How long since the node connected or was last seen", "border-bottom: 1px dotted; cursor: help;" }, "Connected\u00a0/\u00a0Idle"); for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { PeerNode peerNode = peerNodes[peerIndex]; HTMLNode peerRow = peerTable.addChild("tr"); // check box column peerRow.addChild("td", "class", "peer-marker").addChild("input", new String[] { "type", "name" }, new String[] { "checkbox", "node_" + peerNode.hashCode() }); // status column String statusString = peerNode.getPeerNodeStatusString(); if (!advancedEnabled && (peerNode.getPeerNodeStatus() == Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF)) { statusString = "BUSY"; } peerRow.addChild("td", "class", "peer-status").addChild("span", "class", peerNode.getPeerNodeStatusCSSClassName(), statusString + (peerNode.isFetchingARK() ? "*" : "")); // name column if (peerNode.isConnected() && (Integer.parseInt(peerNode.getSimpleVersion()) > 476)) { peerRow.addChild("td", "class", "peer-name").addChild("a", "href", "/send_n2ntm/?peernode_hashcode=" + peerNode.hashCode(), peerNode.getName()); } else { peerRow.addChild("td", "class", "peer-name").addChild("#", peerNode.getName()); } // address column if (advancedEnabled) { String pingTime = ""; if (peerNode.isConnected()) { pingTime = " (" + String.valueOf((int) peerNode.averagePingTime()) + "ms)"; } peerRow.addChild("td", "class", "peer-address").addChild("#", ((peerNode.getDetectedPeer() != null) ? (peerNode.getDetectedPeer().toString()) : ("(unknown address)")) + pingTime); } // version column if (peerNode.publicReverseInvalidVersion()) { peerRow.addChild("td", "class", "peer-version").addChild("span", "class", "peer_too_new", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } else { peerRow.addChild("td", "class", "peer-version").addChild("#", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } // location column if (advancedEnabled) { peerRow.addChild("td", "class", "peer-location", String.valueOf(peerNode.getLocation().getValue())); } // backoff column if (advancedEnabled) { HTMLNode backoffCell = peerRow.addChild("td", "class", "peer-backoff"); backoffCell.addChild("#", fix1.format(peerNode.backedOffPercent.currentValue())); int backoff = (int) (Math.max(peerNode.getRoutingBackedOffUntil() - now, 0)); // Don't list the backoff as zero before it's actually zero if ((backoff > 0) && (backoff < 1000)) { backoff = 1000; } backoffCell.addChild("#", " " + String.valueOf(backoff / 1000) + "/" + String.valueOf(peerNode.getRoutingBackoffLength() / 1000)); backoffCell.addChild("#", (peerNode.getLastBackoffReason() == null) ? "" : ("/" + (peerNode.getLastBackoffReason()))); } // idle column long idle = peerNode.timeLastRoutable(); if(peerNode.isRoutable()) { idle = peerNode.timeLastConnectionCompleted(); } else if(peerNodeStatuses[peerIndex] == Node.PEER_NODE_STATUS_NEVER_CONNECTED) { idle = peerNode.getPeerAddedTime(); } peerRow.addChild("td", "class", "peer-idle", idleToString(now, idle)); if (path.endsWith("displaymessagetypes.html")) { HTMLNode messageCountRow = peerTable.addChild("tr", "class", "message-status"); messageCountRow.addChild("td", "colspan", "2"); HTMLNode messageCountCell = messageCountRow.addChild("td", "colspan", String.valueOf(advancedEnabled ? 6 : 3)); HTMLNode messageCountTable = messageCountCell.addChild("table", "class", "message-count"); HTMLNode countHeaderRow = messageCountTable.addChild("tr"); countHeaderRow.addChild("th", "Message"); countHeaderRow.addChild("th", "Incoming"); countHeaderRow.addChild("th", "Outgoing"); List messageNames = new ArrayList(); Map messageCounts = new HashMap(); for (Iterator incomingMessages = peerNode.getLocalNodeReceivedMessagesFromStatistic().keySet().iterator(); incomingMessages.hasNext(); ) { String messageName = (String) incomingMessages.next(); messageNames.add(messageName); Long messageCount = (Long) peerNode.getLocalNodeReceivedMessagesFromStatistic().get(messageName); messageCounts.put(messageName, new Long[] { messageCount, new Long(0) }); } for (Iterator outgoingMessages = peerNode.getLocalNodeSentMessagesToStatistic().keySet().iterator(); outgoingMessages.hasNext(); ) { String messageName = (String) outgoingMessages.next(); if (!messageNames.contains(messageName)) { messageNames.add(messageName); } Long messageCount = (Long) peerNode.getLocalNodeSentMessagesToStatistic().get(messageName); Long[] existingCounts = (Long[]) messageCounts.get(messageName); if (existingCounts == null) { messageCounts.put(messageName, new Long[] { new Long(0), messageCount }); } else { existingCounts[1] = messageCount; } } Collections.sort(messageNames, new Comparator() { public int compare(Object first, Object second) { return ((String) first).compareToIgnoreCase((String) second); } }); for (Iterator messageNamesIterator = messageNames.iterator(); messageNamesIterator.hasNext(); ) { String messageName = (String) messageNamesIterator.next(); Long[] messageCount = (Long[]) messageCounts.get(messageName); HTMLNode messageRow = messageCountTable.addChild("tr"); messageRow.addChild("td", messageName); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[0])); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[1])); } } } if(!advancedEnabled) { peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "remove", "Remove selected peers" }); } else { HTMLNode actionSelect = peerForm.addChild("select", "name", "action"); actionSelect.addChild("option", "value", "", "-- Select action --"); actionSelect.addChild("option", "value", "enable", "Enable selected peers"); actionSelect.addChild("option", "value", "disable", "Disable selected peers"); actionSelect.addChild("option", "value", "set_burst_only", "On selected peers, set BurstOnly"); actionSelect.addChild("option", "value", "clear_burst_only", "On selected peers, clear BurstOnly"); actionSelect.addChild("option", "value", "set_listen_only", "On selected peers, set ListenOnly"); actionSelect.addChild("option", "value", "clear_listen_only", "On selected peers, clear ListenOnly"); actionSelect.addChild("option", "value", "", "-- -- --"); actionSelect.addChild("option", "value", "remove", "Remove selected peers"); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "submit", "Go" }); } } // END PEER TABLE // BEGIN PEER ADDITION BOX HTMLNode peerAdditionInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); peerAdditionInfobox.addChild("div", "class", "infobox-header", "Add another peer"); HTMLNode peerAdditionContent = peerAdditionInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerAdditionForm = peerAdditionContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); peerAdditionForm.addChild("#", "Paste the reference here:"); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("textarea", new String[] { "id", "name", "rows", "cols" }, new String[] { "reftext", "ref", "8", "74" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Enter the URL of the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "refurl", "text", "url" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Choose the file containing the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "reffile", "file", "reffile" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "add", "Add" }); // our reference HTMLNode referenceInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); referenceInfobox.addChild("div", "class", "infobox-header").addChild("a", "href", "myref.txt", "My reference"); referenceInfobox.addChild("div", "class", "infobox-content").addChild("pre", "id", "reference", node.exportPublicFieldSet().toString()); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 200, "text/html", "OK", pageBuffer.toString()); }
50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/8894de616e17a43e740747a9eb17956bab9b3b3d/DarknetConnectionsToadlet.java/clean/src/freenet/clients/http/DarknetConnectionsToadlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1640, 967, 12, 3098, 2003, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 16, 9942, 503, 288, 9506, 202, 780, 589, 273, 2003, 18, 588, 743, 5621, 202, 202, 430, 12, 803, 18, 5839, 1190, 2932, 4811, 1734, 18, 5830, 6, 3719, 288, 1082, 202, 5784, 974, 694, 2662, 273, 756, 18, 6530, 4782, 974, 694, 5621, 1082, 202, 780, 2289, 1352, 273, 394, 17436, 5621, 1082, 202, 2556, 18, 2626, 774, 12, 5328, 1769, 1082, 202, 2211, 18, 2626, 7817, 12, 5900, 16, 4044, 16, 315, 955, 19, 7446, 3113, 315, 3141, 3113, 1352, 18, 10492, 10663, 1082, 202, 2463, 31, 202, 202, 97, 9506, 202, 6385, 1250, 16111, 1526, 273, 756, 18, 588, 774, 361, 1810, 2170, 7675, 291, 23618, 40, 1313, 2758, 1526, 5621, 9506, 202, 20308, 11090, 1459, 7691, 1195, 202, 202, 6813, 907, 8526, 4261, 3205, 273, 756, 18, 588, 40, 1313, 2758, 9314, 5621, 202, 202, 12726, 18, 3804, 12, 12210, 3205, 16, 394, 13359, 1435, 288, 1082, 202, 482, 509, 3400, 12, 921, 1122, 16, 1033, 2205, 13, 288, 9506, 202, 6813, 907, 1122, 907, 273, 261, 6813, 907, 13, 1122, 31, 9506, 202, 6813, 907, 2205, 907, 273, 261, 6813, 907, 13, 2205, 31, 9506, 202, 474, 1267, 16220, 273, 1122, 907, 18, 588, 6813, 907, 1482, 1435, 300, 2205, 907, 18, 588, 6813, 907, 1482, 5621, 9506, 202, 430, 261, 2327, 16220, 480, 374, 13, 288, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1640, 967, 12, 3098, 2003, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 16, 9942, 503, 288, 9506, 202, 780, 589, 273, 2003, 18, 588, 743, 5621, 202, 202, 430, 12, 803, 18, 5839, 1190, 2932, 4811, 1734, 18, 5830, 6, 3719, 288, 1082, 202, 5784, 974, 694, 2662, 273, 756, 18, 6530, 4782, 974, 694, 5621, 1082, 202, 780, 2289, 1352, 273, 394, 17436, 5621, 1082, 202, 2556, 18, 2626, 774, 12, 5328, 1769, 1082, 202, 2211, 18, 2626, 7817, 12, 5900, 16, 4044, 16, 315, 955, 19, 7446, 3113, 315, 3141, 3113, 1352, 18, 10492, 10663, 1082, 202, 2463, 31, 202, 202, 97, 9506, 202, 2 ]
return "Project"+(projectId==null ? ":Hash"+this.hashCode() : ":"+projectId);
return "Project"+(projectId==null ? ":Hash_"+this.hashCode() : ":Id_"+projectId);
public String toString(){ return "Project"+(projectId==null ? ":Hash"+this.hashCode() : ":"+projectId); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/Project.java/buggy/components/common/src/ome/model/Project.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 514, 1762, 1435, 95, 202, 2463, 315, 4109, 6, 15, 12, 4406, 548, 631, 2011, 692, 6398, 2310, 9548, 15, 2211, 18, 2816, 1085, 1435, 294, 6398, 548, 9548, 15, 4406, 548, 1769, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1762, 1435, 95, 202, 2463, 315, 4109, 6, 15, 12, 4406, 548, 631, 2011, 692, 6398, 2310, 9548, 15, 2211, 18, 2816, 1085, 1435, 294, 6398, 548, 9548, 15, 4406, 548, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
getSelectedMarker(), (IMarkerResolution[]) resolutions[0],view);
getSelectedMarker(), (IMarkerResolution[]) resolutions[0], view);
public void run() { IRunnableContext context = new ProgressMonitorDialog(view.getSite() .getShell()); final Object[] resolutions = new Object[1]; IRunnableWithProgress resolutionsRunnable = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) { monitor.beginTask(NLS.bind( MarkerMessages.resolveMarkerAction_computationAction, getMarkerDescription()), 100); monitor.worked(25); resolutions[0] = IDE.getMarkerHelpRegistry().getResolutions( getSelectedMarker()); monitor.done(); } }; Object service = view.getSite().getAdapter( IWorkbenchSiteProgressService.class); try { if (service == null) { PlatformUI.getWorkbench().getProgressService().runInUI(context, resolutionsRunnable, null); } else { ((IWorkbenchSiteProgressService) service).runInUI(context, resolutionsRunnable, null); } } catch (InvocationTargetException exception) { handleException(exception); return; } catch (InterruptedException exception) { handleException(exception); return; } Dialog dialog = new MarkerResolutionDialog(view.getSite().getShell(), getSelectedMarker(), (IMarkerResolution[]) resolutions[0],view); dialog.open(); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/7d6fbe86c181539fc68cffbd17b3f9a6d307c84d/ActionResolveMarker.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ActionResolveMarker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 45, 20013, 1042, 819, 273, 394, 10980, 7187, 6353, 12, 1945, 18, 588, 4956, 1435, 9506, 202, 18, 588, 13220, 10663, 202, 202, 6385, 1033, 8526, 1565, 6170, 273, 394, 1033, 63, 21, 15533, 202, 202, 45, 20013, 1190, 5491, 1565, 6170, 20013, 273, 394, 467, 20013, 1190, 5491, 1435, 288, 1082, 202, 482, 918, 1086, 12, 45, 5491, 7187, 6438, 13, 288, 9506, 202, 10259, 18, 10086, 2174, 12, 5106, 18, 4376, 12, 25083, 202, 7078, 5058, 18, 10828, 7078, 1803, 67, 13406, 367, 1803, 16, 25083, 202, 588, 7078, 3291, 1435, 3631, 2130, 1769, 9506, 202, 10259, 18, 1252, 329, 12, 2947, 1769, 9506, 202, 7818, 6170, 63, 20, 65, 273, 1599, 41, 18, 588, 7078, 6696, 4243, 7675, 588, 2903, 6170, 12, 25083, 202, 588, 7416, 7078, 10663, 9506, 202, 10259, 18, 8734, 5621, 1082, 202, 97, 202, 202, 20451, 202, 202, 921, 1156, 273, 1476, 18, 588, 4956, 7675, 588, 4216, 12, 9506, 202, 45, 2421, 22144, 4956, 5491, 1179, 18, 1106, 1769, 202, 202, 698, 288, 1082, 202, 430, 261, 3278, 422, 446, 13, 288, 9506, 202, 8201, 5370, 18, 588, 2421, 22144, 7675, 588, 5491, 1179, 7675, 2681, 382, 5370, 12, 2472, 16, 25083, 202, 7818, 6170, 20013, 16, 446, 1769, 1082, 202, 97, 469, 288, 9506, 202, 12443, 45, 2421, 22144, 4956, 5491, 1179, 13, 1156, 2934, 2681, 382, 5370, 12, 2472, 16, 25083, 202, 7818, 6170, 20013, 16, 446, 1769, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 45, 20013, 1042, 819, 273, 394, 10980, 7187, 6353, 12, 1945, 18, 588, 4956, 1435, 9506, 202, 18, 588, 13220, 10663, 202, 202, 6385, 1033, 8526, 1565, 6170, 273, 394, 1033, 63, 21, 15533, 202, 202, 45, 20013, 1190, 5491, 1565, 6170, 20013, 273, 394, 467, 20013, 1190, 5491, 1435, 288, 1082, 202, 482, 918, 1086, 12, 45, 5491, 7187, 6438, 13, 288, 9506, 202, 10259, 18, 10086, 2174, 12, 5106, 18, 4376, 12, 25083, 202, 7078, 5058, 18, 10828, 7078, 1803, 67, 13406, 367, 1803, 16, 25083, 202, 588, 7078, 3291, 1435, 3631, 2130, 1769, 9506, 202, 10259, 18, 1252, 329, 12, 2947, 1769, 9506, 202, 7818, 6170, 63, 2 ]
data.horizontalIndent = HORZ_INDENT;
protected FormText newLayout(Composite composite, int colSpan, String text, String style) { GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); data.horizontalSpan = colSpan; FormText resultText; if (style.equalsIgnoreCase(VALUE)) { FormText formText = toolkit.createFormText(composite, true);// new // StyledText(composite, // SWT.MULTI // | // SWT.READ_ONLY); formText.setFont(TEXT_FONT); formText.setWhitespaceNormalized(false); formText.setText(checkText(text), false, true); // Trying to fingure out how to reduce the space between lines // see FormText class. // GC gc = new GC(formText); // FontMetrics fm = gc.setgetFontMetrics(); // int lineHeight = fm.getHeight(); // formText.setBackground(background); data.horizontalIndent = HORZ_INDENT; // data.widthHint = DESCRIPTION_WIDTH; formText.setLayoutData(data); // formText.setEditable(false); // formText.getCaret().setVisible(false); formText.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { FormText c = (FormText) e.widget; if (c != null && c.canCopy()) { currentSelectedText = c; } } }); formText.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent event) { try { // Perhaps should use TaskListUiUtil.openUrl instead? URL url = new URL((String) event.getHref()); IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport(); support.getExternalBrowser().openURL(url); } catch (PartInitException e1) { MessageDialog.openError(null, "Link error", "Could not open browser"); } catch (MalformedURLException e) { MessageDialog.openError(null, "Link error", "Hyperlink address is malformed"); } } }); formText.setMenu(contextMenuManager.createContextMenu(formText)); resultText = formText; } else if (style.equalsIgnoreCase(PROPERTY)) { FormText formText = toolkit.createFormText(composite, true);// new // StyledText(composite, // SWT.MULTI // | // SWT.READ_ONLY); // formText.setFont(TEXT_FONT); formText.setText(checkText(text), false, false); // formText.setBackground(background); data.horizontalIndent = HORZ_INDENT; // formText.setLayoutData(data); // StyleRange sr = new StyleRange(0, text.length(), foreground, // background, // SWT.BOLD); // formText.setStyleRange(sr); // formText.getCaret().setVisible(false); // formText.setEnabled(enabled)Enabled(false); formText.setMenu(contextMenuManager.createContextMenu(formText)); resultText = formText; } else { // For a description of how tags work see: // http://www.eclipse.org/articles/Article-Forms/article.html StringBuffer buf = new StringBuffer(); buf.append("<form>"); buf.append("<p>"); // buf.append("<span color=\"header\" font=\"header\">"); buf.append(text); // buf.append("</span>"); buf.append("</p>"); buf.append("</form>"); FormText formText = toolkit.createFormText(composite, true); formText.setWhitespaceNormalized(true); formText.setFont("header", JFaceResources.getDialogFont()); formText.setFont("code", JFaceResources.getTextFont()); formText.setText(buf.toString(), true, false); resultText = formText; } // } else { // Composite generalTitleGroup = toolkit.createComposite(composite); // generalTitleGroup.setLayoutData(new // GridData(GridData.FILL_HORIZONTAL)); // generalTitleGroup.setLayoutData(data); // GridLayout generalTitleLayout = new GridLayout(); // generalTitleLayout.numColumns = 2; // generalTitleLayout.marginWidth = 0; // generalTitleLayout.marginHeight = 9; // generalTitleGroup.setLayout(generalTitleLayout); // // generalTitleGroup.setBackground(background); // // Label image = toolkit.createLabel(generalTitleGroup, ""); // // image.setBackground(background); // image.setImage(WorkbenchImages.getImage(IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_ITEM)); // // GridData gd = new GridData(GridData.FILL_BOTH); // gd.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING; // image.setLayoutData(gd); // // StyledText titleText = new StyledText(generalTitleGroup, SWT.MULTI // | SWT.READ_ONLY); // FormText titleText = toolkit.createFormText(generalTitleGroup, // true);//new StyledText(composite, SWT.MULTI | SWT.READ_ONLY); // // titleText.setText(checkText(text), false, true); // titleText.setText("<form>hello</form>", true, false); // titleText.setFont(HEADER_FONT); // titleText.setLayout(new TableWrapLayout()); // // titleText.setBackground(background); // // StyleRange sr = new StyleRange(titleText.getOffsetAtLine(0), // text.length(), foreground, background, // // SWT.BOLD); // // titleText.setStyleRange(sr); // // titleText.getCaret().setVisible(false); // // titleText.setEditable(false); // titleText.addSelectionListener(new SelectionAdapter() { // // @Override // public void widgetSelected(SelectionEvent e) { // FormText c = (FormText) e.widget; // // if (c != null && c.getSelectionCount() > 0) { // if (c != null && c.canCopy()) { // // if (currentSelectedText != null) { // if (!c.equals(currentSelectedText)) { // currentSelectedText = c; // // currentSelectedText.setSelectionRange(0, 0); // } // // } // } // // currentSelectedText = c; // } // }); // // create context menu // generalTitleGroup.setMenu(contextMenuManager.createContextMenu(generalTitleGroup)); // titleText.setMenu(contextMenuManager.createContextMenu(titleText)); // image.setMenu(contextMenuManager.createContextMenu(image)); // // addHyperlinks(titleText); // resultText = titleText; // } composite.setMenu(contextMenuManager.createContextMenu(composite)); return resultText; }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/c0c94673ddbd8d496152cdec419bd3012b23fcb6/AbstractBugEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 2748, 1528, 394, 3744, 12, 9400, 9635, 16, 509, 645, 6952, 16, 514, 977, 16, 514, 2154, 13, 288, 202, 202, 6313, 751, 501, 273, 394, 7145, 751, 12, 6313, 751, 18, 44, 20344, 67, 26439, 67, 16061, 15870, 1769, 202, 202, 892, 18, 18396, 6952, 273, 645, 6952, 31, 202, 202, 1204, 1528, 563, 1528, 31, 202, 202, 430, 261, 4060, 18, 14963, 5556, 12, 4051, 3719, 288, 1082, 202, 1204, 1528, 646, 1528, 273, 5226, 8691, 18, 2640, 1204, 1528, 12, 27676, 16, 638, 1769, 759, 394, 1082, 202, 759, 934, 93, 1259, 1528, 12, 27676, 16, 1082, 202, 759, 348, 8588, 18, 26588, 1082, 202, 759, 571, 1082, 202, 759, 348, 8588, 18, 6949, 67, 10857, 1769, 1082, 202, 687, 1528, 18, 542, 5711, 12, 5151, 67, 25221, 1769, 1082, 202, 687, 1528, 18, 542, 9431, 15577, 12, 5743, 1769, 1082, 202, 687, 1528, 18, 542, 1528, 12, 1893, 1528, 12, 955, 3631, 629, 16, 638, 1769, 1082, 202, 759, 6161, 310, 358, 284, 310, 594, 596, 3661, 358, 5459, 326, 3476, 3086, 2362, 1082, 202, 759, 2621, 2748, 1528, 667, 18, 1082, 202, 759, 15085, 8859, 273, 394, 15085, 12, 687, 1528, 1769, 1082, 202, 759, 10063, 5653, 10940, 273, 8859, 18, 542, 588, 5711, 5653, 5621, 1082, 202, 759, 509, 980, 2686, 273, 10940, 18, 588, 2686, 5621, 1082, 202, 759, 646, 1528, 18, 542, 8199, 12, 9342, 1769, 1082, 202, 892, 18, 18396, 7790, 273, 670, 916, 62, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 2748, 1528, 394, 3744, 12, 9400, 9635, 16, 509, 645, 6952, 16, 514, 977, 16, 514, 2154, 13, 288, 202, 202, 6313, 751, 501, 273, 394, 7145, 751, 12, 6313, 751, 18, 44, 20344, 67, 26439, 67, 16061, 15870, 1769, 202, 202, 892, 18, 18396, 6952, 273, 645, 6952, 31, 202, 202, 1204, 1528, 563, 1528, 31, 202, 202, 430, 261, 4060, 18, 14963, 5556, 12, 4051, 3719, 288, 1082, 202, 1204, 1528, 646, 1528, 273, 5226, 8691, 18, 2640, 1204, 1528, 12, 27676, 16, 638, 1769, 759, 394, 1082, 202, 759, 934, 93, 1259, 1528, 12, 27676, 16, 1082, 202, 759, 348, 8588, 18, 26588, 1082, 202, 759, 571, 1082, 202, 759, 348, 8588, 18, 2 ]
protected DocumentBuilderFactory() { }
protected DocumentBuilderFactory() { }
protected DocumentBuilderFactory() { } // DocumentBuilderFactory()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2c0635b05f68dbb361b3532fd5813a38b74cf57a/DocumentBuilderFactory.java/clean/core/src/classpath/javax/javax/xml/parsers/DocumentBuilderFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 30236, 1435, 288, 202, 97, 368, 30236, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 30236, 1435, 288, 202, 97, 368, 30236, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
Process proc = launcher.execute(makeCommand, makeTargets, env, workingDirectory); if (proc != null) { try { proc.getOutputStream().close(); } catch (IOException e) { } if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
ArrayList makeArgs = new ArrayList(); String arg = info.getBuildArguments(); if (arg.length() > 0) { String[] args = arg.split("\\s"); for (int i = 0; i < args.length; ++i) { makeArgs.add(args[i]); } } String[] makeTargets; String prebuildStep = info.getPrebuildStep(); boolean prebuildStepPresent = (prebuildStep.length() > 0); Process proc = null; boolean isuptodate = false; if (prebuildStepPresent) { ArrayList premakeArgs = (ArrayList) makeArgs.clone(); String[] premakeTargets; switch (buildType) { case INCREMENTAL_BUILD: { boolean quit = false; premakeArgs.add("-q"); premakeArgs.add("main-build"); premakeTargets = (String[]) premakeArgs .toArray(new String[premakeArgs.size()]); proc = launcher.execute(makeCommand, premakeTargets, env, workingDirectory); if (proc != null) { try { proc.getOutputStream().close(); } catch (IOException e) { } if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) { errMsg = launcher.getErrorMessage(); } } else { errMsg = launcher.getErrorMessage(); } if ((errMsg != null && errMsg.length() > 0) || proc == null) { makeArgs.add("pre-build"); makeArgs.add("main-build"); } else { if (proc.exitValue() == 0) { isuptodate = true; String uptodateMsg = ManagedMakeMessages .getFormattedString(NOTHING_BUILT, currentProject.getName()); buf.append(uptodateMsg); buf.append(System.getProperty( "line.separator", "\n")); consoleOutStream.write(buf.toString() .getBytes()); consoleOutStream.flush(); consoleOutStream.close(); stdout.close(); stderr.close(); } else { makeArgs.add("pre-build"); makeArgs.add("main-build"); } } break; } case FULL_BUILD: { makeArgs.add("clean"); makeArgs.add("pre-build"); makeArgs.add("main-build"); break; } case CLEAN_BUILD: { makeArgs.add("clean"); break; } } } else { makeArgs.addAll(Arrays.asList(getMakeTargets(buildType))); } makeTargets = (String[]) makeArgs.toArray(new String[makeArgs .size()]); if (!isuptodate) { proc = launcher.execute(makeCommand, makeTargets, env, workingDirectory); if (proc != null) { try { proc.getOutputStream().close(); } catch (IOException e) { } if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) { errMsg = launcher.getErrorMessage(); } monitor.subTask(ManagedMakeMessages .getResourceString(REFRESH)); try { currentProject.refreshLocal( IResource.DEPTH_INFINITE, null); } catch (CoreException e) { monitor.subTask(ManagedMakeMessages .getResourceString(REFRESH_ERROR)); } } else {
protected void invokeMake(int buildType, IPath buildDir, IManagedBuildInfo info, IManagedBuilderMakefileGenerator generator, IProgressMonitor monitor) { // Get the project and make sure there's a monitor to cancel the build IProject currentProject = getProject(); if (monitor == null) { monitor = new NullProgressMonitor(); } try { // Figure out the working directory for the build and make sure there is a makefile there IPath workingDirectory = getWorkingDirectory().append(buildDir); IWorkspace workspace = currentProject.getWorkspace(); if (workspace == null) { return; } IWorkspaceRoot root = workspace.getRoot(); if (root == null) { return; } IPath makefile = workingDirectory.addTrailingSeparator().append(generator.getMakefileName()); if (root.getFileForLocation(makefile) == null) { return; } // Flag to the user that make is about to be called IPath makeCommand = new Path(info.getBuildCommand()); if (makeCommand != null) { String[] msgs = new String[2]; msgs[0] = makeCommand.toString(); msgs[1] = currentProject.getName(); monitor.subTask(ManagedMakeMessages.getFormattedString(MAKE, msgs)); // Get a build console for the project StringBuffer buf = new StringBuffer(); IConsole console = CCorePlugin.getDefault().getConsole(); console.start(currentProject); ConsoleOutputStream consoleOutStream = console.getOutputStream(); String[] consoleHeader = new String[3]; switch (buildType) { case FULL_BUILD: consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_FULL); break; case INCREMENTAL_BUILD: consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_INC); break; case CLEAN_BUILD: consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_CLEAN); break; } consoleHeader[1] = info.getConfigurationName(); consoleHeader[2] = currentProject.getName(); buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$ buf.append(ManagedMakeMessages.getFormattedString(CONSOLE_HEADER, consoleHeader)); buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$ consoleOutStream.write(buf.toString().getBytes()); consoleOutStream.flush(); // Remove all markers for this project removeAllMarkers(currentProject); // Get the arguments to be passed to make from build model ArrayList makeArgs = new ArrayList(); String arg = info.getBuildArguments(); if (arg.length() > 0) { String[] args = arg.split("\\s"); //$NON-NLS-1$ for (int i = 0; i < args.length; ++i) { makeArgs.add(args[i]); } } makeArgs.addAll(Arrays.asList(getMakeTargets(buildType))); String[] makeTargets = (String[]) makeArgs.toArray(new String[makeArgs.size()]); // Get a launcher for the make command String errMsg = null; CommandLauncher launcher = new CommandLauncher(); launcher.showCommand(true); // Set the environmennt, some scripts may need the CWD var to be set. Properties props = launcher.getEnvironment(); props.put("CWD", workingDirectory.toOSString()); //$NON-NLS-1$ props.put("PWD", workingDirectory.toOSString()); //$NON-NLS-1$ String[] env = null; ArrayList envList = new ArrayList(); Enumeration names = props.propertyNames(); if (names != null) { while (names.hasMoreElements()) { String key = (String) names.nextElement(); envList.add(key + "=" + props.getProperty(key)); //$NON-NLS-1$ } env = (String[]) envList.toArray(new String[envList.size()]); } // Hook up an error parser manager String[] errorParsers = info.getDefaultConfiguration().getErrorParserList(); ErrorParserManager epm = new ErrorParserManager(getProject(), workingDirectory, this, errorParsers); epm.setOutputStream(consoleOutStream); OutputStream stdout = epm.getOutputStream(); OutputStream stderr = epm.getOutputStream(); // Launch make Process proc = launcher.execute(makeCommand, makeTargets, env, workingDirectory); if (proc != null) { try { // Close the input of the process since we will never write to it proc.getOutputStream().close(); } catch (IOException e) { } if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) { errMsg = launcher.getErrorMessage(); } // Force a resync of the projects without allowing the user to cancel. // This is probably unkind, but short of this there is no way to insure // the UI is up-to-date with the build results monitor.subTask(ManagedMakeMessages.getResourceString(REFRESH)); try { currentProject.refreshLocal(IResource.DEPTH_INFINITE, null); } catch (CoreException e) { monitor.subTask(ManagedMakeMessages.getResourceString(REFRESH_ERROR)); } } else { errMsg = launcher.getErrorMessage(); } // Report either the success or failure of our mission buf = new StringBuffer(); if (errMsg != null && errMsg.length() > 0) { String errorDesc = ManagedMakeMessages.getResourceString(BUILD_ERROR); buf.append(errorDesc); buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$ buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ } else { // Report a successful build String successMsg = ManagedMakeMessages.getFormattedString(BUILD_FINISHED, currentProject.getName()); buf.append(successMsg); buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$ } // Write message on the console consoleOutStream.write(buf.toString().getBytes()); consoleOutStream.flush(); stdout.close(); stderr.close(); // Generate any error markers that the build has discovered monitor.subTask(ManagedMakeMessages.getResourceString(MARKERS)); addBuilderMarkers(epm); epm.reportProblems(); consoleOutStream.close(); } } catch (Exception e) { forgetLastBuiltState(); } finally { getGenerationProblems().clear(); } }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/ec7b7d407631005d692b25cf5b8f5b0fd6b7bc85/GeneratedMakefileBuilder.java/buggy/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 4356, 6464, 12, 474, 1361, 559, 16, 467, 743, 1361, 1621, 16, 6246, 4184, 3116, 966, 1123, 16, 6246, 4184, 1263, 6464, 768, 3908, 4456, 16, 467, 5491, 7187, 6438, 13, 288, 202, 202, 759, 968, 326, 1984, 471, 1221, 3071, 1915, 1807, 279, 6438, 358, 3755, 326, 1361, 202, 202, 45, 4109, 783, 4109, 273, 11080, 5621, 202, 202, 430, 261, 10259, 422, 446, 13, 288, 1082, 202, 10259, 273, 394, 4112, 5491, 7187, 5621, 202, 202, 97, 202, 202, 698, 288, 1082, 202, 759, 18818, 596, 326, 5960, 1867, 364, 326, 1361, 471, 1221, 3071, 1915, 353, 279, 1221, 768, 1915, 1875, 202, 45, 743, 5960, 2853, 273, 336, 14836, 2853, 7675, 6923, 12, 3510, 1621, 1769, 1082, 202, 45, 8241, 6003, 273, 783, 4109, 18, 588, 8241, 5621, 1082, 202, 430, 261, 14915, 422, 446, 13, 288, 9506, 202, 2463, 31, 1082, 202, 97, 1082, 202, 45, 8241, 2375, 1365, 273, 6003, 18, 588, 2375, 5621, 1082, 202, 430, 261, 3085, 422, 446, 13, 288, 9506, 202, 2463, 31, 1082, 202, 97, 1082, 202, 45, 743, 1221, 768, 273, 5960, 2853, 18, 1289, 16808, 6581, 7675, 6923, 12, 8812, 18, 588, 6464, 17812, 10663, 1082, 202, 430, 261, 3085, 18, 29925, 1290, 2735, 12, 6540, 768, 13, 422, 446, 13, 288, 9506, 202, 2463, 31, 1875, 202, 97, 1082, 202, 759, 9960, 358, 326, 729, 716, 1221, 353, 2973, 358, 506, 2566, 1082, 202, 45, 743, 1221, 2189, 273, 394, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 4356, 6464, 12, 474, 1361, 559, 16, 467, 743, 1361, 1621, 16, 6246, 4184, 3116, 966, 1123, 16, 6246, 4184, 1263, 6464, 768, 3908, 4456, 16, 467, 5491, 7187, 6438, 13, 288, 202, 202, 759, 968, 326, 1984, 471, 1221, 3071, 1915, 1807, 279, 6438, 358, 3755, 326, 1361, 202, 202, 45, 4109, 783, 4109, 273, 11080, 5621, 202, 202, 430, 261, 10259, 422, 446, 13, 288, 1082, 202, 10259, 273, 394, 4112, 5491, 7187, 5621, 202, 202, 97, 202, 202, 698, 288, 1082, 202, 759, 18818, 596, 326, 5960, 1867, 364, 326, 1361, 471, 1221, 3071, 1915, 353, 279, 1221, 768, 1915, 1875, 202, 45, 743, 5960, 2853, 273, 336, 14836, 2853, 7675, 6923, 2 ]
getIgnorePrefix());
getIgnorePrefix(), getIgnoreWarnings(), getIgnoreKeywords());
public boolean verifyExpectedOutput(){ boolean result = false; CompareFiles cf = new CompareFiles(); String errorMessage = null; String outputFileName = null; String correctFileName = null; // If this testcase doesn't participate in file comparison if (!this.sendOutputToFile() && (null == this.getExpectedOutputFilename())) { return true; } if (this.sendOutputToFile() ) { outputFileName = verifyOutputFileIsSet(); } correctFileName = OUTPUT_FILE_ROOT + this.getExpectedOutputFilename(); errorMessage = "File Comparison failed: diff -u " + outputFileName + " " + correctFileName; ArrayList ignoreList = null; String [] ignore = null; if (null != (ignore = this.getLinesToIgnore())) { ignoreList = new ArrayList(); for (int i = 0; i < ignore.length; i++) { ignoreList.add(ignore[i]); } } try { result = cf.filesIdentical(outputFileName, correctFileName,ignoreList, getIgnorePrefix()); } catch (IOException e) { System.out.println(e.getMessage()); e.printStackTrace(); } if (!result) { System.out.println(errorMessage); } System.out.println("VERIFY:"+result); return result;}
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/b497e4b3ffee7f5f33b502c34c8c49bd700b7290/WebclientTestCase.java/clean/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 1250, 3929, 6861, 1447, 1435, 95, 565, 1250, 563, 273, 629, 31, 565, 11051, 2697, 6080, 273, 394, 11051, 2697, 5621, 565, 514, 9324, 273, 446, 31, 565, 514, 876, 4771, 273, 446, 31, 565, 514, 3434, 4771, 273, 446, 31, 3639, 368, 971, 333, 1842, 3593, 3302, 1404, 30891, 340, 316, 585, 5826, 565, 309, 16051, 2211, 18, 4661, 1447, 15450, 1435, 597, 225, 202, 12, 2011, 422, 333, 18, 588, 6861, 1447, 5359, 1435, 3719, 288, 202, 2463, 638, 31, 565, 289, 3639, 309, 261, 2211, 18, 4661, 1447, 15450, 1435, 262, 288, 3639, 876, 4771, 273, 3929, 1447, 812, 15737, 5621, 565, 289, 377, 3434, 4771, 273, 11550, 67, 3776, 67, 9185, 397, 333, 18, 588, 6861, 1447, 5359, 5621, 3639, 9324, 273, 315, 812, 19479, 2535, 30, 3122, 300, 89, 315, 397, 876, 4771, 397, 315, 315, 397, 540, 3434, 4771, 31, 3639, 2407, 2305, 682, 273, 446, 31, 565, 514, 5378, 2305, 273, 446, 31, 3639, 309, 261, 2011, 480, 261, 6185, 273, 333, 18, 588, 5763, 774, 3777, 1435, 3719, 288, 202, 6185, 682, 273, 394, 2407, 5621, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 2305, 18, 2469, 31, 277, 27245, 288, 202, 565, 2305, 682, 18, 1289, 12, 6185, 63, 77, 19226, 202, 97, 565, 289, 3639, 775, 288, 202, 2088, 273, 6080, 18, 2354, 6106, 1706, 12, 2844, 4771, 16, 3434, 4771, 16, 6185, 682, 16, 6862, 282, 336, 3777, 2244, 9334, 336, 3777, 4312, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 1250, 3929, 6861, 1447, 1435, 95, 565, 1250, 563, 273, 629, 31, 565, 11051, 2697, 6080, 273, 394, 11051, 2697, 5621, 565, 514, 9324, 273, 446, 31, 565, 514, 876, 4771, 273, 446, 31, 565, 514, 3434, 4771, 273, 446, 31, 3639, 368, 971, 333, 1842, 3593, 3302, 1404, 30891, 340, 316, 585, 5826, 565, 309, 16051, 2211, 18, 4661, 1447, 15450, 1435, 597, 225, 202, 12, 2011, 422, 333, 18, 588, 6861, 1447, 5359, 1435, 3719, 288, 202, 2463, 638, 31, 565, 289, 3639, 309, 261, 2211, 18, 4661, 1447, 15450, 1435, 262, 288, 3639, 876, 4771, 273, 3929, 1447, 812, 15737, 5621, 565, 289, 377, 3434, 4771, 273, 11550, 67, 3776, 67, 9185, 397, 333, 18, 2 ]
xloc = Integer.parseInt(v);
xloc = wAttrib.parseInt(v);
vValue X(String v) { if (v != null) try { xloc = Integer.parseInt(v); } catch (Exception e) { return null; /*FAIL*/ } return vInteger.New(xloc);}
4078 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4078/0873bfd9f40823d371100403b60e5dce9bbe3cb7/wTTY.java/buggy/jcon/wTTY.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 331, 620, 1139, 12, 780, 331, 13, 288, 565, 309, 261, 90, 480, 446, 13, 775, 288, 202, 92, 1829, 273, 341, 12399, 18, 2670, 1702, 12, 90, 1769, 565, 289, 1044, 261, 503, 425, 13, 288, 202, 2463, 446, 31, 1748, 12319, 5549, 565, 289, 565, 327, 331, 4522, 18, 1908, 12, 92, 1829, 1769, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 331, 620, 1139, 12, 780, 331, 13, 288, 565, 309, 261, 90, 480, 446, 13, 775, 288, 202, 92, 1829, 273, 341, 12399, 18, 2670, 1702, 12, 90, 1769, 565, 289, 1044, 261, 503, 425, 13, 288, 202, 2463, 446, 31, 1748, 12319, 5549, 565, 289, 565, 327, 331, 4522, 18, 1908, 12, 92, 1829, 1769, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if (!nextAtom.getFlag(CDKConstants.VISITED) && !nextAtom.getFlag(CDKConstants.ISPLACED))
if (!nextAtom.getFlag(CDKConstants.VISITED) && !nextAtom.getFlag(CDKConstants.ISPLACED))
public static void breadthFirstSearch(AtomContainer ac, Vector sphere, AtomContainer[] pathes) throws org.openscience.cdk.exception.NoSuchAtomException { Atom atom = null, nextAtom = null; int atomNr, nextAtomNr; AtomContainer path = null; Vector newSphere = new Vector(); for (int f = 0; f < sphere.size(); f++) { atom = (Atom)sphere.elementAt(f); if (!atom.getFlag(CDKConstants.ISINRING)) { atomNr = ac.getAtomNumber(atom); if (debug) { System.out.println("BreadthFirstSearch around atom " + (atomNr + 1)); } Bond[] bonds = ac.getConnectedBonds(atom); for (int g = 0; g < bonds.length; g++) { nextAtom = bonds[g].getConnectedAtom(atom); if (!nextAtom.getFlag(CDKConstants.VISITED) && !nextAtom.getFlag(CDKConstants.ISPLACED)) { if (debug) { System.out.println("BreadthFirstSearch is meeting new atom " + (ac.getAtomNumber(nextAtom) + 1)); } nextAtomNr = ac.getAtomNumber(nextAtom); pathes[nextAtomNr] = (AtomContainer)pathes[atomNr].shallowCopy(); pathes[nextAtomNr].addAtom(nextAtom); if (debug) System.out.println("Adding atom " + (nextAtomNr + 1) + " to path " + (nextAtomNr + 1)); pathes[nextAtomNr].addBond(bonds[g]); if (ac.getBondCount(nextAtom) > 1) newSphere.addElement(nextAtom); } } } } if (newSphere.size() > 0) { for (int f = 0; f < newSphere.size(); f++) { ((Atom)newSphere.elementAt(f)).setFlag(CDKConstants.VISITED, true); } breadthFirstSearch(ac, newSphere, pathes); } }
46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/9f992723c3f44cadad1a2525a16a572d7af62f39/AtomPlacer.java/clean/src/org/openscience/cdk/layout/AtomPlacer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 324, 25254, 3759, 2979, 12, 3641, 2170, 1721, 16, 5589, 20041, 16, 7149, 2170, 8526, 589, 281, 13, 1216, 2358, 18, 20346, 71, 6254, 18, 71, 2883, 18, 4064, 18, 28341, 3641, 503, 202, 95, 202, 202, 3641, 3179, 273, 446, 16, 1024, 3641, 273, 446, 31, 202, 202, 474, 3179, 18726, 16, 1024, 3641, 18726, 31, 202, 202, 3641, 2170, 589, 273, 446, 31, 202, 202, 5018, 394, 22747, 273, 394, 5589, 5621, 9506, 202, 1884, 261, 474, 284, 273, 374, 31, 284, 411, 20041, 18, 1467, 5621, 284, 27245, 202, 202, 95, 1082, 202, 7466, 273, 261, 3641, 13, 87, 9346, 18, 2956, 861, 12, 74, 1769, 1082, 202, 430, 16051, 7466, 18, 588, 4678, 12, 39, 3398, 2918, 18, 5127, 706, 54, 1360, 3719, 1082, 202, 95, 9506, 202, 7466, 18726, 273, 1721, 18, 588, 3641, 1854, 12, 7466, 1769, 9506, 202, 430, 261, 4148, 13, 9506, 202, 95, 6862, 202, 3163, 18, 659, 18, 8222, 2932, 38, 25254, 3759, 2979, 6740, 3179, 315, 397, 261, 7466, 18726, 397, 404, 10019, 9506, 202, 97, 9506, 202, 9807, 8526, 15692, 273, 1721, 18, 588, 8932, 26090, 12, 7466, 1769, 9506, 202, 1884, 261, 474, 314, 273, 374, 31, 314, 411, 15692, 18, 2469, 31, 314, 27245, 9506, 202, 95, 6862, 202, 4285, 3641, 273, 15692, 63, 75, 8009, 588, 8932, 3641, 12, 7466, 1769, 6862, 202, 430, 16051, 4285, 3641, 18, 588, 4678, 12, 39, 3398, 2918, 18, 26780, 1285, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 324, 25254, 3759, 2979, 12, 3641, 2170, 1721, 16, 5589, 20041, 16, 7149, 2170, 8526, 589, 281, 13, 1216, 2358, 18, 20346, 71, 6254, 18, 71, 2883, 18, 4064, 18, 28341, 3641, 503, 202, 95, 202, 202, 3641, 3179, 273, 446, 16, 1024, 3641, 273, 446, 31, 202, 202, 474, 3179, 18726, 16, 1024, 3641, 18726, 31, 202, 202, 3641, 2170, 589, 273, 446, 31, 202, 202, 5018, 394, 22747, 273, 394, 5589, 5621, 9506, 202, 1884, 261, 474, 284, 273, 374, 31, 284, 411, 20041, 18, 1467, 5621, 284, 27245, 202, 202, 95, 1082, 202, 7466, 273, 261, 3641, 13, 87, 9346, 18, 2956, 861, 12, 74, 1769, 1082, 202, 430, 16051, 7466, 2 ]
println(" throw new RuntimeException(\"This is not a " + typeName + ":\" + trm);");
println(" throw new RuntimeException(\"This is not a " + className + ":\" + trm);");
private void genFromTerm() { String get_factory = staticFactoryGetter(); String className = ListTypeGenerator.className(type); println(" public static " + className + " fromTerm(aterm.ATerm trm)"); println(" {"); println(" if (trm instanceof aterm.ATermList) {"); println(" aterm.ATermList list = ((aterm.ATermList) trm).reverse();"); println(" " + className + " tmp = (" + className + ") " + get_factory + ".make" + className + "();"); println(" for (; !list.isEmpty(); list = list.getNext()) {"); println(" " + elementTypeName + " elem = " + elementTypeName + ".fromTerm(list.getFirst());"); println(" if (elem != null) {"); println(" tmp = " + get_factory + ".make" + className + "(elem, tmp);"); println(" }"); println(" else {"); println(" throw new RuntimeException(\"Invalid element in " + typeName + ":\" + elem);"); println(" }"); println(" }"); println(" return tmp;"); println(" }"); println(" else {"); println(" throw new RuntimeException(\"This is not a " + typeName + ":\" + trm);"); println(" }"); println(" }"); ATermFactory f; }
3664 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3664/254c3ec1df537d078abb76532ba23210235b3077/ListTypeImplGenerator.java/buggy/apigen/src/apigen/gen/java/ListTypeImplGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3157, 1265, 4065, 1435, 288, 202, 202, 780, 336, 67, 6848, 273, 760, 1733, 8461, 5621, 202, 202, 780, 2658, 273, 987, 559, 3908, 18, 12434, 12, 723, 1769, 202, 202, 8222, 2932, 225, 1071, 760, 315, 397, 2658, 397, 315, 628, 4065, 12, 270, 1035, 18, 789, 1035, 433, 81, 2225, 1769, 202, 202, 8222, 2932, 225, 288, 8863, 202, 202, 8222, 2932, 377, 309, 261, 313, 81, 1276, 622, 1035, 18, 789, 1035, 682, 13, 288, 8863, 202, 202, 8222, 2932, 3639, 622, 1035, 18, 789, 1035, 682, 666, 273, 14015, 270, 1035, 18, 789, 1035, 682, 13, 433, 81, 2934, 9845, 26994, 1769, 202, 202, 8222, 2932, 3639, 315, 397, 2658, 397, 315, 1853, 273, 7566, 397, 2658, 397, 9369, 315, 397, 336, 67, 6848, 397, 3552, 6540, 6, 397, 2658, 397, 25605, 4868, 1769, 202, 202, 8222, 2932, 3639, 364, 261, 31, 401, 1098, 18, 291, 1921, 5621, 666, 273, 666, 18, 588, 2134, 10756, 288, 8863, 202, 202, 8222, 2932, 1850, 315, 397, 930, 7947, 397, 315, 3659, 273, 315, 397, 930, 7947, 397, 3552, 2080, 4065, 12, 1098, 18, 588, 3759, 10663, 8863, 202, 202, 8222, 2932, 6647, 309, 261, 10037, 480, 446, 13, 288, 8863, 202, 202, 8222, 2932, 2398, 1853, 273, 315, 397, 336, 67, 6848, 397, 3552, 6540, 6, 397, 2658, 397, 7751, 10037, 16, 1853, 1769, 8863, 202, 202, 8222, 2932, 6647, 289, 8863, 202, 202, 8222, 2932, 6647, 469, 288, 8863, 202, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3157, 1265, 4065, 1435, 288, 202, 202, 780, 336, 67, 6848, 273, 760, 1733, 8461, 5621, 202, 202, 780, 2658, 273, 987, 559, 3908, 18, 12434, 12, 723, 1769, 202, 202, 8222, 2932, 225, 1071, 760, 315, 397, 2658, 397, 315, 628, 4065, 12, 270, 1035, 18, 789, 1035, 433, 81, 2225, 1769, 202, 202, 8222, 2932, 225, 288, 8863, 202, 202, 8222, 2932, 377, 309, 261, 313, 81, 1276, 622, 1035, 18, 789, 1035, 682, 13, 288, 8863, 202, 202, 8222, 2932, 3639, 622, 1035, 18, 789, 1035, 682, 666, 273, 14015, 270, 1035, 18, 789, 1035, 682, 13, 433, 81, 2934, 9845, 26994, 1769, 202, 202, 8222, 2932, 3639, 315, 397, 2658, 397, 2 ]
GenericValue billToContactMech = delegator.makeValue("InvoiceContactMech", UtilMisc.toMap("invoiceId", invoiceId)); billToContactMech.set("contactMechId", ocm.getString("contactMechId")); billToContactMech.set("contactMechPurposeTypeId", "BILLING_LOCATION"); toStore.add(billToContactMech);
Map createBillToContactMechContext = UtilMisc.toMap("invoiceId", invoiceId, "contactMechId", ocm.getString("contactMechId"), "contactMechPurposeTypeId", "BILLING_LOCATION", "userLogin", userLogin); Map createBillToContactMechResult = dispatcher.runSync("createInvoiceContactMech", createBillToContactMechContext); if (ServiceUtil.isError(createBillToContactMechResult)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingInvoiceContactMechFromOrder",locale), null, null, createBillToContactMechResult); }
public static Map createInvoiceForOrder(DispatchContext dctx, Map context) { GenericDelegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); Locale locale = (Locale) context.get("locale"); if (decimals == -1 || rounding == -1) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingAritmeticPropertiesNotConfigured",locale)); } String orderId = (String) context.get("orderId"); List billItems = (List) context.get("billItems"); boolean previousInvoiceFound = false; if (billItems == null || billItems.size() == 0) { Debug.logVerbose("No order items to invoice; not creating invoice; returning success", module); return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource,"AccountingNoOrderItemsToInvoice",locale)); } try { List toStore = new LinkedList(); GenericValue orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId)); if (orderHeader == null) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingNoOrderHeader",locale)); } // get list of previous invoices for the order List billedItems = delegator.findByAnd("OrderItemBilling", UtilMisc.toMap("orderId", orderId)); if (billedItems != null && billedItems.size() > 0) { boolean nonDigitalInvoice = false; Iterator bii = billedItems.iterator(); while (bii.hasNext() && !nonDigitalInvoice) { GenericValue orderItemBilling = (GenericValue) bii.next(); GenericValue invoiceItem = orderItemBilling.getRelatedOne("InvoiceItem"); if (invoiceItem != null) { String invoiceItemType = invoiceItem.getString("invoiceItemTypeId"); if (invoiceItemType != null) { if ("INV_FPROD_ITEM".equals(invoiceItemType) || "INV_PROD_FEATR_ITEM".equals(invoiceItemType)) { nonDigitalInvoice = true; } } } } if (nonDigitalInvoice) { previousInvoiceFound = true; } } // figure out the invoice type String invoiceType = null; String orderType = orderHeader.getString("orderTypeId"); if (orderType.equals("SALES_ORDER")) { invoiceType = "SALES_INVOICE"; } else if (orderType.equals("PURCHASE_ORDER")) { invoiceType = "PURCHASE_INVOICE"; } // Make an order read helper from the order OrderReadHelper orh = new OrderReadHelper(orderHeader); // get the product store GenericValue productStore = delegator.findByPrimaryKey("ProductStore", UtilMisc.toMap("productStoreId", orh.getProductStoreId())); // get the shipping adjustment mode (Y = Pro-Rate; N = First-Invoice) String prorateShipping = productStore.getString("prorateShipping"); if (prorateShipping == null) { prorateShipping = "Y"; } // get the billing parties String billToCustomerPartyId = orh.getBillToParty().getString("partyId"); String billFromVendorPartyId = orh.getBillFromParty().getString("partyId"); // get some quantity totals BigDecimal totalItemsInOrder = orh.getTotalOrderItemsQuantityBd(); // get some price totals BigDecimal shippableAmount = orh.getShippableTotalBd(null); BigDecimal orderSubTotal = orh.getOrderItemsSubTotalBd(); BigDecimal invoiceShipProRateAmount = ZERO; BigDecimal invoiceSubTotal = ZERO; BigDecimal invoiceQuantity = ZERO; GenericValue billingAccount = orderHeader.getRelatedOne("BillingAccount"); String billingAccountId = billingAccount != null ? billingAccount.getString("billingAccountId") : null; // TODO: ideally this should be the same time as when a shipment is sent and be passed in as a parameter Timestamp invoiceDate = UtilDateTime.nowTimestamp(); // TODO: perhaps consider billing account net days term as well? Long orderTermNetDays = orh.getOrderTermNetDays(); Timestamp dueDate = null; if (orderTermNetDays != null) { dueDate = UtilDateTime.getDayEnd(invoiceDate, orderTermNetDays.intValue()); } // create the invoice record Map createInvoiceContext = FastMap.newInstance(); createInvoiceContext.put("partyId", billToCustomerPartyId); createInvoiceContext.put("partyIdFrom", billFromVendorPartyId); createInvoiceContext.put("billingAccountId", billingAccountId); createInvoiceContext.put("invoiceDate", invoiceDate); createInvoiceContext.put("dueDate", dueDate); createInvoiceContext.put("invoiceTypeId", invoiceType); // start with INVOICE_IN_PROCESS, in the INVOICE_READY we can't change the invoice (or shouldn't be able to...) createInvoiceContext.put("statusId", "INVOICE_IN_PROCESS"); createInvoiceContext.put("currencyUomId", orderHeader.getString("currencyUom")); createInvoiceContext.put("userLogin", userLogin); // store the invoice first Map createInvoiceResult = dispatcher.runSync("createInvoice", createInvoiceContext); if (ServiceUtil.isError(createInvoiceResult)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingInvoiceFromOrder",locale), null, null, createInvoiceResult); } // call service, not direct entity op: delegator.create(invoice); String invoiceId = (String) createInvoiceResult.get("invoiceId"); // order roles to invoice roles List orderRoles = orderHeader.getRelated("OrderRole"); if (orderRoles != null) { Iterator orderRolesIt = orderRoles.iterator(); Map createInvoiceRoleContext = FastMap.newInstance(); createInvoiceRoleContext.put("invoiceId", invoiceId); createInvoiceRoleContext.put("userLogin", userLogin); while (orderRolesIt.hasNext()) { GenericValue orderRole = (GenericValue)orderRolesIt.next(); createInvoiceRoleContext.put("partyId", orderRole.getString("partyId")); createInvoiceRoleContext.put("roleTypeId", orderRole.getString("roleTypeId")); Map createInvoiceRoleResult = dispatcher.runSync("createInvoiceRole", createInvoiceRoleContext); if (ServiceUtil.isError(createInvoiceRoleResult)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingInvoiceFromOrder",locale), null, null, createInvoiceRoleResult); } } } // order terms to invoice terms. Implemented for purchase orders, although it may be useful // for sales orders as well. Later it might be nice to filter OrderTerms to only copy over financial terms. List orderTerms = orh.getOrderTerms(); toStore.addAll(createInvoiceTerms(delegator, invoiceId, orderTerms)); // billing accounts List billingAccountTerms = null; // for billing accounts we will use related information if (billingAccount != null) { // get the billing account terms billingAccountTerms = billingAccount.getRelated("BillingAccountTerm"); // set the invoice terms as defined for the billing account toStore.addAll(createInvoiceTerms(delegator, invoiceId, billingAccountTerms)); // set the invoice bill_to_customer from the billing account List billToRoles = billingAccount.getRelated("BillingAccountRole", UtilMisc.toMap("roleTypeId", "BILL_TO_CUSTOMER"), null); Iterator billToIter = billToRoles.iterator(); while (billToIter.hasNext()) { GenericValue billToRole = (GenericValue) billToIter.next(); if (!(billToRole.getString("partyId").equals(billToCustomerPartyId))) { GenericValue invoiceRole = delegator.makeValue("InvoiceRole", UtilMisc.toMap("invoiceId", invoiceId)); invoiceRole.set("partyId", billToRole.get("partyId")); invoiceRole.set("roleTypeId", "BILL_TO_CUSTOMER"); toStore.add(invoiceRole); } } // set the bill-to contact mech as the contact mech of the billing account if (UtilValidate.isNotEmpty(billingAccount.getString("contactMechId"))) { GenericValue billToContactMech = delegator.makeValue("InvoiceContactMech", UtilMisc.toMap("invoiceId", invoiceId)); billToContactMech.set("contactMechId", billingAccount.getString("contactMechId")); billToContactMech.set("contactMechPurposeTypeId", "BILLING_LOCATION"); toStore.add(billToContactMech); } } else { List billingLocations = orh.getBillingLocations(); if (billingLocations != null) { Iterator bli = billingLocations.iterator(); while (bli.hasNext()) { GenericValue ocm = (GenericValue) bli.next(); GenericValue billToContactMech = delegator.makeValue("InvoiceContactMech", UtilMisc.toMap("invoiceId", invoiceId)); billToContactMech.set("contactMechId", ocm.getString("contactMechId")); billToContactMech.set("contactMechPurposeTypeId", "BILLING_LOCATION"); toStore.add(billToContactMech); } } } // get a list of the payment method types //DEJ20050705 doesn't appear to be used: List paymentPreferences = orderHeader.getRelated("OrderPaymentPreference"); // create the bill-from (or pay-to) contact mech as the primary PAYMENT_LOCATION of the party from the store GenericValue payToAddress = null; if (invoiceType.equals("PURCHASE_INVOICE")) { // for purchase orders, the pay to address is the BILLING_LOCATION of the vendor GenericValue billFromVendor = orh.getPartyFromRole("BILL_FROM_VENDOR"); if (billFromVendor != null) { List billingContactMechs = billFromVendor.getRelatedOne("Party").getRelatedByAnd("PartyContactMechPurpose", UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION")); if ((billingContactMechs != null) && (billingContactMechs.size() > 0)) { payToAddress = (GenericValue) billingContactMechs.get(0); } } } else { // for sales orders, it is the payment address on file for the store payToAddress = PaymentWorker.getPaymentAddress(delegator, productStore.getString("payToPartyId")); } if (payToAddress != null) { GenericValue payToCm = delegator.makeValue("InvoiceContactMech", UtilMisc.toMap("invoiceId", invoiceId)); payToCm.set("contactMechId", payToAddress.getString("contactMechId")); payToCm.set("contactMechPurposeTypeId", "PAYMENT_LOCATION"); toStore.add(payToCm); } // sequence for items - all OrderItems or InventoryReservations + all Adjustments int invoiceItemSeqNum = 1; String invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, 2); // create the item records if (billItems != null) { Iterator itemIter = billItems.iterator(); while (itemIter.hasNext()) { GenericValue itemIssuance = null; GenericValue orderItem = null; GenericValue shipmentReceipt = null; GenericValue currentValue = (GenericValue) itemIter.next(); if ("ItemIssuance".equals(currentValue.getEntityName())) { itemIssuance = currentValue; } else if ("OrderItem".equals(currentValue.getEntityName())) { orderItem = currentValue; } else if ("ShipmentReceipt".equals(currentValue.getEntityName())) { shipmentReceipt = currentValue; } else { Debug.logError("Unexpected entity " + currentValue + " of type " + currentValue.getEntityName(), module); } if (orderItem == null && itemIssuance != null) { orderItem = itemIssuance.getRelatedOne("OrderItem"); } else if ((orderItem == null) && (shipmentReceipt != null)) { orderItem = shipmentReceipt.getRelatedOne("OrderItem"); } else if ((orderItem == null) && (itemIssuance == null) && (shipmentReceipt == null)) { Debug.logError("Cannot create invoice when orderItem, itemIssuance, and shipmentReceipt are all null", module); return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingIllegalValuesPassedToCreateInvoiceService",locale)); } GenericValue product = null; if (orderItem.get("productId") != null) { product = orderItem.getRelatedOne("Product"); } // get some quantities BigDecimal orderedQuantity = orderItem.getBigDecimal("quantity"); BigDecimal billingQuantity = null; if (itemIssuance != null) { billingQuantity = itemIssuance.getBigDecimal("quantity"); } else if (shipmentReceipt != null) { billingQuantity = shipmentReceipt.getBigDecimal("quantityAccepted"); } else { billingQuantity = orderedQuantity; } if (orderedQuantity == null) orderedQuantity = ZERO; if (billingQuantity == null) billingQuantity = ZERO; // check if shipping applies to this item. Shipping is calculated for sales invoices, not purchase invoices. boolean shippingApplies = false; if ((product != null) && (ProductWorker.shippingApplies(product)) && (invoiceType.equals("SALES_INVOICE"))) { shippingApplies = true; } GenericValue invoiceItem = delegator.makeValue("InvoiceItem", UtilMisc.toMap("invoiceId", invoiceId, "invoiceItemSeqId", invoiceItemSeqId)); invoiceItem.set("invoiceItemTypeId", getInvoiceItemType(delegator, (orderItem == null ? null : orderItem.getString("orderItemTypeId")), (product == null ? null : product.getString("productTypeId")), invoiceType, "INV_FPROD_ITEM")); invoiceItem.set("description", orderItem.get("itemDescription")); invoiceItem.set("quantity", new Double(billingQuantity.doubleValue())); invoiceItem.set("amount", orderItem.get("unitPrice")); invoiceItem.set("productId", orderItem.get("productId")); invoiceItem.set("productFeatureId", orderItem.get("productFeatureId")); invoiceItem.set("overrideGlAccountId", orderItem.get("overrideGlAccountId")); //invoiceItem.set("uomId", ""); String itemIssuanceId = null; if (itemIssuance != null && itemIssuance.get("inventoryItemId") != null) { itemIssuanceId = itemIssuance.getString("itemIssuanceId"); invoiceItem.set("inventoryItemId", itemIssuance.get("inventoryItemId")); } // similarly, tax only for purchase invoices if ((product != null) && (invoiceType.equals("SALES_INVOICE"))) { invoiceItem.set("taxableFlag", product.get("taxable")); } toStore.add(invoiceItem); // this item total BigDecimal thisAmount = invoiceItem.getBigDecimal("amount").multiply(invoiceItem.getBigDecimal("quantity")).setScale(decimals, rounding); // add to the ship amount only if it applies to this item if (shippingApplies) { invoiceShipProRateAmount = invoiceShipProRateAmount.add(thisAmount).setScale(decimals, rounding); } // increment the invoice subtotal invoiceSubTotal = invoiceSubTotal.add(thisAmount).setScale(decimals, rounding); // increment the invoice quantity invoiceQuantity = invoiceQuantity.add(billingQuantity).setScale(decimals, rounding); // create the OrderItemBilling record GenericValue orderItemBill = delegator.makeValue("OrderItemBilling", UtilMisc.toMap("invoiceId", invoiceId, "invoiceItemSeqId", invoiceItemSeqId)); orderItemBill.set("orderId", orderItem.get("orderId")); orderItemBill.set("orderItemSeqId", orderItem.get("orderItemSeqId")); orderItemBill.set("itemIssuanceId", itemIssuanceId); if ((shipmentReceipt != null) && (shipmentReceipt.getString("receiptId") != null)) { orderItemBill.set("shipmentReceiptId", shipmentReceipt.getString("receiptId")); } orderItemBill.set("quantity", invoiceItem.get("quantity")); orderItemBill.set("amount", invoiceItem.get("amount")); toStore.add(orderItemBill); String parentInvoiceItemSeqId = invoiceItemSeqId; // increment the counter invoiceItemSeqNum++; invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, 2); // create the item adjustment as line items List itemAdjustments = OrderReadHelper.getOrderItemAdjustmentList(orderItem, orh.getAdjustments()); Iterator itemAdjIter = itemAdjustments.iterator(); while (itemAdjIter.hasNext()) { GenericValue adj = (GenericValue) itemAdjIter.next(); if (adj.get("amount") != null) { // pro-rate the amount // set decimals = 100 means we don't round this intermediate value, which is very important BigDecimal amount = adj.getBigDecimal("amount").divide(orderItem.getBigDecimal("quantity"), 100, rounding); amount = amount.multiply(invoiceItem.getBigDecimal("quantity")); amount = amount.setScale(decimals, rounding); GenericValue adjInvItem = delegator.makeValue("InvoiceItem", UtilMisc.toMap("invoiceId", invoiceId, "invoiceItemSeqId", invoiceItemSeqId)); adjInvItem.set("invoiceItemTypeId", getInvoiceItemType(delegator, adj.getString("orderAdjustmentTypeId"), null, invoiceType, "INVOICE_ITM_ADJ")); adjInvItem.set("productId", orderItem.get("productId")); adjInvItem.set("productFeatureId", orderItem.get("productFeatureId")); adjInvItem.set("parentInvoiceId", invoiceId); adjInvItem.set("parentInvoiceItemSeqId", parentInvoiceItemSeqId); //adjInvItem.set("uomId", ""); // invoice items for sales tax are not taxable themselves // TODO: This is not an ideal solution. Instead, we need to use OrderAdjustment.includeInTax when it is implemented if (!(adj.getString("orderAdjustmentTypeId").equals("SALES_TAX"))) { adjInvItem.set("taxableFlag", product.get("taxable")); } adjInvItem.set("quantity", new Double(1)); adjInvItem.set("amount", new Double(amount.doubleValue())); adjInvItem.set("description", adj.get("description")); adjInvItem.set("taxAuthPartyId", adj.get("taxAuthPartyId")); adjInvItem.set("overrideGlAccountId", adj.get("overrideGlAccountId")); adjInvItem.set("taxAuthGeoId", adj.get("taxAuthGeoId")); adjInvItem.set("taxAuthorityRateSeqId", adj.get("taxAuthorityRateSeqId")); toStore.add(adjInvItem); // this adjustment amount BigDecimal thisAdjAmount = adjInvItem.getBigDecimal("amount").multiply(adjInvItem.getBigDecimal("quantity")).setScale(decimals, rounding); // adjustments only apply to totals when they are not tax or shipping adjustments if (!"SALES_TAX".equals(adj.getString("orderAdjustmentTypeId")) && !"SHIPPING_ADJUSTMENT".equals(adj.getString("orderAdjustmentTypeId"))) { // increment the invoice subtotal invoiceSubTotal = invoiceSubTotal.add(thisAdjAmount).setScale(decimals, rounding); // add to the ship amount only if it applies to this item if (shippingApplies) { invoiceShipProRateAmount = invoiceShipProRateAmount.add(thisAdjAmount).setScale(decimals, rounding); } } // increment the counter invoiceItemSeqNum++; invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, 2); } } } } // create header adjustments as line items -- always to tax/shipping last List shipAdjustments = new ArrayList(); List taxAdjustments = new ArrayList(); List headerAdjustments = orh.getOrderHeaderAdjustments(); Iterator headerAdjIter = headerAdjustments.iterator(); while (headerAdjIter.hasNext()) { GenericValue adj = (GenericValue) headerAdjIter.next(); if ("SHIPPING_CHARGES".equals(adj.getString("orderAdjustmentTypeId"))) { shipAdjustments.add(adj); } else if ("SALES_TAX".equals(adj.getString("orderAdjustmentTypeId"))) { taxAdjustments.add(adj); } else { // these will effect the shipping pro-rate (unless commented) // other adjustment type BigDecimal adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, toStore, orderSubTotal, invoiceSubTotal, invoiceQuantity, decimals, rounding); // invoiceShipProRateAmount += adjAmount; // do adjustments compound or are they based off subtotal? Here we will (unless commented) // invoiceSubTotal += adjAmount; // increment the counter invoiceItemSeqNum++; invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, 2); } } // next do the shipping adjustments Iterator shipAdjIter = shipAdjustments.iterator(); while (shipAdjIter.hasNext()) { GenericValue adj = (GenericValue) shipAdjIter.next(); if ("N".equalsIgnoreCase(prorateShipping)) { if (previousInvoiceFound) { Debug.logInfo("Previous invoice found for this order [" + orderId + "]; shipping already billed", module); continue; } else { // this is the first invoice; bill it all now BigDecimal adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, toStore, new BigDecimal("1"), new BigDecimal("1"), totalItemsInOrder, decimals, rounding); // should shipping effect the tax pro-rate? here we do, and we also update order sub total for this adjustment's value invoiceSubTotal = invoiceSubTotal.add(adjAmount).setScale(decimals, rounding); orderSubTotal = orderSubTotal.add(adj.getBigDecimal("amount")).setScale(decimals, rounding); // increment the counter invoiceItemSeqNum++; invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, 2); } } else { // pro-rate the shipping amount based on shippable information BigDecimal adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, toStore, shippableAmount, invoiceShipProRateAmount, invoiceQuantity, decimals, rounding); // should shipping effect the tax pro-rate? here we do, and we also update order sub total for this adjustment's value invoiceSubTotal = invoiceSubTotal.add(adjAmount).setScale(decimals, rounding); orderSubTotal = orderSubTotal.add(adj.getBigDecimal("amount")).setScale(decimals, rounding); // increment the counter invoiceItemSeqNum++; invoiceItemSeqId = UtilFormatOut.formatPaddedNumber(invoiceItemSeqNum, 2); } } // last do the tax adjustments Iterator taxAdjIter = taxAdjustments.iterator(); while (taxAdjIter.hasNext()) { GenericValue adj = (GenericValue) taxAdjIter.next(); BigDecimal adjAmount = calcHeaderAdj(delegator, adj, invoiceType, invoiceId, invoiceItemSeqId, toStore, orderSubTotal, invoiceSubTotal, invoiceQuantity, taxDecimals, taxRounding); // this doesn't really effect anything; but just for our totals invoiceSubTotal = invoiceSubTotal.add(adjAmount).setScale(decimals, rounding); } // check for previous order payments List orderPaymentPrefs = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("orderId", orderId)); if (orderPaymentPrefs != null) { List currentPayments = new ArrayList(); Iterator opi = orderPaymentPrefs.iterator(); while (opi.hasNext()) { GenericValue paymentPref = (GenericValue) opi.next(); List payments = paymentPref.getRelated("Payment"); currentPayments.addAll(payments); } if (currentPayments.size() > 0) { // apply these payments to the invoice; only if they haven't already been applied Iterator cpi = currentPayments.iterator(); while (cpi.hasNext()) { GenericValue payment = (GenericValue) cpi.next(); List currentApplications = null; currentApplications = payment.getRelated("PaymentApplication"); if (currentApplications == null || currentApplications.size() == 0) { // no applications; okay to apply Map appl = new HashMap(); appl.put("paymentId", payment.get("paymentId")); appl.put("invoiceId", invoiceId); appl.put("billingAccountId", billingAccountId); appl.put("amountApplied", payment.get("amount")); appl.put("userLogin", userLogin); Map createPayApplResult = dispatcher.runSync("createPaymentApplication", appl); if (ServiceUtil.isError(createPayApplResult)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingInvoiceFromOrder",locale), null, null, createPayApplResult); } } } } } // store value objects //Debug.log("Storing : " + toStore, module); // TODO BIG TIME: need to get rid of the storeAll/toStore stuff and call all services for these things rather than direct entity ops delegator.storeAll(toStore); // should all be in place now, so set status to INVOICE_READY (unless it's a purchase invoice, which we sets to INVOICE_IN_PROCESS) String nextStatusId = "INVOICE_READY"; if (invoiceType.equals("PURCHASE_INVOICE")) { nextStatusId = "INVOICE_IN_PROCESS"; } Map setInvoiceStatusResult = dispatcher.runSync("setInvoiceStatus", UtilMisc.toMap("invoiceId", invoiceId, "statusId", nextStatusId, "userLogin", userLogin)); if (ServiceUtil.isError(setInvoiceStatusResult)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingInvoiceFromOrder",locale), null, null, setInvoiceStatusResult); } // check to see if we are all paid up Map checkResp = dispatcher.runSync("checkInvoicePaymentApplications", UtilMisc.toMap("invoiceId", invoiceId, "userLogin", userLogin)); if (ServiceUtil.isError(checkResp)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource,"AccountingErrorCreatingInvoiceFromOrderCheckPaymentAppl",locale), null, null, checkResp); } Map resp = ServiceUtil.returnSuccess(); resp.put("invoiceId", invoiceId); return resp; } catch (GenericEntityException e) { String errMsg = UtilProperties.getMessage(resource,"AccountingEntityDataProblemCreatingInvoiceFromOrderItems",UtilMisc.toMap("reason",e.toString()),locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } catch (GenericServiceException e) { String errMsg = UtilProperties.getMessage(resource,"AccountingServiceOtherProblemCreatingInvoiceFromOrderItems",UtilMisc.toMap("reason",e.toString()),locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } }
55411 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55411/f69d9c6deaed6cb28670d72ef334daa488133ccd/InvoiceServices.java/buggy/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1635, 752, 10467, 1290, 2448, 12, 5325, 1042, 302, 5900, 16, 1635, 819, 13, 288, 3639, 7928, 15608, 639, 11158, 639, 273, 302, 5900, 18, 588, 15608, 639, 5621, 3639, 3566, 6681, 7393, 273, 302, 5900, 18, 588, 6681, 5621, 3639, 7928, 620, 729, 5358, 273, 261, 7014, 620, 13, 819, 18, 588, 2932, 1355, 5358, 8863, 3639, 6458, 2573, 273, 261, 3916, 13, 819, 18, 588, 2932, 6339, 8863, 3639, 309, 261, 31734, 422, 300, 21, 747, 13885, 422, 300, 21, 13, 288, 5411, 327, 1956, 1304, 18, 2463, 668, 12, 1304, 2297, 18, 24906, 12, 3146, 10837, 3032, 310, 37, 583, 81, 7943, 2297, 1248, 15334, 3113, 6339, 10019, 3639, 289, 3639, 514, 20944, 273, 261, 780, 13, 819, 18, 588, 2932, 1019, 548, 8863, 3639, 987, 20714, 3126, 273, 261, 682, 13, 819, 18, 588, 2932, 17240, 3126, 8863, 3639, 1250, 2416, 10467, 2043, 273, 629, 31, 3639, 309, 261, 17240, 3126, 422, 446, 747, 20714, 3126, 18, 1467, 1435, 422, 374, 13, 288, 5411, 4015, 18, 1330, 14489, 2932, 2279, 1353, 1516, 358, 9179, 31, 486, 4979, 9179, 31, 5785, 2216, 3113, 1605, 1769, 5411, 327, 1956, 1304, 18, 2463, 4510, 12, 1304, 2297, 18, 24906, 12, 3146, 10837, 3032, 310, 2279, 2448, 3126, 774, 10467, 3113, 6339, 10019, 3639, 289, 3639, 775, 288, 5411, 987, 358, 2257, 273, 394, 10688, 5621, 5411, 7928, 620, 1353, 1864, 273, 11158, 639, 18, 4720, 858, 11575, 2932, 2448, 1864, 3113, 3564, 11729, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1635, 752, 10467, 1290, 2448, 12, 5325, 1042, 302, 5900, 16, 1635, 819, 13, 288, 3639, 7928, 15608, 639, 11158, 639, 273, 302, 5900, 18, 588, 15608, 639, 5621, 3639, 3566, 6681, 7393, 273, 302, 5900, 18, 588, 6681, 5621, 3639, 7928, 620, 729, 5358, 273, 261, 7014, 620, 13, 819, 18, 588, 2932, 1355, 5358, 8863, 3639, 6458, 2573, 273, 261, 3916, 13, 819, 18, 588, 2932, 6339, 8863, 3639, 309, 261, 31734, 422, 300, 21, 747, 13885, 422, 300, 21, 13, 288, 5411, 327, 1956, 1304, 18, 2463, 668, 12, 1304, 2297, 18, 24906, 12, 3146, 10837, 3032, 310, 37, 583, 81, 7943, 2297, 1248, 15334, 3113, 6339, 10019, 3639, 289, 3639, 514, 20944, 2 ]
public DebugEvent createTerminateEvent() {
public DebugEvent createTerminateEvent() {
public DebugEvent createTerminateEvent() { return new DebugEvent( this, DebugEvent.TERMINATE ); }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/265609f8253713cf79c6ccc527e74a15c521b97a/CDebugElement.java/buggy/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4015, 1133, 752, 26106, 1133, 1435, 202, 95, 202, 202, 2463, 394, 4015, 1133, 12, 333, 16, 4015, 1133, 18, 29516, 1777, 11272, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4015, 1133, 752, 26106, 1133, 1435, 202, 95, 202, 202, 2463, 394, 4015, 1133, 12, 333, 16, 4015, 1133, 18, 29516, 1777, 11272, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if (MylarTaskListPlugin.getDefault().getTaskHandlerForElement((ITaskListElement) selectedObject) != null) { ITask t = MylarTaskListPlugin.getDefault().getTaskHandlerForElement( (ITaskListElement) selectedObject).dropItemToPlan((ITaskListElement) selectedObject); planContentProvider.addTask(t); updateEstimatedHours(); planTableViewer.refresh(); return true;
if (MylarTaskListPlugin.getDefault().getHandlerForElement((ITaskListElement) selectedObject) != null) { ITask task = null; if (selectedObject instanceof ITask) { task = (ITask)selectedObject; } else if (selectedObject instanceof IQueryHit){ task = MylarTaskListPlugin.getDefault().getHandlerForElement( (ITaskListElement) selectedObject).getCorrespondingTask((IQueryHit) selectedObject); } if (task != null) { planContentProvider.addTask(task); updateEstimatedHours(); planTableViewer.refresh(); return true; }
public boolean performDrop(Object data) { Object selectedObject = ((IStructuredSelection) TaskListView.getDefault().getViewer().getSelection()) .getFirstElement(); if (selectedObject instanceof ITask) { planContentProvider.addTask((ITask) selectedObject); updateEstimatedHours(); planTableViewer.refresh(); return true; } else if (selectedObject instanceof ITaskListElement) { if (MylarTaskListPlugin.getDefault().getTaskHandlerForElement((ITaskListElement) selectedObject) != null) { ITask t = MylarTaskListPlugin.getDefault().getTaskHandlerForElement( (ITaskListElement) selectedObject).dropItemToPlan((ITaskListElement) selectedObject); planContentProvider.addTask(t); updateEstimatedHours(); planTableViewer.refresh(); return true; } return false; } return false; }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d56887d5cef86824a8e68ec95452d914c6fc55cd/TaskPlannerEditorPart.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/ui/TaskPlannerEditorPart.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 1250, 3073, 7544, 12, 921, 501, 13, 288, 9506, 202, 921, 3170, 921, 273, 14015, 45, 30733, 6233, 13, 3837, 682, 1767, 18, 588, 1868, 7675, 588, 18415, 7675, 588, 6233, 10756, 25083, 202, 18, 588, 3759, 1046, 5621, 9506, 202, 430, 261, 8109, 921, 1276, 467, 2174, 13, 288, 6862, 202, 7088, 1350, 2249, 18, 1289, 2174, 12443, 1285, 835, 13, 3170, 921, 1769, 6862, 202, 2725, 9122, 17275, 14910, 5621, 6862, 202, 7088, 1388, 18415, 18, 9144, 5621, 6862, 202, 2463, 638, 31, 9506, 202, 97, 469, 309, 261, 8109, 921, 1276, 467, 2174, 682, 1046, 13, 288, 6862, 202, 430, 261, 12062, 7901, 2174, 682, 3773, 18, 588, 1868, 7675, 588, 2174, 1503, 1290, 1046, 12443, 1285, 835, 682, 1046, 13, 3170, 921, 13, 480, 446, 13, 288, 25083, 202, 1285, 835, 268, 273, 8005, 7901, 2174, 682, 3773, 18, 588, 1868, 7675, 588, 2174, 1503, 1290, 1046, 12, 6862, 9506, 202, 12, 1285, 835, 682, 1046, 13, 3170, 921, 2934, 7285, 1180, 774, 5365, 12443, 1285, 835, 682, 1046, 13, 3170, 921, 1769, 25083, 202, 7088, 1350, 2249, 18, 1289, 2174, 12, 88, 1769, 25083, 202, 2725, 9122, 17275, 14910, 5621, 25083, 202, 7088, 1388, 18415, 18, 9144, 5621, 25083, 202, 2463, 638, 31, 6862, 202, 97, 6862, 202, 2463, 629, 31, 9506, 202, 97, 9506, 202, 2463, 629, 31, 1082, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 1250, 3073, 7544, 12, 921, 501, 13, 288, 9506, 202, 921, 3170, 921, 273, 14015, 45, 30733, 6233, 13, 3837, 682, 1767, 18, 588, 1868, 7675, 588, 18415, 7675, 588, 6233, 10756, 25083, 202, 18, 588, 3759, 1046, 5621, 9506, 202, 430, 261, 8109, 921, 1276, 467, 2174, 13, 288, 6862, 202, 7088, 1350, 2249, 18, 1289, 2174, 12443, 1285, 835, 13, 3170, 921, 1769, 6862, 202, 2725, 9122, 17275, 14910, 5621, 6862, 202, 7088, 1388, 18415, 18, 9144, 5621, 6862, 202, 2463, 638, 31, 9506, 202, 97, 469, 309, 261, 8109, 921, 1276, 467, 2174, 682, 1046, 13, 288, 6862, 202, 430, 261, 12062, 7901, 2174, 682, 3773, 18, 588, 1868, 7675, 588, 2174, 1503, 2 ]
return (float)(value.getFloatValue() / 1000);
return (value.getFloatValue() / 1000);
protected static float toHertz(Value value) { switch (value.getPrimitiveType()) { case CSSPrimitiveValue.CSS_HZ: return value.getFloatValue(); case CSSPrimitiveValue.CSS_KHZ: return (float)(value.getFloatValue() / 1000); default: throw new DOMException(DOMException.INVALID_ACCESS_ERR, ""); } }
45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/37794489f7dedd0c74c1b7ae67e92cf8d877b256/CSSOMValue.java/buggy/sources/org/apache/batik/css/dom/CSSOMValue.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 760, 1431, 358, 44, 1051, 94, 12, 620, 460, 13, 288, 202, 9610, 261, 1132, 18, 588, 9840, 559, 10756, 288, 202, 3593, 6765, 9840, 620, 18, 10276, 67, 44, 62, 30, 202, 565, 327, 460, 18, 588, 4723, 620, 5621, 202, 3593, 6765, 9840, 620, 18, 10276, 67, 47, 44, 62, 30, 202, 565, 327, 261, 5659, 21433, 1132, 18, 588, 4723, 620, 1435, 342, 4336, 1769, 202, 1886, 30, 5411, 604, 394, 4703, 503, 12, 8168, 503, 18, 9347, 67, 13204, 67, 9712, 16, 1408, 1769, 202, 97, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 760, 1431, 358, 44, 1051, 94, 12, 620, 460, 13, 288, 202, 9610, 261, 1132, 18, 588, 9840, 559, 10756, 288, 202, 3593, 6765, 9840, 620, 18, 10276, 67, 44, 62, 30, 202, 565, 327, 460, 18, 588, 4723, 620, 5621, 202, 3593, 6765, 9840, 620, 18, 10276, 67, 47, 44, 62, 30, 202, 565, 327, 261, 5659, 21433, 1132, 18, 588, 4723, 620, 1435, 342, 4336, 1769, 202, 1886, 30, 5411, 604, 394, 4703, 503, 12, 8168, 503, 18, 9347, 67, 13204, 67, 9712, 16, 1408, 1769, 202, 97, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
return slot << LOG_BYTES_IN_ADDRESS;
return Offset.fromIntZeroExtend(slot << LOG_BYTES_IN_ADDRESS);
public final int getIMTOffset() { if (VM.VerifyAssertions) VM._assert(VM.BuildForIMTInterfaceInvocation); int slot = id % IMT_METHOD_SLOTS; if (VM.BuildForEmbeddedIMT) { slot += TIB_FIRST_INTERFACE_METHOD_INDEX; } return slot << LOG_BYTES_IN_ADDRESS; }
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/3a9aeeb7f964774e6adc285d6526603ac1570e14/VM_InterfaceMethodSignature.java/buggy/rvm/src/vm/classLoader/VM_InterfaceMethodSignature.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 727, 509, 336, 3445, 56, 2335, 1435, 288, 565, 309, 261, 7397, 18, 8097, 8213, 1115, 13, 8251, 6315, 11231, 12, 7397, 18, 3116, 1290, 3445, 56, 1358, 9267, 1769, 565, 509, 4694, 273, 612, 738, 467, 6152, 67, 5327, 67, 55, 1502, 8047, 31, 565, 309, 261, 7397, 18, 3116, 1290, 14980, 3445, 56, 13, 288, 1377, 4694, 1011, 399, 13450, 67, 15354, 67, 18865, 67, 5327, 67, 9199, 31, 565, 289, 565, 327, 9874, 18, 2080, 1702, 7170, 16675, 12, 14194, 2296, 2018, 67, 13718, 67, 706, 67, 15140, 1769, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 727, 509, 336, 3445, 56, 2335, 1435, 288, 565, 309, 261, 7397, 18, 8097, 8213, 1115, 13, 8251, 6315, 11231, 12, 7397, 18, 3116, 1290, 3445, 56, 1358, 9267, 1769, 565, 509, 4694, 273, 612, 738, 467, 6152, 67, 5327, 67, 55, 1502, 8047, 31, 565, 309, 261, 7397, 18, 3116, 1290, 14980, 3445, 56, 13, 288, 1377, 4694, 1011, 399, 13450, 67, 15354, 67, 18865, 67, 5327, 67, 9199, 31, 565, 289, 565, 327, 9874, 18, 2080, 1702, 7170, 16675, 12, 14194, 2296, 2018, 67, 13718, 67, 706, 67, 15140, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
{ return look_and_feel; }
{ return look_and_feel; }
static LookAndFeel getLookAndFeel() { return look_and_feel; }
47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/ed52daae8ff65683ea13c6ffb02a6febd446ffc5/UIManager.java/buggy/javax/swing/UIManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 225, 10176, 1876, 2954, 292, 9014, 1184, 1876, 2954, 292, 1435, 565, 288, 202, 2463, 2324, 67, 464, 67, 3030, 292, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 760, 225, 10176, 1876, 2954, 292, 9014, 1184, 1876, 2954, 292, 1435, 565, 288, 202, 2463, 2324, 67, 464, 67, 3030, 292, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
dsTrans.clear();
ostore.clear(appID);
public void clear() { dsTrans.clear(); }
55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/6b40bde05ec81edb76699af7b9a97b68469f7216/TSOTransaction.java/buggy/src/com/sun/gi/objectstore/tso/TSOTransaction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2424, 1435, 288, 202, 202, 2377, 1429, 18, 8507, 5621, 1082, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2424, 1435, 288, 202, 202, 2377, 1429, 18, 8507, 5621, 1082, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
public int size() { return al.size(); }
public int size() { return al.size(); }
public int size() { return al.size(); }
4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/a6a25004fd5e24a1bc5f053aa539d01dc2553fbf/CopyOnWriteArraySet.java/buggy/src/java/org/logicalcobwebs/concurrent/CopyOnWriteArraySet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 509, 1377, 963, 1435, 10792, 288, 327, 524, 18, 1467, 5621, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 509, 1377, 963, 1435, 10792, 288, 327, 524, 18, 1467, 5621, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
public void testPermissionInheritance() throws Throwable { CmsObject cms = getCmsObject(); echo("Testing inheritance of permissions"); String foldername = "testPermissionInheritance"; String subfoldername = foldername + "/" + "subfolder"; String resourcename = foldername + "/test.txt"; String subresourcename = subfoldername + "/subtest.txt"; cms.createResource(foldername, CmsResourceTypeFolder.getStaticTypeId()); cms.createResource(subfoldername, CmsResourceTypeFolder.getStaticTypeId()); cms.createResource(resourcename, CmsResourceTypePlain.getStaticTypeId()); cms.createResource(subresourcename, CmsResourceTypePlain.getStaticTypeId()); assertEquals("+r+w+v+c", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("+r+w+v+c", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("+r+w+v+c", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "Users", "+o"); assertEquals("", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("+r+w+v+c", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("+r+w+v+c", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "Users", "+o+i"); assertEquals("", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.createGroup("GroupA", "", 0, ""); cms.createGroup("GroupB", "", 0, ""); cms.createGroup("GroupC", "", 0, ""); cms.createGroup("GroupD", "", 0, ""); cms.addUserToGroup("testUser", "GroupA"); cms.addUserToGroup("testUser", "GroupB"); cms.addUserToGroup("testUser", "GroupC"); cms.addUserToGroup("testUser", "GroupD"); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupA", "+r"); assertEquals("+r", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupA", "+r+i"); assertEquals("+r", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("+r", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("+r", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupB", "+w"); assertEquals("+r+w", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("+r", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("+r", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupB", "+w+i"); assertEquals("+r+w", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("+r+w", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("+r+w", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupC", "-r"); assertEquals("-r+w", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("+r+w", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("+r+w", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupC", "-r+i"); assertEquals("-r+w", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("-r+w", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("-r+w", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupD", "-w"); assertEquals("-r-w", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("-r+w", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("-r+w", cms.getPermissions(subresourcename, "testUser").getPermissionString()); cms.chacc(foldername, I_CmsPrincipal.PRINCIPAL_GROUP, "GroupD", "-w+i"); assertEquals("-r-w", cms.getPermissions(resourcename, "testUser").getPermissionString()); assertEquals("-r-w", cms.getPermissions(subfoldername, "testUser").getPermissionString()); assertEquals("-r-w", cms.getPermissions(subresourcename, "testUser").getPermissionString()); }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/be6031929d4b8a365df3862b5c27a9277870225a/TestPermissions.java/clean/test/org/opencms/file/TestPermissions.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 5041, 28255, 1435, 1216, 4206, 288, 7734, 14371, 6166, 273, 28287, 5621, 2398, 3376, 2932, 22218, 16334, 434, 4371, 8863, 7734, 514, 3009, 529, 273, 315, 3813, 5041, 28255, 14432, 3639, 514, 31001, 529, 273, 3009, 529, 397, 4016, 397, 315, 1717, 5609, 14432, 3639, 514, 31174, 1069, 273, 3009, 529, 397, 2206, 3813, 18, 5830, 14432, 3639, 514, 720, 455, 20989, 1069, 273, 31001, 529, 397, 2206, 1717, 3813, 18, 5830, 14432, 7734, 6166, 18, 2640, 1420, 12, 5609, 529, 16, 30696, 3899, 18, 588, 5788, 11731, 10663, 3639, 6166, 18, 2640, 1420, 12, 1717, 5609, 529, 16, 30696, 3899, 18, 588, 5788, 11731, 10663, 3639, 6166, 18, 2640, 1420, 12, 455, 20989, 1069, 16, 30696, 13360, 18, 588, 5788, 11731, 10663, 3639, 6166, 18, 2640, 1420, 12, 1717, 455, 20989, 1069, 16, 30696, 13360, 18, 588, 5788, 11731, 10663, 7734, 1815, 8867, 2932, 15, 86, 15, 91, 15, 90, 15, 71, 3113, 6166, 18, 588, 6521, 12, 455, 20989, 1069, 16, 315, 3813, 1299, 20387, 588, 5041, 780, 10663, 3639, 1815, 8867, 2932, 15, 86, 15, 91, 15, 90, 15, 71, 3113, 6166, 18, 588, 6521, 12, 1717, 5609, 529, 16, 315, 3813, 1299, 20387, 588, 5041, 780, 10663, 3639, 1815, 8867, 2932, 15, 86, 15, 91, 15, 90, 15, 71, 3113, 6166, 18, 588, 6521, 12, 1717, 455, 20989, 1069, 16, 315, 3813, 1299, 20387, 588, 5041, 780, 10663, 7734, 6166, 18, 8838, 952, 12, 5609, 529, 16, 467, 67, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 5041, 28255, 1435, 1216, 4206, 288, 7734, 14371, 6166, 273, 28287, 5621, 2398, 3376, 2932, 22218, 16334, 434, 4371, 8863, 7734, 514, 3009, 529, 273, 315, 3813, 5041, 28255, 14432, 3639, 514, 31001, 529, 273, 3009, 529, 397, 4016, 397, 315, 1717, 5609, 14432, 3639, 514, 31174, 1069, 273, 3009, 529, 397, 2206, 3813, 18, 5830, 14432, 3639, 514, 720, 455, 20989, 1069, 273, 31001, 529, 397, 2206, 1717, 3813, 18, 5830, 14432, 7734, 6166, 18, 2640, 1420, 12, 5609, 529, 16, 30696, 3899, 18, 588, 5788, 11731, 10663, 3639, 6166, 18, 2640, 1420, 12, 1717, 5609, 529, 16, 30696, 3899, 18, 588, 5788, 11731, 10663, 3639, 6166, 18, 2640, 1420, 12, 455, 20989, 1069, 2 ]
String className = theClass.getName();
String className = getTheClass().getName();
public ClassNode getClassNode() { if (classNode == null && GroovyObject.class.isAssignableFrom(theClass)) { // lets try load it from the classpath String className = theClass.getName(); String groovyFile = className; int idx = groovyFile.indexOf('$'); if (idx > 0) { groovyFile = groovyFile.substring(0, idx); } groovyFile = groovyFile.replace('.', '/') + ".groovy"; //System.out.println("Attempting to load: " + groovyFile); URL url = theClass.getClassLoader().getResource(groovyFile); if (url == null) { url = Thread.currentThread().getContextClassLoader().getResource(groovyFile); } if (url != null) { try { /** * todo there is no CompileUnit in scope so class name * checking won't work but that mostly affects the bytecode * generation rather than viewing the AST */ CompilationUnit.ClassgenCallback search = new CompilationUnit.ClassgenCallback() { public void call( ClassVisitor writer, ClassNode node ) { if( node.getName().equals(theClass.getName()) ) { MetaClassImpl.this.classNode = node; } } }; final ClassLoader parent = theClass.getClassLoader(); GroovyClassLoader gcl = (GroovyClassLoader) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return new GroovyClassLoader(parent); } }); CompilationUnit unit = new CompilationUnit( ); unit.setClassgenCallback( search ); unit.addSource( url ); unit.compile( Phases.CLASS_GENERATION ); } catch (Exception e) { throw new GroovyRuntimeException("Exception thrown parsing: " + groovyFile + ". Reason: " + e, e); } } } return classNode; }
6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/7f7bd98b21b4a4a5dd588d3eb27c681f7fe6e3fe/MetaClassImpl.java/buggy/src/main/groovy/lang/MetaClassImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 19769, 2900, 907, 1435, 288, 4202, 309, 261, 1106, 907, 422, 446, 597, 20841, 921, 18, 1106, 18, 291, 7961, 1265, 12, 5787, 797, 3719, 288, 6647, 368, 14557, 775, 1262, 518, 628, 326, 10006, 6647, 514, 2658, 273, 336, 1986, 797, 7675, 17994, 5621, 6647, 514, 24955, 812, 273, 2658, 31, 6647, 509, 2067, 273, 24955, 812, 18, 31806, 2668, 8, 8284, 6647, 309, 261, 3465, 405, 374, 13, 288, 9079, 24955, 812, 273, 24955, 812, 18, 28023, 12, 20, 16, 2067, 1769, 6647, 289, 6647, 24955, 812, 273, 24955, 812, 18, 2079, 2668, 1093, 16, 2023, 13, 397, 3552, 75, 12859, 14432, 6647, 368, 3163, 18, 659, 18, 8222, 2932, 23089, 358, 1262, 30, 315, 397, 24955, 812, 1769, 6647, 1976, 880, 273, 326, 797, 18, 588, 7805, 7675, 588, 1420, 12, 75, 12859, 812, 1769, 6647, 309, 261, 718, 422, 446, 13, 288, 9079, 880, 273, 4884, 18, 2972, 3830, 7675, 29120, 7805, 7675, 588, 1420, 12, 75, 12859, 812, 1769, 6647, 289, 6647, 309, 261, 718, 480, 446, 13, 288, 9079, 775, 288, 10402, 1783, 10792, 380, 10621, 1915, 353, 1158, 16143, 2802, 316, 2146, 1427, 667, 508, 10792, 380, 6728, 8462, 1404, 1440, 1496, 716, 23958, 30058, 326, 22801, 10792, 380, 9377, 9178, 2353, 1476, 310, 326, 9183, 10792, 1195, 10402, 22416, 2802, 18, 797, 4507, 2428, 1623, 273, 394, 22416, 2802, 18, 797, 4507, 2428, 1435, 288, 15604, 1071, 918, 745, 12, 1659, 7413, 2633, 16, 19769, 756, 262, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 19769, 2900, 907, 1435, 288, 4202, 309, 261, 1106, 907, 422, 446, 597, 20841, 921, 18, 1106, 18, 291, 7961, 1265, 12, 5787, 797, 3719, 288, 6647, 368, 14557, 775, 1262, 518, 628, 326, 10006, 6647, 514, 2658, 273, 336, 1986, 797, 7675, 17994, 5621, 6647, 514, 24955, 812, 273, 2658, 31, 6647, 509, 2067, 273, 24955, 812, 18, 31806, 2668, 8, 8284, 6647, 309, 261, 3465, 405, 374, 13, 288, 9079, 24955, 812, 273, 24955, 812, 18, 28023, 12, 20, 16, 2067, 1769, 6647, 289, 6647, 24955, 812, 273, 24955, 812, 18, 2079, 2668, 1093, 16, 2023, 13, 397, 3552, 75, 12859, 14432, 6647, 368, 3163, 18, 659, 18, 8222, 2932, 23089, 358, 1262, 30, 315, 2 ]
property( obj, TemplateElement.REF_TEMPLATE_PARAMETER_PROP );
property( obj, IDesignElementModel.REF_TEMPLATE_PARAMETER_PROP );
public void visitTemplateElement( TemplateElement obj ) { attribute( obj, DesignSchemaConstants.NAME_ATTRIB, DesignElement.NAME_PROP ); writer.attribute( DesignSchemaConstants.ID_ATTRIB, new Long( obj .getID( ) ).toString( ) ); resourceKey( obj, DesignElement.DISPLAY_NAME_ID_PROP, DesignElement.DISPLAY_NAME_PROP ); property( obj, TemplateElement.REF_TEMPLATE_PARAMETER_PROP ); }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d802c33711e0d111551ae23575895cd060f085b6/ModuleWriter.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 2283, 1046, 12, 5035, 1046, 1081, 262, 202, 95, 202, 202, 4589, 12, 1081, 16, 29703, 3078, 2918, 18, 1985, 67, 26741, 16, 9506, 202, 15478, 1046, 18, 1985, 67, 15811, 11272, 202, 202, 6299, 18, 4589, 12, 29703, 3078, 2918, 18, 734, 67, 26741, 16, 394, 3407, 12, 1081, 9506, 202, 18, 588, 734, 12, 262, 262, 18, 10492, 12, 262, 11272, 202, 202, 3146, 653, 12, 1081, 16, 29703, 1046, 18, 17463, 67, 1985, 67, 734, 67, 15811, 16, 9506, 202, 15478, 1046, 18, 17463, 67, 1985, 67, 15811, 11272, 202, 202, 4468, 12, 1081, 16, 5035, 1046, 18, 10771, 67, 12205, 67, 9819, 67, 15811, 11272, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 2283, 1046, 12, 5035, 1046, 1081, 262, 202, 95, 202, 202, 4589, 12, 1081, 16, 29703, 3078, 2918, 18, 1985, 67, 26741, 16, 9506, 202, 15478, 1046, 18, 1985, 67, 15811, 11272, 202, 202, 6299, 18, 4589, 12, 29703, 3078, 2918, 18, 734, 67, 26741, 16, 394, 3407, 12, 1081, 9506, 202, 18, 588, 734, 12, 262, 262, 18, 10492, 12, 262, 11272, 202, 202, 3146, 653, 12, 1081, 16, 29703, 1046, 18, 17463, 67, 1985, 67, 734, 67, 15811, 16, 9506, 202, 15478, 1046, 18, 17463, 67, 1985, 67, 15811, 11272, 202, 202, 4468, 12, 1081, 16, 5035, 1046, 18, 10771, 67, 12205, 67, 9819, 67, 15811, 11272, 202, 97, 2, -100, -100, -100 ]
if (first_freeblock == OUT_OF_BLOCKS) return 0;
if (first_freeblock == OUT_OF_BLOCKS) { sysLockBlock.unlock(); return 0; }
freeBlocks () { sysLockBlock.lock(); if (first_freeblock == OUT_OF_BLOCKS) return 0; VM_BlockControl the_block = VM_Magic.addressAsBlockControl(blocks[first_freeblock]); int i = 1; int next = the_block.nextblock; while (next != OUT_OF_BLOCKS) { the_block = VM_Magic.addressAsBlockControl(blocks[next]); i++; next = the_block.nextblock; } sysLockBlock.unlock(); return i; }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/1380f9b4187028241a4ee9091599540a12c2f377/VM_Allocator.java/buggy/rvm/src/vm/memoryManagers/watson/markAndSweep/VM_Allocator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4843, 6450, 1832, 288, 565, 2589, 2531, 1768, 18, 739, 5621, 202, 225, 309, 261, 3645, 67, 9156, 2629, 422, 8210, 67, 3932, 67, 11403, 55, 13, 288, 2589, 2531, 1768, 18, 26226, 5621, 327, 374, 31, 289, 565, 8251, 67, 1768, 3367, 326, 67, 2629, 273, 8251, 67, 19289, 18, 2867, 1463, 1768, 3367, 12, 7996, 63, 3645, 67, 9156, 2629, 19226, 202, 202, 474, 277, 273, 404, 31, 202, 202, 474, 1024, 273, 326, 67, 2629, 18, 4285, 2629, 31, 202, 202, 17523, 261, 4285, 480, 8210, 67, 3932, 67, 11403, 55, 13, 288, 1082, 202, 5787, 67, 2629, 273, 8251, 67, 19289, 18, 2867, 1463, 1768, 3367, 12, 7996, 63, 4285, 19226, 1082, 202, 77, 9904, 31, 1082, 202, 4285, 273, 326, 67, 2629, 18, 4285, 2629, 31, 202, 282, 289, 377, 2589, 2531, 1768, 18, 26226, 5621, 1082, 327, 277, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4843, 6450, 1832, 288, 565, 2589, 2531, 1768, 18, 739, 5621, 202, 225, 309, 261, 3645, 67, 9156, 2629, 422, 8210, 67, 3932, 67, 11403, 55, 13, 288, 2589, 2531, 1768, 18, 26226, 5621, 327, 374, 31, 289, 565, 8251, 67, 1768, 3367, 326, 67, 2629, 273, 8251, 67, 19289, 18, 2867, 1463, 1768, 3367, 12, 7996, 63, 3645, 67, 9156, 2629, 19226, 202, 202, 474, 277, 273, 404, 31, 202, 202, 474, 1024, 273, 326, 67, 2629, 18, 4285, 2629, 31, 202, 202, 17523, 261, 4285, 480, 8210, 67, 3932, 67, 11403, 55, 13, 288, 1082, 202, 5787, 67, 2629, 273, 8251, 67, 19289, 18, 2867, 1463, 1768, 3367, 12, 7996, 63, 4285, 19226, 1082, 202, 77, 2 ]
item=getText(0, getLength()); setSelectedItem(item);
lookupResult.matchingItem=getText(0, getLength()); lookupResult.matchingString=getText(0, getLength()); setSelectedItem(lookupResult.matchingItem, lookupResult.matchingString);
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { // return immediately when selecting an item if (selecting) return; // insert the string into the document super.insertString(offs, str, a); // lookup and select a matching item Object item = lookupItem(getText(0, getLength())); if (item != null) { setSelectedItem(item); } else { if (strictMatching) { // keep old item selected if there is no match item = adaptor.getSelectedItem(); // imitate no insert (later on offs will be incremented by // str.length(): selection won't move forward) offs = offs-str.length(); // provide feedback to the user that his input has been received but can not be accepted UIManager.getLookAndFeel().provideErrorFeedback(adaptor.getTextComponent()); } else { // no item matches => use the current input as selected item item=getText(0, getLength()); setSelectedItem(item); } } setText(item==null?"":item.toString()); // select the completed part adaptor.markText(offs+str.length()); }
47551 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47551/c2f0954df9e7b0f9b25f6d89557aef5d494e722c/AutoCompleteDocument.java/clean/src/java/org/jdesktop/swingx/autocomplete/AutoCompleteDocument.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2243, 780, 12, 474, 21174, 16, 514, 609, 16, 3601, 694, 279, 13, 1216, 6107, 2735, 503, 288, 3639, 368, 327, 7636, 1347, 24674, 392, 761, 3639, 309, 261, 4025, 310, 13, 327, 31, 3639, 368, 2243, 326, 533, 1368, 326, 1668, 3639, 2240, 18, 6387, 780, 12, 26600, 16, 609, 16, 279, 1769, 3639, 368, 3689, 471, 2027, 279, 3607, 761, 3639, 1033, 761, 273, 3689, 1180, 12, 588, 1528, 12, 20, 16, 9888, 1435, 10019, 3639, 309, 261, 1726, 480, 446, 13, 288, 5411, 23006, 1180, 12, 1726, 1769, 3639, 289, 469, 288, 5411, 309, 261, 13948, 9517, 13, 288, 7734, 368, 3455, 1592, 761, 3170, 309, 1915, 353, 1158, 845, 7734, 761, 273, 9087, 18, 588, 7416, 1180, 5621, 7734, 368, 709, 305, 340, 1158, 2243, 261, 29082, 603, 21174, 903, 506, 28859, 635, 7734, 368, 609, 18, 2469, 13332, 4421, 8462, 1404, 3635, 5104, 13, 7734, 21174, 273, 21174, 17, 701, 18, 2469, 5621, 7734, 368, 5615, 10762, 358, 326, 729, 716, 18423, 810, 711, 2118, 5079, 1496, 848, 486, 506, 8494, 7734, 6484, 1318, 18, 588, 9794, 1876, 2954, 292, 7675, 685, 6768, 668, 15888, 12, 19195, 280, 18, 588, 1528, 1841, 10663, 5411, 289, 469, 288, 7734, 368, 1158, 761, 1885, 516, 999, 326, 783, 810, 487, 3170, 761, 7734, 761, 33, 588, 1528, 12, 20, 16, 9888, 10663, 7734, 23006, 1180, 12, 1726, 1769, 5411, 289, 3639, 289, 3639, 7883, 12, 1726, 631, 2011, 35, 3660, 30, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2243, 780, 12, 474, 21174, 16, 514, 609, 16, 3601, 694, 279, 13, 1216, 6107, 2735, 503, 288, 3639, 368, 327, 7636, 1347, 24674, 392, 761, 3639, 309, 261, 4025, 310, 13, 327, 31, 3639, 368, 2243, 326, 533, 1368, 326, 1668, 3639, 2240, 18, 6387, 780, 12, 26600, 16, 609, 16, 279, 1769, 3639, 368, 3689, 471, 2027, 279, 3607, 761, 3639, 1033, 761, 273, 3689, 1180, 12, 588, 1528, 12, 20, 16, 9888, 1435, 10019, 3639, 309, 261, 1726, 480, 446, 13, 288, 5411, 23006, 1180, 12, 1726, 1769, 3639, 289, 469, 288, 5411, 309, 261, 13948, 9517, 13, 288, 7734, 368, 3455, 1592, 761, 3170, 309, 1915, 353, 1158, 845, 7734, 761, 273, 2 ]
reval.res.write (encode (value.toString (), encoding));
writeToResponse (value.toString (), reval.res);
private void renderFromRequest (RequestEvaluator reval) { String encoding = (String) parameters.get ("encoding"); Object value = reval.req.get (name); if (value != null) reval.res.write (encode (value.toString (), encoding)); }
3798 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3798/49474a3317b2b421f14f13b21b2aa7881bd0b5ba/Skin.java/clean/src/helma/framework/core/Skin.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1743, 25074, 261, 691, 15876, 283, 1125, 13, 288, 202, 565, 514, 2688, 273, 261, 780, 13, 1472, 18, 588, 7566, 5999, 8863, 202, 565, 1033, 460, 273, 283, 1125, 18, 3658, 18, 588, 261, 529, 1769, 202, 565, 309, 261, 1132, 480, 446, 13, 202, 3639, 283, 1125, 18, 455, 18, 2626, 261, 3015, 261, 1132, 18, 10492, 1832, 16, 2688, 10019, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1743, 25074, 261, 691, 15876, 283, 1125, 13, 288, 202, 565, 514, 2688, 273, 261, 780, 13, 1472, 18, 588, 7566, 5999, 8863, 202, 565, 1033, 460, 273, 283, 1125, 18, 3658, 18, 588, 261, 529, 1769, 202, 565, 309, 261, 1132, 480, 446, 13, 202, 3639, 283, 1125, 18, 455, 18, 2626, 261, 3015, 261, 1132, 18, 10492, 1832, 16, 2688, 10019, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
label = null;
this.label = label;
public Nonterminal(String name) { this.name = name; label = null; }
11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/70bedeee5377b529a3850434da92620927ed3cef/Nonterminal.java/buggy/tools/ppg/src/ppg/atoms/Nonterminal.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3858, 15979, 12, 780, 508, 13, 288, 202, 202, 2211, 18, 529, 273, 508, 31, 202, 202, 1925, 273, 446, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3858, 15979, 12, 780, 508, 13, 288, 202, 202, 2211, 18, 529, 273, 508, 31, 202, 202, 1925, 273, 446, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
x = GUIPreferences.getInstance().getRulerPosX(); y = GUIPreferences.getInstance().getRulerPosY(); if(x+20 > screenSize.width) { x = 0; } if(y+20 > screenSize.height) { y = 0; } minimapW.setLocation(x,y);
x = GUIPreferences.getInstance().getMinimapPosX(); y = GUIPreferences.getInstance().getMinimapPosY();
public void initialize() { menuBar = new CommonMenuBar(this.getClient()); initializeFrame(); try { client.game.addGameListener(gameListener); // Create the board viewer. bv = new BoardView1(client.game, frame, this); // Place the board viewer in a set of scrollbars. scroller = new Panel(); scroller.setLayout (new BorderLayout()); Scrollbar vertical = new Scrollbar (Scrollbar.VERTICAL); Scrollbar horizontal = new Scrollbar (Scrollbar.HORIZONTAL); scroller.add (bv, BorderLayout.CENTER); // Scrollbars are broken for "Brandon Drew" <brandx0@hotmail.com> if (System.getProperty ("megamek.client.clientgui.hidescrollbars", "false").equals //$NON-NLS-1$ //$NON-NLS-2$ ("false")) { //$NON-NLS-1$ // Assign the scrollbars to the board viewer. scroller.add (vertical, BorderLayout.EAST); scroller.add (horizontal, BorderLayout.SOUTH); bv.setScrollbars (vertical, horizontal); } } catch (IOException e) { doAlertDialog(Messages.getString("ClientGUI.FatalError.title"), Messages.getString("ClientGUI.FatalError.message") + e); //$NON-NLS-1$ //$NON-NLS-2$ die(); } layoutFrame(); frame.setVisible(true); menuBar.addActionListener(this); frame.addKeyListener(this); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { frame.setVisible(false); saveSettings(); die(); } }); UnitLoadingDialog unitLoadingDialog = new UnitLoadingDialog(frame); if (!MechSummaryCache.getInstance().isInitialized()) { unitLoadingDialog.setVisible(true); } uo = new UnitOverview(this); bv.addDisplayable(uo); bv.addMouseListener(this); bv.addKeyListener(this); bv.add(popup); Dimension screenSize = frame.getToolkit().getScreenSize(); int x,y,h,w; mechW = new Dialog(frame, Messages.getString("ClientGUI.MechDisplay"), false); //$NON-NLS-1$ x = GUIPreferences.getInstance().getDisplayPosX(); y = GUIPreferences.getInstance().getDisplayPosY(); h = GUIPreferences.getInstance().getDisplaySizeHeight(); w = GUIPreferences.getInstance().getDisplaySizeWidth(); if(x + w > screenSize.width) { x = 0; w = Math.min(w, screenSize.width); } if(y + h > screenSize.height) { y = 0; h = Math.min(h, screenSize.height); } mechW.setLocation(x, y); mechW.setSize(w, h); mechW.setResizable(true); mechW.addWindowListener(this); mechW.addKeyListener(this); mechD = new MechDisplay(this); mechD.addMechDisplayListener(bv); mechW.add(mechD); // added by kenn Ruler.color1 = GUIPreferences.getInstance().getRulerColor1(); Ruler.color2 = GUIPreferences.getInstance().getRulerColor2(); ruler = new Ruler(frame, this.client, bv); x = GUIPreferences.getInstance().getRulerPosX(); y = GUIPreferences.getInstance().getRulerPosY(); h = GUIPreferences.getInstance().getRulerSizeHeight(); w = GUIPreferences.getInstance().getRulerSizeWidth(); if(x + w > screenSize.width) { x = 0; w = Math.min(w, screenSize.width); } if(y + h > screenSize.height) { y = 0; h = Math.min(h, screenSize.height); } ruler.setLocation(x,y); ruler.setSize(w,h); // end kenn // minimap minimapW = new Dialog(frame, Messages.getString("ClientGUI.MiniMap"), false); //$NON-NLS-1$ x = GUIPreferences.getInstance().getRulerPosX(); y = GUIPreferences.getInstance().getRulerPosY(); if(x+20 > screenSize.width) { x = 0; } if(y+20 > screenSize.height) { y = 0; } minimapW.setLocation(x,y); try { minimap = new MiniMap(minimapW, this, bv); } catch (IOException e) { doAlertDialog(Messages.getString("ClientGUI.FatalError.title"), Messages.getString("ClientGUI.FatalError.message1") + e); //$NON-NLS-1$ //$NON-NLS-2$ die(); } minimap.addKeyListener(this); minimapW.addWindowListener(this); minimapW.addKeyListener(this); minimapW.add(minimap); cb = new ChatterBox(this); this.add(cb.getComponent(), BorderLayout.SOUTH); client.changePhase(IGame.PHASE_UNKNOWN); mechSelectorDialog = new MechSelectorDialog(this, unitLoadingDialog); customBADialog = new CustomBattleArmorDialog(this, unitLoadingDialog); new Thread(mechSelectorDialog, "Mech Selector Dialog").start(); //$NON-NLS-1$ new Thread(customBADialog, "Custom Battle Armor Dialog").start(); }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/cd24c4c865a02abdf5dd33c2609030b4ceef8a3d/ClientGUI.java/buggy/megamek/src/megamek/client/ui/AWT/ClientGUI.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4046, 1435, 288, 3639, 3824, 5190, 273, 394, 5658, 4599, 5190, 12, 2211, 18, 588, 1227, 10663, 3639, 4046, 3219, 5621, 3639, 775, 288, 5411, 1004, 18, 13957, 18, 1289, 12496, 2223, 12, 13957, 2223, 1769, 5411, 368, 1788, 326, 11094, 14157, 18, 5411, 18021, 273, 394, 17980, 1060, 1767, 21, 12, 2625, 18, 13957, 16, 2623, 16, 333, 1769, 5411, 368, 13022, 326, 11094, 14157, 316, 279, 444, 434, 5532, 13518, 18, 5411, 888, 1539, 273, 394, 23641, 5621, 5411, 888, 1539, 18, 542, 3744, 261, 2704, 30814, 10663, 5411, 23134, 3215, 9768, 273, 394, 23134, 3215, 261, 31636, 18, 21654, 10109, 1769, 5411, 23134, 3215, 10300, 273, 394, 23134, 3215, 261, 31636, 18, 44, 20344, 1769, 5411, 888, 1539, 18, 1289, 261, 70, 90, 16, 30814, 18, 19835, 1769, 5411, 368, 23134, 13518, 854, 12933, 364, 315, 20484, 265, 463, 16052, 6, 411, 20523, 92, 20, 36, 15224, 4408, 18, 832, 34, 5411, 309, 261, 3163, 18, 588, 1396, 10792, 7566, 81, 1332, 339, 79, 18, 2625, 18, 2625, 20292, 18, 76, 350, 742, 2693, 13518, 3113, 315, 5743, 20387, 14963, 4329, 3993, 17, 5106, 17, 21, 8, 4329, 3993, 17, 5106, 17, 22, 8, 10792, 7566, 5743, 6, 3719, 288, 4329, 3993, 17, 5106, 17, 21, 8, 7734, 368, 12093, 326, 5532, 13518, 358, 326, 11094, 14157, 18, 7734, 888, 1539, 18, 1289, 261, 17824, 16, 30814, 18, 41, 9053, 1769, 7734, 888, 1539, 18, 1289, 261, 18396, 16, 30814, 18, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4046, 1435, 288, 3639, 3824, 5190, 273, 394, 5658, 4599, 5190, 12, 2211, 18, 588, 1227, 10663, 3639, 4046, 3219, 5621, 3639, 775, 288, 5411, 1004, 18, 13957, 18, 1289, 12496, 2223, 12, 13957, 2223, 1769, 5411, 368, 1788, 326, 11094, 14157, 18, 5411, 18021, 273, 394, 17980, 1060, 1767, 21, 12, 2625, 18, 13957, 16, 2623, 16, 333, 1769, 5411, 368, 13022, 326, 11094, 14157, 316, 279, 444, 434, 5532, 13518, 18, 5411, 888, 1539, 273, 394, 23641, 5621, 5411, 888, 1539, 18, 542, 3744, 261, 2704, 30814, 10663, 5411, 23134, 3215, 9768, 273, 394, 23134, 3215, 261, 31636, 18, 21654, 10109, 1769, 5411, 23134, 3215, 10300, 273, 394, 23134, 3215, 261, 31636, 18, 44, 2 ]
if (localName.equals(KEYSTORE_USE_SMART_CARD)) {
else if (localName.equals(KEYSTORE_USE_SMART_CARD)) {
public void endElement( String namespaceURI, String localName, String qName ) throws SAXException { super.endElement(namespaceURI, localName, qName); if (endElementAction == SKIP) { return; } if (log.isDebugEnabled()) { log.debug("CryptoClientPolicy: " + localName + " = " + getContents()); } if (localName.equals(IS_CERT_AUTH_ELEMENT)) { String st_value = getContents(); boolean value = false; if (st_value.equalsIgnoreCase("true")) { value = true; } if (log.isInfoEnabled()) { if (value) { log.info("Running as a Certificate Authority"); } else { log.info("Running as a standard Cougaar node"); } } cryptoClientPolicy.setIsCertificateAuthority(value); } if (localName.equals(KEYSTORE_FILE_ELEMENT)) { cryptoClientPolicy.setKeystoreName(getContents()); } if (localName.equals(KEYSTORE_PASSWORD_ELEMENT)) { cryptoClientPolicy.setKeystorePassword(getContents()); } if (localName.equals(KEYSTORE_USE_SMART_CARD)) { cryptoClientPolicy.setUseSmartCard(true); } // end of if (localName.equals(KEYSTORE_USE_SMART_CARD)) // trusted CA keystore if (localName.equals(CA_KEYSTORE_ELEMENT)) { cryptoClientPolicy.setTrustedCaKeystoreName(getContents()); } if (localName.equals(CA_KEYSTORE_PASSWORD_ELEMENT)) { cryptoClientPolicy.setTrustedCaKeystorePassword(getContents()); } // trusted CA /* if (localName.equals(CA_ALIAS_ELEMENT)) { currentTrustedCa.caAlias = getContents(); } */ if (localName.equals(CA_URL_ELEMENT)) { currentTrustedCa.caURL = getContents(); } if (localName.equals(CA_DN_ELEMENT)) { currentTrustedCa.caDN = getContents(); } if (localName.equals(CERT_DIRECTORY_URL_ELEMENT)) { currentTrustedCa.certDirectoryUrl = getContents(); } if (localName.equals(CERT_DIRECTORY_TYPE_ELEMENT)) { String type = getContents(); if (type.equalsIgnoreCase("NetTools")) { currentTrustedCa.certDirectoryType = TrustedCaPolicy.NETTOOLS; } else if (type.equalsIgnoreCase("CougaarOpenLdap")) { currentTrustedCa.certDirectoryType = TrustedCaPolicy.COUGAAR_OPENLDAP; } } // Certificate attributes if (localName.equals(OU_ELEMENT)) { currentCertAttr.ou = getContents(); } if (localName.equals(O_ELEMENT)) { currentCertAttr.o = getContents(); } if (localName.equals(L_ELEMENT)) { currentCertAttr.l = getContents(); } if (localName.equals(ST_ELEMENT)) { currentCertAttr.st = getContents(); } if (localName.equals(C_ELEMENT)) { currentCertAttr.c = getContents(); } if (localName.equals(DOMAIN_ELEMENT)) { currentCertAttr.domain = getContents(); } if (localName.equals(KEYALGNAME_ELEMENT)) { currentCertAttr.keyAlgName = getContents(); } if (localName.equals(SIGALGNAME_ELEMENT)) { currentCertAttr.sigAlgName = getContents(); } if (localName.equals(KEYSIZE_ELEMENT)) { String val = getContents(); currentCertAttr.keysize = Integer.parseInt(val); } if (localName.equals(NODE_IS_SIGNER_ELEMENT)) { String val = getContents(); currentCertAttr.nodeIsSigner = false; if (val.equalsIgnoreCase("true")) { currentCertAttr.nodeIsSigner = true; } } if (localName.equals(IS_ROOT_CA_ELEMENT)) { String st_value = getContents(); boolean value = true; if (st_value.equalsIgnoreCase("false")) { value = false; } if (CryptoDebug.debug) { if (value) { if(log.isDebugEnabled()) log.debug("Running as Root Certificate Authority"); } else { if(log.isDebugEnabled()) log.debug("Running as a delegate Certificate Authority"); } } cryptoClientPolicy.setIsRootCA(value); } if (localName.equals(VALIDITY_ELEMENT)) { Duration duration = new Duration(serviceBroker); duration.parse(getContents()); currentCertAttr.howLong = duration.getDuration(); } if (localName.equals(ENVELOPE_ELEMENT)) { Duration duration = new Duration(serviceBroker); duration.parse(getContents()); currentCertAttr.regenEnvelope = duration.getDuration(); } }
12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/a51df5f1eb38a22f66b24c8f4cba9da639b96ff5/CryptoClientPolicyHandler.java/buggy/securityservices/src/org/cougaar/core/security/config/CryptoClientPolicyHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 14840, 12, 514, 19421, 16, 9506, 225, 514, 11927, 16, 9506, 225, 514, 22914, 262, 565, 1216, 14366, 288, 565, 2240, 18, 409, 1046, 12, 4937, 3098, 16, 11927, 16, 22914, 1769, 565, 309, 261, 409, 1046, 1803, 422, 18420, 13, 288, 1377, 327, 31, 565, 289, 565, 309, 261, 1330, 18, 291, 2829, 1526, 10756, 288, 1377, 613, 18, 4148, 2932, 18048, 1227, 2582, 30, 315, 397, 11927, 202, 202, 15, 315, 273, 315, 397, 15015, 10663, 565, 289, 565, 309, 261, 3729, 461, 18, 14963, 12, 5127, 67, 22367, 67, 7131, 67, 10976, 3719, 288, 1377, 514, 384, 67, 1132, 273, 15015, 5621, 1377, 1250, 460, 273, 629, 31, 1377, 309, 261, 334, 67, 1132, 18, 14963, 5556, 2932, 3767, 6, 3719, 288, 202, 1132, 273, 638, 31, 1377, 289, 1377, 309, 261, 1330, 18, 291, 966, 1526, 10756, 288, 202, 430, 261, 1132, 13, 288, 202, 225, 613, 18, 1376, 2932, 7051, 487, 279, 6660, 6712, 560, 8863, 202, 97, 202, 12107, 288, 202, 225, 613, 18, 1376, 2932, 7051, 487, 279, 4529, 7695, 637, 69, 297, 756, 8863, 202, 97, 1377, 289, 1377, 8170, 1227, 2582, 18, 542, 2520, 20795, 12, 1132, 1769, 565, 289, 565, 309, 261, 3729, 461, 18, 14963, 12, 3297, 13651, 67, 3776, 67, 10976, 3719, 288, 1377, 8170, 1227, 2582, 18, 542, 653, 2233, 461, 12, 588, 6323, 10663, 565, 289, 565, 309, 261, 3729, 461, 18, 14963, 12, 3297, 13651, 67, 13784, 67, 10976, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 14840, 12, 514, 19421, 16, 9506, 225, 514, 11927, 16, 9506, 225, 514, 22914, 262, 565, 1216, 14366, 288, 565, 2240, 18, 409, 1046, 12, 4937, 3098, 16, 11927, 16, 22914, 1769, 565, 309, 261, 409, 1046, 1803, 422, 18420, 13, 288, 1377, 327, 31, 565, 289, 565, 309, 261, 1330, 18, 291, 2829, 1526, 10756, 288, 1377, 613, 18, 4148, 2932, 18048, 1227, 2582, 30, 315, 397, 11927, 202, 202, 15, 315, 273, 315, 397, 15015, 10663, 565, 289, 565, 309, 261, 3729, 461, 18, 14963, 12, 5127, 67, 22367, 67, 7131, 67, 10976, 3719, 288, 1377, 514, 384, 67, 1132, 273, 15015, 5621, 1377, 1250, 460, 273, 629, 31, 1377, 309, 261, 334, 67, 2 ]
public BshMethod getMethod( String name, Class [] sig )
public BshMethod getMethod( String name, Class [] sig )
public BshMethod getMethod( String name, Class [] sig ) throws UtilEvalError { return getMethod( name, sig, false/*declaredOnly*/ ); }
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/c9cc3b0c109c0a5854c010fafa4c9d3eaaa4c30c/NameSpace.java/buggy/bsh/NameSpace.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 605, 674, 1305, 6272, 12, 514, 508, 16, 1659, 5378, 3553, 262, 3196, 202, 15069, 3564, 13904, 668, 202, 95, 202, 202, 2463, 6272, 12, 508, 16, 3553, 16, 629, 20308, 16571, 3386, 5549, 11272, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 605, 674, 1305, 6272, 12, 514, 508, 16, 1659, 5378, 3553, 262, 3196, 202, 15069, 3564, 13904, 668, 202, 95, 202, 202, 2463, 6272, 12, 508, 16, 3553, 16, 629, 20308, 16571, 3386, 5549, 11272, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
expr = "row[\"" + expr.replaceAll( "\"", "\\\"") + "\"]";
expr = "row[\"" + expr.replaceAll( "\"", "\\\\\"") + "\"]";
public void visitDataItem( DataItemHandle handle ) { // Create data item DataItemDesign data = new DataItemDesign( ); setupReportItem( data, handle ); data.setName( handle.getName( ) ); // Fill in data expression, //String expr = handle.getValueExpr( ); String expr = handle.getResultSetColumn( ); if (expr != null && expr.trim( ).length( ) > 0) { expr = "row[\"" + expr.replaceAll( "\"", "\\\"") + "\"]"; data.setValue( expr ); } // Handle Action ActionHandle action = handle.getActionHandle( ); if ( action != null ) { data.setAction( createAction( action ) ); } // Fill in help text data.setHelpText( handle.getHelpTextKey( ), handle.getHelpText( ) ); setHighlight( data, expr ); setMap( data, expr ); currentElement = data; }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/bf1a2f74df77246e6b148dcf8b9fdf64f82777a9/EngineIRVisitor.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 29903, 12, 1910, 1180, 3259, 1640, 262, 202, 95, 202, 202, 759, 1788, 501, 761, 202, 202, 29903, 15478, 501, 273, 394, 1910, 1180, 15478, 12, 11272, 202, 202, 8401, 4820, 1180, 12, 501, 16, 1640, 11272, 202, 202, 892, 18, 542, 461, 12, 1640, 18, 17994, 12, 262, 11272, 202, 202, 759, 14192, 316, 501, 2652, 16, 3196, 202, 759, 780, 3065, 273, 1640, 18, 24805, 4742, 12, 11272, 202, 202, 780, 3065, 273, 1640, 18, 588, 13198, 1494, 12, 11272, 202, 202, 430, 261, 8638, 480, 446, 597, 3065, 18, 5290, 12, 262, 18, 2469, 12, 262, 405, 374, 13, 202, 202, 95, 1082, 202, 8638, 273, 315, 492, 63, 8530, 397, 3065, 18, 2079, 1595, 12, 7023, 3113, 28040, 3660, 13, 397, 7023, 4279, 31, 1082, 202, 892, 18, 542, 620, 12, 3065, 11272, 202, 202, 97, 202, 202, 759, 5004, 4382, 202, 202, 1803, 3259, 1301, 273, 1640, 18, 588, 1803, 3259, 12, 11272, 202, 202, 430, 261, 1301, 480, 446, 262, 202, 202, 95, 1082, 202, 892, 18, 542, 1803, 12, 752, 1803, 12, 1301, 262, 11272, 202, 202, 97, 202, 202, 759, 14192, 316, 2809, 977, 202, 202, 892, 18, 542, 6696, 1528, 12, 1640, 18, 588, 6696, 1528, 653, 12, 262, 16, 1640, 18, 588, 6696, 1528, 12, 262, 11272, 202, 202, 542, 16205, 12, 501, 16, 3065, 11272, 202, 202, 542, 863, 12, 501, 16, 3065, 11272, 202, 202, 2972, 1046, 273, 501, 31, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 29903, 12, 1910, 1180, 3259, 1640, 262, 202, 95, 202, 202, 759, 1788, 501, 761, 202, 202, 29903, 15478, 501, 273, 394, 1910, 1180, 15478, 12, 11272, 202, 202, 8401, 4820, 1180, 12, 501, 16, 1640, 11272, 202, 202, 892, 18, 542, 461, 12, 1640, 18, 17994, 12, 262, 11272, 202, 202, 759, 14192, 316, 501, 2652, 16, 3196, 202, 759, 780, 3065, 273, 1640, 18, 24805, 4742, 12, 11272, 202, 202, 780, 3065, 273, 1640, 18, 588, 13198, 1494, 12, 11272, 202, 202, 430, 261, 8638, 480, 446, 597, 3065, 18, 5290, 12, 262, 18, 2469, 12, 262, 405, 374, 13, 202, 202, 95, 1082, 202, 8638, 273, 315, 492, 63, 8530, 397, 2 ]
public static Object referenceIncrDecr(Object obj, int type)
public static Object referenceIncrDecr(Object obj, int incrDecrMask)
public static Object referenceIncrDecr(Object obj, int type) { Object value = getReference(obj); if (value == Undefined.instance) return value; boolean post = (type == Node.POST_INC || type == Node.POST_DEC); double number; if (value instanceof Number) { number = ((Number)value).doubleValue(); } else { number = toNumber(value); if (post) { // convert result to number value = new Double(number); } } if (type == Node.PRE_INC || type == Node.POST_INC) { ++number; } else { --number; } Number result = new Double(number); setReference(obj, result); if (post) { return value; } else { return result; } }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/cb3a4fef51dd031baf4bc78bcf8cc452587ea3b7/ScriptRuntime.java/clean/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 2114, 382, 3353, 1799, 86, 12, 921, 1081, 16, 509, 17633, 1799, 86, 5796, 13, 565, 288, 3639, 1033, 460, 273, 13223, 12, 2603, 1769, 3639, 309, 261, 1132, 422, 22243, 18, 1336, 13, 5411, 327, 460, 31, 3639, 1250, 1603, 273, 261, 723, 422, 2029, 18, 3798, 67, 23213, 747, 618, 422, 2029, 18, 3798, 67, 1639, 39, 1769, 3639, 1645, 1300, 31, 3639, 309, 261, 1132, 1276, 3588, 13, 288, 5411, 1300, 273, 14015, 1854, 13, 1132, 2934, 9056, 620, 5621, 3639, 289, 469, 288, 5411, 1300, 273, 358, 1854, 12, 1132, 1769, 5411, 309, 261, 2767, 13, 288, 7734, 368, 1765, 563, 358, 1300, 7734, 460, 273, 394, 3698, 12, 2696, 1769, 5411, 289, 3639, 289, 3639, 309, 261, 723, 422, 2029, 18, 3670, 67, 23213, 747, 618, 422, 2029, 18, 3798, 67, 23213, 13, 288, 5411, 965, 2696, 31, 3639, 289, 469, 288, 5411, 1493, 2696, 31, 3639, 289, 3639, 3588, 563, 273, 394, 3698, 12, 2696, 1769, 3639, 31098, 12, 2603, 16, 563, 1769, 3639, 309, 261, 2767, 13, 288, 5411, 327, 460, 31, 3639, 289, 469, 288, 5411, 327, 563, 31, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1033, 2114, 382, 3353, 1799, 86, 12, 921, 1081, 16, 509, 17633, 1799, 86, 5796, 13, 565, 288, 3639, 1033, 460, 273, 13223, 12, 2603, 1769, 3639, 309, 261, 1132, 422, 22243, 18, 1336, 13, 5411, 327, 460, 31, 3639, 1250, 1603, 273, 261, 723, 422, 2029, 18, 3798, 67, 23213, 747, 618, 422, 2029, 18, 3798, 67, 1639, 39, 1769, 3639, 1645, 1300, 31, 3639, 309, 261, 1132, 1276, 3588, 13, 288, 5411, 1300, 273, 14015, 1854, 13, 1132, 2934, 9056, 620, 5621, 3639, 289, 469, 288, 5411, 1300, 273, 358, 1854, 12, 1132, 1769, 5411, 309, 261, 2767, 13, 288, 7734, 368, 1765, 563, 358, 1300, 7734, 460, 273, 394, 3698, 12, 2696, 1769, 2 ]
disabledData = getImageData(backRoot);
disabledData = getImageData(backRoot, runLoader);
public AnimationItem(IWorkbenchWindow workbenchWindow) { this.window = workbenchWindow; //Get the progress manager started if it hasn't already JobProgressManager.getInstance(); URL iconsRoot = Platform.getPlugin(PlatformUI.PLUGIN_ID).find( new Path(PROGRESS_FOLDER)); try { URL runningRoot = new URL(iconsRoot, RUNNING_ICON); URL backRoot = new URL(iconsRoot, BACKGROUND_ICON); animatedData = getImageData(runningRoot); if (animatedData != null) animatedImage = getImage(animatedData[0]); disabledData = getImageData(backRoot); if (disabledData != null) disabledImage = getImage(disabledData[0]); listener = getProgressListener(); JobProgressManager.getInstance().addListener(listener); } catch (MalformedURLException exception) { ProgressUtil.logException(exception); } }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/cc72ec84df4d93cc632406d8e555ffcc65f0b1b1/AnimationItem.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 22685, 1180, 12, 45, 2421, 22144, 3829, 1440, 22144, 3829, 13, 288, 202, 202, 2211, 18, 5668, 273, 1440, 22144, 3829, 31, 202, 202, 759, 967, 326, 4007, 3301, 5746, 309, 518, 13342, 1404, 1818, 202, 202, 2278, 5491, 1318, 18, 588, 1442, 5621, 202, 202, 1785, 17455, 2375, 273, 1082, 202, 8201, 18, 588, 3773, 12, 8201, 5370, 18, 19415, 67, 734, 2934, 4720, 12, 9506, 202, 2704, 2666, 12, 24022, 67, 17357, 10019, 202, 202, 698, 288, 1082, 202, 1785, 3549, 2375, 273, 394, 1976, 12, 14516, 2375, 16, 23574, 67, 21745, 1769, 1082, 202, 1785, 1473, 2375, 273, 394, 1976, 12, 14516, 2375, 16, 29226, 67, 21745, 1769, 1082, 202, 304, 17275, 751, 273, 10567, 751, 12, 8704, 2375, 1769, 1082, 202, 430, 261, 304, 17275, 751, 480, 446, 13, 9506, 202, 304, 17275, 2040, 273, 10567, 12, 304, 17275, 751, 63, 20, 19226, 1082, 202, 9278, 751, 273, 10567, 751, 12, 823, 2375, 1769, 1082, 202, 430, 261, 9278, 751, 480, 446, 13, 9506, 202, 9278, 2040, 273, 10567, 12, 9278, 751, 63, 20, 19226, 1082, 202, 12757, 273, 3570, 2329, 2223, 5621, 1082, 202, 2278, 5491, 1318, 18, 588, 1442, 7675, 1289, 2223, 12, 12757, 1769, 202, 202, 97, 1044, 261, 18695, 20160, 1520, 13, 288, 1082, 202, 5491, 1304, 18, 1330, 503, 12, 4064, 1769, 202, 202, 97, 202, 97, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 22685, 1180, 12, 45, 2421, 22144, 3829, 1440, 22144, 3829, 13, 288, 202, 202, 2211, 18, 5668, 273, 1440, 22144, 3829, 31, 202, 202, 759, 967, 326, 4007, 3301, 5746, 309, 518, 13342, 1404, 1818, 202, 202, 2278, 5491, 1318, 18, 588, 1442, 5621, 202, 202, 1785, 17455, 2375, 273, 1082, 202, 8201, 18, 588, 3773, 12, 8201, 5370, 18, 19415, 67, 734, 2934, 4720, 12, 9506, 202, 2704, 2666, 12, 24022, 67, 17357, 10019, 202, 202, 698, 288, 1082, 202, 1785, 3549, 2375, 273, 394, 1976, 12, 14516, 2375, 16, 23574, 67, 21745, 1769, 1082, 202, 1785, 1473, 2375, 273, 394, 1976, 12, 14516, 2375, 16, 29226, 67, 21745, 1769, 1082, 202, 304, 17275, 751, 2 ]
protected void runMatrixMigration(Connection con, boolean isDeveloper) throws JobExecutionException { logger.info("Quartz task started: runMatrixMigration()"); String tableName = getOldTableName("osp_scaffolding"), tableName2 = null, tableName3 = null; String sql = "select * from " + tableName; try { List additionalForms = new ArrayList(); additionalForms.add(expectationFormId.getValue()); Statement matrixInnerStmt = con.createStatement(), innerStmt = con.createStatement(); stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sql); try { while (rs.next()) { String id = rs.getString("id"); String owner = rs.getString("ownerid"); String title = rs.getString("title"); String description = rs.getString("description"); String documentRoot = rs.getString("documentroot"); String privacyxsdid = rs.getString("privacyxsdid"); String worksite = rs.getString("worksiteId"); boolean published = rs.getBoolean("published"); String publishedBy = rs.getString("publishedBy"); Date publishedDate = rs.getDate("publishedDate"); String columnLabel = ""; //rs.getString("columnLabel"); String rowLabel = ""; //rs.getString("rowLabel"); String readyColor = ""; //rs.getString("readyColor"); String pendingColor = ""; //rs.getString("pendingColor"); String completedColor = ""; //rs.getString("completedColor"); String lockColor = ""; //rs.getString("lockColor"); int workflowOption = Scaffolding.HORIZONTAL_PROGRESSION; //rs.getInt("workflowOption"); String exposed_page_id = ""; //rs.getString("exposed_page_id"); String style_id = ""; //rs.getString("style_id"); Scaffolding scaffolding = new Scaffolding(); Id sid = idManager.getId(id); scaffolding.setId(null); scaffolding.setNewId(sid); scaffolding.setOwner(agentManager.getAgent(owner)); scaffolding.setTitle(title); scaffolding.setDescription(description); scaffolding.setWorksiteId(idManager.getId(worksite)); scaffolding.setPublished(published); if(publishedBy != null) scaffolding.setPublishedBy(agentManager.getAgent(publishedBy)); scaffolding.setColumnLabel(columnLabel); scaffolding.setPublishedDate(publishedDate); scaffolding.setRowLabel(rowLabel); scaffolding.setReadyColor(readyColor); scaffolding.setPendingColor(pendingColor); scaffolding.setCompletedColor(completedColor); scaffolding.setLockedColor(lockColor); scaffolding.setWorkflowOption(workflowOption); scaffolding.setExposedPageId(exposed_page_id); Style style = null; //new Style(); //style.setId(idManager.getId(style_id)); scaffolding.setStyle(style); //***************** run through the criteria tableName = getOldTableName("osp_scaffolding_criteria"); tableName2 = getOldTableName("osp_matrix_label"); sql = "select * from " + tableName + " join " + tableName2 + " on ELT=ID" + " where parent_id='" + id + "' order by seq_num"; ResultSet rss = innerStmt.executeQuery(sql); Map criteriaMap = new HashMap(); while (rss.next()) { int sequenceNumber = rss.getInt("seq_num"); Id lid = idManager.getId(rss.getString("elt")); String color = rss.getString("color"); String textColor = null; String ldescription = rss.getString("description"); Criterion criterion = new Criterion(); criterion.setId(null); criterion.setNewId(lid); criterion.setColor(color); criterion.setTextColor(textColor); criterion.setScaffolding(scaffolding); criterion.setDescription(ldescription); criterion.setSequenceNumber(sequenceNumber); scaffolding.add(criterion); criteriaMap.put(lid.getValue(), criterion); } rss.close(); //***************** run through the levels tableName = getOldTableName("osp_scaffolding_levels"); tableName2 = getOldTableName("osp_matrix_label"); sql = "select * from " + tableName + " join " + tableName2 + " on ELT=ID" + " where scaffolding_id='" + id + "' order by seq_num"; rss = innerStmt.executeQuery(sql); Map levelMap = new HashMap(); while (rss.next()) { int sequenceNumber = rss.getInt("seq_num"); Id lid = idManager.getId(rss.getString("elt")); String color = rss.getString("color"); String textColor = null; String ldescription = rss.getString("description"); Level level = new Level(); level.setId(null); level.setNewId(lid); level.setColor(color); level.setTextColor(textColor); level.setScaffolding(scaffolding); level.setDescription(ldescription); level.setSequenceNumber(sequenceNumber); scaffolding.add(level); levelMap.put(lid.getValue(), level); } rss.close(); //***************** run through the cells tableName = getOldTableName("osp_scaffolding_cell"); sql = "select * from " + tableName + " where scaffolding_id='" + id + "' "; rss = innerStmt.executeQuery(sql); Map scaffoldingCellMap = new HashMap(); Map scaffoldingCellExpheadMap = new HashMap(); while (rss.next()) { Id cid = idManager.getId(rss.getString("id")); String criterionStr = rss.getString("rootcriterion_id"); String levelStr = rss.getString("level_id"); String expectationheader = rss.getString("expectationheader"); String initialStatus = rss.getString("initialstatus"); String gradablereflection = rss.getString("gradablereflection"); Level level = (Level)levelMap.get(levelStr); Criterion criterion = (Criterion)criteriaMap.get(criterionStr); ScaffoldingCell cell = new ScaffoldingCell(); cell.setId(null); cell.setNewId(cid); cell.setInitialStatus(initialStatus); cell.setLevel(level); cell.setRootCriterion(criterion); cell.setScaffolding(scaffolding); WizardPageDefinition page = cell.getWizardPageDefinition(); page.setSiteId(worksite); page.setTitle( (criterion.getDescription() != null ? criterion.getDescription() : "") + " - " + (level.getDescription() != null ? level.getDescription() : "")); cell.setEvaluationDevice(evaluationFormId); cell.setEvaluationDeviceType(FORM_TYPE); cell.setReflectionDevice(intelGrowthFormId); cell.setReflectionDeviceType(FORM_TYPE); cell.setReviewDevice(feedbackFormId); cell.setReviewDeviceType(FORM_TYPE); cell.setAdditionalForms(additionalForms); scaffolding.add(cell); scaffoldingCellMap.put(cid.getValue(), cell); scaffoldingCellExpheadMap.put(cid.getValue(), expectationheader); } rss.close(); Id scaffId = (Id)matrixManager.save(scaffolding); scaffolding = matrixManager.getScaffolding(scaffId); tableName = getOldTableName("osp_scaffolding_cell"); tableName2 = getOldTableName("osp_expectation"); tableName3 = getOldTableName("osp_matrix_label"); sql = "select SCAFFOLDING_CELL_ID, " + tableName3 + ".ID, DESCRIPTION " + " FROM " + tableName + " JOIN " + tableName2 + " ON " + tableName + ".ID=SCAFFOLDING_CELL_ID " + " JOIN " + tableName3 + " ON ELT=" + tableName3 + ".ID " + " where scaffolding_id='" + id + "' ORDER BY SCAFFOLDING_CELL_ID, SEQ_NUM"; rss = innerStmt.executeQuery(sql); String lastScaffoldingCellId = "", guidanceText = null, scaffoldingCellId = null; while (rss.next()) { scaffoldingCellId = rss.getString("SCAFFOLDING_CELL_ID"); if(!scaffoldingCellId.equals(lastScaffoldingCellId)) { if(guidanceText != null) { ScaffoldingCell scell = (ScaffoldingCell)scaffoldingCellMap.get(lastScaffoldingCellId); Guidance guide = guidanceManager.createNew( "", worksite, scell.getWizardPageDefinition().getId(), MatrixFunctionConstants.VIEW_SCAFFOLDING_GUIDANCE, MatrixFunctionConstants.EDIT_SCAFFOLDING_GUIDANCE); guidanceText += "</ul>"; guide.getInstruction().setText(guidanceText); /* description, idManager.getId(worksite), securityQualifier, securityViewFunction, securityEditFunction);*/ //guidanceManager.saveGuidance(guide); scell.setGuidance(guide); matrixManager.storeScaffoldingCell(scell); } lastScaffoldingCellId = scaffoldingCellId; //starts a new cell String expHeader = (String)scaffoldingCellExpheadMap.get(scaffoldingCellId); guidanceText = expHeader + "\n<ul>"; } if(guidanceText.length() > 0) guidanceText += "\n<br />"; guidanceText += "<li>" + rss.getString("DESCRIPTION") + "</li>"; } rss.close(); if(guidanceText != null) { ScaffoldingCell scell = (ScaffoldingCell)scaffoldingCellMap.get(scaffoldingCellId); Guidance guide = guidanceManager.createNew( "", worksite, scell.getWizardPageDefinition().getId(), MatrixFunctionConstants.VIEW_SCAFFOLDING_GUIDANCE, MatrixFunctionConstants.EDIT_SCAFFOLDING_GUIDANCE); guidanceText += "</ul>"; guide.getInstruction().setText(guidanceText); //guidanceManager.saveGuidance(guide); scell.setGuidance(guide); matrixManager.storeScaffoldingCell(scell); } //scaffId = (Id)matrixManager.save(scaffolding); //***************** run through the user matrices tableName = getOldTableName("osp_matrix_tool"); tableName2 = getOldTableName("osp_matrix"); tableName3 = getOldTableName("osp_matrix_cell"); sql = "select " + tableName3 + ".id, matrix_id, owner, status, reflection_id, scaffolding_cell_id " + " from " + tableName + " join " + tableName2 + " on matrixtool_id=" + tableName + ".id " + " join " + tableName3 + " on matrix_id=" + tableName2 + ".id " + " where scaffolding_id='" + id + "' order by owner"; rss = innerStmt.executeQuery(sql); tableName = getOldTableName("osp_reflection"); tableName2 = getOldTableName("osp_reflection_item"); tableName3 = getOldTableName("osp_reviewer_item"); String lastOwner = ""; Matrix matrix = null; boolean badCell = false; int intelGrowthIndex = 1; while (rss.next()) { String mcidStr = rss.getString("id"); Id mcid = idManager.getId(mcidStr); String mowner = rss.getString("owner"); String status = rss.getString("status"); String scaffolding_cell_id = rss.getString("scaffolding_cell_id"); if(!mowner.equals(lastOwner)) { if(matrix != null && !badCell) matrixManager.save(matrix); lastOwner = mowner; badCell = false; matrix = new Matrix(); matrix.setOwner(agentManager.getAgent(mowner)); matrix.setScaffolding(scaffolding); } badCell = scaffolding_cell_id == null; if(!badCell) { ScaffoldingCell sCell = (ScaffoldingCell)scaffoldingCellMap.get(scaffolding_cell_id); Cell cell = new Cell(); cell.setNewId(mcid); cell.getWizardPage().setNewId(idManager.createId()); cell.getWizardPage().setOwner(matrix.getOwner()); cell.setScaffoldingCell(sCell); cell.setStatus(status); Set attachments = new HashSet(); String cellAttachmentTable = getOldTableName("osp_cell_attachment"); sql = "select * from " + cellAttachmentTable + " where cell_id='" + mcidStr + "'"; ResultSet rsCellFiles = matrixInnerStmt.executeQuery(sql); while(rsCellFiles.next()) { String attid = rsCellFiles.getString("id"); String artifact = rsCellFiles.getString("artifactId"); Attachment att = new Attachment(); att.setNewId(idManager.getId(attid)); att.setArtifactId(idManager.getId(artifact)); att.setWizardPage(cell.getWizardPage()); //matrixManager.save(att); attachments.add(att); } cell.setAttachments(attachments); rsCellFiles.close(); // get the intellectual growth sql = "SELECT ID, GROWTHSTATEMENT FROM " + tableName + " WHERE CELL_ID='" + mcidStr + "'"; ResultSet rsss = matrixInnerStmt.executeQuery(sql); if(rsss.next()) { String reflection_id = rsss.getString(1); String growth = rsss.getString(2); // save the intellectual growth Integer anId = incUser(matrix.getOwner().getId().getValue()); Id reflectionForm = createReflectionForm(matrix.getOwner().getId().getValue(), "IntGrowth " + scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), growth); Review review = reviewManager.createNew("", worksite); review.setDeviceId(intelGrowthFormId.getValue());// form idvalue review.setParent(cell.getWizardPage().getId().getValue());// wizard page review.setType(Review.REFLECTION_TYPE);//contant review.setReviewContent(reflectionForm); getReviewManager().saveReview(review); sql = "SELECT CONNECTTEXT, EVIDENCE FROM " + tableName2 + " WHERE REFLECTION_ID='" + reflection_id + "' ORDER BY SEQ_NUM"; rsss = matrixInnerStmt.executeQuery(sql); Set pageForms = new HashSet(); while(rsss.next()) { String connect_text = rsss.getString("CONNECTTEXT"); String evidence = rsss.getString("EVIDENCE"); // save the expectation anId = incUser(matrix.getOwner().getId().getValue()); Id expectationForm = createExpectationForm(matrix.getOwner().getId().getValue(), "Reflection " + scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), evidence, connect_text); pageForms.add(expectationForm); } cell.getWizardPage().setPageForms(pageForms); } rsss.close(); // sql = "SELECT ID, REVIEWER_ID, COMMENTS, GRADE, STATUS, CREATED, MODIFIED FROM " + tableName3 + " WHERE CELL_ID='" + mcidStr + "'"; rsss = matrixInnerStmt.executeQuery(sql); while(rsss.next()) { String riid = rsss.getString("ID"); String reviewer_id = rsss.getString("REVIEWER_ID"); String comment = rsss.getString("COMMENTS"); String grade = rsss.getString("GRADE"); String ri_status = rsss.getString("STATUS"); String ri_created = rsss.getString("CREATED"); String ri_modified = rsss.getString("MODIFIED"); // save the Reviews //Skip if the reviewer is null if (reviewer_id != null && !reviewer_id.equalsIgnoreCase("")) { Integer anId = incUser(reviewer_id); Id evaluationForm = createEvaluationForm(reviewer_id, "Review "+ scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), grade, comment); Review review = reviewManager.createNew("", worksite); review.setDeviceId(evaluationFormId.getValue());// form idvalue Id pageId = resolveId(cell.getWizardPage()); review.setParent(pageId.getValue());// wizard page review.setType(Review.EVALUATION_TYPE);//contant review.setReviewContent(evaluationForm); getReviewManager().saveReview(review); } } rsss.close(); matrix.add(cell); } } // end while(rss.next()) rss.close(); if(matrix != null && !badCell) matrixManager.save(matrix); } } finally { rs.close(); } } catch (Exception e) { logger.error("error selecting data with this sql: " + sql); logger.error("", e); throw new JobExecutionException(e); } finally { try { stmt.close(); } catch (Exception e) { } } logger.info("Quartz task fininshed: runMatrixMigration()"); }
48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/53248046016f1adb9e69fdf606052ac8aab039f2/OspMigrationJob.java/buggy/migration/api-impl/src/java/org/theospi/portfolio/migration/OspMigrationJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 4750, 918, 1086, 4635, 10224, 12, 1952, 356, 16, 1250, 353, 28145, 13, 1216, 3956, 14576, 288, 1377, 1194, 18, 1376, 2932, 12099, 94, 1562, 5746, 30, 1086, 4635, 10224, 1435, 8863, 5411, 514, 4775, 273, 336, 7617, 7147, 2932, 538, 84, 67, 31105, 310, 6, 3631, 1850, 4775, 22, 273, 446, 16, 540, 4775, 23, 273, 446, 31, 1377, 514, 1847, 273, 315, 4025, 380, 628, 315, 397, 4775, 31, 5411, 775, 288, 540, 987, 3312, 18529, 273, 394, 2407, 5621, 540, 3312, 18529, 18, 1289, 12, 12339, 367, 1204, 548, 18, 24805, 10663, 5375, 8056, 3148, 2857, 8952, 273, 356, 18, 2640, 3406, 9334, 5411, 3443, 8952, 273, 356, 18, 2640, 3406, 5621, 5411, 3480, 273, 356, 18, 2640, 3406, 5621, 5411, 10842, 3597, 273, 3480, 18, 8837, 1138, 12, 4669, 1769, 4766, 565, 775, 288, 9079, 1323, 261, 5453, 18, 4285, 10756, 288, 5375, 514, 612, 273, 3597, 18, 588, 780, 2932, 350, 8863, 5375, 514, 3410, 273, 3597, 18, 588, 780, 2932, 8443, 350, 8863, 5375, 514, 2077, 273, 3597, 18, 588, 780, 2932, 2649, 8863, 5375, 514, 2477, 273, 3597, 18, 588, 780, 2932, 3384, 8863, 5375, 514, 1668, 2375, 273, 3597, 18, 588, 780, 2932, 5457, 3085, 8863, 5375, 514, 19013, 19144, 350, 273, 3597, 18, 588, 780, 2932, 14427, 19144, 350, 8863, 5375, 514, 1440, 4256, 273, 3597, 18, 588, 780, 2932, 1252, 4256, 548, 8863, 5375, 1250, 9487, 273, 3597, 18, 588, 5507, 2932, 12614, 8863, 5375, 514, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 4750, 918, 1086, 4635, 10224, 12, 1952, 356, 16, 1250, 353, 28145, 13, 1216, 3956, 14576, 288, 1377, 1194, 18, 1376, 2932, 12099, 94, 1562, 5746, 30, 1086, 4635, 10224, 1435, 8863, 5411, 514, 4775, 273, 336, 7617, 7147, 2932, 538, 84, 67, 31105, 310, 6, 3631, 1850, 4775, 22, 273, 446, 16, 540, 4775, 23, 273, 446, 31, 1377, 514, 1847, 273, 315, 4025, 380, 628, 315, 397, 4775, 31, 5411, 775, 288, 540, 987, 3312, 18529, 273, 394, 2407, 5621, 540, 3312, 18529, 18, 1289, 12, 12339, 367, 1204, 548, 18, 24805, 10663, 5375, 8056, 3148, 2857, 8952, 273, 356, 18, 2640, 3406, 9334, 5411, 3443, 8952, 273, 356, 18, 2640, 3406, 5621, 5411, 3480, 273, 2 ]
bnd.show();
bnd.setVisible(true);
public void boardNewXX() { // display new board dialog BoardNewDialog bnd = new BoardNewDialog(frame, lisTerrain.getItems(), lisTerrain.getSelectedIndex()); bnd.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100); bnd.show(); if(bnd.getX() > 0 || bnd.getY() > 0) { IHex[] newHexes = new IHex[ bnd.getX() * bnd.getY() ]; for(int i = 0; i < newHexes.length; i++) { newHexes[i] = new Hex(); } board.newData(bnd.getX(), bnd.getY(), newHexes); curpath = null; curfile = null; frame.setTitle(Messages.getString("BoardEditor.title")); //$NON-NLS-1$ menuBar.setBoard( true ); } }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/c1d9d15832147777c7866e12b2a22073e12e3714/BoardEditor.java/buggy/megamek/src/megamek/client/ui/AWT/BoardEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 11094, 1908, 5619, 1435, 288, 3639, 368, 2562, 394, 11094, 6176, 3639, 17980, 1060, 1908, 6353, 324, 4880, 273, 394, 17980, 1060, 1908, 6353, 12, 3789, 16, 328, 291, 56, 264, 7596, 18, 588, 3126, 9334, 328, 291, 56, 264, 7596, 18, 588, 7416, 1016, 10663, 3639, 324, 4880, 18, 542, 2735, 12, 3789, 18, 588, 2735, 7675, 92, 397, 18478, 16, 2623, 18, 588, 2735, 7675, 93, 397, 2130, 1769, 3639, 324, 4880, 18, 542, 6207, 12, 3767, 1769, 7734, 309, 12, 70, 4880, 18, 588, 60, 1435, 405, 374, 747, 324, 4880, 18, 588, 61, 1435, 405, 374, 13, 288, 5411, 467, 7037, 8526, 394, 7037, 281, 273, 394, 467, 7037, 63, 324, 4880, 18, 588, 60, 1435, 380, 324, 4880, 18, 588, 61, 1435, 308, 31, 2398, 364, 12, 474, 277, 273, 374, 31, 277, 411, 394, 7037, 281, 18, 2469, 31, 277, 27245, 288, 1171, 394, 7037, 281, 63, 77, 65, 273, 394, 15734, 5621, 2398, 289, 5411, 11094, 18, 2704, 751, 12, 70, 4880, 18, 588, 60, 9334, 324, 4880, 18, 588, 61, 9334, 394, 7037, 281, 1769, 2398, 662, 803, 273, 446, 31, 5411, 662, 768, 273, 446, 31, 5411, 2623, 18, 542, 4247, 12, 5058, 18, 588, 780, 2932, 22233, 6946, 18, 2649, 7923, 1769, 4329, 3993, 17, 5106, 17, 21, 8, 5411, 3824, 5190, 18, 542, 22233, 12, 638, 11272, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 377, 1071, 918, 11094, 1908, 5619, 1435, 288, 3639, 368, 2562, 394, 11094, 6176, 3639, 17980, 1060, 1908, 6353, 324, 4880, 273, 394, 17980, 1060, 1908, 6353, 12, 3789, 16, 328, 291, 56, 264, 7596, 18, 588, 3126, 9334, 328, 291, 56, 264, 7596, 18, 588, 7416, 1016, 10663, 3639, 324, 4880, 18, 542, 2735, 12, 3789, 18, 588, 2735, 7675, 92, 397, 18478, 16, 2623, 18, 588, 2735, 7675, 93, 397, 2130, 1769, 3639, 324, 4880, 18, 542, 6207, 12, 3767, 1769, 7734, 309, 12, 70, 4880, 18, 588, 60, 1435, 405, 374, 747, 324, 4880, 18, 588, 61, 1435, 405, 374, 13, 288, 5411, 467, 7037, 8526, 394, 7037, 281, 273, 394, 467, 7037, 63, 324, 4880, 2 ]
currentIssue.setPriority("P4");
currentIssue.setPriority(Priority.P4);
public static List loadIssues() { List issues = new ArrayList(); Issue currentIssue = null; Description description = null; currentIssue = new Issue(); currentIssue.setId(new Integer(1)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Improve filter performance upon list change"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current implementation of filtering uses a N*N*M algorithm to re-filter when the list \nchanges, for M changes on a list of size N.\n\nIt is necessary to improve this runtime by using more appropriate data structures inside \nthe AbstractFilterList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=1)\nscreenshot from profiler\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("In creating a test case I found that the filter performance can be really bad in certain situations.\n\nI think this case can be justification for updating the AbstractFilterList to use a SparseList instead of the \ncurrent arraylist hack."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have changed the AbstractFilterList to use SparseList instead of the hack array data structure. The \nresults are impressive in some cases only and not noticable in other cases. This change will cause \nchange events to be orders of magnitude faster, while get() events will be slightly slower.\n\nHere is the results in elapsed time from two tests I ran, before and after the fix:\nCaseInsensitiveFilterListTest\nbefore: 3.9s\nafter: 2.8s\n\nMultipleListenersTest\nbefore: 162.9s\nafter: 19.2s"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(2)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Filter regex fails with special characters"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current filter code for CaseInsensitiveFilterList fails to work when the filter text \ncontains regular-expression characters such as dot.\n\nFix this to handle special characters as they should be."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed in CVS. Added a method getMatcher() that constructs a matcher using the source \nstring"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(3)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("EventListIterator problem with remove() method"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("This code doesn't seem to work properly: \n(variable \"songs\" is a BasicEventList)\n\n public int cleanFromMissingFiles() {\n Iterator it = songs.iterator();\n while (it.hasNext()) {\n MP3Song song = (MP3Song) it.next();\n File f = new File(song.getPath());\n if (!f.exists())\n it.remove(); \n }\n }\n\nif there are 2 items to remove, after removing the first, the iterator return\nfalse at the next call to hasNext()\nif, for example, there are 8 items to remove, the hasNext() return false after\nthe 4th remove() calls. \nAnd so on...\n\nthe rest of the code is right, in fact, with this code:\n\n public int cleanFromMissingFiles() {\n List list = new LinkedList();\n list.addAll(songs);\n Iterator it = list.iterator();\n while (it.hasNext()) {\n MP3Song song = (MP3Song) it.next();\n File f = new File(song.getPath());\n if (!f.exists())\n it.remove();\n }\n songs.clear();\n songs.addAll(list);\n }\n\neverything is all right.\n\nhope this can help.\nbye."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was a defect in my iterator code.\n\nThe iterator contains two indexes - the index of the last item viewed and the index of the \nnext item to view. When a remove occurred, only the last item viewed index was updated. \n\nThe next item to view index needed to be shifted down by one whenever a remove would \ncause the list's indicies to shift down by one."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(4)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Error in setting header value in TableComparatorSelector"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("Maybe there is a problem in TableComparatorSelector.\n\nI set tableHeader.setReorderingAllowed(true) on a table which has its own\nTableComparatorSelector. \nI move a column. After moving, the index of the column is changed, but the\nmodelIndex remains unchanged. \nThis is wel handled in method mouseClicked with trhis code \n\n int viewColumn = columnModel.getColumnIndexAtX(e.getX()); \n int column = table.convertColumnIndexToModel(viewColumn); \n\nthe last method, which rewrite the table header of all the columns, has the\nfollowing code:\n\n // and set the name of the table header to the current comparator\n for(int c = 0; c < table.getColumnCount(); c++) {\n if(c == column) { \n table.getColumnModel().getColumn(column).setHeaderValue(sortedHeader);\n } else {\n String header = listTable.getTableFormat().getFieldName(c);\n table.getColumnModel().getColumn(c).setHeaderValue(header);\n }\n }\n\nthis method doesn't seem to handle difference between column index and model index.\nIn my app, when I move a column and then click on the header for resorting the\ntable, all the header value happen to move from their position. And this seems\nto be caused by that portion of code wich, I guess, has to use the view index\nand not the model index of the column. \n\nIf I am right, that code has to handle difference between index and model index.\nIf I am wrong, there are different way to handle this thing?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The problem looks legit. In most of my use of ListTable I use only a single column so \nmultiple columns is not well exercised!\n\nI'll try to reproduce the problem and look into a fix."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've fixed the bug and done preliminary testing to verify that the fix worked."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(5)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Speed up SparseLists"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The SparseListNode's height() method slow. More formally, this method is potentially O(n) \nand it should be optimized to be O(1).\n\nThis is insignificant in small lists but huge in large lists. In my brief profiling I discovered \nthat height() can consume 75% of the access time for large lists."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have tuned SparseLists to use a better height() method. The height is now stored \nin the node and recalculated whenever it may have changed (as a consequence of \ninsert or remove).\n\nThe performance gains are fantastic."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(6)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("MutationList return \"parent\" source instead of its own"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("MutationList getRootList was\n \n public EventList getRootList() {\n return source;\n }\n\nas of revision 1.3 on CVS.\n\nIn revision 1.4, it is:\n\n /**\n * For implementing the EventList interface. This returns the root of the\n * source list, or <code>this</code> if this list has no source.\n */\n /*\n public EventList getRootList() {\n if(source == this) return this;\n return source.getRootList();\n }\n\nand this broke all my code and my coomprehension of Glazed Lists.\n\nIs this correct?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Forgive me for breaking your code. The newest revision in CVS is correct and the previous \nrevision was a bug.\n\nIn your own code when you need the source list, you are supposed to use 'source', which \nis a protected member of the MutationList class. If you change your calls to 'getRootList()' \nwith 'source', your code should continue to work as it is supposed to.\n\n\nHere's why I made the change:\n\nGlazed Lists needs to be thread-safe. Currently I have made every effort to make it totally \nthread-safe. To accomplish thread safety I need to synchronize threads while they are \nperforming updates to the lists. In my original implementation, each list would be coded \nlike this:\n public synchronized void notifyListUpdated()\n public synchronized void get()\nUnfortunately this strategy can fail for thread safety in deadlock because the Swing thread \ncan be doing a get() while the query thread is doing an update. The get() call propagates \nfrom the table to the filter to the sorted list and eventually to the source list, holding all \nthe locks as it works. The notifyListUpdated does the opposite, starting at the source list \nand propagating through the sorted list, the filter and finally the table, attempting to \nacquire locks as it goes also. A deadlock is the inevitable result because the Swing thread \nis waiting for the query thread to release its lock on the source list while the query thread \nwaits on the Swing thread to release its lock on the table.\n\nSo my naive solution failed and I realized that I needed to synchronize all lists with the \nsame lock. The obvious lock to choose is the root list - the absolute source list in the tree. \nThis is the list that all of the other lists depend on.\n\nAs you walk through the code, you will see that I protect against thread problems with\n synchronized(getRootList()) {\n }\n\nBut I still access the parent list with 'source'. For example, the following is cut-and-pasted \nfrom SortedList:\n\n public void setComparator(Comparator comparator) {\n synchronized(getRootList()) {\n // create the sorted list with a simple comparator\n sorted = new IndexedTree(new IndexedTreeNodeComparator(comparator));\n // create a list which knows the offsets of the indexes\n unsorted = new IndexedTree();\n\n // we're done if there's no elements in the source list\n if(source.size() == 0) return;\n\n // add all elements in the source list, in order\n for(int i = 0; i < source.size(); i++) {\n IndexedTreeNode unsortedNode = unsorted.addByNode(i, this);\n insertByUnsortedNode(unsortedNode);\n }\n\n // notification about the big change\n updates.beginAtomicChange();\n updates.appendChange(0, size() - 1, ListChangeBlock.DELETE);\n updates.appendChange(0, size() - 1, ListChangeBlock.INSERT);\n updates.commitAtomicChange();\n }\n }\n\nThe second line is synchronized on getRootList(), but all of the calls to size() are directly \non source.\n\nIn summary\n\nWhenever you are synchronizing, use\n synchronized(getRootList())\nbut for everything else use\n source"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(7)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CaseInsensitiveFilterList non-\"live\" mode"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("If you have a CaseInsensitiveFilterList with many entries and you filter for \"foo\", then the \nlist will be filtered three times! Because the list is \"live\" it filters once after the user types \n\"f\", another time after they have typed \"fo\" and finally a third time after they have \ncompleted \"foo\".\n\nThis is great when filtering is very fast and the list is short but it leads to unnecessary \nperformance lags when the list is large and filtering isn't as fast.\n\nThe CaseInsensitiveFilterList should have a non-\"live\" mode where the list is only filtered \nafter the user presses the Enter key in the search box. There could also be a \"filter\" \nbutton to activate the filter after the filter text has been entered."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added some new methods to CaseInsensitiveFilterList:\n\ngetActionListener()\nsetLive(boolean)\n\nThe ActionListener can be used to trigger a refilter on a button press. \nThe list also will always refilter when ENTER is pressed in the filter edit field, whether in live mode or \nnot.\n\nFinally the DocumentListener has been moved to an inner class which is a 'safer' place for it."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(8)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("ListChangeSequence hasNext() fails when there's no next"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("There are two things that happen when a list changes:\n - the ListChangeEvent is populated with the change information\n - the notifyListChanges() method is called on all listeners\n\nSometimes as a consequence of multi-threading, multiple change events are processed in \na single notifyListChanges() methods. When the notifyListChanges() is called on a different \nthread than where the changes were created, that method is required to verify that there \nare changes left to be processed using:\n listChanges.hasNext()\n\nThis is performed by the ListTable because it receives all events on the SwingThread via \nListChangeListenerEventThreadProxy:\n public void notifyListChanges(ListChangeEvent listChanges) {\n ...\n // when all events hae already been processed by clearing the event queue\n if(!listChanges.hasNext()) {\n return;\n ...\n\nUnfortunately the listChanges.hasNext() method is broken, and throws an \nIndexOutOfBoundsException when there are no more changes:\njava.lang.IndexOutOfBoundsException: Index: 43, Size: 43\n at java.util.ArrayList.RangeCheck(ArrayList.java:507)\n at java.util.ArrayList.get(ArrayList.java:324)\n at \ncom.odellengineeringltd.glazedlists.event.ListChangeSequence.getBlockCount(ListChangeSe\nquence.java:181)\n at \ncom.odellengineeringltd.glazedlists.event.ListChangeEvent.hasNext(ListChangeEvent.java:\n124)\n at com.odellengineeringltd.glazedlists.jtable.ListTable.notifyListChanges(ListTable.java:\n158)\n at \ncom.odellengineeringltd.glazedlists.event.ListChangeListenerEventThreadProxy.run(ListCha\nngeListenerEventThreadProxy.java:54)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)\n at \njava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:\n151)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The ListChangeEvent now checks with the target ListChangeSequence to verify that it has \nnot already reached the last atomic change in the set.\n\nThis should fix the problem as it has in my preliminary tests."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(9)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("fails to report selection event"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("The problem is in this code:\n\nclass ListTable \n...\n\n public void notifyListChanges(ListChangeEvent listChanges) {\n // for avoiding extra selection events\n ignoreSelectionEvents = true;\n // when all events hae already been processed by clearing the event queue\n if(!listChanges.hasNext()) {\n return;\n // notify all changes simultaneously\n }\n\nit is needed to add this line\n\n ignoreSelectionEvents = false;\n\nbefore that return. Without that line, it could happen that\nignoreSelectionEvents remains false and selection event are no more propagated."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The bug has been fixed.\n\nThe bug report was very useful in helping me fix this bug quickly!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(10)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("IndexedTree insert and remove are too slow"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The height() method on the IndexedTreeNode is not optimized and prevents the \nIndexedTreeNode from functioning efficiently. The method has O(n) runtime while proper \noptimization should yield O(log n) runtime.\n\nThis is because the height() method does not cache the height of the values at the nodes.\n\nFix the height as done for issue #5 with SparseListNode and the IndexedTree will perform \nmuch more efficiently."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have resolved the speed issue with the IndexedTreeNode.\n\nThis will impact the SortedList and cause it to perform faster sorts!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(11)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Expose prepareRenderer from JTable into ListTable class"); description = new Description(); description.setWho("philblais"); description.setWhen(null); description.setText("I like having the ability to alternate colors on each of the rows of my tables so \nthat they look more like a ledger. Since ListTable creates the JTable object it \nmakes it impossible to use this approach to render this.\n\nI propose to expose this method into ListTable so that it can be overriden if \nnecessary."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("philblais - Glazed Lists already has a place where you can configure your table and \nprepare your renderers as necessary.\n\nYou will have implemented the interface TableFormat which contains a method \nconfigureTable(). This method is called after the JTable has been created and its purpose is \nto allow you to modify the table's renderers to your liking:\n\n /**\n * Allow the record model to customize the table to its liking\n * This method is called after the table is created so that the\n * record can ensure the table behaves appropriately. This may\n * include setting the editors and renderers for the table.\n */\n public void configureTable(JTable table);\n\nPlease call prepareRenderer() from this configureTable method and I hope you will get \nyour desired results.\n\nIf my understanding of your problem is incorrect please explain why calling \nprepareRenderer() from your configureTable() is insufficient and I will make quick \nprogress at getting it working for you.\n\nGood luck with your project!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("On 30-Jan-04, at 10:54 AM, Philippe Blais wrote:\n\nHi,\n\nThe way it now it won't work. The JTable's prepareRenderer method is called\ndynamically with the cell's renderer, the row index and the column index.\nIn my project I use the row index to decide what kind of background I want\nfor all the renderers on the row.\n\nI made a quick and dirty mod to ListTable for now since I couldn't simply\nsubclass it, my mod looks as follows in the constructWidgets method:\n\n--\ntable = new JTable(this)\n{\n public Component prepareRenderer(TableCellRenderer renderer, int\nrowIndex,int colIndex)\n {\n Component c = super.prepareRenderer(renderer, \n rowIndex, colIndex);\n if (rowIndex % 2 == 0 && !isCellSelected(rowIndex,\ncolIndex)){\n if (alternateShadingColor!=null) {\n c.setBackground(alternateShadingColor);\n } else {\n c.setBackground(getBackground());\n }\n } else {\n c.setBackground(getBackground());\n }\n \n return c;\n}\n--\n\nOn simple way to allow extending ListTable for this functionality would be\nto delegate the creation of the table to a protected method of ListTable\nthat can be overridden by whoever wants to extend ListTable.\n\nMy suggestion is to change the \"new JTable(this)\" call to\n\"createTable(this)\" where the method would look like:\n\nprotected JTable createTable(TableModel model) {\n return new JTable(model);\n}\n\nThis way I would have the ability to use my own extended JTable.\n\nThanks,\n\nPhil Blais\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Phil Blais - \n\nI have written a fix for your problem and I hope that you find it sufficient! \n\nBut first, an explanation as to why I have not fixed your problem the way you have \nsuggested. The problem with allowing the user to extend JTable is that it prevents me \nfrom extending JTable in the future.\n\nMy solution involves a custom renderer called StripedTableCellRenderer which I have \nadded to the com.odellengineeringltd.glazedlists.jtable package. In your TableCell class \nyou will need to set each column's renderer to use this StripedTableCellRenderer:\n\npublic void configureTable(JTable table) {\n Color oddColor = new java.awt.Color(234, 234, 234);\n Color evenColor = table.getBackground();\n StripedTableCellRenderer renderer = new StripedTableCellRenderer(oddColor, \nevenColor);\n for(int i = 0; i < getFieldCount(); i++) {\n table.getColumnModel().getColumn(i).setCellRenderer(renderer);\n }\n}\n\nThe StripedTableCellRenderer uses the default renderer from the table so classes like \nBoolean and Number should render correctly.\n\nIt is also possible to specify a base renderer to use. In this case the StripedRenderer will \nuse that renderer to do the initial drawing and then paint its own stripe onto the row.\n\nLet me know if this solution is still insufficient and I will work with you to resolve any \noutstanding problems."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(12)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Problem with ListTable.getSelected() ?"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("Sometimes I receive this exception that seems to be connected to a problem in\ngetSelected() methods in ListTable.\n\njava.lang.IndexOutOfBoundsException: cannot get from tree of size 14 at 47\n at\ncom.odellengineeringltd.glazedlists.util.IndexedTreeNode.getNodeWithIndex(IndexedTreeNode.java:81)\n at\ncom.odellengineeringltd.glazedlists.util.IndexedTree.getNode(IndexedTree.java:55)\n at com.odellengineeringltd.glazedlists.SortedList.get(SortedList.java:228)\n at\ncom.odellengineeringltd.glazedlists.jtable.ListTable.getSelected(ListTable.java:227)\n at\nnet.della.mcube.outliner.OutlinersBuilder$2.filterMatches(OutlinersBuilder.java:77)\n at\nnet.della.mcube.util.CustomFilteredList.filterMatches(CustomFilteredList.java:38)\n at\ncom.odellengineeringltd.glazedlists.AbstractFilterList.notifyListChanges(AbstractFilterList.java:93)\n at\ncom.odellengineeringltd.glazedlists.event.ListChangeSequence.commitAtomicChange(ListChangeSequence.java:154)\n at net.della.mcube.util.QueryList.refresh(QueryList.java:110)\n at net.della.mcube.util.QueryList$RefreshTask.run(QueryList.java:127)\n at java.util.TimerThread.mainLoop(Timer.java:432)\n at java.util.TimerThread.run(Timer.java:382)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This problem arises when the table selection is being accessed by a thread which is not \nthe event dispatch thread. When the table selection is being modified by the event \ndispatch thread and a second thread attempts to access the selection, it is natural for the \nsecond thread to see an inconsistent view of the selection. This inconsistent view can \ncause unrelated exceptions to show up in other parts of the system. \n\n\nI have come up with three potential solutions to this problem:\n\n1. Synchronize access to the table selection. The problem with this approach is that typical \naccess to the table selection is done by the event dispatch thread which does not require \nsynchronization. Therefore the synchronization will cause an unnecessary performance hit \nto typical use.\n\n2. Require that all access to the table selection be performed on the event dispatch \nthread. This is how things work currently. But as is demonstrated there are cases where \nother threads such as timer threads need to access the table selection. The work around \nfor this case is to use the SwingUtilities.invokeAndWait() method to schedule the selection \naccess on the event dispatch thread. The biggest problem with this approach is that it adds \ncomplexity to the ListTable class.\n\n3. Attempt to detect if the selection is currently being modified. This can be tested by \nwhether or not the selection has a consistent state. If the state is inconsistent simply \nreturn null as if there was no selection.\n\n\nI am trying to decide between solution two and solution three. Solution 2 will always \nreturn the correct value but it will also always take a long time when called by a thread \nwhich is not the event dispatch thread. Solution 3 will always return immediately but has \nthe potential for returning the wrong value when the selection is being modified.\n\nI will look through and continue to weight the pros and cons of each solution. Please let \nme know if you have any input which may help me make my decision."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have made the getSelected() method safe to call from threads which are not the event \ndispatch thread. To do this I have made the getSelected() method use a helper class which \nwill do the actual selection lookup on the event dispatch thread.\n\nIn implementing this solution I have been thinking that the ListTable class should not be \nconcerned with selection. Unfortunately I cannot remove selection from ListTable without \nbreaking existing code.\n\nIn the interim I am considering making the getSelected() method deprecated with clients \naccessing the SelectionList as an alternative. The problem with this solution is that like \ngetSelected(), the SelectionList is not safe to be used any thread but the event dispatch \nthread.\n\nI will continue to think about this problem. If anyone has any suggestions I am open for \ncomment."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(13)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("ListChangeSequence grows unbounded"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The ListChangeSequence grows as more and more atomic changes are created. For a long-\nrunning Glazed Lists application the memory usage may become a serious performance \nproblem.\n\nThe ListChangeSequence should null out atomic changes when they are no longer in use \nand shift the array list when it grows too large."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I performed a thorough examination of the memory usage of Glazed Lists and the \napplication does not grow unbounded.\n\nThis can be verified in the code from the following lines that were cut-and-paste from \nListChangeSequence:\n\n // attempt to reclaim some changes for the change pool\n int oldestRequiredChange = atomicChanges.size(); \n for(int e = 0; e < listenerEvents.size(); e++) {\n ListChangeEvent listChangeEvent = (ListChangeEvent)listenerEvents.get(e);\n int eventOldestChange = listChangeEvent.getAtomicChangeCount();\n if(eventOldestChange < oldestRequiredChange) {\n oldestRequiredChange = eventOldestChange;\n }\n }\n // recycle every change that is no longer used\n for(int i = oldestChange; i < oldestRequiredChange; i++) {\n List recycledChanges = (List)atomicChanges.get(i);\n changePool.addAll(recycledChanges);\n atomicChanges.set(i, null);\n }\n // now we have reclaimed all these change objects\n oldestChange = oldestRequiredChange;\n\nI guess that when I was initially entering this bug I had forgotten that I had gotten around \nto adding this optimization. Nevertheless it is good to verify that there are no memory \nleaks when using Glazed Lists. In my simple test, Glazed Lists consumed less than 1000k \nof memory during the first 100,000 changes but consumed no additional memory for the \nfollowing 1,000,000 changes. Therefore I conclude that memory usage does not grow \nunbounded."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(14)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("JList support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists needs to support JList alongside JTable and JComboBox.\n\nIt should be very straightforward to change between JList and JTable in an application:\n * The selection interfaces should be the same\n * The renderers should be the same\n\nFrom Fred at l2fprod.com:\n> I was looking at an equivalent of \"ListTable\"\n> but which would encapsulates a JList. Do you \n> have this on your todo list? I guess it could\n> share code with the ListTable\n\n\nThis functionality should get its own package,\n com.odellengineeringltd.glazedlists.jlist\nPerhaps the class name could be EventJList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've done some preliminary work on this and I've run into a few snags.\n\nMy first problem is with rendering. I cannot get the preferred width in order to render the cells \nnicely, because the getSize() methods depend on the results of the rendered cells! It also seems \nto be a lot slower than JTable when scrolling through a long list of rendered cells.\n\nOne thing that this has brought me to think about is better naming for some classes. ListTable is \nfine for an event list JTable, but the matching \"ListList\" does not make much sense. My working \nname is \"EventJList\" which I think is a decent naming convention. I am pondering what the \nconsequences would be if I renamed everything in Glazed Lists to make more sense. If I were to \ndo that I would probably also want to change the package names. O'Dell Engineering is now using \na better package prefix of \"ca.odell\" which might in and of itself be worth the costs of migration.\n\nStill I have users and CVS is unfriendly to directory deletes. I'll worry about that later. For now I \nget to think about how to do JLists right."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have implemented EventJList. The class shares the following with ListTable:\n - SelectionListener interface\n - SelectionList / Selection Model\n\nThis class never batches groups of changes like ListTable does. It also does not use a Mutable change \nevent. It may be necessary to create a mutable ListDataEvent if change event creation proves to be a \nbottleneck.\n\nThis class still does not have any extra renderer support. For now if styled rendering is necessary, the \nuse of ListTable is a sufficient work around."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(15)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Inserted items become selected"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I am delighted with the performance, flexibility and ease of use of your platform, which I am \ncurrently evaluating for use in a table intensive application for my employer.\n\nOur application needs to display tabular data which gets notified through JMS. That means, \nultimately, that data arrives via a callback method in out code. I am therefore using a \nBasicEventList as base list, encapsulated in a SortedList and a subclass of AbstractFilterList as a \nmeans of providing the functionality (sorting & filtering by various criteria) that we need.\n\nThe only problem so far arises with keeping selected rows between data insertions.�I set the \nunderlying table selection model to ListSelectionModel.MULTIPLE_INTERVAL_SELECTION (anyway, \nas it is the default value). A thread keeps adding rows to the table, at a rate of 10 per second (to \ntest performance). I have noticed that whenever I select a row, further row insertions may \nmodify the number of selected rows. In particular, if a new row has the same internal index as \nthe currently selected one, it is guaranteed I will end up with two selected rows.\n\nThat seems to be your intended behaviour as per the documentation of the class SelectionList; \nhowever, I tried to modify it in order to suppress this behaviour to no avail. In particular, I \nsuppressed the lines marked inside SelectionList.notifyListChanges():\n// when an element is inserted, it is selected if its index was selected\n} else if(changeType == ListChangeBlock.INSERT) {\n��� // when selected, add the flag and fire a selection event\n��� if(previouslySelected) {\n��� ��� flagList.add(index, Boolean.TRUE); // <--- SUPRESS\n��� ��� updates.appendChange(previousSelectionIndex, ListChangeBlock.INSERT); // <--- SUPRESS\n��� // when not selected, just add the space\n��� } else {\n��� ��� flagList.add(index, null);\n��� }\n\nI tried other changes, including the method SelectionList.valueChanged(). Do you have any \nsuggestion to solve this problem? Is it a bug in your code? In that case, I'd be willing to help and \ncontribute back to your project any bugfixes I develop.�I can also provide you with my testing \ncode, but at this stage it's really simple: the thread inserting fake data rows does so in an \ninvokeLater() block, and uses a java.util.Timer for scheduling data feed.\n\nThe problem does not manifest when I set the table selection model to \nListSelectionModel.SINGLE_SELECTION, by the way.\n\nThank you for your time and for providing the Java Community with such a promising piece of \nwork.\n\nYours\nIv�n Rivera Rodr�guez"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Iv�n -\n\nThe current behaviour is \"as designed\" but I agree that there may be a better way to solve this \nproblem.\n\nThis behaviour is the same as the behaviour of a simple JTable (ie. no Glazed Lists). When JTable \nreceives in insert at some index, say i, then the newly inserted row will be selected only if row i \nwas selected before the insertion. This behaviour has some nice properties: values inserted \nwithin a range of selected values will themselves become selected.\n\nBut I also agree that this behaviour can be problematic. I think the solution is to add an extra \n\"mode\" to the SelectionList. The new mode will be as you describe. Inserted values will never be \nselected until done so explicitly by the user.\n\nDue to constraints at school and at work I will be unable to add this functionality until at least \nFebruary 14th, 2004. In the worst case it will take until February 21st to complete. Hopefully then \nI will get something working that solves this problem!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("According to the J2SE 1.4.1 API for DefaultListSelectionModel:\n\"If the value at index is itself selected and the selection mode is not SINGLE_SELECTION, set all of \nthe newly inserted items as selected. Otherwise leave them unselected. \"\nhttp://java.sun.com/j2se/1.4.1/docs/api/javax/swing/\nDefaultListSelectionModel.html#insertIndexInterval(int,%20int,%20boolean)\n\nI have tested some of the simple ways to solve this problem and I do not think that they will work \nelegantly. The problem is that I need to undo the selection which is added by \nDefaultListSelectionModel. This would be trivial except that the ListSelectionModel fires events that \nalso need to be done and undone.\n\nI am considering changing the Interface of SelectionList, to become a ListSelectionModel and \nEventList simultaneously. This approach is complex but appropriate as the SelectionList already \ntracks the table selection.\n\nI will continue to review my options but for now it looks like implementing ListSelectionModel is my \nbest bet."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have solved the problem by implementing ListSelectionModel. Implementing this class was \ndifficult as the interface specification was not explicit enough for the behaviour in certain cases. I \nthink that the behaviour of my ListSelectionModel should be the same as the J2SE 1.4 \nDefaultListSelectionModel. If you discover a descrepancy, let me know.\n\nThis new ListSelectionModel has a new mode for solving this problem \n\"MULTIPLE_INTERVAL_SELECTION_DEFENSIVE\". The new mode is the default list selection mode. \n\nMy ListSelectionModel is fully capable of switching between different modes and retains the \nappropriate selection when the mode changes. To test this, there is a commented out block of \ncode in ProgrammingLanguageBrowser.java that provides a JComboBox to switch between \ndifferent ListSelectionModel modes.\n\nI hope this fix helps, it took quite a bit of code to make it work - 653 lines!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("From Iv�n Rivera:\n\nThank you very much. I had also some time to work on the issue last Friday and came up with a \nsubclass of javax.swing.DefaultListSelectionModel which undoes the selection, without caring for \nevents generated. I append a copy to this mail for you to examine, as it seems to correct the \n(Swing-default) behaviour.\n\nYou are right about the event handling problem, but it doesn't seem to be causing troubles in my \ntest benchmark. Perhaps it's just a matter of performance. Anyway, your solution is surely more \nelegant. I won't be able to see your code until this night at home, since at work I'm behind an \nextremely restrictive firewall which doesn't even allow SSH tunneling for CVS checkout.\n\nI'm working in some components to enable automatic width adjustment for columns based on \ncontent and column hiding. I hope to be able to contribute the code once I'm done (this week, \nmost likely).\n\nOnce again, thanks for your interest.\n\nYours,\n\nIv�n Rivera"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(16)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("No removeSelectionListener() method in ListTable"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Hi,\n\nat minimum the ListTable has no removeSelectionListener(SelectionListener)\nmethod ...\n\nAny plans to correct this?\n\nCheers,\n\nJoern"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The method had been omitted in error.\n\nI have added it to the latest revision in CVS."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(17)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Selection concurrency ArrayIndexOutOfBoundsException"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I got the following exception:\n\n[tasks] Interrupting worker thread to run Adding Article\napple.awt.EventQueueExceptionHandler Caught Throwable : \njava.lang.ArrayIndexOutOfBoundsException: Cannot get selection index 0, list size 0\n at \ncom.odellengineeringltd.glazedlists.listselectionmodel.SelectionModelEventList$EventListSelectionMode\nl.isSelectedIndex(SelectionModelEventList.java:505)\n at javax.swing.JTable.isRowSelected(JTable.java:1451)\n at javax.swing.JTable.isCellSelected(JTable.java:1481)\n at javax.swing.JTable.prepareRenderer(JTable.java:3725)\n at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1149)\n at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)\n at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)\n at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)\n at javax.swing.JComponent.paintComponent(JComponent.java:541)\n at javax.swing.JComponent.paint(JComponent.java:808)\n at javax.swing.JComponent._paintImmediately(JComponent.java:4695)\n at javax.swing.JComponent.paintImmediately(JComponent.java:4488)\n at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)\n at \njavax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:\n117)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)\n at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)\napple.awt.EventQueueExceptionHandler Caught Throwable : \njava.lang.ArrayIndexOutOfBoundsException: Cannot get selection index 0, list size 0\n at \ncom.odellengineeringltd.glazedlists.listselectionmodel.SelectionModelEventList$EventListSelectionMode\nl.isSelectedIndex(SelectionModelEventList.java:505)\n at javax.swing.JTable.isRowSelected(JTable.java:1451)\n at javax.swing.JTable.isCellSelected(JTable.java:1481)\n at javax.swing.JTable.prepareRenderer(JTable.java:3725)\n at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1149)\n at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)\n at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)\n at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)\n at javax.swing.JComponent.paintComponent(JComponent.java:541)\n at javax.swing.JComponent.paint(JComponent.java:808)\n at javax.swing.JComponent.paintChildren(JComponent.java:647)\n at javax.swing.JComponent.paint(JComponent.java:817)\n at javax.swing.JViewport.paint(JViewport.java:774)\n at javax.swing.JComponent.paintChildren(JComponent.java:647)\n at javax.swing.JComponent.paint(JComponent.java:817)\n at javax.swing.JComponent._paintImmediately(JComponent.java:4695)\n at javax.swing.JComponent.paintImmediately(JComponent.java:4488)\n at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)\n at \njavax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:\n117)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)\n at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The lists can get out of sync while changes are pending in the event queue. The ListSelectionModel \nmust not throw an exception because it is possible that the lists are simply out of sync and that when \nthe event queue is processed they will come back into sync.\n\nThis has been fixed so that the SelectionModel does not throw an exception in the possiblility that the \nlists are simply out of sync.\n\nOne unfortunate side effect is that the ListSelectionModel now cannot provide warning as to whether \nthis method is actually being called in error."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(18)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("set(), add(), remove() etc. not implemented"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists does not support remove() on FilterLists. It simply throws an Exception.\n\nGlazed Lists should support remove(). It should also support set().\n\nTo provide protection, there should be a MutationList called ReadOnlyList that throws an exception \nupon a remove() or a set."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The following methods that modify lists should be implemented: set(), add(), remove() and clear().\n\nImplementing these is not straightforward because we want to modify the model indirectly by calling \nthese methods upon the view. Here are some observations:\n\nBasicEventList:\nAlready supports modifying methods.\n\nQueryList:\nNot directly modifyable. Objects created or modified externally can currently be updated via \nnotifyObjectUpdated(). This is appropriate.\n\nSortedList:\nMethods called with an index such as set(index, value) and add(index, value) will have unpredictable \nresults. This is because the modified/inserted objects may be sorted into a different index than that \nspecified. This is acceptable but should be documented.\n\nFilteredList:\nThe add(index, value) method is ambiguous. This is because there may be several filtered-out indicies \nin the source list that will have the same filtered index. I think the best approach is to insert at the \nhighest index that will satisfy the specified index.\nThe add() and set() methods may cause an object to become filtered. This is acceptable but should be \ndocumented.\n\nFreezableList:\nChanges may do different things in different states. This is nonintuitive and could be \ntroublesome. For example, when a list is frozen changes can only applied to a local copy. When the list \nis not frozen changes should propagate to parente lists. Therefore I recommend that changes are only \nallowed in the not frozen state. Otherwise an IllegalStateException should be thrown.\n\nSelectionList:\nThis is not clearly defined. It may be intuitive that remove() either removes the selection or that \nremove() actually removes an element from the source list. But add() can only add an element to the \nsource list because it is unnatural to use add() to perform selection by value and not index. Therefore \nadd() and remove() will modify the source list.\n\nMutationList:\nThis should continue to throw MethodNotSupportedException for mutator methods. It may be desirable \nto make some methods use others such as clear() calling remove() in sequence in order to simplify \nwriting extending classes."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Daniel Bonin and I were discussing modifyable views and we came up with some observations. When \nusing FilterList, SortedList or the like, you can have inconsistent behaviour. For example, the following \ncode wil fail.\n\nlist x = ...\nx.add(0, \"Jesse\");\nassert(\"Jesse\".equals(x.get(0));\n\nThis can fail because the inserted value \"Jesse\" gets filtered out or sorted to a different location.\n\nOur solution: a happy list. The happy list \"fakes\" success as the method directed. It basically keeps \ntrack of local changes to make the changes appear consistent. This can be used with GUIs to allow the \nuser to verify their modifications without losing the filtering and sorting. \n\nThe happy list will be called \"DeltaList\" and it will keep track of both the source list and a set of deltas \nthat have been performed. When an insert at x occurs, the delta list simulates that the insert occured at \nx, even if the insert was sorted or filtered to a different location."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have created a new class \"WritableMutationList\" that provides these services to lists that extend it. It \nrequires that lists implement two additional methods:\n - isWritable() returns true if the list is accepting changes at this time\n - getSourceIndex() gets the index from the source list for the corresponding index in the mutated list\n\nThis requires that there is a 1:1 correspondence between indicies in the mutated list and the indicies in \nthe source list. This will not work for lists that combine source values in the mutated view.\n\nTo complete the fix, I must implement a ReadOnlyList mutated list and a DeltaList. I will also need to do \na bunch of testing to verify that this works."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added a ReadOnlyList - now all that's left is DeltaList.\n\n...And LOTS of testing!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I added test methods to SortedList and CaseInsensitiveFilterList and have gained confidence in my \nimplementation of the set(), add(), remove(), clear() etc. methods.\n\nThe DeltaList has been moved to a separate issue, issue 24.\nhttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=24"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(19)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed lists on the network"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As documented in the developer newsgroup, I want to build a model that allows list changes to be \ndistributed across the network.\n\nhttps://glazedlists.dev.java.net/servlets/ReadMsg?list=dev&msgNo=11\nhttps://glazedlists.dev.java.net/servlets/ReadMsg?list=dev&msgNo=12\n\nI will create a descrete event simulation model in order to test out what network strategies are most \neffective. Also I think that this package should be implemented exclusively using the buffered java.nio \npackage if possible."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(20)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Refactor package and class names"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("These changes make the code easier for new users at the expense of requiring existing users to change \ntheir imports. Therefore the changes should be made very carefully. If possible a tool should be \nreferenced to automatically convert .java files for existing users.\n\nFirst off, com.odellengineeringltd.glazedlists is a mouthful. This should be changed to O'Dell \nEngineering's new standard package, ca.odell.glazedlists.\n\n...glazedlists.listselectionmodel should be renamed to ...glazedlists.selection.\n\nIn ...glazedlists.jtable:\n ListTable should be EventJTable\n SelectionListener should be moved to ...glazedlists.selection\n BasicSelectionListener should be moved to ...glazedlists.selection\n\nFinally the following classes should be verified working or removed:\n...glazedlists.jtextfield.ArrayStringCompleter\n...glazedlists.jtextfield.CompletedField\n...glazedlists.jtextfield.ComponentCaution\n...glazedlists.jtextfield.ListStringCompleter\n...glazedlists.jtextfield.StringCompleter\n...glazedlists.jtextfield.ValidatedField\n...glazedlists.jtable.StyledDocumentEditor\n...glazedlists.jtable.WritableListTable\n...glazedlists.jtable.WritableTableFormat\n...glazedlists.query.QueryListManager\n\nAs I have already said, these changes will ruin Glazed Lists programs. Therefore all Glazed Lists users \nshould be notified before making any changes and copies of the Glazed Lists jar file and source should \nbe permanently archived for users with these packages."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("When I fix this bug I will be breaking compatibility. Other compatibility-breaking changes should all be \nperformed at the exact same time.\n\nAnother compatibility-breaking change is changing the concurrency strategy. The current strategy uses \nsimple global synchronization, where a better solution will use Reader/Writer locks. This will be \nnecessary to resolve Issue 25."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Here's my current ideas on what to do with each class. My goal is to simplify Glazed Lists by removing \neverything that is not essential. \n\nAbstractFilterList - ok\nArrayStringCompleter - remove, this class is not within the scope of the project\nBasicEventList - ok\nBasicSelectionListener - remove, this class is simple in implementation and limited in use\nBoundedMap - remove, this class is no longer used\nCachingList - ok\nCaseInsensitiveFilterList - SubstringFilterList, have case toggle options\nCharacteristicList - rename ?\nComparableComparator - ok\nComparatorChain - ok\nCompletedField - remove, not within scope\nComponentCaution - remove, not within scope\nCompositeList - ok\nDynamicQueryList - replace with a different 'query' list that does not use the Query class, just a \nsetCollection() method\nEmptyQuery - remove\nEventJList - replace with a EventListModel\nEventList - ok\nEventListIterator - ok\nExitOnCloseHandler - remove, not in scope\nFilterable - remove? Filterator only may be a better approach\nFilterator - rename TextFilterator\nFreezableList - ok\nIconComboBoxRenderer - remove, not within scope\nIndexedTree - ok\nIndexedTreeNode - ok\nListChangeBlock - make package-scope, move constants DELETE, INSERT to ListChangeEvent class\nListChangeEvent - ok, add methods to get the source list and target listener\nListChangeListener - ok, change notifyListChanges to listChanged\nListChangeListenerEventThreadProxy - ok\nListChangeListenerWeakReferenceProxy - ok\nListChangeSequence - ok, maybe rename to ListChangeEventHelper or something\nListComboBoxModel - ok\nListStringCompleter - remove, out of scope\nListTable - replace with EventListTableModel\nMutableListDataEvent - ok, make package-scope\nMutableTableModelEvent - ok, make package-scope\nMutationList - rename. the renamed list could be \"DecoratorList\" or something else\nPeriodicQueryList - remove, see DynamicQueryList\nProgrammingLanguageBrowser - ok\nProgrammingLanguageNameComparator - ok\nProgrammingLanguageTableCell - ok\nProgrammingLanguageYearComparator - ok\nQuery - remove, see DynamicQueryList\nQueryList - replace as per DynamicQueryList\nQueryListManager - remove\nReadOnlyList - ok\nReverseComparator - ok\nSelectionList - remove\nSelectionListener - ok? maybe remove due to models, consider more flexible selection events\nSelectionModelEventList - ok\nSelectionNotifier - package private\nSortedList - ok\nSparseList - ok\nStringCompleter - remove\nStripedTableCellRenderer - not really in scope, but keep it anyway\nStyledDocumentEditor - remove\nStyledDocumentRenderer - not really in scope, but keep it anyway, adjust built-in forms\nSubEventList - ok\nTableComparatorChooser - ok\nTableComparatorSelector - remove\nTableFormat - rename um TableColumnFormat maybe? remove configureTable for new model-\napproach\nTaskQueryList - remove, see DynamicQueryList\nUniqueList - ok\nValidatedField - remove\nWritableListTable - replace with methods in TableFormat\nWritableMutationList - remove, replace with more powerful MutationList\nWritableTableFormat - remove\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Some other things I think we should go over for this issue:\n - verify standard copyright header\n - classes should be final\n\nTo reduce the number of visible classes and therefore simplify Glazed Lists:\n - all *List classes should be in the main package\n - no support classes should be public\n - Swing classes in swing package\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Two other things I thought of to verify:\n - imports are clean & straightforward & necessary\n - there is a thread-safety warning in Javadoc for all thread-unsafe classes"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("NEVER AGAIN"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(21)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SubList not implemented"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SubList should be implemented. This should be an MutationList on its own, that starts with the initial \nsize and accepts add() and remove() from source list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Implementing SubList as an EventList in its own right will introduce a subtle problem:\n\nThe SubList should listen to events from its source list and change itself accordingly. But if the SubList \nis to listen for such events, it must be registered as a ListChangeListener of the source list.\n\nBecause the SubList is a ListChangeListener, the source list will always maintain a reference to the \nSubList and the SubList will never go out of scope. Therefore the SubList will never be garbage collected \nand waste memory space.\n\nThe work around is to require EventLists to accept two classes of ListChangeListeners - those that \nshould be garbage collected once they go out of the scope from the caller and those that should not be \ngarbage collected. In effect there should be ListChangeListeners that are stored with weak references \nand those that have regular references.\n\nI would prefer not to change the interface for EventList or ListChangeListener, so it will be tricky to \ndetermine whether to reference a listener with a weak reference or a regular reference. One solution \ncreate a proxy class called \"WeakReferenceListChangeListenerProxy\" that sends changes using a weak \nreference only. This is similar to the SwingThreadProxy already in use in Glazed Lists."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SubList is added and appears to be working.\n\nI still need to perform a test to ensure it is being garbage collected."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed!\n\nThe SubList and Iterator now respond to events. Therefore they can be used even if the underlying list \nchanges."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(22)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CachingList dumps all values whenever the list is changed"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The CachingList will be of growing importance as Glazed Lists are used on the network.\n\nThe current implementation of CachingList dumps the entire cache whenever any changes to the list \noccur. The CachingList should only dump values which have been invalidated."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current CachingList keeps track of what is in its cache by its list index. When the list is modified, \nthese list indicies may change and therefore it is necessary to invalidate the entire cache.\n\nIn order to fix the CachingList, it will be necessary to change the data structures that support it. This fix \nwill be difficult to build!\n\nI am considering allowing this defect to exist in the 1.0 release as it is only a performance problem and \nnot a behavioural problem."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I'm assigning this to Kevin Maltby - the best coder I know when caching is concerned. Let's hope my \nflattery and his talent are enough to get this bug fixed!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin has pretty much conquered this one. He's going to CVS commit and close this issue real soon.\n\nI have peer-reviewed his code and it's pretty decent. The peer review session was very helpful and \nhopefully we can get a lot of the Glazed Lists code peer reviewed in the future!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The fix is in. The CachingList now behaves as you would expect."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(23)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Add JUnit Support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As Glazed Lists gets bigger in scope it is becoming very urgent to create a set of unit tests.\n\nThere should be a package such as .glazedlists.test that is only compiled if the JUnit libraries are \ndetected on the classpath. If they are, then these test files can be built. They can then be tested with a \n\"test\" target in the project buildfile.\n\nFinally these test classes shall not be included in the library distribution."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added the framework for JUnit tests within the Glazed Lists package and build file.\n\nNow all I have to do is write the tests!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've gone through the code to select which classes are good candidates for unit tests. Unit tests require \nprogrammatic access so testing Swing stuff will be of marginal value.\n\npackage: .glazedlists\nAbstractFilterList\nBasicEventList\nCaseInsensitiveFilterList\nSortedList\nWritableMutationList\n\npackage: .glazedlists.listselectionmodel\nSelectionModelEventList\n\npackage: .glazedlists.util\nBoundedMap\nCachingList\nEventListIterator\nFreezableList\nIndexedTree\nReadOnlyList\nSparseList\n\nAs of March 18, 2004 I have created tests for the CaseInsensitiveFilterList and the SortedList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The most basic classes now have tests for them.\n\nSome tests are not appropriate for JUnit, for example, concurrency tests.\n\nRegardless, JUnit support is now in the Glazed Lists project. It is possible to add new tests by simply \ncreating a class that ends with Test.java. In fact, Glazed Lists now requires that classes ending in \nTest.java must be JUnit tests as such classes are NOT included in the distribution jar.\n\nAnyone interested in getting their hands dirty with Glazed Lists should consider adding more tests to \nour test library!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(24)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Add DeltaList for consistency with derivatives of WritableMutationList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("WritableMutationLists allow modifications to be made to the list that may behave differently than \nexpected. The solution is to implement a DeltaList, which is a mutation list that provides as-expected \nresults when they would not otherwise be possible.\n\nFrom issue 18:\n\nDaniel Bonin and I were discussing modifyable views and we came up with some observations. When \nusing FilterList, SortedList or the like, you can have inconsistent behaviour. For example, the following \ncode wil fail.\n\nlist x = ...\nx.add(0, \"Jesse\");\nassert(\"Jesse\".equals(x.get(0));\n\nThis can fail because the inserted value \"Jesse\" gets filtered out or sorted to a different location.\n\nOur solution: a happy list. The happy list \"fakes\" success as the method directed. It basically keeps \ntrack of local changes to make the changes appear consistent. This can be used with GUIs to allow the \nuser to verify their modifications without losing the filtering and sorting. \n\nThe happy list will be called \"DeltaList\" and it will keep track of both the source list and a set of deltas \nthat have been performed. When an insert at x occurs, the delta list simulates that the insert occured at \nx, even if the insert was sorted or filtered to a different location."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("priority reduced as there is no 'customers' waiting for this feature."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This may be an excellent candidate as something to extend AbstractFilterList."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(25)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CompositeList not thread-safe"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists' new CompositeList combines multiple event lists into one.\n\nThis class is not thread-safe. In particular, it may be possible to cause a deadlock when one thread is \nreading the CompositeList while another thread is writing a list that the CompositeList is composed of."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug depends on fixing Issue 26. That issue is for adding beefier concurrency constructs to Glazed \nLists."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After much thought, I have decided my approach to solving this bug.\n\nHere are the things that all solutions must consider:\n1. When one of the source lists change, they call notifyListChanges() while holding the writer lock to \nthat source list.\n2. When a user needs read access to any list including CompositeList, the user acquires a reader lock \nand performs their access. The list must not change during access.\n3. If a thread obtains two locks, it must always obtain the locks in the same order as any other thread \nthat may hold those two locks. Otherwise deadlock is possible as threads may compete for each other's \nlocks.\n\nMy initial idea was as follows:\n - Eliminate the need for locking all source lists for each access\n - When a read is performed, lock the local read lock and the read lock on the source list\n - When a write is performed, lock the local write lock and the write lock of the source list\n - When a source list calls notifyListChanges, use the tryLock() method to attempt to obtain the local \nwrite lock. If it can be obtained propogate the change. If it cannot, return without propogating the \nchange. The thread that currently holds a lock is now responsible for propogating that change.\n\nThis strategy has many advantages. It has a constant time to acquire locks, and it takes advantage of \nthe listEvent's abilities to be read at a later time. Although this avoids deadlock, the problem this \nstrategy is that this does not fulfill requirement 2.\n\nTherefore, I will implement a much simpler and potentially slower strategy:\n - for each lock, present a decorator lock that locks all corresponding locks from the source list\n - obtain the locks in a constant order: by the System.hashCode() value of their source list\n\nThis solution looks good! The only problem I have with it is that the System.hashCode() value could \nchange for an Object over time if it gets moved within memory. I doubt that this will be a problem but it \nis a good thing to keep an eye on."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("My initial implementation is complete, but I still need to add a test class to verify that it is thread safe."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After implementing my proposed solution, I tested it and discovered that it was\nfailing miserably! The solution has a problem that prevents it from being\nacceptable. The notifying thread must have a write lock on the entire list to\nprevent changes from being made while the listChanged() method is being handled\nby listeners. This is requirement #2 and it is not satisfied by that proposal.\nTherefore the proposal is insufficient.\n\nTherefore I propose a new solution, somewhat of a hybrid between the two.\ni. Read lock on composite list obtains the read locks of all source lists in\narbitrary order\nii. Write lock on composite list is a special ReadWriteLock called\n\"PropagateLock\" plus the read locks of all source lists.\niii. Upon a change notification in the composite list, that thread tests if the\npropagateLock is locked. If it is, it leaves its changes to be propogated by the\nthread that currently owns the propogate lock. If that lock is unlocked, the\nthread takes the propogate lock and then all read locks in arbitrary order. It\nthen concatenates its own changes with any changes left while it was collecting\nlocks. Finally it propagates the concatenated change while holding the propogate\nlock, read locks to all source lists, and the original write lock for one source\nlist.\n\nThis combined lock includes the \"writer lock\" for this list, satisfying\nrequirement #1. \nThe reader lock is a hybrid lock that holds all other read locks, preventing\nchanges while reading. This satisfies requirement #2.\nThe reader locks need not be mutex with one another so that solves part of #3.\nFor writer locks, a thread's 2nd lock is always the propogate lock, and it fails\nif that lock is not available immediately, solving another part of #3. Finally,\nno thread acquires write locks after owning a first read lock, finishing up the\nfinal area of concern for requirement #3."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Yet again, I have presented a solution that failed in practice. Here is the problem with my most recent \nsolution:\n\nSuppose you have two writer threads, A and B that write to source lists Apples and Bananas. There is \nalso a reader thread C that reads the composite list of A and B called \"FruitSalad\".\n\n1. A creates an event in Apples and acquires the write lock to Apples. A = { WL(Apples) }\n2. C wants to read the fruit salad and requests a read lock. By the provided implementation, this causes \nC to obtain read locks to each of the two lists Apples and Bananas in arbitrary order. C aquires the read \nlock to Bananas and requests the read lock to Apples, which blocks because A currently holds that lock. \nC = { RL(Bananas), REQUEST(RL(Apples)) }\n3. B wants to create an event in Bananas and requests the write lock to Bananas. This blocks because C \ncurrently holds that lock. B = { REQUEST(WL(Bananas)) }\n4. A forwards its event to FruitSalad, regarding its change to Apples. A attempts to acquire the read \nlocks to all lists in FruitSalad in order to forward this event. When attempting to acquire the read lock to \nBananas, this request is blocked because there is a waiting request for the write lock to Bananas by B. \nTherefore A = { WL(Apples), REQUEST(RL(Bananas)) }\n\nAs you can see, all of the lists are awaiting requests held by each other and we have a deadlock. This \nsucks! I do not think it is appropriate to change the preferences on the lock orders because doing so \nmay severely limit the original concurrency goals of Glazed Lists.\n\nFor now, I will continue to ponder a better solution. "); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=2)\nMy request for help on Usenet\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I was thinking about this problem and I came to a solution. Supporting arbitrary\nsources for CompositeList is not only difficult, it is impossible!\n\nThis is because allowing arbitrary numbers of threads and sources for each list\ncan always lead to potential deadloch situations. For example, suppose we have\nthe following.\nlist A\nlist B\nthread C reading the composite list (A, B) called \"Fruit Salad\"\nthread D reading the composite list (B, A) called \"Fruit Punch\"\nThen C can hold RL(A) while waiting for RL(B) while D is holding RL(B) while\nwaiting for RL(A). You guessed it, deadlock.\n\nIt may be worthwhile to investigate using a lock-aquiring-order to solve this\nproblem partially, but I still think that arbitrary graphs are impossible to\nsupport. I must also note that it is always possible to support arbitrary graphs\nwhen using a global lock. I would very much like to avoid that solution however.\n\nAnyway given my new requirements I have drafted up a new solution! Set writers\nto write change events to a queue, then attempt to obtain the composite list\nlock. Overload the composite list lock to first obtain a base lock, then to\nforward queued changes after all reader lock has been acquired.\n\nOr better, pseudocode:\n\n lock() {\n starlock.lock()\n lock all read locks\n process queue\n }\n unlock() {\n starlock.unlock()\n release all read locks\n }\n tryLock() {\n boolean success = starlock.trylock() \n if(!success) return false;\n lock all read locks\n process queue\n }\n listChanged(list event) {\n add event to queue\n cl.tryLock()\n cl.unlock();\n }\n\nDoes anybody have any comments on this strategy? The biggest new idea is that\nreaders may sometimes be called upon to forward changes when they are acquiring\nthe read lock."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("My solution worked and this issue has been resolved!\n\nHow satisfying!!\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(26)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Replace global lock with reader/writer locks"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current Glazed Lists uses global locks for all reads and writes. It would higher performance to use a \nreader/writer lock instead.\n\nThe reader/writer lock could be either requested via eventList.getLock().aquireRead() or via \neventList.aquireReadLock(). I think I prefer using getLock(), which returns an object implementing a \nReaderWriterLock interface. That way I can easily swap out the lock implementation."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("We've swapped the global synchronized on root list to global reader writer locks.\n\nWe can now replace that with local locks."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I am marking this problem as \"fixed\" and creating a new issue which covers concurrent mutationlist \nmodifications."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(27)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList not implemented"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists needs a UniqueList that can take two lists and show only the unique values."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin Maltby has got a working implementation! What a stallion!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueLists are now implemented to provide a unique view of a given list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Jesse Wilson broke it with the addition of the testUpdateDeleteCollide test \ncase.\n\nThe result of this test was the following Exception...\n\n [junit] Testcase: testUpdateDeleteCollide(com.odellengineeringltd.glazedlist\ns.util.UniqueListTest): Caused an ERROR\n [junit] cannot get from tree of size 1 at 1\n [junit] java.lang.IndexOutOfBoundsException: cannot get from tree of size 1\nat 1\n [junit] at com.odellengineeringltd.glazedlists.util.IndexedTreeNode.getN\nodeWithIndex(IndexedTreeNode.java:81)\n [junit] at com.odellengineeringltd.glazedlists.util.IndexedTree.getNode(\nIndexedTree.java:64)\n [junit] at com.odellengineeringltd.glazedlists.SortedList.get(SortedList\n.java:239)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueList.get(Uniqu\neList.java:167)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueList.processIn\nsertEvent(UniqueList.java:259)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueList.notifyLis\ntChanges(UniqueList.java:209)\n [junit] at com.odellengineeringltd.glazedlists.event.ListChangeSequence.\ncommitAtomicChange(ListChangeSequence.java:134)\n [junit] at com.odellengineeringltd.glazedlists.SortedList.notifyListChan\nges(SortedList.java:146)\n [junit] at com.odellengineeringltd.glazedlists.event.ListChangeSequence.\ncommitAtomicChange(ListChangeSequence.java:134)\n [junit] at com.odellengineeringltd.glazedlists.AbstractFilterList.handle\nFilterChanged(AbstractFilterList.java:187)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueListTest$IntAr\nrayFilterList.setFilter(UniqueListTest.java:526)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueListTest.testU\npdateDeleteCollide(UniqueListTest.java:542)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is broken because some naive programmer guy didn't do a very good job at implementing \nSortedList. "); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed as a consequence of bug 37 being fixed.\n\nI performed the Unit Tests and all worked perfectly, for 1000 elements filtered 10 times."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(28)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Lists may fail if the change event indicies are out of order"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Lists that evaluate the values such as SortedList and FilteredList may break if the change event has \nindicies that arrive out of order.\n\nThere should be a test for this added to the unit tests and a fix should be made if the problem is \nlegitimate."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have created a JUnit test that confirms the presense of this bug. That test has been added to CVS.\n\nThe solution as I see it is to add a method in the ListChangeSequence that is called from \ncommitAtomicChanges(). Such a method would examine the list change events and re-order them into \norder of increasing index.\n\nThe reordering could potentially also merge adjacent list change blocks but this is not totally necessary."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The ListChangeSequence now bubble-sorts change blocks when the change is commited.\n\nBubbleSort was used because it only swaps adjacent entries. When two change blocks are swapped, \ntheir indicies must be modified relative to one another. Therefore bubble sort is the simplest sort to \nimplement."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug appears to remain broken:\n\n [junit] Testcase: testIndexOutOfOrder(com.odellengineeringltd.glazedlists.test.IndexOrderTest): \nFAILED\n [junit] expected:<[[I@c05d3b, [I@28f6ee, [I@6bade9, [I@66afb3, [I@9945ce, [I@b5dac4, [I@2d96f2, \n[I@110003, [I@17e4ca, [I@adb1d4, [I@75d6ab, [I@60a26f, [I@484a05, [I@f39b3a, [I@542a75, \n[I@af993e, [I@75e4fc, [I@c62c8, [I@2940b3, [I@56b6b9, [I@f66cff, [I@6de49c, [I@bbf1ca, [I@ff0dde, \n[I@e78fc6, [I@901437, [I@1f6226, [I@64ea66, [I@58f9d3, [I@79a2e7, [I@b60280, [I@5e55ab, \n[I@4a55f2, [I@5093f1, [I@20bf2c, [I@e6f7d2, [I@9836ed, [I@3e0ebb, [I@39443f, [I@afae45, [I@da4b71, \n[I@8f1d7e, [I@d9660d, [I@bb0d0d, [I@55e55f, [I@45c859, [I@64883c, [I@2c1e6b, [I@811c88, \n[I@785d65, [I@3bc257, [I@53f67e, [I@5bdc50, [I@dd3812, [I@8c436b, [I@9e5c73, [I@c791b9, \n[I@3020ad, [I@b15692, [I@aa9f99, [I@d42d08, [I@d86fd3, [I@958bb8, [I@7f4ec, [I@60e128, \n[I@5e1077, [I@8b3364, [I@db05b2, [I@530cf2, [I@76fba0, [I@81ed9e, [I@175422, [I@949f69, \n[I@6dadf9, [I@b8d6f7, [I@290fbc, [I@c80b01, [I@4aa0ce, [I@833eca, [I@8f5824, [I@e3cd51, [I@bc8e1e, \n[I@1671b2, [I@82764b, [I@2452e8, [I@bf3d87, [I@60991f, [I@e4f7c2, [I@45f0e3, [I@c9d92c, [I@d0fafc, \n[I@dc6b5, [I@70bea5, [I@f47396, [I@d0af9b, [I@b8f8eb, [I@de17f4, [I@f6ba0f, [I@313906, [I@96cf11, \n[I@f47bf5, [I@f6438d, [I@cd0888]> but was:<[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, \n18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, \n44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \n70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, \n96, 97, 98, 99, 100, 101]>\n [junit] junit.framework.AssertionFailedError: expected:<[[I@c05d3b, [I@28f6ee, [I@6bade9, \n[I@66afb3, [I@9945ce, [I@b5dac4, [I@2d96f2, [I@110003, [I@17e4ca, [I@adb1d4, [I@75d6ab, \n[I@60a26f, [I@484a05, [I@f39b3a, [I@542a75, [I@af993e, [I@75e4fc, [I@c62c8, [I@2940b3, [I@56b6b9, \n[I@f66cff, [I@6de49c, [I@bbf1ca, [I@ff0dde, [I@e78fc6, [I@901437, [I@1f6226, [I@64ea66, [I@58f9d3, \n[I@79a2e7, [I@b60280, [I@5e55ab, [I@4a55f2, [I@5093f1, [I@20bf2c, [I@e6f7d2, [I@9836ed, \n[I@3e0ebb, [I@39443f, [I@afae45, [I@da4b71, [I@8f1d7e, [I@d9660d, [I@bb0d0d, [I@55e55f, \n[I@45c859, [I@64883c, [I@2c1e6b, [I@811c88, [I@785d65, [I@3bc257, [I@53f67e, [I@5bdc50, \n[I@dd3812, [I@8c436b, [I@9e5c73, [I@c791b9, [I@3020ad, [I@b15692, [I@aa9f99, [I@d42d08, \n[I@d86fd3, [I@958bb8, [I@7f4ec, [I@60e128, [I@5e1077, [I@8b3364, [I@db05b2, [I@530cf2, [I@76fba0, \n[I@81ed9e, [I@175422, [I@949f69, [I@6dadf9, [I@b8d6f7, [I@290fbc, [I@c80b01, [I@4aa0ce, [I@833eca, \n[I@8f5824, [I@e3cd51, [I@bc8e1e, [I@1671b2, [I@82764b, [I@2452e8, [I@bf3d87, [I@60991f, \n[I@e4f7c2, [I@45f0e3, [I@c9d92c, [I@d0fafc, [I@dc6b5, [I@70bea5, [I@f47396, [I@d0af9b, [I@b8f8eb, \n[I@de17f4, [I@f6ba0f, [I@313906, [I@96cf11, [I@f47bf5, [I@f6438d, [I@cd0888]> but was:<[0, 1, 2, 3, \n4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, \n32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, \n58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, \n84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101]>\n [junit] at \ncom.odellengineeringltd.glazedlists.test.IndexOrderTest.testIndexOutOfOrder(IndexOrderTest.java:85)\n [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:\n25)\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The current ordering of events appears to be inverted and thus events appear in \ndecreasing order."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Again! This bug has haunted me all day. \n\nThe solution sorts and combines properly, but not necessarily too efficiently. If this proves to be a \nproblem, I'll send the optimization police onto it!\n\nHere's an example of the (poor) runtime. Changes are measured in loop executions.\n [junit] Changed! blocks before: 142, after: 142, changes: 141\n [junit] Changed! blocks before: 204, after: 1, changes: 405\n [junit] Changed! blocks before: 203, after: 88, changes: 9890\n [junit] Changed! blocks before: 306, after: 253, changes: 647\n [junit] Changed! blocks before: 541, after: 40, changes: 5257\n [junit] Changed! blocks before: 514, after: 73, changes: 27433\n [junit] Changed! blocks before: 212, after: 158, changes: 439\n [junit] Changed! blocks before: 626, after: 9, changes: 46633\n [junit] Changed! blocks before: 548, after: 67, changes: 22004\n [junit] Changed! blocks before: 141, after: 141, changes: 140\n [junit] Changed! blocks before: 411, after: 91, changes: 20767\n [junit] Changed! blocks before: 119, after: 119, changes: 118\n [junit] Changed! blocks before: 490, after: 2, changes: 32108\n [junit] Changed! blocks before: 460, after: 81, changes: 24387\n [junit] Changed! blocks before: 121, after: 121, changes: 120\n [junit] Changed! blocks before: 551, after: 81, changes: 24285\n [junit] Changed! blocks before: 219, after: 176, changes: 447\n [junit] Changed! blocks before: 623, after: 68, changes: 53634\n [junit] Changed! blocks before: 572, after: 23, changes: 23838\n [junit] Changed! blocks before: 34, after: 34, changes: 33\n [junit] Changed! blocks before: 41, after: 29, changes: 919\n [junit] Changed! blocks before: 55, after: 55, changes: 54\n [junit] Changed! blocks before: 77, after: 50, changes: 2964\n [junit] Changed! blocks before: 65, after: 1, changes: 127\n [junit] Changed! blocks before: 46, after: 46, changes: 45\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(29)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("ToString on BasicEventList, MutationList no good"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The toString value on Java Lists is like \"[lemon, orange, apple, banana]\"\nbut on Glazed Lists it is like \"com.odellengineeringltd.glazedlists.BasicEventList@f4d448ce\""); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The toString value on Glazed Lists is the same as the toString value on Java \nLists now."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(30)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Verify ListTable changeSizeRepaintAllThreshhold works"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Some users have had problems with the behaviour of Glazed Lists when the \nchangeSizeRepaintAllThreshhold is low.\n\nVerify that the behaviour is:\n - correct\n - faster than using single changes"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've done some research and learned a lot about the behaviour of JTable.\n\nWhen you give JTable a large set of small changes, it has different behaviour depending on what its \nrenderer is doing. If the table rows all have a uniform height, then the JTable is very fast at handling \nsuch a set of changes. If the table rows have nonuniform height, however, the JTable is very slow.\n\nTherefore I am going to make a few small changes:\n - I am going to further document the changeSizeRepaintAllThreshhold and its relationship with the \ntable speed in both the ListTable class and in the performance section of the tutorial\n - I am going to change the default value of changeSizeRepaintAllThreshhold to 250, and add proper \ngetter and setter values. The table performance was intolerable with variable row sizes when there were \nmroe than 250 changes, but may be acceptable below that.\n\nNote that the changeSizeRepaintAllThreshhold is an unwanted hack to work around the poor behaviour \nof JTable in such situations. It has major problems because it forces the table to lose its selection and \nits scrolling."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have changed the behaviour of repaintAllThreshhold to default to Integer.MAX_VALUE. Therefore new \nrepaintAllThreshhold must be set manually to be enabled. This is good because the whole thing is kind \nof an ugly hack to get around the poor behaviour of the JTable's ability to track row height. \n\nI believe the whole problem stems from a poor implementation of SizeSequence in the JVM. I think a \ntree-based structure similar to the one used for SparseList may be more appropriate."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(31)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("More powerful TableComparatorSelector"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists' TableComparatorSelector does not:\n - have chevrons or arrows to indicate sort order\n - allow sorting by multiple columns simultaneously\n\nThese should be implemented by \"beefing-up\" TableComparatorSelector."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've moved this from priority 4 to priority 2 due to demand!\n\nI also got some additional info from the users mailing list.\n\nSource for a tool that does table header stuff well:\nhttp://www.fawcette.com/javapro/2002_08/magazine/columns/visualcomponents/\n\nAlso - the table should support raw-order sort."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have started preliminary work on this.\n\nI have yet to do the header arrows and multiple-column sort, but the new TableComparatorSelector is \nalready much, much better."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added support for multiple column sort, and arrow icons.\n\nHeader/table sorting is now a FIRST CLASS feature in Glazed Lists.\n\nAll that's left is support for raw sort order. I will enter a new bug for that as the support should be done \nin SortedList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(32)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CachingList could be more powerful"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As Kevin and I were working on the CachingList problems today, we came up with some clever new \nideas for a powerful replacement for CachingList:\n\n - background loading. Calls to get() return a default value immediately, then load the actual value in \nthe background. Finally fire a updated() event when the actual value is loaded.\n\n - bulk loading via an API. Create a Caching API for performing BulkLoading. This is not really a \nMutationList because it would require more than an EventList as a source. Bulk loading could be faster \nbut it is definitely a big fat ugly pig to implement.\n\n - footprint that is bounded by max cache size and NOT by the size of the source list. This will be \nnecessary for arbitrarily large source lists on finitely powerful computers.\n\nRegardless of where we go forward with Caching, it will be necessary to find some real-world cases that \nrequire caching before we commit serious time to the problem. Such cases will enable us to have a \nuser's perspective on caching."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(33)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList raw order support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SortedList should support raw order when the current comparator is NULL."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is now high priority as it is needed for making TableComparatorChooser work better."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Done!\n\nAlthough the SortedList now supports raw-order sort, this is not supported by \nTableComparatorChooser."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(34)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList sometimes does not forward events on a DELETE"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueList currently does not forward events on when a DELETE is encountered in \nthe following instance:\n\nThe element being removed is modelled in the unique view and has at least one \nduplicate. This should result in the duplicate being modelled in the unique \nview and an update event being forwarded.\n\nIn some circumstances, such as on a call to clear() on the source list, \nforwarding this event causes the following exception:\n\nChange blocks U.0 and D.0-1 intersect\njava.lang.IllegalStateException: Change blocks U.0 and D.0-1 intersect\nat com.odellengineeringltd.glazedlists.event.ListChangeBlock.requiresSwap\n(ListChangeBlock.java:185)...\n\nThis fix will require altering the current strategy for dealing with change \ncollisions in ListChangeBlock."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueList now forwards events correctly in all cases when handling DELETE \nevents."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(35)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList needs a means of forwarding non-mandatory change events"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueList needs to provide access to non-mandatory change events for \noverlaying lists which want to listen to them."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The solution is for UniqueList to use multiple ListEventAssemblers and to allow\nlisteners to choose which ListEventAssembler they subscribe to by overloading\nthe addListEventListener() method."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(36)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("GlazedLists requires a counted, unique view of a given list."); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("This list type is based on the Bag ADT and is currently unnamed.\n\nThis class will sit on top of a UniqueList, and listen to all change events \nfrom the UniqueList to correctly provide access to not only a view which is \nguaranteed to be unique, but also the number of duplicate values for each \nunique value.\n\nAn example usage would be a list of votes for favourite pop.\n\nSource Unique View Unique, Counted\n------------------------------------------------------\nPepsi | Coke | Coke x 3\nCoke | MountainDew | Mountain Dew\nSprite | Pepsi | Pepsi x 2\nPepsi | Sprite | Sprite\nMountain Dew | |\nCoke | |\nCoke | |\n------------------------------------------------------\n\nClearly this could provide a valuable list view."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Specified an explicit dependency upon Issue 35."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added the getCount() method which works well and was very easy to\nimplement. Like all reading methods, this method is not thread safe. I think it\nwould be a good idea to comb through the Javadocs before 1.0 and add a standard\nthread safe warning to methods like these.\n\nAlso I attempted to implement listeners for the bag events but I failed because\nsometimes updates are thrown that collide with deletes or inserts. For example,\nif I have a change that deletes multiple instances of a value, the first few\ndeletes will throw updates and the last delete will throw a delete. These\nintersect and the ListEventAssembler complains. So this is on hold for now."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed for now! We may add listeners for change counts later, but that will require some work on \nListEventAssembler.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(37)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed Lists version 0.8 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists version 0.8 is the last release before Glazed Lists undergoes the major API change.\n\nGlazed Lists 0.8 will be a release that should be permanently available on the Glazed Lists webpage for \nexisting users, but such users should be encouraged to migrate to Glazed Lists 0.9.\n\nGlazed Lists v0.8 does not inlcude:\n - the renaming of APIs and classes\n - the new concurrency model\n\nIt depents upon the following issues:\n 33 - SortedList raw order support\n 34 - UniqueList sometimes does not forward events on a DELETE\n 29 - ToString on BasicEventList, MutationList no good\n 30 - Verify ListTable changeSizeRepaintAllThreshhold works"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This issue depends on the outstanding bugs in the 0.8 release. It does not require new features or \nenhancements."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The 0.8 release can't be done until the SortedList is fixed and the UniqueList is finished (and verified)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Version 0.8 was released on April 15, 2004."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(38)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("TableComparatorChooser icon can get out of sync"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("When the sorting of a list changes, the TableComparatorChooser fails to respond to this change \nappropriately. The TableComparatorChooser should show the proper icon, even if the sorted list's \ncomparator was selected elsewhere."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("TableComparatorChooser now responds to sorting criteria changing externally."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(39)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Sorting clears selection"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This problem will be very difficult to solve using the current Glazed Lists framework, but it is a valid \nproblem. Sorting clears the selection. \n\nThe only fix I can think of is to add a new type of event alongside INSERT, UPDATE and DELETE which is \ncalled MOVE. I think it is kind of an ugly hack on principal because it will impact all other lists if it is \nimplemented. \n\nI will have to give this one some more thought. Saving selection by value may be one option but that is \nalso rather a big ugly hack."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The \"ideal\" solution looks like it will cause major headaches to the rest of the\nGlazed Lists code. I think we should consider implementing a simpler solution\nthat keeps the selection by value rather than by index. This solution is\nstraightforward to implement and will be immediately useful to Glazed Lists' users."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After a bunch of thinking I have come to the conclusion that this solution can\nbe implemented without compromising the rest of Glazed Lists.\n\nHere is my idea:\nAdd an extra property to each change event called \"is reorder\". Such events will\nalways contain remove all and insert all events so that they can be processed as\nthey are currently by regular lists. But lists that are reorder-aware can view\nthe reorder property and get an array of reorder indicies. \n\nHaving reorder supported in lists like filter list will improve performance!\nSuppose a sorted list is filtered. Then if that list is resorted, each element\nis currently tested to see if it shall still be filtered. But if the filter list\nsupports reordering, it can use the reorder and not need to refilter."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This solution is mostly implemented! The only thing left is to add support for \nmultiple sorted lists in sequence. This will be necessary for UniqueList \nsupport!\n\nOh boy!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added support to major classes: SortedList (and UniqueList), AbstractFilterList, & \nEventSelectionModel.\n\nI will also need to add support for minor classes: CachingList, FreezableList, CompositeList. I am \nconsidering adding a method forwardEvent(ListChanges c) to speed up lists like FreezableList that \nsimply propagate changes."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(40)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Sorted List fails upon intensive filtering"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SortedList fails upon an intensive amount of filtering. The SortedListTest must be updated to catch this \nfailure and the SortedList should also be fixed to remedy the problem.\n\n [junit] FILTER: 4, 5, 1, 6, 2, 3, 2, 8, 1, 3, \n [junit] SORTED: 1, 1, 2, 3, 2, 3, 4, 8, 5, 6,"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I was processing the events in the ListChangeEvent in a manner that was unsafe when there were \ninserts mixed with deletes.\n\nThe SortedList now fires all delete events first, and then goes on to handle the inserts and updates \nlater.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(41)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed Lists version 0.9 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This issue depends upon all issues to be resolved for the 0.9 release.\n\nThese issues include the name refactoring and API stability.\n\nGlazed Lists 0.9 is a release intended to have 100% compatibility with 1.0. This includes:\n - class & package names\n - concurrency strategy\n - event sequence strategy"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This release depends upon the 0.9 issues."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TO DO, left in this release, off the top of my head:\n* make final classes final\n* determine where EventList iterator/sublist goes\n* tutorial? may defer to 1.0\n* rename main package (ca.odell.glazedlists)\n* port Query stuff to use UniqueList, move package to migrationkit\n* move DEMO out of Javadocs (new demo for 1.0 definitely needed)\n* change TableFormat to not include configureTable() method"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Released!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(42)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Enable concurrent mutation list modifications"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Currently the reader/writer locks lock ALL lists when any mutation list is being modified (ie. re-sorted).\n\nThe reader/writer locks should be changed to only lock dependent lists when such a modification takes \nplace.\n\nThis applies to:\n - AbstractFilterList\n - SortedList\n - UniqueList\n - CachingList\n - and potentially others"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed . . . now the SortedList and AbstractFilterList can sort or filter multiple lists with the same source \nsimultaneously. This uses the new InternalReadWriteLock which delegates locking to a pair of \nReadWriteLocks."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(43)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Potential deadlock in CachingList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The CachingList acquires a WriteLock when it may already have a ReadLock.\n\nThis is DANGEROUS! It is possible that two CachingLists may each have readlocks, and contest over a \nwrite lock to their doom!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Simple solution: make CachingList.getReadLock() return the write lock."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(44)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("remove(object), clear() can have unwanted side effects"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Suppose we have a List \"alphabet\" containing \"A\", \"B\", \"C\", \"D\", \"E\", \"F\".\nIf we call alphabet.subList(1, 3).clear(), then the list alphabet should change to \"A\", \"D\", \"E\", \"F\".\nBut Glazed Lists clears the entire list alphabet.\n\nSimilar problems exist upon clearing filtered lists, etc.\n\nThis problem exists in the following List methods:\nclear()\nremove(Object)\nremoveAll(Collection)\nretainAll(Collection)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Hopefully, this doesn't ruin any code in place because the behaviour of SubList etc.\nare now correct. Existing code could possibly depend on the incorrect implementations!\nHopefully that does not prove to be a problem.\n\nThis fix allows us to do cool things, as I will demonstrate:\n\nSuppose we have a list, alphabet composed of { A, B, C, D, E, F, G, H, I, J, K }\nAnd we constructed a transformed list vowels, which filtered alphabet to { A, E, I }\nThen if we do vowels.clear(), we get the following result:\nalphabet becomes: B, C, D, F, G, H, J, K\n\nCool, no? This would be made more powerful with a better example. Perhaps a list of email addresses, \nand a filter list that picks the SPAM or whatever."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(45)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Add write functionality to UniqueList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The UniqueList should be writable. Some write methods to include:\n\nadd(), remove(), set() . . .\n\nThe most interesting ones to implement will be the remove() methods as they may require removing \nmultiple duplicates from the source list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added write support to UniqueList.\n\nThere is an interesting problem posed by supporting writing in UniqueList, as well as writing in other \ncode already implemented via bug 44.\n\nMethods such as clear() on a filter list may call several remove() methods on the underlying source list. \nThese remove() methods fire the event listeners and other lists receive notification for each of many \nremoves within a clear. Such listeners will likely read from their source list to respond to the change, \nand it is possible that this source list is still in the process of changing due to the clear() method. \nTherefore:\n - such methods that call multiple changing methods on their source list must be in a consistent state \nfor each such method call\n - such methods must be implemented in a way that safely handles receiving a change event after each \nsource list modification.\n\nThese multiple source method calling lists are troublesome and it may be worthwhile to find a way to \nbundle a set of methods to invoke on a source list as a group. This is a sophisticated problem and will \nrequire some research. For the time being, guaranteeing consistency and event safety should be \nsufficient."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(46)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList, FilterList fire multiple events for some operations"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("UniqueList.clear(), FilterList.clear(), SubList.clear() all can fire multiple ListEvents when only a single \noperation is performed upon them.\n\nThis can be fixed by causing such lists to not propogate changes until they are all done."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("These lists now only fire one event for the said operations. A new test class\nhas also been added to verify this behaviour."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(47)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Threshhold List"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Suppose we have a list of Objects, each of which has a date created.\n\nIt should be possible to create a filter that filters for where the date created is less than or greater than \na specified threshhold. This should be possible for any criteria that can take a range of values - in \neffect anything that is Comparable.\n\nCurrently this is possible using the AbstractFilterList, but it is not 'smart' enough to know how \nadjustments in the criteria require only a subset of the values to be readjusted. A clever implementation \nof this would use a sorted set, and binary search to find the seperator between those that meet the \ncriteria and those that do not.\n\nI was thinking a \"Date Slider\" Swing widget would be a good prototype of this!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("assigned issue to myself"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("I've hammered out some code towards the creation of this list that is yet to be \nin cvs, but hopefully by the end of the month this list should be available to \nthe world. My initial implementaion followed the design of UniqueList which \nprovides explicit sorting by wrapping a SortedList.\n\nHowever, during construction it occurred to me that the explicit sorting might \nnot be desirable. My second implementation sorts the list internally to keeps \ncalls to setThreshold() super fast, but does not enforce a particular sort \norder."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Well after roughly a month out of town, and 4 different versions of the code \nfor this feature, ThresholdList is nearing public release.\n\nWhile keeping the underlying sort order might offer some business value to this \ntransformation, doing so comes with a significant performance penalty. As \nsuch, I have returned to the earlier requirement for this transformation to \nexplicitly sort the list. The sorting is performed internally for performance \nreasons over simply wrapping a SortedList as UniqueList does.\n\nCurrently I am working to clean up the implementation a bit after having Jesse \ncode-review my classes. With any luck this code should be available within 2 \nweeks at the latest."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin's code was 1000x better today than two weeks ago. He's modest, but today's code is really good.\n\nWe have added 3 public classes to the codebase:\n - ThresholdEvaluator interface gets an int from a given Object\n - ThresholdList, sorts and limits a list by a ThresholdEvaluator value\n - ThresholdRangeModelFactory - creates range models for use in a Slider\n\nThis stuff also lends itself to use with ComboBoxes and such!\n\nTo Do:\n - test the heck out of it\n - add Kev's tutorial page to website, revise tutorial\n - integrate into demo\n\nWe're almost done!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(48)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Migrationkit's DynamicQueryList fails to forward events"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The Migrationkit's DynamicQueryList class is not forwarding events."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has already been fixed.\n\nThe fix is NOT in the Glazed Lists 0.9 release, but it will be in the next Glazed Lists release. The fix is \nalso available via CVS."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(49)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Tutorial v. 0.9"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists needs a new tutorial. It would be great if this tutorial involved a newer, more exciting and \nmore powerful demo app.\n\nMy current two ideas are:\n - a bugzilla XML browser\n - a Pop3 client\n\nSuch involve lots of lists and could take good advantage of Glazed Lists' ability to transform lists.\n\nThe demo should involve:\n - Multiple-criterea sorting\n - Text Filtering & Custom Filtering\n - UniqueList, UniqueList on a derived list\n - Transformed List\n - JTable, JComboBox & JList\n\nThe demo should not rely on third-party libraries or tools for simplicity."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("progress on this is going very well! I already have a preview of the tutorial\nonline, and a few more steps and it will be done.\n\nTodo: \n1. Concurrency\n2. CompositeList (?)\n3. Performance"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added Concurrency. \n\nThis tutorial needs to be revamped and sexed up, but I don't feel like doing it! I wonder if we can \nconvince one of our users to do it! ha ha ha."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(50)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SWT Support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists does not support SWT. This toolkit is growing in importance and Glazed Lists is well suited \nfor this platform.\n\nSome things to consider:\n - I need an SWT 'expert', either by becoming one or by finding a volunteer\n - SWT compilation into the .jar file must be conditional. SWT support should be in source-form only \nand compiled only if SWT classes are available on the user's class path.\n - From my initial research, SWT is not as model-driven as Swing. Although this does not pose a \nproblem it may require a change in approach\n - We need to choose an SWT version to support. 3.0 is coming out soon but I have no idea what the \nactual SWT users in the field are using."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added some SWT support to Glazed Lists!\n\nI ported the following classes from Swing to SWT:\n * EventTableModel (now EventTableViewer)\n * TableFormat\n * TextFilterList\n\nYet I still have some issues to resolve:\n * concurrency support in EventTableViewer\n * hitting ENTER in the TextFilterList\n * EventTableViewer handling column widths\n * EventTableViewer handling column alignment\n * EventTableViewer handling Images as cell contents\n * EventTableViewer sorting via clicking on the table's header\n\nSo I have my work cut out for me. SWT is not that tricky to hack on, but it is kind of a pain to get up \nand running.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Today I added support for EventTableViewer keeping the Selection between ListChanges. The \nimplemented algorithm is simple and reliable but slow. It will be desirable to speed this up to support \nreally big tables!\n\nSWT is becoming a high priority at O'Dell Engineering so I think this bug will receive some well deserved \nattention."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Today I added some support for SWT's checked tables.\n\nThe classes are \"Checkable\" and \"TableCheckFilterList\". There are some limitations, however.\n* TableCheckFilterList inspects the table's check items so there may not be any TransformationLists \nbetween the TableCheckFilterList and the EventTableViewer.\n* Checkable objects may not be shared between tables.\n\nIf I can think of work-arounds or fixes for these limitations, I'll post another update.\n"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(51)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Implement Chunk Transfer Protocol client & servers"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("We have hacked out a basic plan for the initial network protocol for Glazed Lists.\n\nWe are going to use a layered protocol to isolate concerns:\n - \"Chunk Transfer Protocol\" is our base protocol. This is a simplification of HTTP/1.1 with chunked \nencoding. We would like Glazed Lists to work through HTTP proxies and HTTP-aware firewalls so this \nprotocol shall be a subset of HTTP/1.1.\n - \"Update Subscription Protocol\" is an update-push protocol that sits on top of CTP and adds some \napplication-specific features. This will initially consist of update sequencing. Eventual features for this \nare digitally signed updates, peer-to-peer support and NAT evasion.\n - Glazed Lists on the network will specify an encoding for list updates that can be transferred via USP. \n\nAll encodings must have the following properties:\n - well documented to allow for alternative implementations\n - extendible without breaking clients using previous versions\n - language and platform neutral\n - simple!\n\nAll that said, we need to implement the first step, Chunk Transfer Protocol. Here are the interfaces for \nthe initial version of CTP:\n\nCTPServerProtocol\nvoid sendResponse(int code, Map headers) throws CTPException;\nvoid sendChunk(byte[] data) throws CTPException;\nvoid close();\nCTPServerHandler\nvoid receiveGet(CTPServerProtocol source, String uri, Map headers);\nvoid connectionClosed(CTPServerProtocol source, Exception reason);\n\nCTPClientProtocol\nvoid sendGet(String uri, Map headers) throws CTPException;\nvoid close();\nCTPClientHandler\nvoid receiveResponse(CTPClientProtocol source, int code, Map headers);\nvoid receiveChunk(CTPClientProtocol source, byte[] data);\nvoid connectionClosed(CTPClientProtocol source, Exception reason);\n\nIt should be straightforward to create a simple implementation that uses sockets. This design should \nalso hopefully be extendable for use with Java's buffered IO, java.nio."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("About 90% of ChunkedTransferProtocol is implemented.\n\nLeft to do:\n - Buffer sizing, including setting the initial size & max size\n - Handling method calls from other threads\n - Listen port selection\n - Stop() method\n\nMy ChunkedTransferProtocol implementation has the following notes:\n - it starts its own thread that does all the networking via NIO\n - it uses a subset of HTTP that should slip nicely through proxy servers\n - it handles the case where the proxy removes chunking (although no Content-Length)\n - Server and client share the same connection class\n\nHaving come this far, I will leave the remaining four tasks until I have built more of USP on top of CTP. \nUSP is \"Update Subscription Protocol\", I will be creating an issue for tracking its development."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(52)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Support 'nested' change events"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Adding support for nested change events may simplify the code and may even make it more powerful.\n\nCurrently, some classes such as TransformationList implement clear(), removeAll() etc. as a series of \nremove() calls. This fires a series of events when only one event should be fired.\n\nThe solution is to create 'nested' change events such as\nbeginNestedChange()\ncommitNestedChange()\n\nwhich can contain within it many calls to beginChange() / commitChange(), where such commits do not \nactually send the events."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added support for nested changes.\n\nThe new method is:\nbeginEvent(true), which means \"Begin an event with support for nested changes\"\nas an alternative to \"beginEvent(false) and beginEvent(), which mean \"Begin an\nevent that throws an exception when creating a nested change\".\n\nThis is already in use by clear(), removeAll() and retainAll() in\nTransformationList and replaceAll() in UniqueList. If implementing this in your\ncode, remember that Iterators behaviour will change if they stop receiving\nchange event notification.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(53)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Protected constructors on final classes"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Both ReadOnlyList and ThreadSafeList have protected constructors. This is most \nlikely in error, particularly because both classes are final. These should be \nmade public (I would do it but my CVS still doesn't want to work at my new \nplace)."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was an easy fix. We have to get Kevin some CVS access!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(54)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("EventSelectionModel does not support concurrency"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("In implementing EventSelectionModel we made some incorrect assumptions about\nmultithreading. The problem is that although the accessing thead will usually be\nthe event dispatch thread, we must be able to read the model while another\nthread is modifying the source list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added concurrency support with an Internal lock."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(55)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList events delete indicies that do not exist"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I ran into a problem when coupling EventSelectionModel\nand UniqueList, so I decided to enhance the ConsistencyTestList\nto verify that UniqueList is well behaved.\n\nFrom my tests, the UniqueList can sometimes delete indicies\nthat have not yet been created! For example, on a list of\nsize 5, it might delete at 6 and later on insert at 6 to\nretain size consistency.\n\nI am going to dive into the UniqueList code to attempt to\nfind the problem. Hopefully it is either a mis-reported\nproblem or an easy fix!\n\nTo reproduce, add the following line to the end of the\nUniqueList constructor, and run the JUnit tests.\n addListEventListener(new ca.odell.glazedlists.test.ConsistencyTestList(this,\n\"unique\"));\n\nThe (first of many) exception I received was:\n\n [junit] java.lang.Exception: unique/1 cannot delete at 2, size is: 2\n [junit] at\nca.odell.glazedlists.test.ConsistencyTestList.listChanged(ConsistencyTestList.java:63)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:248)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:221)\n [junit] at ca.odell.glazedlists.UniqueList.listChanged(UniqueList.java:152)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:248)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:221)\n [junit] at ca.odell.glazedlists.SortedList.listChanged(SortedList.java:174)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:248)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:221)\n [junit] at\nca.odell.glazedlists.AbstractFilterList.handleFilterChanged(AbstractFilterList.java:196)\n [junit] at\nca.odell.glazedlists.test.IntArrayFilterList.setFilter(IntArrayFilterList.java:33)\n [junit] at\nca.odell.glazedlists.test.UniqueListTest.testUpdateDeleteCollide(UniqueListTest.java:514)\n [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n [junit] at\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n [junit] at\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n [junit] at java.lang.reflect.Method.invoke(Method.java:582)\n [junit] at junit.framework.TestCase.runTest(TestCase.java:154)\n [junit] at junit.framework.TestCase.runBare(TestCase.java:127)\n [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)\n [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)\n [junit] at junit.framework.TestResult.run(TestResult.java:109)\n [junit] at junit.framework.TestCase.run(TestCase.java:118)\n [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)\n [junit] at junit.framework.TestSuite.run(TestSuite.java:203)\n [junit] at\norg.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)\n [junit] at\norg.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:524)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have found the cause of this problem!\n\nThe problem is that UniqueList uses \"delayed inserts\". This means it does not\nadd into to the event list any insert events until all delete and update events\nhave been inserted.\n\nThe problem is that the delete indicies are all offset the insert indicies, and\nthe insert indicies are missing.\n\nHere is a simple example.\nI have a list \"A B\" that I change to \"C\".\n\nThe change event should be \"delete 0-1, insert 0\"\n\nBefore re-ordering, it is currently \"delete 1-2, insert 0\", which is wrong and\nillegal.\n\nThe solution is to keep an offset index that increments with every index, and\nthis value is subtracted from every delete.\n\nNow, all's left is implementation!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("fixed! I would like Kevin to look over my fix to verify that I did the right thing!\n\nPerhaps we could add some more tests to verify that this kind of thing doesn't\nhappen again!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(56)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList replaceAll() can clear selection"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The replaceAll() method should use UPDATE events whenever possible.\nCurrently it forwards DELETE/INSERT events that can clear selection.\n\nIn order for UniqueList to completely replace query lists, this functionality is\nabsolutely mandatory."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After a bunch of thinking I have come to the conclusion that this solution can\nbe implemented without compromising the rest of Glazed Lists.\n\nHere is my idea:\nAdd an extra property to each change event called \"is reorder\". Such events will\nalways contain remove all and insert all events so that they can be processed as\nthey are currently by regular lists. But lists that are reorder-aware can view\nthe reorder property and get an array of reorder indicies. \n\nHaving reorder supported in lists like filter list will improve performance!\nSuppose a sorted list is filtered. Then if that list is resorted, each element\nis currently tested to see if it shall still be filtered. But if the filter list\nsupports reordering, it can use the reorder and not need to refilter."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Whoops! My bad. \n\nThe previous comment is supposed to be on Issue 39."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("From my analysis, this problem may require changing the way the UniqueList\nlistChanged() method is handled. I think that a 2-pass algorithm may remove all\nthe events that are currently not optimized.\n\nPass 1: Update the duplicatesList by inserting a non-duplicate for every\ninserted and updated value, remove all deleted values. Create a working array\ncontaining the previous values for each updated index: either DUPLICATE or\nNON-DUPLICATE\n\nPass 2: Iterate simultaneously through the update event and the previous value\narray. For each index, determine if it is now a DUPLICATE or NON-DUPLICATE and\ncompare that to the previous value. Forward events as necessary."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As a consequence of much thought on Friday afternoon, this bug is very fixed and \nthe solution is awesome. Much thanks to Kevin for being my brain-storming buddy \non this solution.\n\nHorray!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(57)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed Lists version 1.0 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This issue depends upon all issues to be resolved for the 1.0 release.\n\nGlazed Lists 1.0 is the production-quality and feature-complete release of\nGlazed Lists. There are many issues that must be resolved for this release.\n\n - UniqueList replaceAll() can clear selection\n - CompositeList not thread-safe\n - Glazed lists on the network\n - Tutorial v. 0.9\n\nSome issues would also be 'nice-to-have' for 1.0. In particular:\n - Sorting clears selection (this may require a work-around implementation)\n\nAs of June 25 I am marking all non-1.0 issues as lowest priority. Such issues\nmay be removed at a later date if it is determined that they shall not be\nimplemented."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(58)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList and SortedList not optimized for contains and containsAll methods"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Current implementations of both SortedList and UniqueList do not take advantage \nof optimizations available since the lists are in sorted order. Namely, the \ncontains and containsAll methods could boast significant performance \nimprovements if they are optimized."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Adding this optimization to SortedList is simple. Overload contains with a one \nline method which returns true iff sorted.getNode returns non-null. For \ncontainsAll, simply iterate through the collection and call contains for each \nelement."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The enhancement for UniqueList must be a little more complex. For a simple and \nreasonably fast implementation, the underlying SortedList's contains and \ncontainsAll methods could be called. However, this produces very odd and \ncounter-intuitive best and worst cases. The best case is to have no duplicates \nin the UniqueList, since no duplicates would be repeatedly compared. This \nimplementation would yield a worst case of having n identical items in the \nUniqueList, or just one element in the compressed view."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("However, these best and worst cases SHOULD be the exact opposite for a \nUniqueList. The above worst case SHOULD require only a single comparison for a \ncall to contains and SHOULD be the best case for searching a UniqueList. \nLikewise, the above best case should be the worst case as it would be the \nlargest possible set to search on.\n\nDue to the fact that the SparseList ADT isn't inherently a sorted set, further \noptimization is a little more tricky. I'm trying to come up with a good way to \ntake advantage of searching only the unique view. Any clever ideas?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Implementation of this should simply use the public API method \"get(index)\" and\na binary search.\n\nThe following methods should also be implemented:\n indexOf()\n lastIndexOf()\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Kevin added binary search methods to both these classes. 50% faster*.\n\n\n*based on 1 test."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(59)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WORKSFORME"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("read-only access is broken once a ReadOnlyList is decorated by a writable list."); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The error is not to be found in ReadOnlyList but as a consequence of layering \nwith ReadOnlyList.\n\nConsider the following:\n\nA BasicEventList containing aribitrary data.\n\nA ReadOnlyList wrapping that data to prevent changes.\n\nA SortedList wrapping the ReadOnlyList to provide a sorted view of that read-\nonly data.\n\nThis will scenario will allow a write operation on the SortedList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("This problem cannot be replicated with a fresh checkout of the source. I \nimagine my local copy of ReadOnlyList was out of sync due to some testing and \namidst my recent CVS troubles I had forgotten about the change. This issue \nshould be closed."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(60)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList fires insert & delete instead of updates"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("When updating a range of values in a sorted list, the sorted list sends a \nsequence of delete and insert events instead of update evetns, even if the order \ndoes not change."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I am very close to having a complete solution to this.\n\nThe current potential problems - \n - multiple updates co-existing with non-updated indices\n - updates with multiple copies of the same source value\n - high-performance (the current implementation has some O(n^2) methods)\n\nBut the solution is good and it seems to work. Oh boy!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Upon further research, some discoveries:\n - multiple copies of the same value breaks because of the non-deterministic insert order in \nIndexedTree. I will try to fix this.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The \"non-deterministic\" insert order from before is a lie - it is actually just \"insert at head\" instead of \nthe preferred \"insert at tail\". This has been changed and now SortedList works with multiple values \nquite well!\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This fix for this issue was very involved and required the addition of two helper classes to SortedList, \nIndicesPendingDeletion, a wrapper around a TreeSet, and IndexNodePair, a union of a node and the \nindex from which it came."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(61)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SetEnabled(boolean) on EventSelectionModel"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("It would be great if we could disable changing of the table selection via a\nsetEnabled() method on EventSelectionModel.\n\nI'm not 100% sure this will work well with JTable & JList, but if possible, it\nwould make for a great addition to the JTable's existing functionality."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("EventSelectionModel.setEnabled(false) will now prevent the user from changing the selection.\n\nThe selection can still be changed however. If the list changes, the selection may change. For example, \nif a selected item is deleted, it will no longer be selected!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(62)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList indexOf() etc. make multiple tree calls"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current implementation of SortedList has a faster version of the methods indexOf, lastIndexOf and \ncontains. These methods perform binary searches of the list using the sorted ordering. These \noperations make O(log n) tree calls, each of which as an O(log n) cost. Total cost is O(log n * log n). For \nexample, on a tree of size 1000, this cost is O(100).\n\nThese methods can be made faster by using calls on the sorted tree. Such an implementation will have \na total cost of O(log n). For example, on a tree of size 1000, this cost is O(10).\n\nThe IndexedTree classes may need to be modified for new indexOf methods."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Revised priority, etc. of bug which were wrong."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin implemented the fix, I am merely the reporter. Here is what Kevin had to say:\n\n\nSortedList Changes:\n\n- Fixed flawed comment for lastIndexOf()\n- Changed indexOf(), lastIndexOf(), and contains() so that they now call\n the corresponding method on the sorted tree to cut the cost down to\n one tree call from SortedList giving O(log(n)) runtime.\n- Removed now redundant binary search methods\n- Improved the IndexedTreeNodeComparator inner class to compare both\n standard Objects and IndexedTreeNodes to make this bug fix possible\n \nSortedListTest Changes:\n- Added an additional test to each of the indexOf() lastIndexOf() and contains()\n testcases to test on an empty list.\n \nIndexedTree Changes:\n\n- Added support for indexOf(), lastIndexOf() and contains()\n \nIndexedTreeNode Changes:\n- Implemented support for each of the new methods on the IndexedTree interface.\n\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(63)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("EventLists don't get garbage collected unless source list is garbage collected.."); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("With the current system, once an EventList is created it lives until the app \nterminates, or the source list is garbage collected. EventLists need to have \ndefined lifecycle methods, such as dispose() for example, to allow them to be \npicked up by gc() when you no longer need them.\n\nFor most applications the EventLists used to transform a source list will live \nfor the entire lifespan of the source list. However, it is concievable that an \napplication might destroy and create lists on a particular source over time and \nthose should be garbage collected when possible."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("changed priority."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added a dispose() method to TransformedList.\n\nThe UniqueList overrides this method to manually dispose the SortedList, other chained lists should do \nthis too!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(64)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WORKSFORME"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Multithreading problem in demo app & tutorial part 6."); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I get the following exception, I am assuming it is due to the issues being loaded before the GUI is \ncompletely constructed.\n\njava.lang.NullPointerException\n at IssuesUserFilter.filterMatches(IssuesUserFilter.java:74)\n at ca.odell.glazedlists.AbstractFilterList.listChanged(AbstractFilterList.java:138)\n at ca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:289)\n at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:256)\n at IssuesList.listChanged(IssuesList.java:82)\n at ca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:289)\n at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:256)\n at ca.odell.glazedlists.UniqueList.replaceAll(UniqueList.java:514)\n at IssuesList$IssuesRefreshTask.run(IssuesList.java:67)\n at java.util.TimerThread.mainLoop(Timer.java:432)\n at java.util.TimerThread.run(Timer.java:382)\nException in thread \"main\" java.util.ConcurrentModificationException: Cannot begin a new event while \nanother event is in progress\n at ca.odell.glazedlists.event.ListEventAssembler.beginEvent(ListEventAssembler.java:94)\n at ca.odell.glazedlists.event.ListEventAssembler.beginEvent(ListEventAssembler.java:72)\n at ca.odell.glazedlists.AbstractFilterList.handleFilterChanged(AbstractFilterList.java:199)\n at IssuesUserFilter.<init>(IssuesUserFilter.java:52)\n at IssuesBrowser.display(IssuesBrowser.java:43)\n at IssuesBrowser.main(IssuesBrowser.java:81)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I tried to reproduce this problem and I can't. If anybody else can, could you please send a stack trace? \nThe stack trace provided is from an old revision as IssueUserFilter cannot throw a null pointer exception \non line 74 (as there are no dereferences on 74)."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I couldn't reproduce this problem. It is possible that another bug that has since been fixed was \nconfounding with this one?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(65)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Tutorial part 3 references outdated API"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Part 3 of the Tutorial references the old API for getFilterStrings() on \nTextFilterable."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added a new branch of tutorial, tutorial-0.9.1\nhttp://publicobject.com/glazedlists/tutorial-0.9.1/\n\nNote that although tutorial numbers equal Glazed Lists numbers, there may be some Glazed Lists \nreleases that skip a tutorial release. Also, the tutorial could be rewritten by someone a little less \nexperienced who can point out the finer details of Glazed Lists development! As an experienced user I \nthink I glossed over some things too much since they are too familiar to me!\n\nAlso the tutorial has been moved out of CVS and onto the website only. I have added a tutorial zip to \nthe java.net file archives."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(66)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList fires empty events on setComparator"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SortedList fires empty update events on setComparator(). This can throw off the EventTableModel etc.\n\napple.awt.EventQueueExceptionHandler Caught Throwable : \njava.lang.IndexOutOfBoundsException: bitIndex < 0: -1\n at java.util.BitSet.get(BitSet.java:459)\n at javax.swing.DefaultListSelectionModel.clear(DefaultListSelectionModel.java:277)\n at javax.swing.DefaultListSelectionModel.setState(DefaultListSelectionModel.java:489)\n at javax.swing.DefaultListSelectionModel.removeIndexInterval(DefaultListSelectionModel.java:544)\n at javax.swing.JTable.tableRowsDeleted(JTable.java:2971)\n at javax.swing.JTable.tableChanged(JTable.java:2874)\n at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)\n at ca.odell.glazedlists.swing.EventTableModel.listChanged(EventTableModel.java:118)\n at ca.odell.glazedlists.event.EventThreadProxy.listChanged(EventThreadProxy.java:44)\n at ca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:289)\n at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:256)\n at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:321)\n at \nca.odell.glazedlists.swing.TableComparatorChooser.columnClicked(TableComparatorChooser.java:306)\n at \nca.odell.glazedlists.swing.TableComparatorChooser.mouseClicked(TableComparatorChooser.java:179)\n at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)\n at java.awt.Component.processMouseEvent(Component.java:5103)\n at java.awt.Component.processEvent(Component.java:4897)\n at java.awt.Container.processEvent(Container.java:1569)\n at java.awt.Component.dispatchEventImpl(Component.java:3615)\n at java.awt.Container.dispatchEventImpl(Container.java:1627)\n at java.awt.Component.dispatchEvent(Component.java:3477)\n at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)\n at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)\n at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)\n at java.awt.Container.dispatchEventImpl(Container.java:1613)\n at java.awt.Window.dispatchEventImpl(Window.java:1606)\n at java.awt.Component.dispatchEvent(Component.java:3477)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)\n at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was an easy fix. The problem stems from when we added support to retain selection through a \nsort as we forgot to support 0-element lists in that case."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(67)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("SparseList makes 2 tree calls when 1 will suffice"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SparseList models a list with some elements filtered out. This is accomplished using a tree whose nodes \ncontain two indices: relative to all elements and relative only to unfiltered elements.\n\nThe getIndex and getCompressedIndex methods are performed in two stages:\n - get the corresponding node\n - get the appropriate index for that node\n\nThis two-stage process can be condensed into one by adding a method to SparseList's nodes to \nperform this operation in one step.\n\nImplementing this performance enhancement will have the following Big-O impact:\n - Currently a getIndex() on a list of size 1000 takes O(10 + 10)\n - After the optimization, on a list of size 1000 this takes O(10)\n\nAlthough this is a very lowlevel optimization, it occurs in a frequently called method. The implementor \nshould record real-world times on getIndex and getCompressedIndex before and after the fix to see if \nthe real-world results compare to the theoretical ones."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Now speedier!\n\nI created a sample program that does repeated gets() from a FilterList.\nOriginally this program took 14 seconds to run.\nAfter the optimization, it takes 8.9 seconds!\n\nAlright! Only problem is that there aren't very many obvious optimizations left!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(68)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("file"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Glazed lists on the filesystem"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists should store and retrieve list data using the filesystem.\n\nThe uses for this are numerous:\n - data caching\n - database style persistence\n\nIt would be desirable for such an implementation to be:\n - really, really easy to use\n - transactionable (preferrably using a supported API such as JTA)\n - very fault tolerant\n\nSee prevalayer for a more general-purpose implementation of this functionality.\n\nJava programmers would love to use an List API to persist data. This could be awesome."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("I was pondering the implementation of this feature and I suddenly remembered an \narticle from an old JDJ. After making use of my JDJ Resource CD, I tracked it \ndown in Volume 8, Issue 11. The article is entitled \"Enabling a File System as \na Transactional Resource\". Some the work we will need to do to implement this \nfeature may have been partially solved in the article. Is it exactly what we \nneed? Probably not, but it's still worth a read.\n\nThe web version for any of you with digital subscriptions to the JDJ or access \nvia the Resource CD is:\n\nhttp://sys-con.com/story/?storyid=37798&DE=1"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("*** Issue 74 has been marked as a duplicate of this issue. ***"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(69)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Build fails on junit"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Default target excludes *Test classes by there is one not folowing the pattren.\n\ncompile:\n [mkdir] Created dir: /data/cvs/javanet/glazedlists/classes\n [javac] Compiling 82 source files to /data/cvs/javanet/glazedlists/classes\n [javac]\n/data/cvs/javanet/glazedlists/source/ca/odell/glazedlists/test/ThreadedCompositeRunner.java:10:\npackage junit.framework does not exist\n [javac] import junit.framework.*;\n [javac] ^\n [javac] Note: Some input files use or override a deprecated API.\n [javac] Note: Recompile with -deprecation for details.\n [javac] 1 error"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Created an attachment (id=3)\nA simple patch\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was a total oversight on my behalf and has now been resolved."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(70)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("UI does not allow to remove sorting order"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("TableComparatorChooser instals header UI that allow to select sort by mouse\nclicks order but it *cannot* be removed.\n\nExpected behaviour: on third click remove sorting by selected column."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is the problem that I have not yet solved. The fix is\nfairly straightforward yet I do not know if it is natural.\nYou suggest the expected behavior of a 3rd click removing\nsorting. Although practical, this is not the behavior found\nin native Windows or Mac OS X tables. Mind you, I have\nnot yet seen another implementation of multiple-column\nsorting, so my experience is constrained to single column\nsorting.\n\nDo you think that this would be a worthwhile option to\nbe set on the TableComparatorChooser? I just think that\nbeing the same as Mac and Windows is preferable only\nbecause that will be the behavior that users will be most\nfamiliar with.\n\nLet me know what you think about this, and I will consider\nadding a method or changing the behavior."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Currently we have no compelling reason to change the behaviour. If I am presented with such, this bug \nmay be reopened!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(71)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Event API antipatterns"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("ListEventListener:\n\n * <p>It is mandatory that the calling thread has obtained the write lock\n * on the source list. This guarantees the listener can read and write the\n * source list without obtaining any further locks.\n\nAFAIK it's pure antipattern. Commonly any event listener must not alter event\nsource synchronously to avoid:\n - dispatching out of date events to other listeners\n - infinite event loops\n\nListEvent & ListEventAssembler\n\nMy undertanding is that all clients get the same ListEvent object.\nUnfortunatelly ListEvent is mutable and therefore \"consumed\" by the first\nlistener. May be it should be cloned before firing it."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was a documentation error. Fortunately we do not follow the terrible\npractices as suggested by our own documentation. The documentation has\nbeen corrected and we have made note that the source list shall not be changed\nin the handling of an event.\n\nThe documentation error has been corrected:\n * <p>It is mandatory that the calling thread has obtained the write lock\n * on the source list. This is because the calling thread will have written\n * to the source list to cause this event. This condition guarantees that\n * no writes can occur while the listener is handling this event.\n * It is an error to write to the source list while processing an event.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(72)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Note on issue 71"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("I cannot edit issues. I had to fill next one. This one represents additional\nnote issue #71.\n\nRegarding event source mutability and event firing I can see that your solution\ncould work if EventAssembler fires updated events. I.e. if a listener changes a\nsource list then:\n - all already notified listeners get the event decribing the additional change\n - listener itself gets no event \n - all not yet notified listeners get an event desribing both original change\n and new change (blocks)\n\nIt could be hard to implement. Hopefully unit test could be simple."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fortunately we do not have to worry about this problem.\n\nListeners are strictly not allowed to modify their source lists in the processing of list events, and that's \nfinal!\n\nFortunately if a listener does not like the contents of a source list, it is free to present and alternate \nview of that list that it likes better. We call these \"TransformationLists\" and they are the basis of this \nproject. \n\nFinally, for good measure:\nDO NOT MODIFY A LIST WHILE PROCESSING AN EVENT THAT IT SENT YOU! IT WILL MEAN BIG TROUBLE \nFOR YOU! PROBABLY A CONCURRENTMODIFICATIONEXCEPTION!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(73)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("ArrayIndexOutOfBoundsException on J2SE 5.0 beta 2"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I got the following Exception upon starting the demo app.\n\ndeathstar:glazedlists$ java -jar glazedlists.jar \nException in thread \"AWT-EventQueue-0\" java.lang.ArrayIndexOutOfBoundsException:\nInvalid range for selection: 0-0, list size is 0\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.setSubRangeOfRange(EventSelectionModel.java:420)\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.removeSelectionInterval(EventSelectionModel.java:587)\n at javax.swing.JTable.checkLeadAnchor(JTable.java:2963)\n at javax.swing.JTable.tableRowsInserted(JTable.java:3079)\n at javax.swing.JTable.tableChanged(JTable.java:3013)\n at\njavax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)\n at ca.odell.glazedlists.swing.EventTableModel.listChanged(EventTableModel.java:118)\n at ca.odell.glazedlists.event.EventThreadProxy.run(EventThreadProxy.java:54)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)\n at\njava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at\njava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at\njava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at\njava.awt.EventDispatchThread.run(EventDispatchThread.java:110)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Easy fix! I hope they fix the Java 5.0 though as this is lame. Currently the lameness is that if -1 is \npassed as an argument to any method, it is either a no-op or a selection clear."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(74)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("DUPLICATE"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("1.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("file"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("File based list"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Attached prototype implementation of file bases lists. It can be used as data\nholder (warpped by EventList) for huge lists. Implementation is not effecient on\nlist.remove()."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Created an attachment (id=4)\nSources\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("See bug #68.\n\nThat implementation will support all that is here, plus persisting a List so that it can be opened up later \nwhen the application is next started. The only problem with that implementation is that it is currently \nvaporware. This will do great for now!\n\n*** This issue has been marked as a duplicate of 68 ***"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Here I primarily addressed huge lists that does not fit into memory. I planned\nto wrap it into CachedFileList that would keep few last entries in memory and\ninteligently implements iterators to do not flush the cached entries.\n\nIt can be reused for long term persistence but with the same warning as Swing\nused - it's not designed for it and the serialization format can change. I was\ntempting to add a File parametrized contructor but I have resisted because long\nterm persistence introduces data format backward compatability issues (well with\nwrong clients, but it's too easy to code such client if everything seems to\nimplicitly work today). In my applications clients must explicitly iterate over\nlist and store its content.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The argument to avoid serializing a list for long-term use is compelling.\n\nWhen I get around to implementing issue 68, I will keep this in mind. \nI think a useful approach will be to create a \"Serialator\" class with a method such as \n byte[] toBytes(Object o)\nI could then create a default Serialiator that simply Serializes the Object.\n\nThis will allow users to use the Serializable interface or perhaps something with more longevity. The \nproblem with Serializable and Externalizable is that neither of them interoperate outside of Java very \neasily. By using a Serialator, we enable the user to spend the extra time to create binary representations \nof their data that interop either via files or even via the network. This way we get the best of both \nworlds. \n\nI will be sure to include options such as \"temporary\" for the eventual implementation of #68. And of \ncourse a \"Serialization Warning\" in the Javadoc."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(75)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P2"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("net"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Implement Resource Block Peer"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Originally I planned to create \"Update Subscription Protocol\" which was a publish/subscribe protocol for \nupdate events. This approach is nice because it is generic, yet I have realized that it is not flexible \nenough for any generic use!\n\nTherefore I suggest \"Block Resource Peer\", which is similar to the proposed Update Subscription \nProtocol, but with a few important differences:\n - clients can query upstream, for methods like get(i)\n - packet interpretation is left up to another class\n\nBlock Resource Peer must perform the following:\n - Crypto. Public key exchange and block signing\n - Blocking. Like chunking, but not at the mercy of proxy servers. Most of the time, 1 packet will \ncontain 1 HTTP chunk, and 1 HTTP chunk will contain 1 block\n\nEventually, I would like to add P2P to Block Resource Peer. This has the following implications:\n - A block from connection X may have been signed from Y which is upstream of X\n - Connections to a resource, rather than a particular host. Resources are replicated\n - Databases of hosts and resources\n\nTo simplify this:\n - Resources are named by their source host, but not available exclusively at that site\n - I shall design a URI for resources, \"glazedlists://host:port/resourcename\" may be a good start\n - Resource handlers should have methods to publish blocks and handle queries\n - Multiple resource publishers and subscribers per Block Resource Peer\n\nI have my work cut out for me. For starters I will design some interfaces and perhaps even draw some \ndiagrams!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(76)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WORKSFORME"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("problem in EventListSelectionModel under Java 5"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("I have another problem with Java5\nThis exception raises up. The same code works perfectly under 1.4.2\nI am testing the CVS version of glazedlists.\n\nException in thread \"AWT-EventQueue-0\" java.lang.ArrayIndexOutOfBoundsException:\nInvalid range for selection: 0-0, list size is 0\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.setSubRangeOfRange(EventSelectionModel.java:387)\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.removeSelectionInterval(EventSelectionModel.java:548)\n at javax.swing.JTable.checkLeadAnchor(JTable.java:2965)\n at javax.swing.JTable.tableRowsInserted(JTable.java:3081)\n at javax.swing.JTable.tableChanged(JTable.java:3015)\n at\njavax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)\n at ca.odell.glazedlists.swing.EventTableModel.listChanged(EventTableModel.java:118)\n at ca.odell.glazedlists.event.EventThreadProxy.run(EventThreadProxy.java:54)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)\n at\njava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at\njava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I could not reproduce this bug. I think it is a duplicate of an earlier bug that has since been fixed.\n\nIn the included exception, the method removeSelectionInterval() calls setSubRangeOfRange() on \nline 548. But in my code from CVS, there is no such method call on line 548. Note that it is very \npossible that the tested system has different newline characters: \"\\n\" or \"\\r\\n\" which can \ncause a discrepancy in line numbers.\n\nI request that the bug's reporter, idella, please update to the latest version from CVS by doing a clean \ncheckout and verify that this bug still exists. Please include steps to reproduce!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(77)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableHeader indicator arrows point the wrong way"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Compare table header indicator arrows between Glazed Lists' TableComparatorChooser and native \napps. Glazed Lists' arrows point up when down and vice-versa. This should be verified on other \nplatforms!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was just a silly missing exclamation mark, as in if(isReverse()) should have been if(!isReverse())\n\nAn embarassing mistake to say the least. How come nobody caught this earlier!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(78)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("EventThreadProxy in wrong package"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The EventThreadProxy class depends on Java Swing. But that class is not in the swing package, rather it \nis in the event package.\n\nThis is a problem for building on VMs that do not support Swing such as GCJ."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("All fixed up, moved to the other package. It should have never been there in the first place.\n\nThis fix is more significant than you might expect for at least one project:\n - For a project at work, we are using Glazed Lists with SWT\n - We are compiling with GCJ\n - GCJ does not support Swing\n - Our project grabs the Glazed Lists source and then dumps the swing/ folder\n - The EventThreadProxy breaks our build, until now we had to delete it explicitly"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(79)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WONTFIX"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TransformedList with a virtual entry"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("I found usefull to code a list that adds a virtual entry to own end. This list\nis then used as source for UI component models.\n\nBackground: I have impelemented the logic in list rather than in models bacause\nI share the list source by multiple models and their respective views (form vs\ntable view)."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Created an attachment (id=5)\nThe source\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I think that this is a good idea and the submitted code is good.\n\nBut there already exists a more general solution in the code called \"CompositeList\".\n\nCompositeList allows you to concatenate EventLists and view them as one. For this problem, this would \nuse CompositeList in the following way:\n - CompositeList of 2 lists A and B\n - A is the EventList of interest\n - B is a BasicEventList with one entry, the 'virtual' entry\nAny action to de-virtualize the last entry would simply be to do A.addAll(B), B.set(0, new VirtualEntry());\n\nAgain, the provided code is good. But I don't see a very compelling reason to include it in the main \nGlazed Lists distribution simply because the provided code solves a rather specific problem. If it were \nmy application code I would keep the VirtualList, perhaps in a util/ package of my project."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(80)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P2"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("AbstractFilterList.notifyFilterChanged() should have \"tighter\" and \"looser\""); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Suppose I have a TextFilterList where I have filtered out 9000 of 10,000 items.\nIf I edit the filter text to add a new word, it is impossible that any of the hiddne elements will appear \nbecause the filter is getting \"tighter\". By adding a new word, I can only filter-out and not filter-in.\n\nUnfortunately AbstractFilterList does not support the idea of \"tigher\" and \"looser\" and therefore in this \ncase all 10,000 elements will be re-examined when only 1000 will do.\n\nSimilarly if I remove a filter word, it is not possible that existing entries will filter-out, only filter in. This \nis a 'looser' refinement. The AbstractFilterList should only examine the 9000 hidden elements and not \nthe 1000 visible ones.\n\nThis will increase the performance of AbstractFilterList without much additional complexity. It should \nstill support overall changes where the new filter and old filter have no relationship."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(81)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P4"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("JDBC support in Glazed Lists"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I think that people are using Glazed Lists as an alternative to a traditional database grids.\n\nI have been wondering whether or not it is possible to create a JDBCList that is backed by a SQL query. \nThere's a whole bunch of different problems that this could introduce, but if done right then Glazed \nLists would make a killer database grid.\n\nIt will require some thought and some tweaking to existing classes if we want to build this."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(82)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableComparatorChooser sort arrow indicators not right aligned"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is the nit-pickiest issue yet. The TableComparatorChooser arrows don't look EXACTLY like the \nnative operating system, but they could.\nhttp://publicobject.com/glazedlists/sortedjtables/\n\nA summary of differences:\n label alignment is not LEFT on Windows\n label alignment is not context-sensitive on Windows or Mac OS X\n arrow alignment is not RIGHT on Mac OS X\n header is not blue for primary column on Mac OS X\n\nThis issue is low priority and should only be done if there's nothing better to do! Don't work on this \nbug!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(83)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableComparatorChooser needs icons for new Java l&fs"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Java is getting better Look&Feel support and Glazed Lists should keep up with appropriate icons for the \nTableComparatorChooser.\n\nLook and feels currently supported by TableComparatorChooser:\n - Aqua\n - Metal\n - Windows\n\nLook and feels that need support\n - Ocean (J2SE 1.5+)\n - GTK\n - Windows XP\n\nHere's some screenshots to get started:\nhttp://java.sun.com/developer/technicalArticles/releases/j2se15/"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=6)\nSwingSet demo, this is what OCEAN looks like\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=7)\nAnother SwingSet demo picture for what OCEAN looks like\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've attached some Ocean screenshots so that I can draw up some triangles for\nthat theme.\n\nAs for XP, I need to find a friend who will lend me their XP box for a few hours\nso I can get some screenshots of its icons.\n\nAs for GTK, the GTK theme does not make this task very easy. The GTK theme is\nskinnable itself, so an icon that looks good for one GTK user might look\nterrible for another GTK user. There might be a standard icon included in such\nskins, but I have no idea how to get at it. Also I would like to note that my\nSun box has the ugliest GTK theme known to man and it would be a crime against\nhumanity to make an icon that matches its theme. I think the \"Blue Curve\" theme\nis where all the GTK kids are at with their Redhat boxes and if I can get a hold\nof that, I'd be able to do a decent enough icon."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've completed the Ocean triangles, you can view them right now at:\nhttp://publicobject.com/glazedlists/sortedjtables/\n\nAs for the others:\n Windows XP - I'm installing XP on a box tomorrow, so I should be able to do icons for it soon.\n GTK - I think my best bet is to copy the set from Evolution 2.0, if I can get that on a machine\n Synth - Not before mentioned skinnable L&F. Obviously I will need code support for this via setIcons() \nor perhaps inspecting the synth XML file or something? I don't know if it supports extensions but that \nwould be really slick. Programmable access will be necessary regardless for canned skins."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The XP skin is now complete.\n\nAll that is left is GTK & Synth. GTK will be deferred until requested, or I get bored and want to draw 'em \nup. Synth will require me to look into how to make synth skins. I haven't yet seen any, so I'm going to \nput that on hold also. When the Synth skins first start popping up, then I'll do some investigation!\n\n"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(84)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P4"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TextFilterList optimization via caching results"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Currently TextFilterList does a full-text search on ALL of the Strings returned from getFilterStrings() for \nALL Objects in the list. In many cases this will contain a lot of redundant searches. Suppose we have a \nprogram like mCube where the data is songs. Each song has an album and and an artist and there is a \nlot of duplication among album and artists for names. Currently if I have 25 items all with the artist \n\"Limp Bizkit\", then that string will be searched 25 times on a Glazed Lists filter.\n\nMy idea is to cache the result of a String matching a pattern, so that if that exact same String is found \nagain, then the result can be returned faster than normal.\n\nOf course there are some requirements. Finding a cached String has to be an order of magnitude faster \nthan searching the string itself. \n - the normal hashCode() method on String might not be fast. I think it examines every character. It \nmay cache the result however, in which case a HashSet would be a useful datastructure to start\n - using a Collection of successes and a Collection of failures. For each filter string, we could first \ncheck for its presence in either set before attempting to perform the actual match. After finding a \nmatch or not, the String could be placed in one of the Collections.\n - Collections could be limited in size to only the most popular entries to keep searches fast! This \nwould allow for an O(1)-style filtering in best cases\n\nThis will require experimentation. But it is a FUN problem!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("It is important to note that the chance of collision is much higher when the string is smaller.\nSmaller strings tend to have \"token\" values, wheras long strings will more likely be unique descriptions.\n\nExample: \"P3\", \"jessewilson\", \"ENHANCEMENT\" and \"0.9.2\" are more likely to be repeated than say, this \ndescription. It might be worthwhile to determine a cut-off like 32-characters to differentiate between \nStrings that would be worth caching or not."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(85)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Convenience constructors for automatic TableFormats"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Writing a TableFormat is quite a dry experience. It seems like every TableFormat I write is nearly \nidentical and creating them is very mechanical.\n\nTherefore I propose some convenience constructors for EventTableModel that do not require me to \ncreate a boring TableFormat, rather I should be able to specify using Strings how my TableFormat shall \nlook.\n\nFor example, to create an EventTableModel to display Issue objects, this would be a decent constructor:\nList columns = Arrays.asList(new String[] { \"ID\", \"Priority\", \"Description\" });\nList fields = Arrays.asList(new String[] { \"id\", \"priority\", \"shortDescription\" });\nEventTableModel etm = new EventTableModel(myIssuesList, columns, fields);\n\nThe EventTableModel could then use reflection to create a custom TableFormat that fits my needs. In \nthis case, \"ID\" would correspond to a \"getId()\" method in the list objects and \"shortDescription\" would \ncorrespond to a \"getShortDescription()\" method in the list objects. All with simple JavaBeans and \nreflection.\n\nFinally, it might also be desirable to create a TableModel that takes a ResultSet as a parameter and \nexpects objects as either database rows or Lists of row columns.\n\nThe whole idea here is to make it so that we can create applications with less code. Note that if \nimplemented, this would be a very bad thing to feature in a tutorial since it is runtime checked and \nerrors cannot be caught by Mr. Javac."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Done. I sent out a survey to the mailing list on this to see what the best way to expose this functionality \nwould be.\n\nMost users said it would be best simply to provide an alternate constructor to EventTableModel that did \nthe construction of by BeanTableFormat automatcally. So this is how it now works!\n\nThere is a brief caution on the use of this with respect to reflection. It is also dangerous because typos \nin method names will not be checked until runtime."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(86)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Convenience constructor for automatic Filterators"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Bug 85 is \"Convenience constructors for automatic TableFormats\". The fix for this was to use reflection \nto do automatic construction of TableFormat objects. \n\nWe could do something very similar for automatic Filterators. Simply inspect the class in use and use all \nof its methods that return a String. This might not have great performance due to some classes which \ndo lookups in such methods, but it would be a great helper for most simple filter classes.\n\nThis is a convenience-type of enhancement. It must be noted in its Javadocs that use of this method \nmay cause a performance hit in some cases."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed. See the new constructor for TextFilterList."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(87)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("GlazedLists is inconsistent in what exception is thrown on bounds checking"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Our volatile implementation classes follow suit with ArrayList and other \nmembers of the Collections framework by throwing IndexOutOfBoundsExceptions \nwhen range checking fails. The TransformedList throws \nArrayIndexOutOfBoundsExceptions on range checking failures. As a result any \nlist which overrides a method that takes an index may throw different exception \ntypes depending on its implementation details. A minor inconsistency but worth \nmentioning nonetheless. I haven't checked yet how many classes are affected by \nthis."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("A related inconsistency can be found in the volatile IndexedTree ADT (and I \nassume the SparseList ADT) which throws a NullPointerException when a get() is \ncalled on an empty list. ArrayList throws an IndexOutOfBoundsException in that \ncase.\n\nI would agree with anyone who says that this issue is almost a tad on the \nexcessive, but it's still worth mentioning, even at priority 5."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Well I fixed bug 87, albeit perhaps not in the most 'agreeable' way.\n\nHeres the problem with fixing the bug in the IndexedTree class:\n - its used only internally\n - many classes (ie. SortedList) call get() hundreds of times, none of those are ever out-of-bounds\n - high performance is going to be a very important issue for SortedList, so we are going to avoid at all \ncosts slowing that down\n\nSo I fixed it in CachingList instead. The new rule is that IndexedTree will blow up violently if you violate \nits preconditions, so classes that use it should be careful to verify that they are not violating its \npreconditions.\n\nPretty much my strategy is this:\n - create a user-friendly front end (ie. SortedList, CachingList) that does all the necessary due-process \nand range checks\n - create high performance backend (ie. IndexedTree, SparseList) that have strict requirements on \nparameters etc., but do no unnecessary checks or whatever. \n - in that high performance backend, use the assert() keyword to enable appropriate checking when \nnecessary to verify that the code is in fact correct\n\n"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(88)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableFormat may receive null Object"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TableFormat may be passed a null Object for a list that never contains nulls.\n\nThis happens when an element is deleted on a worker thread, but the EventTableModel has not yet \nbeen notified on the event dispatch thread, and the event dispatch thread is now asking to paint the \ndeleted element.\n\nThe null should simply be rendered as null. The renderers should be tolerable, that is much more \nappropriate than the TableFormat."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I must have forgotten.\n\nThis bug is already fixed. It is NOT necessary to check for null in your TableFormat class."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(89)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Validate performance of TextFilterList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TextFilterList uses regular expressions to do searching. Is this really faster? This claim must be \nvalidated.\n\nIf regex is not faster, TextFilterList should use an alternative text searching system."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've been doing some thinking on how to speed this stuff up....\n\nRegex uses a DFA to walk through the strings, one character of input at a time. It may not be \nridiculously fast for my purposes.\n\nindexOf works, but it requires a call to toUpperCase(), which is already slower than regex.\n\nA custom solution may be the ultimate solution to this problem. We learned about fast searching \ntechniques in CS 240 at U of W, this might be the best way to go."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've given this some further thought. What we really need is a test program that tests the performance \nof TextFilterList with meaningful real-world data. Therefore I have come up with a strategy.\n\nI will develop a test program that reads test files, runs them through the TextFilterList and times its \nperformance. It will then write the total time to the console. The test program can verify speed AND \ncorrectness.\n\nThe test file is made up of a series of serialized objects.\n 1. A List of Strings, each String a the 'query String' for a separate test\n 2. A List of Integers, each corresponding to the number of results expected from String #1.\n 3. The test data. This is a List of \"test data objects\". For simplicity, a test data object itself is simply an \nArrayList full of Strings.\n\nNow here are some test data that I think would be reasonable:\n - The ID3 data from my entire MP3 collection. Each MP3's gets one ArrayList full of Strings. These \nstrings are short and there's lots of duplication.\n - The entire Mozilla issue database. This is a mix of short and longs strings with lots of duplication.\n - Some articles from a website. This is a single really long String.\n\nBuilding this will take some time, but it will make it possible to implement competing algorithms and to \nsee how they actually will perform in practice."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've run some simple performance tests and the performance is GOOD, but not GREAT.\nFiltering a quarter-million medium elements takes about 7 seconds on my PowerBook 1.3GHz\nFiltering 2500 medium elements takes about 0.2 seconds on my PowerBook\n\nThis sounds good, but the smart people at Google.com filter a hell of a lot more faster. Mind you they \nhave more hardware, but I think we can significantly improve this.\n\nOne new idea - is there a benefit to doing lookups on filter strings upon loading the data to build an \nindex?\n\nHere's the before-mentioned results:\n--- 2 filters of Mozilla.org's bug database of 260,836 takes 14.2s ---\nslackette:glazedlists$ java -Xmx1000000000 -classpath classes/ \nca.odell.glazedlists.swing.test.TextFilterPerformance mozillabugs.tfpt \nReading input\nRead input, 260836 elements\n\nFilter 0: frameset, expect: 327\nFilter 1: java PC @sun.com, expect: 320\n\nRunning... done. Time: 14187ms\n\n--- and 4 filters with my MP3 collection of 2569 takes 0.8s ---\nslackette:glazedlists$ java -classpath classes/ ca.odell.glazedlists.swing.test.TextFilterPerformance \nmp3collection.tfpt \nReading input\nRead input, 5138 elements\n\nFilter 0: Limp, expect: 79\nFilter 1: Bizkit, expect: 79\nFilter 2: file 128 44100, expect: 508\nFilter 3: iTunes Music jessewilson, expect: 2568\n\nRunning... done. Time: 768ms\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've looked at this and apparently regex was NOT a genius idea. It's performance was okay but I have \nalready built a simpler better replacement. The new method \"caseInsensitiveIndexOf()\" is just as fast (in \nmy tests).\n\nFrom here, I think it is time to implement something faster.\nI think I will try the Boyer-Moore algorithm as the next step in my performance quest."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(90)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("SparseList uses multiple nodes when one will do"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The innovation of SparseList is that null values do not require a node Object.\n\nThis means that in a list of 10,000, if 3000 elements are null, then only 7000 nodes are required.\n\nIt should also be possible to create a SparseList where sequential non-null values are collapsed into one \n'supernode'. This means that a list of 10,000 where all elements are the same, then only one node will \nbe needed.\n\nThis would be useful to make AbstractFilterList scale better! Currently it uses O(N) to provide filtering \nservices to a list of size N, even if its filtering services are not used. With this strategy, it only requires \nnodes when its filter is in use.\n\nThis will add complexity but should yeild a measurable performance benefit."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(91)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("EventListIterator falls in a loop"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("Sometimes my app hangs up, using 100% CPU.\nI have tracked the problem, and found that the loop happens in\nEventListIterator.listChanged() where the first line is\n\nwhile(listChanges.next())\n\nand I think this is the cause of the loop."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Additional comments, emailed from Daniele Dellafiore:\n\nI have submitted issues 91, but I can't add comment on it.\nhttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=91\n\nI have some news, so I will write here.\n\nListChanges.next() method falls in the loop.\nWhen the loop occurs, the first call to next fall in the \"if\" part of the if-else statement.\nBeginning from the second call, the \"else\" part is executed infinitely.\n\nThe call sequence is:\n\nWeakReferenceProxy.listChanged()\n\nin this method is called, within else statement\n\nproxyTarget.listChanged(listChanges);\n\nwhere proxyTarget is a EventListIterator instance, and the loop occurs here, because listChanges.next \nalways returns true.\n\nI do not receive any exceptions, so I do not have a stack trace.\n\n\nIf you want to see the loop in action, you can have a look to CVS code of mcube project: run it and try \nto click on the buttons to sort a table. If you click two times quickly on the same button, you can see \nthat applications start using 100% CPU.\n\nI do not exclude that there could be some issue in my code, but right now I have only figured out the \nloop, not it's cause. Maybe you can help me in understanding what could this cause be.\n\nThanks, bye.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This an excellent bug report led to a very fast fix.\n\nThe problem was that the ListEventAssembler was creating 'reorder' events of size 0. Usually this does \nnot happen because the SortedList does not pass events when its size is 0. But if you have say, an \nEventSelectionModel, it is possible that it will create such events.\n\nThe problem has been solved.\n\nThanks again for the EXCELLENT and HELPFUL bug report."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(92)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Glazed Lists version 0.9.3 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists requires a release before October 25, 2004.\n\nThis should be a polish-release with the following changes:\n - no more migrationkit\n - Javadoc warnings where appropriate (for untested code, unfinished code, concurrency)\n - Demo as WebStart"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've refined the Javadocs for all the public *List classes.\nI've created a migrationkit .jar which is available here:\nhttps://glazedlists.dev.java.net/files/documents/1073/7976/glazedlists-0.8-migrationkit.jar"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(93)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P2"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Multiple source support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists does not support EventLists that have multiple sources.\n\nSee thread, \"ArrayIndexOutOfBoundsException\" on the users@ mailing list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added support for multiple sources in Glazed Lists!\n\nThis has required one major change to the API.\nEventList now has a method, getPublisher() which returns an EventListPublisher.\n\nThis is so that EventLists can share EventListPublishers if they are chained. The EventListPublisher keeps \ntrack of all listeners and their dependencies. When a change is forwarded, all dependencies are \nmanaged to ensure the change is propagates in a safe sequence.\n\nThere are still some outstanding issues with this implementation, but it is a good start.\nOutstanding issues:\n - no support for events other than ListEvent\n - no support for CompositeList\n\nHopefully I can fix these issues soon!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(94)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("issues.xml is 104 KB"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists .jar file includes a 104 KB file \"issues.xml\" for the demo applet.\n\nIncluding this file is okay. Including 104 KB is ridiculous.\n\nTrim the file and update it to the latest issue set!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is actually only 7KB compressed, but trimming it won't hurt anyway.\n\nAnd updating it is definitely worthwhile."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(95)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableComparatorChooser breaks when column count changes"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TableComparatorChooser breaks violently with a NullPointerException when the number of columns is \nchanged.\n\nInstead, TableComparatorChooser should simply adjust to the column change.\n\nThe only problem with this is that some columns may have extra comparators set for them. Figuring \nout how to do this correctly may be tricky!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Additional comparators are thrown out when the TableFormat is changed. This may be a drag, \nbut there are much better ways to turn on and off columns if that is to be desired.\n\nSee the mailing list for sample code that uses the TableColumnModel for this purpose:\nhttps://glazedlists.dev.java.net/servlets/ReadMsg?list=users&msgNo=234"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; return issues; }
10062 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10062/3f5c1bc8959d4b329dc98cd738a87e40f60ad957/Issue.java/clean/source/ca/odell/glazedlists/demo/Issue.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 987, 1262, 17316, 1435, 288, 3639, 987, 8296, 273, 394, 2407, 5621, 3639, 11820, 783, 12956, 273, 446, 31, 3639, 6507, 2477, 273, 446, 31, 3639, 783, 12956, 273, 394, 11820, 5621, 3639, 783, 12956, 18, 542, 548, 12, 2704, 2144, 12, 21, 10019, 3639, 783, 12956, 18, 542, 1482, 2932, 28475, 8863, 3639, 783, 12956, 18, 542, 8183, 2932, 52, 23, 8863, 3639, 783, 12956, 18, 542, 11098, 2932, 30406, 8863, 3639, 783, 12956, 18, 542, 1841, 2932, 7043, 1561, 329, 9772, 8863, 3639, 783, 12956, 18, 542, 1444, 2932, 2972, 8863, 3639, 783, 12956, 18, 542, 20363, 774, 2932, 78, 281, 307, 91, 330, 816, 8863, 3639, 783, 12956, 18, 542, 1676, 4652, 2932, 5591, 8863, 3639, 783, 12956, 18, 542, 12956, 559, 2932, 15580, 8863, 3639, 783, 12956, 18, 542, 27962, 6567, 2932, 9618, 36, 7043, 1561, 329, 9772, 8863, 3639, 783, 12956, 18, 542, 4897, 3291, 2932, 1170, 685, 537, 1034, 9239, 12318, 666, 2549, 8863, 3639, 2477, 273, 394, 6507, 5621, 3639, 2477, 18, 542, 2888, 83, 2932, 78, 281, 307, 91, 330, 816, 8863, 3639, 2477, 18, 542, 9434, 12, 2011, 1769, 3639, 2477, 18, 542, 1528, 2932, 1986, 783, 4471, 434, 11346, 4692, 279, 423, 14, 50, 14, 49, 4886, 358, 283, 17, 2188, 1347, 326, 666, 521, 82, 6329, 16, 364, 490, 3478, 603, 279, 666, 434, 963, 423, 8403, 82, 64, 82, 7193, 353, 4573, 358, 21171, 333, 3099, 635, 1450, 1898, 5505, 501, 12597, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 987, 1262, 17316, 1435, 288, 3639, 987, 8296, 273, 394, 2407, 5621, 3639, 11820, 783, 12956, 273, 446, 31, 3639, 6507, 2477, 273, 446, 31, 3639, 783, 12956, 273, 394, 11820, 5621, 3639, 783, 12956, 18, 542, 548, 12, 2704, 2144, 12, 21, 10019, 3639, 783, 12956, 18, 542, 1482, 2932, 28475, 8863, 3639, 783, 12956, 18, 542, 8183, 2932, 52, 23, 8863, 3639, 783, 12956, 18, 542, 11098, 2932, 30406, 8863, 3639, 783, 12956, 18, 542, 1841, 2932, 7043, 1561, 329, 9772, 8863, 3639, 783, 12956, 18, 542, 1444, 2932, 2972, 8863, 3639, 783, 12956, 18, 542, 20363, 774, 2932, 78, 281, 307, 91, 330, 816, 8863, 3639, 783, 12956, 18, 542, 1676, 4652, 2932, 2 ]
ret = Types.getAssignableForm( ret, (Class)returnType );
ret = Types.getAssignableForm( ret, returnType );
private Object invokeImpl( Object[] argValues, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo, boolean overrideNameSpace ) throws EvalError { Class returnType = getReturnType(); Class [] paramTypes = getParameterTypes(); // If null callstack if ( callstack == null ) callstack = new CallStack( declaringNameSpace ); if ( argValues == null ) argValues = new Object [] { }; // Cardinality (number of args) mismatch if ( argValues.length != numArgs ) { /* // look for help string try { // should check for null namespace here String help = (String)declaringNameSpace.get( "bsh.help."+name, interpreter ); interpreter.println(help); return Primitive.VOID; } catch ( Exception e ) { throw eval error } */ throw new EvalError( "Wrong number of arguments for local method: " + name, callerInfo, callstack ); } // Make the local namespace for the method invocation NameSpace localNameSpace; if ( overrideNameSpace ) localNameSpace = callstack.top(); else { localNameSpace = new NameSpace( declaringNameSpace, name ); localNameSpace.isMethod = true; } // should we do this for both cases above? localNameSpace.setNode( callerInfo ); // set the method parameters in the local namespace for(int i=0; i<numArgs; i++) { // Set typed variable if ( paramTypes[i] != null ) { try { argValues[i] = Types.getAssignableForm( argValues[i], paramTypes[i] ); } catch( UtilEvalError e) { throw new EvalError( "Invalid argument: " + "`"+paramNames[i]+"'" + " for method: " + name + " : " + e.getMessage(), callerInfo, callstack ); } try { localNameSpace.setTypedVariable( paramNames[i], paramTypes[i], argValues[i], null/*modifiers*/); } catch ( UtilEvalError e2 ) { throw e2.toEvalError( "Typed method parameter assignment", callerInfo, callstack ); } } // Set untyped variable else // untyped param { // getAssignable would catch this for typed param if ( argValues[i] == Primitive.VOID) throw new EvalError( "Undefined variable or class name, parameter: " + paramNames[i] + " to method: " + name, callerInfo, callstack ); else try { localNameSpace.setLocalVariable( paramNames[i], argValues[i], interpreter.getStrictJava() ); } catch ( UtilEvalError e3 ) { throw e3.toEvalError( callerInfo, callstack ); } } } // Push the new namespace on the call stack if ( !overrideNameSpace ) callstack.push( localNameSpace ); // Invoke the block, overriding namespace with localNameSpace Object ret = methodBody.eval( callstack, interpreter, true/*override*/ ); // save the callstack including the called method, just for error mess CallStack returnStack = callstack.copy(); // Get back to caller namespace if ( !overrideNameSpace ) callstack.pop(); ReturnControl retControl = null; if ( ret instanceof ReturnControl ) { retControl = (ReturnControl)ret; // Method body can only use 'return' statment type return control. if ( retControl.kind == retControl.RETURN ) ret = ((ReturnControl)ret).value; else // retControl.returnPoint is the Node of the return statement throw new EvalError("'continue' or 'break' in method body", retControl.returnPoint, returnStack ); // Check for explicit return of value from void method type. // retControl.returnPoint is the Node of the return statement if ( returnType == Void.TYPE && ret != Primitive.VOID ) throw new EvalError( "Cannot return value from void method", retControl.returnPoint, returnStack); } if ( returnType != null ) { // If return type void, return void as the value. if ( returnType == Void.TYPE ) return Primitive.VOID; // return type is a class try { ret = Types.getAssignableForm( ret, (Class)returnType ); } catch( UtilEvalError e ) { // Point to return statement point if we had one. // (else it was implicit return? What's the case here?) SimpleNode node = callerInfo; if ( retControl != null ) node = retControl.returnPoint; throw e.toEvalError( "Incorrect type returned from method: " + name + e.getMessage(), node, callstack ); } } return ret; }
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/55acd4bd76dee9ba9304bc8e1b62a76f12ad8b9b/BshMethod.java/buggy/bsh/BshMethod.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 1033, 4356, 2828, 12, 3196, 202, 921, 8526, 1501, 1972, 16, 5294, 11599, 16048, 16, 3049, 2624, 745, 3772, 16, 1082, 202, 5784, 907, 4894, 966, 16, 1250, 3849, 26857, 262, 3196, 202, 15069, 13163, 668, 225, 202, 95, 202, 202, 797, 9424, 273, 18209, 5621, 202, 202, 797, 5378, 21265, 273, 18583, 5621, 202, 202, 759, 971, 446, 745, 3772, 202, 202, 430, 261, 745, 3772, 422, 446, 262, 1082, 202, 1991, 3772, 273, 394, 3049, 2624, 12, 20845, 26857, 11272, 202, 202, 430, 261, 1501, 1972, 422, 446, 262, 1082, 202, 3175, 1972, 273, 394, 1033, 5378, 288, 289, 31, 202, 202, 759, 14338, 9232, 261, 2696, 434, 833, 13, 13484, 202, 202, 430, 261, 1501, 1972, 18, 2469, 480, 818, 2615, 262, 3196, 202, 95, 202, 202, 20308, 1082, 202, 759, 2324, 364, 2809, 533, 1082, 202, 698, 288, 9506, 202, 759, 1410, 866, 364, 446, 1981, 2674, 9506, 202, 780, 2809, 273, 4405, 202, 12, 780, 13, 8840, 5968, 26857, 18, 588, 12, 6862, 202, 6, 70, 674, 18, 5201, 1199, 15, 529, 16, 16048, 11272, 9506, 202, 2761, 11599, 18, 8222, 12, 5201, 1769, 9506, 202, 2463, 14488, 18, 58, 12945, 31, 1082, 202, 97, 1044, 261, 1185, 425, 262, 288, 9506, 202, 12849, 5302, 555, 1082, 202, 97, 202, 202, 5549, 1082, 202, 12849, 394, 13163, 668, 12, 4697, 202, 6, 13634, 1300, 434, 1775, 364, 1191, 707, 30, 315, 4697, 202, 15, 508, 16, 4894, 966, 16, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 1033, 4356, 2828, 12, 3196, 202, 921, 8526, 1501, 1972, 16, 5294, 11599, 16048, 16, 3049, 2624, 745, 3772, 16, 1082, 202, 5784, 907, 4894, 966, 16, 1250, 3849, 26857, 262, 3196, 202, 15069, 13163, 668, 225, 202, 95, 202, 202, 797, 9424, 273, 18209, 5621, 202, 202, 797, 5378, 21265, 273, 18583, 5621, 202, 202, 759, 971, 446, 745, 3772, 202, 202, 430, 261, 745, 3772, 422, 446, 262, 1082, 202, 1991, 3772, 273, 394, 3049, 2624, 12, 20845, 26857, 11272, 202, 202, 430, 261, 1501, 1972, 422, 446, 262, 1082, 202, 3175, 1972, 273, 394, 1033, 5378, 288, 289, 31, 202, 202, 759, 14338, 9232, 261, 2696, 434, 833, 13, 13484, 202, 202, 430, 2 ]
submitErrorEvent = new XFormsSubmitErrorEvent(XFormsModelSubmission.this, resolvedAction);
submitErrorEvent = new XFormsSubmitErrorEvent(XFormsModelSubmission.this, resolvedActionOrResource);
private XFormsSubmitErrorEvent createErrorEvent(ConnectionResult connectionResult) throws IOException { XFormsSubmitErrorEvent submitErrorEvent = null; if (connectionResult.hasContent()) { if (ProcessorUtils.isXMLContentType(connectionResult.resultMediaType)) { // XML content-type // TODO: XForms 1.1 may mandate that we always try to parse the body as XML first // Read stream into Document final DocumentInfo responseBody = TransformerUtils.readTinyTree(connectionResult.getResultInputStream(), connectionResult.resourceURI); submitErrorEvent = new XFormsSubmitErrorEvent(XFormsModelSubmission.this, resolvedAction); submitErrorEvent.setBodyDocument(responseBody); } else if (ProcessorUtils.isTextContentType(connectionResult.resultMediaType)) { // Text content-type // Read stream into String final String charset; { final String connectionCharset = NetUtils.getContentTypeCharset(connectionResult.resultMediaType); if (connectionCharset != null) charset = connectionCharset; else charset = DEFAULT_TEXT_READING_ENCODING; } final Reader reader = new InputStreamReader(connectionResult.getResultInputStream(), charset); final String responseBody = NetUtils.readStreamAsString(reader); submitErrorEvent = new XFormsSubmitErrorEvent(XFormsModelSubmission.this, resolvedAction); submitErrorEvent.setBodyString(responseBody); } else { // This is binary // Don't store anything for now } } return submitErrorEvent; }
54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/4fb6cf3fac9f1dc7fff303d2d1018b171043a9da/XFormsModelSubmission.java/clean/src/java/org/orbeon/oxf/xforms/XFormsModelSubmission.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1139, 18529, 11620, 668, 1133, 752, 668, 1133, 12, 1952, 1253, 1459, 1253, 13, 1216, 1860, 288, 3639, 1139, 18529, 11620, 668, 1133, 4879, 668, 1133, 273, 446, 31, 3639, 309, 261, 4071, 1253, 18, 5332, 1350, 10756, 288, 5411, 309, 261, 5164, 1989, 18, 291, 4201, 8046, 12, 4071, 1253, 18, 2088, 20870, 3719, 288, 7734, 368, 3167, 913, 17, 723, 7734, 368, 2660, 30, 1139, 18529, 404, 18, 21, 2026, 312, 464, 340, 716, 732, 3712, 775, 358, 1109, 326, 1417, 487, 3167, 1122, 7734, 368, 2720, 1407, 1368, 4319, 7734, 727, 4319, 966, 18761, 13491, 273, 11519, 1989, 18, 896, 56, 11652, 2471, 12, 4071, 1253, 18, 588, 1253, 4348, 9334, 1459, 1253, 18, 3146, 3098, 1769, 7734, 4879, 668, 1133, 273, 394, 1139, 18529, 11620, 668, 1133, 12, 60, 18529, 1488, 17865, 18, 2211, 16, 4640, 1803, 1162, 1420, 1769, 7734, 4879, 668, 1133, 18, 542, 2250, 2519, 12, 2740, 2250, 1769, 5411, 289, 469, 309, 261, 5164, 1989, 18, 291, 1528, 8046, 12, 4071, 1253, 18, 2088, 20870, 3719, 288, 7734, 368, 3867, 913, 17, 723, 7734, 368, 2720, 1407, 1368, 514, 7734, 727, 514, 4856, 31, 7734, 288, 10792, 727, 514, 1459, 9652, 273, 8503, 1989, 18, 588, 8046, 9652, 12, 4071, 1253, 18, 2088, 20870, 1769, 10792, 309, 261, 4071, 9652, 480, 446, 13, 13491, 4856, 273, 1459, 9652, 31, 10792, 469, 13491, 4856, 273, 3331, 67, 5151, 67, 6949, 1360, 67, 14672, 31, 7734, 289, 7734, 727, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1139, 18529, 11620, 668, 1133, 752, 668, 1133, 12, 1952, 1253, 1459, 1253, 13, 1216, 1860, 288, 3639, 1139, 18529, 11620, 668, 1133, 4879, 668, 1133, 273, 446, 31, 3639, 309, 261, 4071, 1253, 18, 5332, 1350, 10756, 288, 5411, 309, 261, 5164, 1989, 18, 291, 4201, 8046, 12, 4071, 1253, 18, 2088, 20870, 3719, 288, 7734, 368, 3167, 913, 17, 723, 7734, 368, 2660, 30, 1139, 18529, 404, 18, 21, 2026, 312, 464, 340, 716, 732, 3712, 775, 358, 1109, 326, 1417, 487, 3167, 1122, 7734, 368, 2720, 1407, 1368, 4319, 7734, 727, 4319, 966, 18761, 13491, 273, 11519, 1989, 18, 896, 56, 11652, 2471, 12, 4071, 1253, 18, 588, 1253, 4348, 9334, 1459, 1253, 18, 2 ]
fValidation = componentManager.getFeature(VALIDATION);
fDynamicValidation = componentManager.getFeature(DYNAMIC_VALIDATION);
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException { // get error reporter fXSIErrorReporter.reset((XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER)); fSchemaLoader.setProperty(ERROR_REPORTER, fXSIErrorReporter.fErrorReporter); // get symbol table. if it's a new one, add symbols to it. SymbolTable symbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE); if (symbolTable != fSymbolTable) { fSchemaLoader.setProperty(SYMBOL_TABLE, symbolTable); fSymbolTable = symbolTable; } // internal xerces property: namespace-context fNamespaceSupport = (NamespaceSupport)componentManager.getProperty(NAMESPACE_CONTEXT_PROPERTY); fValidationState.setNamespaceSupport(fNamespaceSupport); fState4XsiType.setNamespaceSupport(fNamespaceSupport); fState4ApplyDefault.setNamespaceSupport(fNamespaceSupport); try { fValidation = componentManager.getFeature(VALIDATION); } catch (XMLConfigurationException e) { fValidation = false; } // Xerces features try { fValidation = fValidation && componentManager.getFeature(SCHEMA_VALIDATION); } catch (XMLConfigurationException e) { fValidation = false; } try { fFullChecking = componentManager.getFeature(SCHEMA_FULL_CHECKING); } catch (XMLConfigurationException e) { fFullChecking = false; } // the validator will do full checking anyway; the loader should // not (and in fact cannot) concern itself with this. fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, false); try { fDynamicValidation = componentManager.getFeature(DYNAMIC_VALIDATION); } catch (XMLConfigurationException e) { fDynamicValidation = false; } try { fNormalizeData = componentManager.getFeature(NORMALIZE_DATA); } catch (XMLConfigurationException e) { fNormalizeData = false; } try { fSchemaElementDefault = componentManager.getFeature(SCHEMA_ELEMENT_DEFAULT); } catch (XMLConfigurationException e) { fSchemaElementDefault = false; } fEntityResolver = (XMLEntityResolver)componentManager.getProperty(ENTITY_MANAGER); fSchemaLoader.setEntityResolver(fEntityResolver); fValidationManager = (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER); fValidationManager.addValidationState(fValidationState); fValidationState.setSymbolTable(fSymbolTable); // get schema location properties try { fExternalSchemas = (String)componentManager.getProperty(SCHEMA_LOCATION); fExternalNoNamespaceSchema = (String)componentManager.getProperty(SCHEMA_NONS_LOCATION); } catch (XMLConfigurationException e) { fExternalSchemas = null; fExternalNoNamespaceSchema = null; } fSchemaLoader.setProperty(SCHEMA_LOCATION, fExternalSchemas); fSchemaLoader.setProperty(SCHEMA_NONS_LOCATION, fExternalNoNamespaceSchema); try { fJaxpSchemaSource = componentManager.getProperty(JAXP_SCHEMA_SOURCE); } catch (XMLConfigurationException e){ fJaxpSchemaSource = null; } fSchemaLoader.setProperty(JAXP_SCHEMA_SOURCE, fJaxpSchemaSource); fResourceIdentifier.clear(); // clear grammars, and put the one for schema namespace there try { fGrammarPool = (XMLGrammarPool)componentManager.getProperty(XMLGRAMMAR_POOL); } catch (XMLConfigurationException e){ fGrammarPool = null; } fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // Copy the allow-java-encoding feature to the grammar loader. // REVISIT: what other fetures/properties do we want to copy? try { boolean jencoding = componentManager.getFeature(ALLOW_JAVA_ENCODING); fSchemaLoader.setFeature(ALLOW_JAVA_ENCODING, jencoding); } catch (XMLConfigurationException e){ } // clear grammars, and put the one for schema namespace there // logic for resetting grammar-related components moved // to schema loader fSchemaLoader.reset(); //reset XSDDescription fLocationPairs.clear(); fNoNamespaceLocationArray.resize(0 , 2) ; // initialize state fCurrentElemDecl = null; fCurrentCM = null; fCurrCMState = null; fSkipValidationDepth = -1; fPartialValidationDepth = -1; fElementDepth = -1; fChildCount = 0; // datatype normalization fEntityRef = false; fInCDATA = false; fMatcherStack.clear(); fBaseURI = null; fState4XsiType.setSymbolTable(symbolTable); fState4ApplyDefault.setSymbolTable(symbolTable); } // reset(XMLComponentManager)
46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/d25b30225af83c0ff67fecc2da34bfe9c4a9629b/XMLSchemaValidator.java/buggy/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2715, 12, 4201, 1841, 1318, 1794, 1318, 13, 1216, 3167, 10737, 288, 3639, 368, 336, 555, 11528, 3639, 284, 60, 2320, 668, 13289, 18, 6208, 12443, 4201, 668, 13289, 13, 4652, 1318, 18, 588, 1396, 12, 3589, 67, 28879, 916, 2560, 10019, 3639, 284, 3078, 2886, 18, 542, 1396, 12, 3589, 67, 28879, 916, 2560, 16, 284, 60, 2320, 668, 13289, 18, 74, 668, 13289, 1769, 3639, 368, 336, 3273, 1014, 18, 309, 518, 1807, 279, 394, 1245, 16, 527, 7963, 358, 518, 18, 3639, 8565, 1388, 26086, 273, 261, 5335, 1388, 13, 4652, 1318, 18, 588, 1396, 12, 22093, 67, 7775, 1769, 3639, 309, 261, 7175, 1388, 480, 284, 5335, 1388, 13, 288, 5411, 284, 3078, 2886, 18, 542, 1396, 12, 22093, 67, 7775, 16, 26086, 1769, 5411, 284, 5335, 1388, 273, 26086, 31, 3639, 289, 3639, 368, 2713, 619, 264, 764, 1272, 30, 1981, 17, 2472, 540, 284, 3402, 6289, 273, 261, 3402, 6289, 13, 4652, 1318, 18, 588, 1396, 12, 11368, 67, 13181, 67, 9900, 1769, 3639, 284, 4354, 1119, 18, 542, 3402, 6289, 12, 74, 3402, 6289, 1769, 3639, 284, 1119, 24, 60, 7722, 559, 18, 542, 3402, 6289, 12, 74, 3402, 6289, 1769, 3639, 284, 1119, 24, 7001, 1868, 18, 542, 3402, 6289, 12, 74, 3402, 6289, 1769, 3639, 775, 288, 5411, 284, 9791, 4354, 273, 1794, 1318, 18, 588, 4595, 12, 40, 25145, 67, 5063, 2689, 1769, 3639, 289, 3639, 1044, 261, 4201, 10737, 425, 13, 288, 5411, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2715, 12, 4201, 1841, 1318, 1794, 1318, 13, 1216, 3167, 10737, 288, 3639, 368, 336, 555, 11528, 3639, 284, 60, 2320, 668, 13289, 18, 6208, 12443, 4201, 668, 13289, 13, 4652, 1318, 18, 588, 1396, 12, 3589, 67, 28879, 916, 2560, 10019, 3639, 284, 3078, 2886, 18, 542, 1396, 12, 3589, 67, 28879, 916, 2560, 16, 284, 60, 2320, 668, 13289, 18, 74, 668, 13289, 1769, 3639, 368, 336, 3273, 1014, 18, 309, 518, 1807, 279, 394, 1245, 16, 527, 7963, 358, 518, 18, 3639, 8565, 1388, 26086, 273, 261, 5335, 1388, 13, 4652, 1318, 18, 588, 1396, 12, 22093, 67, 7775, 1769, 3639, 309, 261, 7175, 1388, 480, 284, 5335, 1388, 13, 288, 5411, 284, 2 ]
fileName = "lnk" + linkNumber + "_" + externalMatchLocation.segment(segments);
fileName = ICSearchConstants.EXTERNAL_SEARCH_LINK_PREFIX + linkNumber + "_" + externalMatchLocation.segment(segments);
private IFile getUniqueFile(IPath externalMatchLocation, IProject refProject) { IFile file = null; String fileName = ""; //$NON-NLS-1$ //Total number of segments in file name int segments = externalMatchLocation.segmentCount() - 1; for (int linkNumber=0; linkNumber<Integer.MAX_VALUE; linkNumber++){ if (fileName !="") //$NON-NLS-1$ fileName = "lnk" + linkNumber + "_" + externalMatchLocation.segment(segments); //$NON-NLS-1$ //$NON-NLS-2$ else fileName = externalMatchLocation.segment(segments); file=refProject.getFile(fileName); IPath path = file.getLocation(); //If the location passed in is equal to a location of a file //that is already linked then return the file if (externalMatchLocation.equals(path)) break; //If the file doesn't already exist in the workspace return if (!file.exists()) break; } return file; }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/2164ad4e156ca6bd5356b95930589775095d6542/NewSearchResultCollector.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/NewSearchResultCollector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 467, 812, 16076, 812, 12, 45, 743, 3903, 2060, 2735, 16, 467, 4109, 1278, 4109, 13, 288, 202, 202, 45, 812, 585, 273, 446, 31, 202, 202, 780, 3968, 273, 1408, 31, 4329, 3993, 17, 5106, 17, 21, 8, 202, 202, 759, 5269, 1300, 434, 5155, 316, 585, 508, 202, 202, 474, 5155, 273, 3903, 2060, 2735, 18, 9273, 1380, 1435, 300, 404, 31, 202, 202, 1884, 261, 474, 1692, 1854, 33, 20, 31, 1692, 1854, 32, 4522, 18, 6694, 67, 4051, 31, 1692, 1854, 27245, 95, 1082, 202, 430, 261, 17812, 480, 3660, 13, 4329, 3993, 17, 5106, 17, 21, 8, 9506, 202, 17812, 273, 26899, 2979, 2918, 18, 2294, 11702, 67, 17251, 67, 10554, 67, 6307, 397, 1692, 1854, 397, 8802, 397, 3903, 2060, 2735, 18, 9273, 12, 12838, 1769, 4329, 3993, 17, 5106, 17, 21, 8, 4329, 3993, 17, 5106, 17, 22, 8, 1082, 202, 12107, 9506, 202, 17812, 273, 3903, 2060, 2735, 18, 9273, 12, 12838, 1769, 25083, 202, 768, 33, 1734, 4109, 18, 29925, 12, 17812, 1769, 1082, 565, 467, 743, 589, 273, 585, 18, 588, 2735, 5621, 25083, 565, 368, 2047, 326, 2117, 2275, 316, 353, 3959, 358, 279, 2117, 434, 279, 585, 1082, 565, 368, 19056, 353, 1818, 8459, 1508, 327, 326, 585, 1082, 565, 309, 261, 9375, 2060, 2735, 18, 14963, 12, 803, 3719, 1082, 377, 202, 8820, 31, 1082, 377, 1082, 565, 368, 2047, 326, 585, 3302, 1404, 1818, 1005, 316, 326, 6003, 327, 1082, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 467, 812, 16076, 812, 12, 45, 743, 3903, 2060, 2735, 16, 467, 4109, 1278, 4109, 13, 288, 202, 202, 45, 812, 585, 273, 446, 31, 202, 202, 780, 3968, 273, 1408, 31, 4329, 3993, 17, 5106, 17, 21, 8, 202, 202, 759, 5269, 1300, 434, 5155, 316, 585, 508, 202, 202, 474, 5155, 273, 3903, 2060, 2735, 18, 9273, 1380, 1435, 300, 404, 31, 202, 202, 1884, 261, 474, 1692, 1854, 33, 20, 31, 1692, 1854, 32, 4522, 18, 6694, 67, 4051, 31, 1692, 1854, 27245, 95, 1082, 202, 430, 261, 17812, 480, 3660, 13, 4329, 3993, 17, 5106, 17, 21, 8, 9506, 202, 17812, 273, 26899, 2979, 2918, 18, 2294, 11702, 67, 17251, 67, 10554, 2 ]
if (nextRingAttachmentBond.getAtomAt(0) == vectorAtom2) {
if (nextRingAttachmentBond.getAtomAt(0) == vectorAtom2) {
private void layoutNextRingSystem() { Atom vectorAtom1 = null, vectorAtom2 = null; Point2d oldPoint1 = null, newPoint1 = null, oldPoint2 = null, newPoint2 = null; RingSet nextRingSystem = null; AtomContainer ringSystem = null; Bond nextRingAttachmentBond = null; double angle, angle1, angle2; resetUnplacedRings(); AtomContainer tempAc = atomPlacer.getPlacedAtoms(molecule); nextRingAttachmentBond = getNextBondWithUnplacedRingAtom(); if (nextRingAttachmentBond != null) { vectorAtom2 = getRingAtom(nextRingAttachmentBond); if (nextRingAttachmentBond.getAtomAt(0) == vectorAtom2) { vectorAtom1 = nextRingAttachmentBond.getAtomAt(1); } else { vectorAtom1 = nextRingAttachmentBond.getAtomAt(0); } oldPoint2 = vectorAtom2.getPoint2D(); oldPoint1 = vectorAtom1.getPoint2D(); //System.out.println("oldPoint1: " + oldPoint1); //System.out.println("oldPoint2: " + oldPoint2); angle1 = GeometryTools.getAngle(oldPoint2.x - oldPoint1.x, oldPoint2.y - oldPoint1.y); nextRingSystem = getRingSystemOfAtom(ringSystems, vectorAtom2); ringSystem = new AtomContainer(); ringSystem.add(nextRingSystem.getRingSetInAtomContainer()); /* Do the layout of the next ring system */ layoutRingSet(firstBondVector, nextRingSystem); /* Place all the substituents of next ring system */ atomPlacer.markNotPlaced(tempAc); ringSystem.add(ringPlacer.placeRingSubstituents(nextRingSystem, bondLength)); atomPlacer.markPlaced(tempAc); newPoint2 = vectorAtom2.getPoint2D(); newPoint1 = vectorAtom1.getPoint2D(); //System.out.println("newPoint1: " + newPoint1); //System.out.println("newPoint2: " + newPoint2); angle2 = GeometryTools.getAngle(newPoint2.x - newPoint1.x, newPoint2.y - newPoint1.y); Vector2d transVec = new Vector2d(oldPoint1); transVec.sub(new Vector2d(newPoint1)); GeometryTools.translate2D(ringSystem, transVec); //System.out.println(ringSystem.getAtomCount()); //System.out.println("oldPoint1 again: " + oldPoint1); //System.out.println("and the angles: " + angle1 + ", " + angle2 + "; diff = " + (angle1 - angle2)); GeometryTools.rotate(ringSystem, oldPoint1, Math.PI + angle1); //vectorAtom2.setPoint2D(oldPoint2); vectorAtom1.setPoint2D(oldPoint1); } }
46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/0207507cbcff0172e0dc48407a71dcf4d56c8695/StructureDiagramGenerator.java/clean/src/org/openscience/cdk/layout/StructureDiagramGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3511, 2134, 10369, 3163, 1435, 202, 95, 202, 202, 3641, 3806, 3641, 21, 273, 446, 16, 3806, 3641, 22, 273, 446, 31, 202, 202, 2148, 22, 72, 1592, 2148, 21, 273, 446, 16, 394, 2148, 21, 273, 446, 16, 1592, 2148, 22, 273, 446, 16, 394, 2148, 22, 273, 446, 31, 202, 202, 10369, 694, 1024, 10369, 3163, 273, 446, 31, 202, 202, 3641, 2170, 9221, 3163, 273, 446, 31, 9506, 202, 9807, 1024, 10369, 6803, 9807, 273, 446, 31, 1082, 202, 9056, 5291, 16, 5291, 21, 16, 5291, 22, 31, 1082, 202, 6208, 984, 28238, 54, 899, 5621, 202, 202, 3641, 2170, 1906, 9988, 273, 3179, 1749, 10598, 18, 588, 6029, 72, 14280, 12, 81, 10545, 1769, 202, 202, 4285, 10369, 6803, 9807, 273, 6927, 9807, 1190, 984, 28238, 10369, 3641, 5621, 202, 202, 430, 261, 4285, 10369, 6803, 9807, 480, 446, 13, 202, 202, 95, 1082, 202, 7737, 3641, 22, 273, 4170, 310, 3641, 12, 4285, 10369, 6803, 9807, 1769, 1082, 202, 430, 261, 4285, 10369, 6803, 9807, 18, 588, 3641, 861, 12, 20, 13, 422, 3806, 3641, 22, 13, 1082, 202, 95, 9506, 202, 7737, 3641, 21, 273, 1024, 10369, 6803, 9807, 18, 588, 3641, 861, 12, 21, 1769, 1082, 202, 97, 6862, 6862, 202, 12107, 1082, 202, 95, 9506, 202, 7737, 3641, 21, 273, 1024, 10369, 6803, 9807, 18, 588, 3641, 861, 12, 20, 1769, 1082, 202, 97, 6862, 6862, 202, 1673, 2148, 22, 273, 3806, 3641, 22, 18, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3511, 2134, 10369, 3163, 1435, 202, 95, 202, 202, 3641, 3806, 3641, 21, 273, 446, 16, 3806, 3641, 22, 273, 446, 31, 202, 202, 2148, 22, 72, 1592, 2148, 21, 273, 446, 16, 394, 2148, 21, 273, 446, 16, 1592, 2148, 22, 273, 446, 16, 394, 2148, 22, 273, 446, 31, 202, 202, 10369, 694, 1024, 10369, 3163, 273, 446, 31, 202, 202, 3641, 2170, 9221, 3163, 273, 446, 31, 9506, 202, 9807, 1024, 10369, 6803, 9807, 273, 446, 31, 1082, 202, 9056, 5291, 16, 5291, 21, 16, 5291, 22, 31, 1082, 202, 6208, 984, 28238, 54, 899, 5621, 202, 202, 3641, 2170, 1906, 9988, 273, 3179, 1749, 10598, 18, 588, 6029, 72, 14280, 12, 2 ]
if ((active0 & 0x177e5080a08c00L) != 0L)
if ((active0 & 0x2efca101418c00L) != 0L)
private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){ switch (pos) { case 0: if ((active0 & 0x3fbff13f7ffc00L) != 0L) { jjmatchedKind = 56; return 27; } if ((active0 & 0x400040800000L) != 0L) { jjmatchedKind = 56; return 1; } if ((active0 & 0x80000000L) != 0L) { jjmatchedKind = 56; return 18; } return -1; case 1: if ((active0 & 0x3ffff1fffffc00L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 1; return 27; } return -1; case 2: if ((active0 & 0x3fff71fef8fc00L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 2; return 27; } return -1; case 3: if ((active0 & 0x3fff51fae8fc00L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 3; return 27; } return -1; case 4: if ((active0 & 0x17fe50d0a0ec00L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 4; return 27; } return -1; case 5: if ((active0 & 0x177e5080a08c00L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 5; return 27; } return -1; case 6: if ((active0 & 0x73e5000a08c00L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 6; return 27; } return -1; case 7: if ((active0 & 0x53e0000a00000L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 7; return 27; } return -1; case 8: if ((active0 & 0x1e0000800000L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 8; return 27; } return -1; case 9: if ((active0 & 0x120000800000L) != 0L) { jjmatchedKind = 56; jjmatchedPos = 9; return 27; } return -1; default : return -1; }}
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/e46325700c227f0167b4ff54cffe78c3db8e7ab8/ZimbraQueryParserTokenManager.java/buggy/ZimbraServer/src/java/com/zimbra/cs/index/queryparser/ZimbraQueryParserTokenManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 727, 509, 10684, 4947, 28565, 40, 507, 67, 20, 12, 474, 949, 16, 1525, 2695, 20, 16, 1525, 2695, 21, 15329, 282, 1620, 261, 917, 13, 282, 288, 1377, 648, 374, 30, 540, 309, 14015, 3535, 20, 473, 374, 92, 23, 19192, 1403, 3437, 74, 27, 1403, 71, 713, 48, 13, 480, 374, 48, 13, 540, 288, 5411, 10684, 11073, 5677, 273, 13850, 31, 5411, 327, 12732, 31, 540, 289, 540, 309, 14015, 3535, 20, 473, 374, 92, 16010, 3028, 6840, 11706, 48, 13, 480, 374, 48, 13, 540, 288, 5411, 10684, 11073, 5677, 273, 13850, 31, 5411, 327, 404, 31, 540, 289, 540, 309, 14015, 3535, 20, 473, 374, 92, 28, 17877, 48, 13, 480, 374, 48, 13, 540, 288, 5411, 10684, 11073, 5677, 273, 13850, 31, 5411, 327, 6549, 31, 540, 289, 540, 327, 300, 21, 31, 1377, 648, 404, 30, 540, 309, 14015, 3535, 20, 473, 374, 92, 23, 9460, 21, 9460, 7142, 713, 48, 13, 480, 374, 48, 13, 540, 288, 5411, 10684, 11073, 5677, 273, 13850, 31, 5411, 10684, 11073, 1616, 273, 404, 31, 5411, 327, 12732, 31, 540, 289, 540, 327, 300, 21, 31, 1377, 648, 576, 30, 540, 309, 14015, 3535, 20, 473, 374, 92, 23, 25449, 11212, 3030, 74, 28, 7142, 713, 48, 13, 480, 374, 48, 13, 540, 288, 5411, 10684, 11073, 5677, 273, 13850, 31, 5411, 10684, 11073, 1616, 273, 576, 31, 5411, 327, 12732, 31, 540, 289, 540, 327, 300, 21, 31, 1377, 648, 890, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 727, 509, 10684, 4947, 28565, 40, 507, 67, 20, 12, 474, 949, 16, 1525, 2695, 20, 16, 1525, 2695, 21, 15329, 282, 1620, 261, 917, 13, 282, 288, 1377, 648, 374, 30, 540, 309, 14015, 3535, 20, 473, 374, 92, 23, 19192, 1403, 3437, 74, 27, 1403, 71, 713, 48, 13, 480, 374, 48, 13, 540, 288, 5411, 10684, 11073, 5677, 273, 13850, 31, 5411, 327, 12732, 31, 540, 289, 540, 309, 14015, 3535, 20, 473, 374, 92, 16010, 3028, 6840, 11706, 48, 13, 480, 374, 48, 13, 540, 288, 5411, 10684, 11073, 5677, 273, 13850, 31, 5411, 327, 404, 31, 540, 289, 540, 309, 14015, 3535, 20, 473, 374, 92, 28, 17877, 48, 13, 480, 374, 48, 2 ]
}
}
public int getLeadSelectionRow() { return 0; // TODO } // getLeadSelectionRow()
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/affa0d2d6f465179c4324a2357a64c93083d6c43/DefaultTreeSelectionModel.java/buggy/core/src/classpath/javax/javax/swing/tree/DefaultTreeSelectionModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 9014, 684, 6233, 1999, 1435, 288, 202, 202, 2463, 374, 31, 368, 2660, 202, 97, 368, 9014, 684, 6233, 1999, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 9014, 684, 6233, 1999, 1435, 288, 202, 202, 2463, 374, 31, 368, 2660, 202, 97, 368, 9014, 684, 6233, 1999, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
return;
public void drop(DropTargetDropEvent dtde) { TablePane tp = (TablePane) dtde.getDropTargetContext().getComponent(); logger.debug("Drop target drop event on "+tp.getName()+": "+dtde); Transferable t = dtde.getTransferable(); DataFlavor importFlavor = bestImportFlavor(tp, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); tp.setInsertionPoint(COLUMN_INDEX_NONE); } else { try { DBTree dbtree = ArchitectFrame.getMainInstance().dbTree; // XXX: bad int insertionPoint = tp.pointToColumnIndex(dtde.getLocation()); if (insertionPoint < 0) insertionPoint = 0; ArrayList paths = (ArrayList) t.getTransferData(importFlavor); Iterator pathIt = paths.iterator(); while (pathIt.hasNext()) { Object someData = dbtree.getNodeForDnDPath((int[]) pathIt.next()); logger.debug("drop: got object of type "+someData.getClass().getName()); if (someData instanceof SQLTable) { SQLTable table = (SQLTable) someData; if (table.getParentDatabase() == tp.getModel().getParentDatabase()) { // can't import table from target into target!! dtde.rejectDrop(); } else { dtde.acceptDrop(DnDConstants.ACTION_COPY); tp.getModel().inherit(insertionPoint, table); dtde.dropComplete(true); } return; } else if (someData instanceof SQLColumn) { SQLColumn col = (SQLColumn) someData; if (col.getParentTable().getParentDatabase() == tp.getModel().getParentDatabase()) { dtde.acceptDrop(DnDConstants.ACTION_MOVE); int removedIndex = col.getParent().getChildren().indexOf(col); if (tp.getModel() == col.getParentTable()) { // moving column inside the same table if (insertionPoint > removedIndex) { insertionPoint--; } } col.getParentTable().removeColumn(col); logger.debug("Adding column '"+col.getName() +"' to table '"+tp.getModel().getName() +"' at position "+insertionPoint); tp.getModel().addColumn(insertionPoint, col); dtde.dropComplete(true); } else { dtde.acceptDrop(DnDConstants.ACTION_COPY); tp.getModel().inherit(insertionPoint, col); logger.debug("Inherited "+col.getColumnName()+" to table"); dtde.dropComplete(true); } return; } else { dtde.rejectDrop(); } } } catch(Exception ex) { JOptionPane.showMessageDialog(tp, "Drop failed: "+ex.getMessage()); logger.error("Error processing drop operation", ex); dtde.rejectDrop(); } finally { tp.setInsertionPoint(COLUMN_INDEX_NONE); } } }
53257 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53257/f026fb33bce99249d7b9664d1b78bb4ce46fd5f9/TablePane.java/buggy/src/ca/sqlpower/architect/swingui/TablePane.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 3640, 12, 7544, 2326, 7544, 1133, 3681, 323, 13, 288, 1082, 202, 1388, 8485, 8071, 273, 261, 1388, 8485, 13, 3681, 323, 18, 588, 7544, 2326, 1042, 7675, 588, 1841, 5621, 1082, 202, 4901, 18, 4148, 2932, 7544, 1018, 3640, 871, 603, 13773, 6834, 18, 17994, 1435, 15, 6877, 13773, 7510, 323, 1769, 1082, 202, 5912, 429, 268, 273, 3681, 323, 18, 588, 5912, 429, 5621, 1082, 202, 751, 2340, 9444, 1930, 2340, 9444, 273, 3796, 5010, 2340, 9444, 12, 6834, 16, 268, 18, 588, 5912, 751, 2340, 842, 1383, 10663, 1082, 202, 430, 261, 5666, 2340, 9444, 422, 446, 13, 288, 9506, 202, 7510, 323, 18, 24163, 7544, 5621, 9506, 202, 6834, 18, 542, 29739, 2148, 12, 11009, 67, 9199, 67, 9826, 1769, 1082, 202, 97, 469, 288, 9506, 202, 698, 288, 6862, 202, 2290, 2471, 1319, 3413, 273, 16959, 15004, 3219, 18, 588, 6376, 1442, 7675, 1966, 2471, 31, 225, 368, 11329, 30, 5570, 6862, 202, 474, 12626, 2148, 273, 8071, 18, 1153, 774, 21689, 12, 7510, 323, 18, 588, 2735, 10663, 6862, 202, 430, 261, 6387, 285, 2148, 411, 374, 13, 12626, 2148, 273, 374, 31, 6862, 202, 19558, 2953, 273, 261, 19558, 13, 268, 18, 588, 5912, 751, 12, 5666, 2340, 9444, 1769, 6862, 202, 3198, 589, 7193, 273, 2953, 18, 9838, 5621, 6862, 202, 17523, 261, 803, 7193, 18, 5332, 2134, 10756, 288, 25083, 202, 921, 2690, 751, 273, 1319, 3413, 18, 588, 907, 1290, 19053, 40, 743, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 3640, 12, 7544, 2326, 7544, 1133, 3681, 323, 13, 288, 1082, 202, 1388, 8485, 8071, 273, 261, 1388, 8485, 13, 3681, 323, 18, 588, 7544, 2326, 1042, 7675, 588, 1841, 5621, 1082, 202, 4901, 18, 4148, 2932, 7544, 1018, 3640, 871, 603, 13773, 6834, 18, 17994, 1435, 15, 6877, 13773, 7510, 323, 1769, 1082, 202, 5912, 429, 268, 273, 3681, 323, 18, 588, 5912, 429, 5621, 1082, 202, 751, 2340, 9444, 1930, 2340, 9444, 273, 3796, 5010, 2340, 9444, 12, 6834, 16, 268, 18, 588, 5912, 751, 2340, 842, 1383, 10663, 1082, 202, 430, 261, 5666, 2340, 9444, 422, 446, 13, 288, 9506, 202, 7510, 323, 18, 24163, 7544, 5621, 9506, 202, 6834, 18, 542, 2 ]
if (propId == IEditorPart.PROP_DIRTY) updateState();
if (propId == IEditorPart.PROP_DIRTY) { updateState(); }
public void propertyChanged(Object source, int propId) { if (source == activeView) { if (propId == IEditorPart.PROP_DIRTY) updateState(); } }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/BaseSaveAction.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BaseSaveAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 1272, 5033, 12, 921, 1084, 16, 509, 2270, 548, 13, 288, 5411, 309, 261, 3168, 422, 2695, 1767, 13, 288, 7734, 309, 261, 5986, 548, 422, 467, 6946, 1988, 18, 15811, 67, 4537, 5538, 13, 10792, 1089, 1119, 5621, 5411, 289, 3639, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 1272, 5033, 12, 921, 1084, 16, 509, 2270, 548, 13, 288, 5411, 309, 261, 3168, 422, 2695, 1767, 13, 288, 7734, 309, 261, 5986, 548, 422, 467, 6946, 1988, 18, 15811, 67, 4537, 5538, 13, 10792, 1089, 1119, 5621, 5411, 289, 3639, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
bootImage.setAddressWord(rvmFieldOffset, getAddressValue(addr, msg, true)); } else if (rvmFieldType.equals(VM_TypeReference.Word)) { VM_Word w = (VM_Word) jdkFieldAcc.get(jdkObject); int val = w == null ? 0 : w.toInt(); VM_Statics.setSlotContents(rvmFieldOffset, val); } else if (rvmFieldType.equals(VM_TypeReference.Offset)) { VM_Offset o = (VM_Offset) jdkFieldAcc.get(jdkObject); int val = o == null ? 0 : o.toInt(); VM_Statics.setSlotContents(rvmFieldOffset, val); } else if (rvmFieldType.equals(VM_TypeReference.Extent)) { VM_Extent e = (VM_Extent) jdkFieldAcc.get(jdkObject); int val = e == null ? 0 : e.toInt(); VM_Statics.setSlotContents(rvmFieldOffset, val);
boolean warn = rvmFieldType.equals(VM_TypeReference.Address); bootImage.setAddressWord(rvmFieldOffset, getAddressValue(o, msg, warn));
private static int copyToBootImage(Object jdkObject, boolean allocOnly, int overwriteOffset, Object parentObject) throws IllegalAccessException { // // Return object if it is already copied and not being overwritten // BootImageMap.Entry mapEntry = BootImageMap.findOrCreateEntry(jdkObject); if (mapEntry.imageOffset != OBJECT_NOT_ALLOCATED && overwriteOffset == -1) return mapEntry.imageOffset; if (verbose >= 2) depth++; // // fetch object's type information // Class jdkType = jdkObject.getClass(); VM_Type rvmType = getRvmType(jdkType); if (rvmType == null) { if (verbose >= 2) traverseObject(jdkObject); if (verbose >= 2) depth--; return OBJECT_NOT_PRESENT; // object not part of bootimage } // // copy object to image // if (jdkType.isArray()) { VM_Array rvmArrayType = rvmType.asArray(); // // allocate space in image // int arrayCount = Array.getLength(jdkObject); int arrayImageOffset = (overwriteOffset == -1) ? bootImage.allocateArray(rvmArrayType, arrayCount) : overwriteOffset; mapEntry.imageOffset = arrayImageOffset; if (verbose >= 2) { if (depth == depthCutoff) say(SPACES.substring(0,depth+1), "TOO DEEP: cutting off"); else if (depth < depthCutoff) { String tab = SPACES.substring(0,depth+1); if (depth == 0 && jtocCount >= 0) tab = tab + "jtoc #" + String.valueOf(jtocCount) + ": "; int arraySize = rvmArrayType.getInstanceSize(arrayCount); say(tab, "Copying array ", jdkType.getName(), " length=", String.valueOf(arrayCount), (arraySize >= LARGE_ARRAY_SIZE) ? " large object!!!" : ""); } } VM_Type rvmElementType = rvmArrayType.getElementType(); // Show info on reachability of int arrays // if (false && rvmElementType.equals(VM_Type.IntType)) { if (parentObject != null) { Class parentObjectType = parentObject.getClass(); VM.sysWrite("Copying int array (", 4 * ((int []) jdkObject).length); VM.sysWriteln(" bytes) from parent object of type ", parentObjectType.toString()); } else { VM.sysWriteln("Copying int array from no parent object"); } } // // copy array elements from host jdk address space into image // recurse on values that are references // if (rvmElementType.isPrimitiveType()) { // array element is logical or numeric type if (rvmElementType.equals(VM_Type.BooleanType)) { boolean values[] = (boolean[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setByte(arrayImageOffset + i, values[i] ? 1 : 0); } else if (rvmElementType.equals(VM_Type.ByteType)) { byte values[] = (byte[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setByte(arrayImageOffset + i, values[i]); } else if (rvmElementType.equals(VM_Type.CharType)) { char values[] = (char[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setHalfWord(arrayImageOffset + (i << LOG_BYTES_IN_CHAR), values[i]); } else if (rvmElementType.equals(VM_Type.ShortType)) { short values[] = (short[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setHalfWord(arrayImageOffset + (i << LOG_BYTES_IN_SHORT), values[i]); } else if (rvmElementType.equals(VM_Type.IntType)) { int values[] = (int[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setFullWord(arrayImageOffset + (i << LOG_BYTES_IN_INT), values[i]); } else if (rvmElementType.equals(VM_Type.LongType)) { long values[] = (long[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setDoubleWord(arrayImageOffset + (i << LOG_BYTES_IN_LONG), values[i]); } else if (rvmElementType.equals(VM_Type.FloatType)) { float values[] = (float[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setFullWord(arrayImageOffset + (i << LOG_BYTES_IN_FLOAT), Float.floatToIntBits(values[i])); } else if (rvmElementType.equals(VM_Type.DoubleType)) { double values[] = (double[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setDoubleWord(arrayImageOffset + (i << LOG_BYTES_IN_DOUBLE), Double.doubleToLongBits(values[i])); } else fail("unexpected primitive array type: " + rvmArrayType); } else { // array element is reference type Object values[] = (Object []) jdkObject; Class jdkClass = jdkObject.getClass(); if (!allocOnly) { for (int i = 0; i<arrayCount; ++i) { if (values[i] != null) { if (verbose >= 2) traceContext.push(values[i].getClass().getName(), jdkClass.getName(), i); int imageOffset = copyToBootImage(values[i], allocOnly, -1, jdkObject); if (imageOffset == OBJECT_NOT_PRESENT) { // object not part of bootimage: install null reference if (verbose >= 2) traceContext.traceObjectNotInBootImage(); bootImage.setNullAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS)); } else { bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS), bootImageAddress + imageOffset); } if (verbose >= 2) traceContext.pop(); } } } } } else { if (rvmType == VM_Type.AddressArrayType) { if (verbose >= 2) depth--; VM_AddressArray addrArray = (VM_AddressArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.OffsetArrayType) { if (verbose >= 2) depth--; VM_OffsetArray addrArray = (VM_OffsetArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.WordArrayType) { if (verbose >= 2) depth--; VM_WordArray addrArray = (VM_WordArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.ExtentArrayType) { if (verbose >= 2) depth--; VM_ExtentArray addrArray = (VM_ExtentArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.CodeArrayType) { if (verbose >= 2) depth--; VM_CodeArray codeArray = (VM_CodeArray) jdkObject; Object backing = codeArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType.isMagicType()) { VM.sysWriteln("Unhandled copying of magic type: " + rvmType.getDescriptor().toString()); VM.sysFail("incomplete boot image support"); } // // allocate space in image // VM_Class rvmScalarType = rvmType.asClass(); int scalarImageOffset = (overwriteOffset == -1) ? bootImage.allocateScalar(rvmScalarType) : overwriteOffset; mapEntry.imageOffset = scalarImageOffset; if (verbose >= 2) { if (depth == depthCutoff) say(SPACES.substring(0,depth+1), "TOO DEEP: cutting off"); else if (depth < depthCutoff) { String tab = SPACES.substring(0,depth+1); if (depth == 0 && jtocCount >= 0) tab = tab + "jtoc #" + String.valueOf(jtocCount) + " "; int scalarSize = rvmScalarType.getInstanceSize(); say(tab, "Copying object ", jdkType.getName(), " size=", String.valueOf(scalarSize), (scalarSize >= LARGE_SCALAR_SIZE) ? " large object!!!" : ""); } } // // copy object fields from host jdk address space into image // recurse on values that are references // VM_Field[] rvmFields = rvmScalarType.getInstanceFields(); for (int i = 0, n = rvmFields.length; i < n; ++i) { VM_Field rvmField = rvmFields[i]; VM_TypeReference rvmFieldType = rvmField.getType(); int rvmFieldOffset = scalarImageOffset + rvmField.getOffset(); String rvmFieldName = rvmField.getName().toString(); Field jdkFieldAcc = getJdkFieldAccessor(jdkType, i, INSTANCE_FIELD); if (jdkFieldAcc == null) { if (verbose >= 2) traceContext.push(rvmFieldType.toString(), jdkType.getName(), rvmFieldName); if (verbose >= 2) traceContext.traceFieldNotInHostJdk(); if (verbose >= 2) traceContext.pop(); if (rvmFieldType.isPrimitiveType()) switch (rvmField.getType().getSize()) { case 4: bootImage.setFullWord(rvmFieldOffset, 0); break; case 8: bootImage.setDoubleWord(rvmFieldOffset, 0L); break; default:fail("unexpected field type: " + rvmFieldType); break; } else bootImage.setNullAddressWord(rvmFieldOffset); continue; } if (rvmFieldType.isPrimitiveType()) { // field is logical or numeric type if (rvmFieldType.isBooleanType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getBoolean(jdkObject) ? 1 : 0); } else if (rvmFieldType.isByteType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getByte(jdkObject)); } else if (rvmFieldType.isCharType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getChar(jdkObject)); } else if (rvmFieldType.isShortType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getShort(jdkObject)); } else if (rvmFieldType.isIntType()) { try { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getInt(jdkObject)); } catch (IllegalArgumentException ex) { System.err.println( "type " + rvmScalarType + ", field " + rvmField); throw ex; } } else if (rvmFieldType.isLongType()) { bootImage.setDoubleWord(rvmFieldOffset, jdkFieldAcc.getLong(jdkObject)); } else if (rvmFieldType.isFloatType()) { float f = jdkFieldAcc.getFloat(jdkObject); bootImage.setFullWord(rvmFieldOffset, Float.floatToIntBits(f)); } else if (rvmFieldType.isDoubleType()) { double d = jdkFieldAcc.getDouble(jdkObject); bootImage.setDoubleWord(rvmFieldOffset, Double.doubleToLongBits(d)); } else if (rvmFieldType.equals(VM_TypeReference.Address)) { Object o = jdkFieldAcc.get(jdkObject); VM_Address addr = (VM_Address) o; String msg = " instance field " + rvmField.toString(); bootImage.setAddressWord(rvmFieldOffset, getAddressValue(addr, msg, true)); } else if (rvmFieldType.equals(VM_TypeReference.Word)) { VM_Word w = (VM_Word) jdkFieldAcc.get(jdkObject); int val = w == null ? 0 : w.toInt(); VM_Statics.setSlotContents(rvmFieldOffset, val); } else if (rvmFieldType.equals(VM_TypeReference.Offset)) { VM_Offset o = (VM_Offset) jdkFieldAcc.get(jdkObject); int val = o == null ? 0 : o.toInt(); VM_Statics.setSlotContents(rvmFieldOffset, val); } else if (rvmFieldType.equals(VM_TypeReference.Extent)) { VM_Extent e = (VM_Extent) jdkFieldAcc.get(jdkObject); int val = e == null ? 0 : e.toInt(); VM_Statics.setSlotContents(rvmFieldOffset, val); } else { fail("unexpected primitive field type: " + rvmFieldType); } } else { // field is reference type Object value = jdkFieldAcc.get(jdkObject); if (!allocOnly && value != null) { Class jdkClass = jdkFieldAcc.getDeclaringClass(); if (verbose >= 2) traceContext.push(value.getClass().getName(), jdkClass.getName(), jdkFieldAcc.getName()); int imageOffset = copyToBootImage(value, allocOnly, -1, jdkObject); if (imageOffset == OBJECT_NOT_PRESENT) { // object not part of bootimage: install null reference if (verbose >= 2) traceContext.traceObjectNotInBootImage(); bootImage.setNullAddressWord(rvmFieldOffset); } else bootImage.setAddressWord(rvmFieldOffset, bootImageAddress + imageOffset); if (verbose >= 2) traceContext.pop(); } } } } // // copy object's type information block into image, if it's not there // already // if (!allocOnly) { if (verbose >= 2) traceContext.push("", jdkObject.getClass().getName(), "tib"); int tibImageOffset = copyToBootImage(rvmType.getTypeInformationBlock(), allocOnly, -1, jdkObject); if (verbose >= 2) traceContext.pop(); if (tibImageOffset == OBJECT_NOT_ALLOCATED) fail("can't copy tib for " + jdkObject); int tibAddress = bootImageAddress + tibImageOffset; VM_ObjectModel.setTIB(bootImage, mapEntry.imageOffset, VM_Address.fromIntZeroExtend(tibAddress), rvmType); } if (verbose >= 2) depth--; return mapEntry.imageOffset; }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/c36d8adc95e26d27b528629ed58daa806b88d906/BootImageWriter.java/clean/rvm/src/tools/bootImageWriter/BootImageWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 509, 29817, 15817, 2040, 12, 921, 525, 2883, 921, 16, 4766, 1377, 1250, 4767, 3386, 16, 509, 6156, 2335, 16, 4766, 1377, 1033, 982, 921, 13, 565, 1216, 11900, 565, 288, 1377, 368, 1377, 368, 2000, 733, 309, 518, 353, 1818, 9268, 471, 486, 3832, 15345, 1377, 368, 1377, 26254, 2040, 863, 18, 1622, 852, 1622, 273, 26254, 2040, 863, 18, 4720, 17717, 1622, 12, 78, 2883, 921, 1769, 1377, 309, 261, 1458, 1622, 18, 2730, 2335, 480, 12166, 67, 4400, 67, 1013, 1502, 13890, 597, 6156, 2335, 422, 300, 21, 13, 3639, 327, 852, 1622, 18, 2730, 2335, 31, 1377, 309, 261, 11369, 1545, 576, 13, 3598, 9904, 31, 1377, 368, 1377, 368, 2158, 733, 1807, 618, 1779, 1377, 368, 1377, 1659, 282, 525, 2883, 559, 273, 525, 2883, 921, 18, 588, 797, 5621, 1377, 8251, 67, 559, 436, 3489, 559, 273, 4170, 3489, 559, 12, 78, 2883, 559, 1769, 1377, 309, 261, 86, 3489, 559, 422, 446, 13, 288, 3639, 309, 261, 11369, 1545, 576, 13, 10080, 921, 12, 78, 2883, 921, 1769, 3639, 309, 261, 11369, 1545, 576, 13, 3598, 413, 31, 3639, 327, 12166, 67, 4400, 67, 3670, 17418, 31, 368, 733, 486, 1087, 434, 4835, 2730, 1377, 289, 1377, 368, 1377, 368, 1610, 733, 358, 1316, 1377, 368, 1377, 309, 261, 78, 2883, 559, 18, 291, 1076, 10756, 288, 3639, 8251, 67, 1076, 436, 3489, 27182, 273, 436, 3489, 559, 18, 345, 1076, 5621, 3639, 368, 3639, 368, 10101, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 509, 29817, 15817, 2040, 12, 921, 525, 2883, 921, 16, 4766, 1377, 1250, 4767, 3386, 16, 509, 6156, 2335, 16, 4766, 1377, 1033, 982, 921, 13, 565, 1216, 11900, 565, 288, 1377, 368, 1377, 368, 2000, 733, 309, 518, 353, 1818, 9268, 471, 486, 3832, 15345, 1377, 368, 1377, 26254, 2040, 863, 18, 1622, 852, 1622, 273, 26254, 2040, 863, 18, 4720, 17717, 1622, 12, 78, 2883, 921, 1769, 1377, 309, 261, 1458, 1622, 18, 2730, 2335, 480, 12166, 67, 4400, 67, 1013, 1502, 13890, 597, 6156, 2335, 422, 300, 21, 13, 3639, 327, 852, 1622, 18, 2730, 2335, 31, 1377, 309, 261, 11369, 1545, 576, 13, 3598, 9904, 31, 1377, 368, 1377, 368, 2158, 733, 2 ]
private SimpleType createSimpleType(Type type) { //Creates the instance of a class derived from SimpleType representing the type. SimpleType result= createInstance(type.getName()); if (result == null) throw new RuntimeException( Messages.message("schema.cantLoadBuiltInTypes") ); result.setName(type.getName()); //Load the result's typeCode int intCode; try { intCode= getClass().getDeclaredField(type.getCode()).getInt(null); } catch (Exception ex) { String error = Messages.message("schema.cantLoadBuiltInTypes") + ex; throw new SimpleTypesFactoryException(ex, error); } result.setTypeCode(intCode); //Find and set the result's SimpleType basetype (if any). if (type.getBase() != null) { result.setBaseType( getType(type.getBase()).getSimpleType() ); } //Adds the facets to the result Vector facets= type.getFacet(); for (int index= 0; index < facets.size(); index++) { TypeProperty prop= (TypeProperty)facets.elementAt(index); if (!prop.getPseudo()) { //adds a "real" facet (defined in the xml specs) result.addFacet( new Facet(prop.getName(), prop.getValue()) ); } else { //sets the information linked with the pseudo facet if (new RealType().getClass().isInstance(result)) { RealType realResult= (RealType)result; if (prop.getName().equals("minM")) realResult.setMinMantissa( Long.parseLong(prop.getValue()) ); else if (prop.getName().equals("maxM")) realResult.setMaxMantissa( Long.parseLong(prop.getValue()) ); else if (prop.getName().equals("minE")) realResult.setMinExponent( Long.parseLong(prop.getValue()) ); else if (prop.getName().equals("maxE")) realResult.setMaxExponent( Long.parseLong(prop.getValue()) ); } } } return result; }
3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/5cc05bb511077153b465e22cdfc358d624a85011/SimpleTypesFactory.java/clean/trunk/castor-2002/castor/src/main/org/exolab/castor/xml/schema/SimpleTypesFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 4477, 559, 752, 5784, 559, 12, 559, 618, 13, 565, 288, 3639, 368, 2729, 326, 791, 434, 279, 667, 10379, 628, 4477, 559, 5123, 326, 618, 18, 3639, 4477, 559, 563, 33, 20075, 12, 723, 18, 17994, 10663, 3639, 309, 261, 2088, 422, 446, 13, 5411, 604, 394, 3235, 12, 4838, 18, 2150, 2932, 4821, 18, 71, 970, 2563, 16409, 382, 2016, 7923, 11272, 202, 565, 563, 18, 542, 461, 12, 723, 18, 17994, 10663, 3639, 368, 2563, 326, 563, 1807, 618, 1085, 3639, 509, 509, 1085, 31, 3639, 775, 288, 5411, 509, 1085, 33, 2900, 7675, 588, 18888, 974, 12, 723, 18, 588, 1085, 1435, 2934, 588, 1702, 12, 2011, 1769, 3639, 289, 3639, 1044, 261, 503, 431, 13, 288, 13491, 514, 555, 273, 4838, 18, 2150, 2932, 4821, 18, 71, 970, 2563, 16409, 382, 2016, 7923, 7734, 397, 431, 31, 5411, 604, 394, 4477, 2016, 1733, 503, 12, 338, 16, 555, 1769, 3639, 289, 3639, 563, 18, 542, 15460, 12, 474, 1085, 1769, 3639, 368, 3125, 471, 444, 326, 563, 1807, 4477, 559, 2580, 5872, 261, 430, 1281, 2934, 3639, 309, 261, 723, 18, 588, 2171, 1435, 480, 446, 13, 288, 5411, 563, 18, 542, 2171, 559, 12, 3130, 12, 723, 18, 588, 2171, 1435, 2934, 588, 5784, 559, 1435, 11272, 3639, 289, 3639, 368, 3655, 326, 21681, 358, 326, 563, 3639, 5589, 21681, 33, 618, 18, 588, 11137, 5621, 3639, 364, 261, 474, 770, 33, 374, 31, 770, 411, 21681, 18, 1467, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 4477, 559, 752, 5784, 559, 12, 559, 618, 13, 565, 288, 3639, 368, 2729, 326, 791, 434, 279, 667, 10379, 628, 4477, 559, 5123, 326, 618, 18, 3639, 4477, 559, 563, 33, 20075, 12, 723, 18, 17994, 10663, 3639, 309, 261, 2088, 422, 446, 13, 5411, 604, 394, 3235, 12, 4838, 18, 2150, 2932, 4821, 18, 71, 970, 2563, 16409, 382, 2016, 7923, 11272, 202, 565, 563, 18, 542, 461, 12, 723, 18, 17994, 10663, 3639, 368, 2563, 326, 563, 1807, 618, 1085, 3639, 509, 509, 1085, 31, 3639, 775, 288, 5411, 509, 1085, 33, 2900, 7675, 588, 18888, 974, 12, 723, 18, 588, 1085, 1435, 2934, 588, 1702, 12, 2011, 1769, 3639, 289, 3639, 1044, 261, 2 ]
private Image getImage(Object proposal) {
private Image getImage(IContentProposal proposal) {
private Image getImage(Object proposal) { if (proposal == null || labelProvider == null) return null; return labelProvider.getImage(proposal); }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/54f5816382677a87ac1d149868af2370808e4f06/ContentProposalPopup.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalPopup.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 3421, 10567, 12, 921, 14708, 13, 288, 202, 202, 430, 261, 685, 8016, 422, 446, 747, 1433, 2249, 422, 446, 13, 1082, 202, 2463, 446, 31, 202, 202, 2463, 1433, 2249, 18, 588, 2040, 12, 685, 8016, 1769, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1152, 3421, 10567, 12, 921, 14708, 13, 288, 202, 202, 430, 261, 685, 8016, 422, 446, 747, 1433, 2249, 422, 446, 13, 1082, 202, 2463, 446, 31, 202, 202, 2463, 1433, 2249, 18, 588, 2040, 12, 685, 8016, 1769, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
}
}
public Element getElementById(String elementId) { Element elem = (Element)m_idAttributes.get(elementId); // Make sure we're done parsing. if (elem == null && !isComplete()) { Object synchObj = getSynchObject(); synchronized (synchObj) { try { // Don't really know why we should need the while loop, // but we seem to come out of wait() too soon! while (!isComplete()) { synchObj.wait(); throwIfParseError(); elem = (Element)m_idAttributes.get(elementId); if(null != elem) return elem; } } catch (InterruptedException e) { throwIfParseError(); } } elem = (Element)m_idAttributes.get(elementId); } return elem; }
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/0e2298c0c460e281c6e54e92ac95421ec5eca2e4/DocumentImpl.java/clean/src/org/apache/xalan/stree/DocumentImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 3010, 19269, 12, 780, 930, 548, 13, 225, 288, 565, 3010, 3659, 273, 261, 1046, 13, 81, 67, 350, 2498, 18, 588, 12, 2956, 548, 1769, 377, 368, 4344, 3071, 732, 4565, 2731, 5811, 18, 565, 309, 261, 10037, 422, 446, 597, 401, 291, 6322, 10756, 565, 288, 4202, 1033, 272, 2515, 2675, 273, 1322, 2515, 921, 5621, 1377, 3852, 261, 87, 2515, 2675, 13, 1377, 288, 3639, 775, 3639, 288, 1850, 368, 7615, 1404, 8654, 5055, 11598, 732, 1410, 1608, 326, 1323, 2798, 16, 1850, 368, 1496, 732, 19264, 358, 12404, 596, 434, 2529, 1435, 4885, 17136, 5, 6647, 1323, 16051, 291, 6322, 10756, 1850, 288, 5411, 272, 2515, 2675, 18, 7048, 5621, 5411, 604, 2047, 21004, 5621, 5411, 3659, 273, 261, 1046, 13, 81, 67, 350, 2498, 18, 588, 12, 2956, 548, 1769, 2398, 309, 12, 2011, 480, 3659, 13, 2868, 327, 3659, 31, 1850, 289, 3639, 289, 3639, 1044, 261, 24485, 503, 425, 13, 3639, 288, 2398, 604, 2047, 21004, 5621, 3639, 289, 2868, 289, 1377, 3659, 273, 261, 1046, 13, 81, 67, 350, 2498, 18, 588, 12, 2956, 548, 1769, 377, 289, 3639, 327, 3659, 31, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 3010, 19269, 12, 780, 930, 548, 13, 225, 288, 565, 3010, 3659, 273, 261, 1046, 13, 81, 67, 350, 2498, 18, 588, 12, 2956, 548, 1769, 377, 368, 4344, 3071, 732, 4565, 2731, 5811, 18, 565, 309, 261, 10037, 422, 446, 597, 401, 291, 6322, 10756, 565, 288, 4202, 1033, 272, 2515, 2675, 273, 1322, 2515, 921, 5621, 1377, 3852, 261, 87, 2515, 2675, 13, 1377, 288, 3639, 775, 3639, 288, 1850, 368, 7615, 1404, 8654, 5055, 11598, 732, 1410, 1608, 326, 1323, 2798, 16, 1850, 368, 1496, 732, 19264, 358, 12404, 596, 434, 2529, 1435, 4885, 17136, 5, 6647, 1323, 16051, 291, 6322, 10756, 1850, 288, 5411, 272, 2515, 2675, 18, 7048, 5621, 5411, 604, 2047, 2 ]
min = Integer.MAX_VALUE; for (index = 0; index < orderedItems ; index++) { if ( num_even_turns[index] != 0 && num_even_turns[index] < min) min = num_even_turns[index]; }
min = Integer.MAX_VALUE; for (index = 0; index < orderedItems ; index++) { if ( num_even_turns[index] != 0 && num_even_turns[index] < min) min = num_even_turns[index]; }
public static TurnVectors generateTurnOrder( Vector v, IGame game ) { int[] num_even_turns = new int[v.size()]; int[] num_normal_turns = new int[v.size()]; int total_even_turns = 0; int total_normal_turns = 0; int index; TurnOrdered[] order = new TurnOrdered[v.size()]; int orderedItems = 0; com.sun.java.util.collections.ArrayList plist = new com.sun.java.util.collections.ArrayList(v.size()); for (Enumeration i = v.elements(); i.hasMoreElements();) { Object item = i.nextElement(); plist.add(item); } com.sun.java.util.collections.Collections.sort(plist, new com.sun.java.util.collections.Comparator() { public int compare(Object o1, Object o2) { return ((TurnOrdered)o1).getInitiative().compareTo(((TurnOrdered)o2).getInitiative()); } }); // Walk through the ordered items. for ( com.sun.java.util.collections.Iterator i = plist.iterator(); i.hasNext(); orderedItems++ ) { final TurnOrdered item = (TurnOrdered)i.next(); order[orderedItems] = item; // Track even turns separately from the normal turns. num_normal_turns[orderedItems] = item.getNormalTurns(game); num_even_turns[orderedItems] = item.getEvenTurns(); // Keep a running total. total_even_turns += num_even_turns[orderedItems]; total_normal_turns += num_normal_turns[orderedItems]; } int min; int turns_left; // We will do the 'normal' turns first, and then the 'even' turns. min = Integer.MAX_VALUE; for(index = 0; index < orderedItems ; index++) { if ( num_normal_turns[index] != 0 && num_normal_turns[index] < min) min = num_normal_turns[index]; } TurnVectors turns = new TurnVectors(total_normal_turns, total_even_turns, min); // Allocate the normal turns. turns_left = total_normal_turns; while (turns_left > 0) { for (index = 0; index < orderedItems; index++) { // If you have no turns here, skip if (num_normal_turns[index] == 0) continue; // If you have less than twice the lowest, // move 1. Otherwise, move more. int ntm = num_normal_turns[index] / min; for (int j = 0; j < ntm; j++) { turns.addNormal(order[index]); num_normal_turns[index]--; turns_left--; } } // Since the smallest unit count had to place 1, reduce min) min--; } // Handle the next 'normal' turn. // Now, we allocate the 'even' turns, if there are any. if ( total_even_turns > 0 ) { min = Integer.MAX_VALUE; for (index = 0; index < orderedItems ; index++) { if ( num_even_turns[index] != 0 && num_even_turns[index] < min) min = num_even_turns[index]; } turns_left = total_even_turns; while (turns_left > 0) { for (index = 0; index < orderedItems; index++) { // If you have no turns here, skip if (num_even_turns[index] == 0) continue; // If you have less than twice the lowest, // move 1. Otherwise, move more. int ntm = num_even_turns[index] / min; for (int j = 0; j < ntm; j++) { turns.addEven(order[index]); num_even_turns[index]--; turns_left--; } } // Since the smallest unit count had to place 1, reduce min) min--; } // Handle the next 'even' turn } // End have-'even'-turns return turns; }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/f4a72f650dc986645cb9c7ceba68b40c099515a5/TurnOrdered.java/clean/megamek/src/megamek/common/TurnOrdered.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 22425, 21680, 2103, 15858, 2448, 12, 5589, 331, 16, 467, 12496, 7920, 262, 565, 288, 565, 509, 8526, 818, 67, 16728, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 15533, 565, 509, 8526, 818, 67, 6130, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 15533, 6647, 509, 2078, 67, 16728, 67, 20922, 87, 273, 374, 31, 565, 509, 2078, 67, 6130, 67, 20922, 87, 273, 374, 31, 565, 509, 770, 31, 3639, 22425, 16756, 8526, 1353, 273, 394, 22425, 16756, 63, 90, 18, 1467, 1435, 15533, 3639, 509, 5901, 3126, 273, 374, 31, 3639, 532, 18, 16924, 18, 6290, 18, 1367, 18, 19246, 18, 19558, 21074, 273, 540, 394, 532, 18, 16924, 18, 6290, 18, 1367, 18, 19246, 18, 19558, 12, 90, 18, 1467, 10663, 3639, 364, 261, 21847, 277, 273, 331, 18, 6274, 5621, 277, 18, 5332, 7417, 3471, 5621, 13, 288, 5411, 1033, 761, 273, 277, 18, 4285, 1046, 5621, 5411, 21074, 18, 1289, 12, 1726, 1769, 3639, 289, 3639, 532, 18, 16924, 18, 6290, 18, 1367, 18, 19246, 18, 15150, 18, 3804, 12, 17842, 16, 394, 532, 18, 16924, 18, 6290, 18, 1367, 18, 19246, 18, 5559, 1435, 288, 5411, 1071, 509, 3400, 12, 921, 320, 21, 16, 1033, 320, 22, 13, 288, 7734, 327, 14015, 15858, 16756, 13, 83, 21, 2934, 588, 2570, 77, 1535, 7675, 9877, 774, 12443, 12, 15858, 16756, 13, 83, 22, 2934, 588, 2570, 77, 1535, 10663, 5411, 289, 3639, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 22425, 21680, 2103, 15858, 2448, 12, 5589, 331, 16, 467, 12496, 7920, 262, 565, 288, 565, 509, 8526, 818, 67, 16728, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 15533, 565, 509, 8526, 818, 67, 6130, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 15533, 6647, 509, 2078, 67, 16728, 67, 20922, 87, 273, 374, 31, 565, 509, 2078, 67, 6130, 67, 20922, 87, 273, 374, 31, 565, 509, 770, 31, 3639, 22425, 16756, 8526, 1353, 273, 394, 22425, 16756, 63, 90, 18, 1467, 1435, 15533, 3639, 509, 5901, 3126, 273, 374, 31, 3639, 532, 18, 16924, 18, 6290, 18, 1367, 18, 19246, 18, 19558, 21074, 273, 540, 394, 532, 2 ]
if (tag.equals(IWorkbenchRegistryConstants.TAG_VISIBILITY)) {
if (currentContribution != null && tag.equals(IWorkbenchRegistryConstants.TAG_VISIBILITY)) {
protected boolean readElement(IConfigurationElement element) { String tag = element.getName(); // Found visibility sub-element if (tag.equals(IWorkbenchRegistryConstants.TAG_VISIBILITY)) { ((ViewerContribution) currentContribution) .setVisibilityTest(element); return true; } return super.readElement(element); }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/16f10c8694f7dbb509caa0b2199aced1aa2436bf/ViewerActionBuilder.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewerActionBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1250, 855, 1046, 12, 45, 1750, 1046, 930, 13, 288, 3639, 514, 1047, 273, 930, 18, 17994, 5621, 3639, 368, 10750, 9478, 720, 17, 2956, 3639, 309, 261, 2972, 442, 4027, 480, 446, 597, 1047, 18, 14963, 12, 45, 2421, 22144, 4243, 2918, 18, 7927, 67, 4136, 30310, 3719, 288, 5411, 14015, 18415, 442, 4027, 13, 783, 442, 4027, 13, 10792, 263, 542, 10135, 4709, 12, 2956, 1769, 5411, 327, 638, 31, 3639, 289, 3639, 327, 2240, 18, 896, 1046, 12, 2956, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1250, 855, 1046, 12, 45, 1750, 1046, 930, 13, 288, 3639, 514, 1047, 273, 930, 18, 17994, 5621, 3639, 368, 10750, 9478, 720, 17, 2956, 3639, 309, 261, 2972, 442, 4027, 480, 446, 597, 1047, 18, 14963, 12, 45, 2421, 22144, 4243, 2918, 18, 7927, 67, 4136, 30310, 3719, 288, 5411, 14015, 18415, 442, 4027, 13, 783, 442, 4027, 13, 10792, 263, 542, 10135, 4709, 12, 2956, 1769, 5411, 327, 638, 31, 3639, 289, 3639, 327, 2240, 18, 896, 1046, 12, 2956, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
new BugzillaReportSelection(bug.getId(), bug.getRepository(), bug.getLabel(), false, bug
new BugzillaReportSelection(bug.getId(), bug.getRepositoryUrl(), bug.getLabel(), false, bug
public void handleEvent(Event event) { IBugzillaBug bug = getBug(); fireSelectionChanged(new SelectionChangedEvent(selectionProvider, new StructuredSelection( new BugzillaReportSelection(bug.getId(), bug.getRepository(), bug.getLabel(), false, bug .getSummary())))); }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/0ea0d8d53298c5be54a74c27b8923b2bdf8ac703/AbstractBugEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1640, 1133, 12, 1133, 871, 13, 288, 1082, 202, 13450, 637, 15990, 19865, 7934, 273, 2882, 637, 5621, 1082, 202, 12179, 6233, 5033, 12, 2704, 12977, 27553, 12, 10705, 2249, 16, 394, 7362, 2862, 6233, 12, 6862, 202, 2704, 16907, 15990, 4820, 6233, 12, 925, 18, 26321, 9334, 7934, 18, 588, 3305, 9334, 7934, 18, 588, 2224, 9334, 629, 16, 7934, 6862, 1082, 202, 18, 588, 4733, 1435, 3719, 10019, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1640, 1133, 12, 1133, 871, 13, 288, 1082, 202, 13450, 637, 15990, 19865, 7934, 273, 2882, 637, 5621, 1082, 202, 12179, 6233, 5033, 12, 2704, 12977, 27553, 12, 10705, 2249, 16, 394, 7362, 2862, 6233, 12, 6862, 202, 2704, 16907, 15990, 4820, 6233, 12, 925, 18, 26321, 9334, 7934, 18, 588, 3305, 9334, 7934, 18, 588, 2224, 9334, 629, 16, 7934, 6862, 1082, 202, 18, 588, 4733, 1435, 3719, 10019, 202, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
_messageEncoding = browser().messageEncodingForLanguage(language());
if (browser() != null) { _messageEncoding = browser().messageEncodingForLanguage(language()); }
public ERXMessageEncoding messageEncoding() { if (_messageEncoding == null) { _messageEncoding = browser().messageEncodingForLanguage(language()); } return _messageEncoding; }
46145 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46145/05091421c29e54114d0f2d691617aa03ceaa9e5f/ERXSession.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXSession.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4232, 60, 1079, 4705, 883, 4705, 1435, 288, 3639, 309, 261, 67, 2150, 4705, 422, 446, 13, 288, 5411, 309, 261, 11213, 1435, 480, 446, 13, 288, 389, 2150, 4705, 273, 4748, 7675, 2150, 4705, 1290, 3779, 12, 4923, 10663, 289, 3639, 289, 3639, 327, 389, 2150, 4705, 31, 377, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4232, 60, 1079, 4705, 883, 4705, 1435, 288, 3639, 309, 261, 67, 2150, 4705, 422, 446, 13, 288, 5411, 309, 261, 11213, 1435, 480, 446, 13, 288, 389, 2150, 4705, 273, 4748, 7675, 2150, 4705, 1290, 3779, 12, 4923, 10663, 289, 3639, 289, 3639, 327, 389, 2150, 4705, 31, 377, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
private Chart getConvertedChart( Chart currentChart, String sNewSubType, String sNewDimension ) { Chart helperModel = (Chart) EcoreUtil.copy( currentChart ); if ( currentChart instanceof ChartWithAxes ) { // Create a new instance of the correct type and set initial // properties currentChart = DialChartImpl.create( ); currentChart.setType( TYPE_LITERAL ); currentChart.setSubType( sNewSubType ); currentChart.setDimension( getDimensionFor( sNewDimension ) ); // Copy generic chart properties from the old chart currentChart.setBlock( helperModel.getBlock( ) ); currentChart.setDescription( helperModel.getDescription( ) ); currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) ); currentChart.getInteractivity().setEnable( helperModel.getInteractivity().isEnable()); currentChart.getInteractivity().setLegendBehavior( helperModel.getInteractivity().getLegendBehavior()); if ( !currentChart.getType( ).equals( LineChart.TYPE_LITERAL ) && !currentChart.getType( ).equals( PieChart.TYPE_LITERAL ) && !currentChart.getType( ).equals( BarChart.TYPE_LITERAL ) && !currentChart.getType( ).equals( AreaChart.TYPE_LITERAL ) ) { currentChart.setSampleData( getConvertedSampleData( helperModel.getSampleData( ) ) ); } currentChart.getTitle( ) .getLabel( ) .getCaption( ) .setValue( CHART_TITLE ); currentChart.setScript( helperModel.getScript( ) ); currentChart.setUnits( helperModel.getUnits( ) ); if ( helperModel.getGridColumnCount( ) > 0 ) { currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) ); } else { currentChart.setGridColumnCount( 1 ); } // Copy series definitions from old chart ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .add( ( (Axis) ( (ChartWithAxes) helperModel ).getAxes( ) .get( 0 ) ).getSeriesDefinitions( ).get( 0 ) ); Vector vOSD = new Vector( ); // Only convert series in primary orthogonal axis. Axis primaryOrthogonalAxis = ( (ChartWithAxes) helperModel ).getPrimaryOrthogonalAxis( (Axis) ( (ChartWithAxes) helperModel ).getAxes( ) .get( 0 ) ); EList osd = primaryOrthogonalAxis.getSeriesDefinitions( ); for ( int j = 0; j < osd.size( ); j++ ) { SeriesDefinition sd = (SeriesDefinition) osd.get( j ); Series series = sd.getDesignTimeSeries( ); sd.getSeries( ).clear( ); sd.getSeries( ).add( getConvertedSeries( series ) ); vOSD.add( sd ); } ( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getSeriesDefinitions( ).clear( ); ( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getSeriesDefinitions( ).addAll( vOSD ); currentChart.getLegend( ) .setItemType( LegendItemType.SERIES_LITERAL ); // Ensure base query is not null EList dataDefinitions = ( (SeriesDefinition) ( (DialChart) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getDesignTimeSeries( ).getDataDefinition( ); if ( dataDefinitions.size( ) == 0 ) { dataDefinitions.add( QueryImpl.create( BLANK_QUERY ) ); } else { Query query = ( (Query) dataDefinitions.get( 0 ) ); if ( query.getDefinition( ) == null || query.getDefinition( ).trim( ).length( ) == 0 ) { query.setDefinition( BLANK_QUERY ); } } } else if ( currentChart instanceof ChartWithoutAxes ) { if ( currentChart.getType( ).equals( TYPE_LITERAL ) ) { currentChart.setSubType( sNewSubType ); ( (DialChart) currentChart ).setDialSuperimposition( sNewSubType.equals( SUPERIMPOSED_SUBTYPE_LITERAL ) ); if ( !currentChart.getDimension( ) .equals( getDimensionFor( sNewDimension ) ) ) { currentChart.setDimension( getDimensionFor( sNewDimension ) ); } } else { // Create a new instance of the correct type and set initial // properties currentChart = DialChartImpl.create( ); currentChart.setType( TYPE_LITERAL ); currentChart.setSubType( sNewSubType ); currentChart.setDimension( getDimensionFor( sNewDimension ) ); ( (DialChart) currentChart ).setDialSuperimposition( sNewSubType.equals( SUPERIMPOSED_SUBTYPE_LITERAL ) ); // Copy generic chart properties from the old chart currentChart.setBlock( helperModel.getBlock( ) ); currentChart.setDescription( helperModel.getDescription( ) ); currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) ); currentChart.setSampleData( helperModel.getSampleData( ) ); currentChart.setScript( helperModel.getScript( ) ); currentChart.setUnits( helperModel.getUnits( ) ); currentChart.getInteractivity().setEnable( helperModel.getInteractivity().isEnable()); currentChart.getInteractivity().setLegendBehavior( helperModel.getInteractivity().getLegendBehavior()); // Clear existing series definitions ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .clear( ); // Copy series definitions ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .add( ( (ChartWithoutAxes) helperModel ).getSeriesDefinitions( ) .get( 0 ) ); // Update the series EList seriesdefinitions = ( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getSeriesDefinitions( ); Series series; for ( int j = 0; j < seriesdefinitions.size( ); j++ ) { series = ( (SeriesDefinition) seriesdefinitions.get( j ) ).getDesignTimeSeries( ); series = getConvertedSeries( series ); // Clear any existing series ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .clear( ); // Add the new series ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .add( series ); } currentChart.getLegend( ) .setItemType( LegendItemType.SERIES_LITERAL ); currentChart.getTitle( ) .getLabel( ) .getCaption( ) .setValue( CHART_TITLE ); } // Ensure base query is not null EList dataDefinitions = ( (SeriesDefinition) ( (DialChart) currentChart ).getSeriesDefinitions( ) .get( 0 ) ).getDesignTimeSeries( ).getDataDefinition( ); if ( dataDefinitions.size( ) == 0 ) { dataDefinitions.add( QueryImpl.create( BLANK_QUERY ) ); } else { Query query = ( (Query) dataDefinitions.get( 0 ) ); if ( query.getDefinition( ) == null || query.getDefinition( ).trim( ).length( ) == 0 ) { query.setDefinition( BLANK_QUERY ); } } } else { return null; } return currentChart; }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/182827fe6ad4e223adc4bf4bcf44d469847b773d/MeterChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/MeterChart.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 14804, 336, 22063, 7984, 12, 14804, 783, 7984, 16, 514, 272, 1908, 30511, 16, 1082, 202, 780, 272, 1908, 8611, 262, 202, 95, 202, 202, 7984, 4222, 1488, 273, 261, 7984, 13, 512, 3644, 1304, 18, 3530, 12, 783, 7984, 11272, 202, 202, 430, 261, 783, 7984, 1276, 14804, 1190, 26494, 262, 202, 202, 95, 1082, 202, 759, 1788, 279, 394, 791, 434, 326, 3434, 618, 471, 444, 2172, 1082, 202, 759, 1790, 1082, 202, 2972, 7984, 273, 9402, 7984, 2828, 18, 2640, 12, 11272, 1082, 202, 2972, 7984, 18, 542, 559, 12, 3463, 67, 23225, 11272, 1082, 202, 2972, 7984, 18, 542, 30511, 12, 272, 1908, 30511, 11272, 1082, 202, 2972, 7984, 18, 542, 8611, 12, 20283, 1290, 12, 272, 1908, 8611, 262, 11272, 1082, 202, 759, 5631, 5210, 4980, 1790, 628, 326, 1592, 4980, 1082, 202, 2972, 7984, 18, 542, 1768, 12, 4222, 1488, 18, 588, 1768, 12, 262, 11272, 1082, 202, 2972, 7984, 18, 542, 3291, 12, 4222, 1488, 18, 588, 3291, 12, 262, 11272, 1082, 202, 2972, 7984, 18, 542, 6313, 1494, 1380, 12, 4222, 1488, 18, 588, 6313, 1494, 1380, 12, 262, 11272, 25083, 202, 2972, 7984, 18, 588, 2465, 9653, 7675, 542, 8317, 12, 4222, 1488, 18, 588, 2465, 9653, 7675, 291, 8317, 10663, 1082, 202, 2972, 7984, 18, 588, 2465, 9653, 7675, 542, 16812, 9212, 12, 4222, 1488, 18, 588, 2465, 9653, 7675, 588, 16812, 9212, 10663, 25083, 202, 430, 261, 401, 2972, 7984, 18, 588, 559, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 14804, 336, 22063, 7984, 12, 14804, 783, 7984, 16, 514, 272, 1908, 30511, 16, 1082, 202, 780, 272, 1908, 8611, 262, 202, 95, 202, 202, 7984, 4222, 1488, 273, 261, 7984, 13, 512, 3644, 1304, 18, 3530, 12, 783, 7984, 11272, 202, 202, 430, 261, 783, 7984, 1276, 14804, 1190, 26494, 262, 202, 202, 95, 1082, 202, 759, 1788, 279, 394, 791, 434, 326, 3434, 618, 471, 444, 2172, 1082, 202, 759, 1790, 1082, 202, 2972, 7984, 273, 9402, 7984, 2828, 18, 2640, 12, 11272, 1082, 202, 2972, 7984, 18, 542, 559, 12, 3463, 67, 23225, 11272, 1082, 202, 2972, 7984, 18, 542, 30511, 12, 272, 1908, 30511, 11272, 1082, 202, 2972, 7984, 18, 542, 8611, 2 ]
return ruby.fixnumCache[(int)value];
return ruby.fixnumCache[(int) value];
public static RubyFixnum m_newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int)value]; } return new RubyFixnum(ruby, value); }
46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/962ce6ffe87d8c8388ef1c922b056aea9b6210db/RubyFixnum.java/clean/org/jruby/RubyFixnum.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 8585, 2107, 312, 67, 2704, 8585, 2107, 12, 54, 10340, 22155, 16, 1525, 460, 13, 288, 3639, 368, 4379, 364, 12139, 21180, 261, 25024, 13, 3639, 309, 14015, 1132, 473, 4871, 54, 10340, 18, 4563, 6069, 67, 8495, 67, 6694, 13, 422, 374, 13, 288, 5411, 327, 22155, 18, 904, 2107, 1649, 63, 12, 474, 13, 460, 15533, 3639, 289, 7734, 327, 394, 19817, 8585, 2107, 12, 27768, 16, 460, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 8585, 2107, 312, 67, 2704, 8585, 2107, 12, 54, 10340, 22155, 16, 1525, 460, 13, 288, 3639, 368, 4379, 364, 12139, 21180, 261, 25024, 13, 3639, 309, 14015, 1132, 473, 4871, 54, 10340, 18, 4563, 6069, 67, 8495, 67, 6694, 13, 422, 374, 13, 288, 5411, 327, 22155, 18, 904, 2107, 1649, 63, 12, 474, 13, 460, 15533, 3639, 289, 7734, 327, 394, 19817, 8585, 2107, 12, 27768, 16, 460, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
public void reset() throws IOException { isReader.reset(); }
public void reset() throws IOException { try { if(DEBUG) os.println(PREFIX + "isReader.reset()"); isReader.reset(); } catch(IOException ioe) { if(DEBUG) ioe.printStackTrace(); throw ioe; } catch(RuntimeException e) { if(DEBUG) e.printStackTrace(); throw e; } }
public void reset() throws IOException { isReader.reset(); }
52348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52348/7bcf40f6f1a430b02e7e0577c31c935b333bec29/MutableInputStreamReader.java/clean/src/org/catacombae/xml/parser/MutableInputStreamReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2715, 1435, 1216, 1860, 288, 353, 2514, 18, 6208, 5621, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2715, 1435, 1216, 1860, 288, 353, 2514, 18, 6208, 5621, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
comment,null);
comment);
public void lineComment() { String comment = (String)buffer.getProperty("lineComment"); if(!buffer.isEditable() || comment == null || comment.length() == 0) { getToolkit().beep(); return; } comment = comment + ' '; buffer.beginCompoundEdit(); int[] lines = getSelectedLines(); try { for(int i = 0; i < lines.length; i++) { String text = getLineText(lines[i]); buffer.insertString(getLineStartOffset(lines[i]) + MiscUtilities.getLeadingWhiteSpace(text), comment,null); } } catch(BadLocationException bl) { Log.log(Log.ERROR,this,bl); } finally { buffer.endCompoundEdit(); } selectNone(); } //}}}
6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/e718c7bf82934baf30a6cb1496b68bf5a319fbd6/JEditTextArea.java/buggy/org/gjt/sp/jedit/textarea/JEditTextArea.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 980, 4469, 1435, 202, 95, 202, 202, 780, 2879, 273, 261, 780, 13, 4106, 18, 588, 1396, 2932, 1369, 4469, 8863, 202, 202, 430, 12, 5, 4106, 18, 291, 15470, 1435, 747, 2879, 422, 446, 747, 2879, 18, 2469, 1435, 422, 374, 13, 202, 202, 95, 1082, 202, 588, 6364, 8691, 7675, 2196, 881, 5621, 1082, 202, 2463, 31, 202, 202, 97, 202, 202, 3469, 273, 2879, 397, 296, 12386, 202, 202, 4106, 18, 10086, 16835, 4666, 5621, 202, 202, 474, 8526, 2362, 273, 16625, 5763, 5621, 202, 202, 698, 202, 202, 95, 1082, 202, 1884, 12, 474, 277, 273, 374, 31, 277, 411, 2362, 18, 2469, 31, 277, 27245, 1082, 202, 95, 9506, 202, 780, 977, 273, 9851, 1528, 12, 3548, 63, 77, 19226, 9506, 202, 4106, 18, 6387, 780, 12, 588, 1670, 1685, 2335, 12, 3548, 63, 77, 5717, 6862, 202, 15, 16584, 71, 11864, 18, 588, 19112, 23108, 12, 955, 3631, 6862, 202, 3469, 16, 2011, 1769, 1082, 202, 97, 202, 202, 97, 202, 202, 14683, 12, 6434, 2735, 503, 2811, 13, 202, 202, 95, 1082, 202, 1343, 18, 1330, 12, 1343, 18, 3589, 16, 2211, 16, 3083, 1769, 202, 202, 97, 202, 202, 23417, 202, 202, 95, 1082, 202, 4106, 18, 409, 16835, 4666, 5621, 202, 202, 97, 202, 202, 4025, 7036, 5621, 202, 97, 368, 9090, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 980, 4469, 1435, 202, 95, 202, 202, 780, 2879, 273, 261, 780, 13, 4106, 18, 588, 1396, 2932, 1369, 4469, 8863, 202, 202, 430, 12, 5, 4106, 18, 291, 15470, 1435, 747, 2879, 422, 446, 747, 2879, 18, 2469, 1435, 422, 374, 13, 202, 202, 95, 1082, 202, 588, 6364, 8691, 7675, 2196, 881, 5621, 1082, 202, 2463, 31, 202, 202, 97, 202, 202, 3469, 273, 2879, 397, 296, 12386, 202, 202, 4106, 18, 10086, 16835, 4666, 5621, 202, 202, 474, 8526, 2362, 273, 16625, 5763, 5621, 202, 202, 698, 202, 202, 95, 1082, 202, 1884, 12, 474, 277, 273, 374, 31, 277, 411, 2362, 18, 2469, 31, 277, 27245, 1082, 202, 95, 9506, 202, 2 ]
ExpBase exp = (ExpBase) getArg(evaluator, args, 2, null);
ExpBase exp = (ExpBase) getArgNoEval(args, 2, null);
protected void defineFunctions() { defineReserved("NULL"); // first char: p=Property, m=Method, i=Infix, P=Prefix // 2nd: // ARRAY FUNCTIONS if (false) define(new FunDefBase("SetToArray", "SetToArray(<Set>[, <Set>]...[, <Numeric Expression>])", "Converts one or more sets to an array for use in a user-if (false) defined function.", "fa*")); // // DIMENSION FUNCTIONS define(new FunDefBase("Dimension", "<Hierarchy>.Dimension", "Returns the dimension that contains a specified hierarchy.", "pdh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getDimension(); } }); //??Had to add this to get <Hierarchy>.Dimension to work? define(new FunDefBase("Dimension", "<Dimension>.Dimension", "Returns the dimension that contains a specified hierarchy.", "pdd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension; } public void testDimensionHierarchy(FoodMartTestCase test) { String s = test.executeExpr("[Time].Dimension.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Dimension", "<Level>.Dimension", "Returns the dimension that contains a specified level.", "pdl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getDimension(); } public void testLevelDimension(FoodMartTestCase test) { String s = test.executeExpr("[Time].[Year].Dimension"); Assert.assertEquals("[Time]", s); } }); define(new FunDefBase("Dimension", "<Member>.Dimension", "Returns the dimension that contains a specified member.", "pdm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getDimension(); } public void testMemberDimension(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q2].Dimension"); Assert.assertEquals("[Time]", s); } }); define(new FunDefBase("Dimensions", "Dimensions(<Numeric Expression>)", "Returns the dimension whose zero-based position within the cube is specified by a numeric expression.", "fdn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension[] dimensions = cube.getDimensions(); int n = getIntArg(evaluator, args, 0); if ((n > dimensions.length) || (n < 1)) { throw newEvalException( this, "Index '" + n + "' out of bounds"); } return dimensions[n - 1]; } public void testDimensionsNumeric(FoodMartTestCase test) { String s = test.executeExpr("Dimensions(2).Name"); Assert.assertEquals("Store", s); } }); define(new FunDefBase("Dimensions", "Dimensions(<String Expression>)", "Returns the dimension whose name is specified by a string.", "fdS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String defValue = "Default Value"; String s = getStringArg(evaluator, args, 0, defValue); if (s.indexOf("[") == -1) { s = Util.quoteMdxIdentifier(s); } OlapElement o = lookupCompound(evaluator.getSchemaReader(), evaluator.getCube(), explode(s), false, Category.Dimension); if (o instanceof Dimension) { return (Dimension) o; } else if (o == null) { throw newEvalException(this, "Dimension '" + s + "' not found"); } else { throw newEvalException(this, "Dimensions(" + s + ") found " + o); } } public void testDimensionsString(FoodMartTestCase test) { String s = test.executeExpr( "Dimensions(\"Store\").UniqueName"); Assert.assertEquals("[Store]", s); } }); // // HIERARCHY FUNCTIONS define(new FunDefBase("Hierarchy", "<Level>.Hierarchy", "Returns a level's hierarchy.", "phl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getHierarchy(); } }); define(new FunDefBase("Hierarchy", "<Member>.Hierarchy", "Returns a member's hierarchy.", "phm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getHierarchy(); } public void testTime(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q1].[1].Hierarchy"); Assert.assertEquals("[Time]", s); } public void testBasic9(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].[F].Hierarchy"); Assert.assertEquals("[Gender]", s); } public void testFirstInLevel9(FoodMartTestCase test) { String s = test.executeExpr( "[Education Level].[All Education Levels].[Bachelors Degree].Hierarchy"); Assert.assertEquals("[Education Level]", s); } public void testHierarchyAll(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Hierarchy"); Assert.assertEquals("[Gender]", s); } public void testHierarchyNull(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Parent.Hierarchy"); Assert.assertEquals("[Gender]", s); // MSOLAP gives "#ERR" } }); // // LEVEL FUNCTIONS define(new FunDefBase("Level", "<Member>.Level", "Returns a member's level.", "plm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getLevel(); } public void testMemberLevel(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q1].[1].Level.UniqueName"); Assert.assertEquals("[Time].[Month]", s); } }); define(new FunDefBase("Levels", "<Hierarchy>.Levels(<Numeric Expression>)", "Returns the level whose position in a hierarchy is specified by a numeric expression.", "mlhn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); Level[] levels = hierarchy.getLevels(); int n = getIntArg(evaluator, args, 1); if ((n > levels.length) || (n < 1)) { throw newEvalException( this, "Index '" + n + "' out of bounds"); } return levels[n - 1]; } public void testLevelsNumeric(FoodMartTestCase test) { String s = test.executeExpr("[Time].Levels(2).Name"); Assert.assertEquals("Quarter", s); } public void testLevelsTooSmall(FoodMartTestCase test) { test.assertExprThrows( "[Time].Levels(0).Name", "Index '0' out of bounds"); } public void testLevelsTooLarge(FoodMartTestCase test) { test.assertExprThrows( "[Time].Levels(8).Name", "Index '8' out of bounds"); } }); define(new FunDefBase("Levels", "Levels(<String Expression>)", "Returns the level whose name is specified by a string expression.", "flS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String s = getStringArg(evaluator, args, 0, null); Cube cube = evaluator.getCube(); OlapElement o = null; if (s.startsWith("[")) { o = lookupCompound(evaluator.getSchemaReader(), cube, explode(s), false, Category.Level); } else { // lookupCompound barfs if "s" doesn't have matching // brackets, so don't even try o = null; } if (o instanceof Level) { return (Level) o; } else if (o == null) { throw newEvalException(this, "Level '" + s + "' not found"); } else { throw newEvalException(this, "Levels('" + s + "') found " + o); } } public void testLevelsString(FoodMartTestCase test) { String s = test.executeExpr( "Levels(\"[Time].[Year]\").UniqueName"); Assert.assertEquals("[Time].[Year]", s); } public void testLevelsStringFail(FoodMartTestCase test) { test.assertExprThrows( "Levels(\"nonexistent\").UniqueName", "Level 'nonexistent' not found"); } }); // // LOGICAL FUNCTIONS define(new FunkResolver("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", new String[] {"fbS", "fbn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Object o = getScalarArg(evaluator, args, 0); if (o == Util.nullValue) { return Boolean.TRUE; } else { return Boolean.FALSE; } } public void testIsEmpty(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Measures].[Foo] AS 'Iif(IsEmpty([Measures].[Unit Sales]), 5, [Measures].[Unit Sales])'" + nl + "SELECT {[Store].[USA].[WA].children} on columns" + nl + "FROM Sales" + nl + "WHERE ( [Time].[1997].[Q4].[12]," + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer]," + nl + " [Measures].[Foo])", "Axis #0:" + nl + "{[Time].[1997].[Q4].[12], [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer], [Measures].[Foo]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima]}" + nl + "Row #0: 5" + nl + "Row #0: 5" + nl + "Row #0: 2" + nl + "Row #0: 5" + nl + "Row #0: 11" + nl + "Row #0: 5" + nl + "Row #0: 4" + nl); } })); define(new FunDefBase("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", "fbn")); // // MEMBER FUNCTIONS define(new FunDefBase("Ancestor", "Ancestor(<Member>, <Level>)", "Returns the ancestor of a member at a specified level.", "fmml") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, false); Level level = getLevelArg(evaluator, args, 1, false); if (member.getHierarchy() != level.getHierarchy()) { throw newEvalException( this, "member '" + member + "' is not in the same hierarchy as level '" + level + "'"); } if (member.getLevel().equals(level)) { return member; } Member[] members = member.getAncestorMembers(); for (int i = 0; i < members.length; i++) { if (members[i].getLevel().equals(level)) return members[i]; } return member.getHierarchy().getNullMember(); // not found } public void testAncestor(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA].[CA].[Los Angeles],[Store Country])"); Assert.assertEquals("USA", member.getName()); } public void testAncestorHigher(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA],[Store].[Store City])"); Assert.assertNull(member); // MSOLAP returns null } public void testAncestorSameLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[Canada],[Store].[Store Country])"); Assert.assertEquals("Canada", member.getName()); } public void testAncestorWrongHierarchy(FoodMartTestCase test) { // MSOLAP gives error "Formula error - dimensions are not // valid (they do not match) - in the Ancestor function" test.assertAxisThrows( "Ancestor([Gender].[M],[Store].[Store Country])", "member '[Gender].[All Gender].[M]' is not in the same hierarchy as level '[Store].[Store Country]'"); } public void testAncestorAllLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA].[CA],[Store].Levels(1))"); Assert.assertTrue(member.isAll()); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension timeDimension = cube.getYearLevel().getDimension(); Member member = evaluator.getContext(timeDimension); Level level = member.getLevel().getChildLevel(); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodNoArgs(FoodMartTestCase test) { // MSOLAP returns [1997].[Q4], because [Time].CurrentMember = // [1997]. Member member = test.executeAxis("ClosingPeriod()"); Assert.assertEquals("[Time].[1997].[Q4]", member.getUniqueName()); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fml") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension timeDimension = cube.getYearLevel().getDimension(); Member member = evaluator.getContext(timeDimension); Level level = getLevelArg(evaluator, args, 0, true); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodLevel(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month])"); Assert.assertEquals("[Time].[1997].[Q4].[12]", member.getUniqueName()); } public void testClosingPeriodLevelNotInTimeFails(FoodMartTestCase test) { test.assertAxisThrows( "ClosingPeriod([Store].[Store City])", "member '[Time].[1997]' must be in same hierarchy as level '[Store].[Store City]'"); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Level level = member.getLevel().getChildLevel(); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodMember(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([USA])"); Assert.assertEquals("WA", member.getName()); } public void testClosingPeriodMemberLeaf(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Time].[1997].[Q3].[8])"); Assert.assertNull(member); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fmlm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); Member member = getMemberArg(evaluator, args, 1, true); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriod(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month],[1997])"); Assert.assertEquals("[Time].[1997].[Q4].[12]", member.getUniqueName()); } public void testClosingPeriodBelow(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Quarter],[1997].[Q3].[8])"); Assert.assertNull(member); } }); define(new FunDefBase("Cousin", "Cousin(<Member1>, <Member2>)", "Returns the member with the same relative position under a member as the member specified.", "fmmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member1 = getMemberArg(evaluator, args, 0, true); Member member2 = getMemberArg(evaluator, args, 1, true); Member cousin = cousin(evaluator.getSchemaReader(), member1, member2); if (cousin == null) { cousin = member1.getHierarchy().getNullMember(); } return cousin; } private Member cousin(SchemaReader schemaReader, Member member1, Member member2) { if (member1.getHierarchy() != member2.getHierarchy()) { throw newEvalException( this, "Members '" + member1 + "' and '" + member2 + "' are not compatible as cousins"); } if (member1.getLevel().getDepth() < member2.getLevel().getDepth()) { return null; } return cousin2(schemaReader, member1, member2); } private Member cousin2(SchemaReader schemaReader, Member member1, Member member2) { if (member1.getLevel() == member2.getLevel()) { return member2; } Member uncle = cousin2(schemaReader, member1.getParentMember(), member2); if (uncle == null) { return null; } int ordinal = Util.getMemberOrdinalInParent(schemaReader, member1); Member[] cousins = schemaReader.getMemberChildren(uncle); if (cousins.length <= ordinal) { return null; } return cousins[ordinal]; } public void testCousin1(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4],[1998])"); Assert.assertEquals("[Time].[1998].[Q4]", member.getUniqueName()); } public void testCousin2(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4].[12],[1998].[Q1])"); Assert.assertEquals("[Time].[1998].[Q1].[3]", member.getUniqueName()); } public void testCousinOverrun(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Customers].[USA].[CA].[San Jose], [Customers].[USA].[OR])"); // CA has more cities than OR Assert.assertNull(member); } public void testCousinThreeDown(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Customers].[USA].[CA].[Berkeley].[Alma Shelton], [Customers].[Mexico])"); // Alma Shelton is the 3rd child // of the 4th child (Berkeley) // of the 1st child (CA) // of USA Assert.assertEquals("[Customers].[All Customers].[Mexico].[DF].[Tixapan].[Albert Clouse]", member.getUniqueName()); } public void testCousinSameLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Gender].[M], [Gender].[F])"); Assert.assertEquals("F", member.getName()); } public void testCousinHigherLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Time].[1997], [Time].[1998].[Q1])"); Assert.assertNull(member); } public void testCousinWrongHierarchy(FoodMartTestCase test) { test.assertAxisThrows( "Cousin([Time].[1997], [Gender].[M])", "Members '[Time].[1997]' and '[Gender].[All Gender].[M]' are not compatible as cousins"); } }); define(new FunDefBase("CurrentMember", "<Dimension>.CurrentMember", "Returns the current member along a dimension during an iteration.", "pmd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return evaluator.getContext(dimension); } public void testCurrentMemberFromSlicer(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Gender].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales where ([Gender].[F])"); Assert.assertEquals("F", result.getCell(new int[] {0}).getValue()); } public void testCurrentMemberFromDefaultMember(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Time].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales"); Assert.assertEquals("1997", result.getCell(new int[] {0}).getValue()); } public void testCurrentMemberFromAxis(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Gender].CurrentMember.Name || [Marital Status].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns," + nl + " CrossJoin({[Gender].children}, {[Marital Status].children}) on rows" + nl + "from Sales"); Assert.assertEquals("FM", result.getCell(new int[] {0,0}).getValue()); } /** * When evaluating a calculated member, MSOLAP regards that * calculated member as the current member of that dimension, so it * cycles in this case. But I disagree; it is the previous current * member, before the calculated member was expanded. */ public void testCurrentMemberInCalcMember(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Measures].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales"); Assert.assertEquals("Unit Sales", result.getCell(new int[] {0}).getValue()); } }); define(new FunDefBase("DefaultMember", "<Dimension>.DefaultMember", "Returns the default member of a dimension.", "pmd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getHierarchyDefaultMember( dimension.getHierarchy()); } public void testDimensionDefaultMember(FoodMartTestCase test) { Member member = test.executeAxis("[Measures].DefaultMember"); Assert.assertEquals("Unit Sales", member.getName()); } }); define(new FunDefBase("FirstChild", "<Member>.FirstChild", "Returns the first child of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); if (children.length == 0) { return member.getHierarchy().getNullMember(); } else { return children[0]; } } public void testFirstChildFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].FirstChild"); Assert.assertEquals("10", member.getName()); } public void testFirstChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstChild"); Assert.assertEquals("F", member.getName()); } public void testFirstChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].[F].FirstChild"); Assert.assertNull(member); } }); define(new FunDefBase("FirstSibling", "<Member>.FirstSibling", "Returns the first child of the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); Member[] children; if (parent == null) { if (member.isNull()) { return member; } children = evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy()); } else { children = evaluator.getSchemaReader().getMemberChildren(parent); } return children[0]; } public void testFirstSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstSibling"); Assert.assertEquals("F", member.getName()); } public void testFirstSiblingLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].FirstSibling"); Assert.assertEquals("Q1", member.getName()); } public void testFirstSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstSibling"); Assert.assertTrue(member.isAll()); } public void testFirstSiblingRoot(FoodMartTestCase test) { // The [Measures] hierarchy does not have an 'all' member, so // [Unit Sales] does not have a parent. Member member = test.executeAxis( "[Measures].[Store Sales].FirstSibling"); Assert.assertEquals("Unit Sales", member.getName()); } public void testFirstSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.FirstSibling"); Assert.assertNull(member); } }); if (false) define(new FunDefBase("Item", "<Tuple>.Item(<Numeric Expression>)", "Returns a member from a tuple.", "mm*")); define(new FunkResolver( "Lag", "<Member>.Lag(<Numeric Expression>)", "Returns a member further along the specified member's dimension.", new String[]{"mmmn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); int n = getIntArg(evaluator, args, 1); return evaluator.getSchemaReader().getLeadMember(member, -n); } public void testLag(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].[12].Lag(4)"); Assert.assertEquals("8", member.getName()); } public void testLagFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].Lag(1)"); Assert.assertNull(member); } public void testLagAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].DefaultMember.Lag(2)"); Assert.assertNull(member); } public void testLagRoot(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1998].Lag(1)"); Assert.assertEquals("1997", member.getName()); } public void testLagRootTooFar(FoodMartTestCase test) { Member member = test.executeAxis("[Time].[1998].Lag(2)"); Assert.assertNull(member); } })); define(new FunDefBase("LastChild", "<Member>.LastChild", "Returns the last child of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); if (children.length == 0) { return member.getHierarchy().getNullMember(); } else { return children[children.length - 1]; } } public void testLastChild(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].LastChild"); Assert.assertEquals("M", member.getName()); } public void testLastChildLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].LastChild"); Assert.assertEquals("12", member.getName()); } public void testLastChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastChild"); Assert.assertEquals("M", member.getName()); } public void testLastChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].LastChild"); Assert.assertNull(member); } }); define(new FunDefBase("LastSibling", "<Member>.LastSibling", "Returns the last child of the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); Member[] children; if (parent == null) { if (member.isNull()) { return member; } children = evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy()); } else { children = evaluator.getSchemaReader().getMemberChildren(parent); } return children[children.length - 1]; } public void testLastSibling(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].LastSibling"); Assert.assertEquals("M", member.getName()); } public void testLastSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q1].LastSibling"); Assert.assertEquals("Q4", member.getName()); } public void testLastSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastSibling"); Assert.assertTrue(member.isAll()); } public void testLastSiblingRoot(FoodMartTestCase test) { // The [Time] hierarchy does not have an 'all' member, so // [1997], [1998] do not have parents. Member member = test.executeAxis( "[Time].[1998].LastSibling"); Assert.assertEquals("1998", member.getName()); } public void testLastSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.LastSibling"); Assert.assertNull(member); } }); define(new FunkResolver( "Lead", "<Member>.Lead(<Numeric Expression>)", "Returns a member further along the specified member's dimension.", new String[]{"mmmn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); int n = getIntArg(evaluator, args, 1); return evaluator.getSchemaReader().getLeadMember(member, n); } public void testLead(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q2].[4].Lead(4)"); Assert.assertEquals("8", member.getName()); } public void testLeadNegative(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(-1)"); Assert.assertEquals("F", member.getName()); } public void testLeadLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(3)"); Assert.assertNull(member); } })); define(new FunDefBase("Members", "Members(<String Expression>)", "Returns the member whose name is specified by a string expression.", "fmS")); define(new FunDefBase( "NextMember", "<Member>.NextMember", "Returns the next member in the level that contains a specified member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getLeadMember(member, +1); } public void testBasic2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[F].NextMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("M")); } public void testFirstInLevel2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[M].NextMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions.length == 0); } public void testAll2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].PrevMember} ON COLUMNS from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions.length == 0); } }); if (false) define(new FunDefBase("OpeningPeriod", "OpeningPeriod([<Level>[, <Member>]])", "Returns the first sibling among the descendants of a member at a level.", "fm*")); if (false) define(new FunDefBase("ParallelPeriod", "ParallelPeriod([<Level>[, <Numeric Expression>[, <Member>]]])", "Returns a member from a prior period in the same relative position as a specified member.", "fm*")); define(new FunDefBase("Parent", "<Member>.Parent", "Returns the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); if (parent == null || !evaluator.getSchemaReader().getRole().canAccess(parent)) { parent = member.getHierarchy().getNullMember(); } return parent; } public void testBasic5(FoodMartTestCase test) { Result result = test.runQuery( "select{ [Product].[All Products].[Drink].Parent} on columns from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("All Products")); } public void testFirstInLevel5(FoodMartTestCase test) { Result result = test.runQuery( "select {[Time].[1997].[Q2].[4].Parent} on columns,{[Gender].[M]} on rows from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("Q2")); } public void testAll5(FoodMartTestCase test) { Result result = test.runQuery( "select {[Time].[1997].[Q2].Parent} on columns,{[Gender].[M]} on rows from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("1997")); } }); define(new FunDefBase("PrevMember", "<Member>.PrevMember", "Returns the previous member in the level that contains a specified member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getLeadMember(member, -1); } public void testBasic(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[M].PrevMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("F")); } public void testFirstInLevel(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[F].PrevMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions.length == 0); } public void testAll(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].PrevMember} ON COLUMNS from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions.length == 0); } }); if (false) define(new FunDefBase("ValidMeasure", "ValidMeasure(<Tuple>)", "Returns a valid measure in a virtual cube by forcing inapplicable dimensions to their top level.", "fm*")); // // NUMERIC FUNCTIONS define(new FunkResolver("Aggregate", "Aggregate(<Set>[, <Numeric Expression>])", "Returns a calculated value using the appropriate aggregate function, based on the context of the query.", new String[] {"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); Aggregator aggregator = (Aggregator) evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE); if (aggregator == null) { throw newEvalException(null, "Could not find an aggregator in the current evaluation context"); } Aggregator rollup = aggregator.getRollup(); if (rollup == null) { throw newEvalException(null, "Don't know how to rollup aggregator '" + aggregator + "'"); } return rollup.aggregate(evaluator.push(), members, exp); } public void testAggregate(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Store].[CA plus OR] AS 'AGGREGATE({[Store].[USA].[CA], [Store].[USA].[OR]})'" + nl + "SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} ON COLUMNS," + nl + " {[Store].[USA].[CA], [Store].[USA].[OR], [Store].[CA plus OR]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE ([1997].[Q1])", "Axis #0:" + nl + "{[Time].[1997].[Q1]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[CA]}" + nl + "{[Store].[All Stores].[USA].[OR]}" + nl + "{[Store].[CA plus OR]}" + nl + "Row #0: 16,890" + nl + "Row #0: 36,175.20" + nl + "Row #1: 19,287" + nl + "Row #1: 40,170.29" + nl + "Row #2: 36,177" + nl + "Row #2: 76,345.49" + nl); } public void testAggregate2(FoodMartTestCase test) { test.runQueryCheckResult( "WITH" + nl + " MEMBER [Time].[1st Half Sales] AS 'Aggregate({Time.[1997].[Q1], Time.[1997].[Q2]})'" + nl + " MEMBER [Time].[2nd Half Sales] AS 'Aggregate({Time.[1997].[Q3], Time.[1997].[Q4]})'" + nl + " MEMBER [Time].[Difference] AS 'Time.[2nd Half Sales] - Time.[1st Half Sales]'" + nl + "SELECT" + nl + " { [Store].[Store State].Members} ON COLUMNS," + nl + " { Time.[1st Half Sales], Time.[2nd Half Sales], Time.[Difference]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE [Measures].[Store Sales]", "Axis #0:" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[Canada].[BC]}" + nl + "{[Store].[All Stores].[Mexico].[DF]}" + nl + "{[Store].[All Stores].[Mexico].[Guerrero]}" + nl + "{[Store].[All Stores].[Mexico].[Jalisco]}" + nl + "{[Store].[All Stores].[Mexico].[Veracruz]}" + nl + "{[Store].[All Stores].[Mexico].[Yucatan]}" + nl + "{[Store].[All Stores].[Mexico].[Zacatecas]}" + nl + "{[Store].[All Stores].[USA].[CA]}" + nl + "{[Store].[All Stores].[USA].[OR]}" + nl + "{[Store].[All Stores].[USA].[WA]}" + nl + "Axis #2:" + nl + "{[Time].[1st Half Sales]}" + nl + "{[Time].[2nd Half Sales]}" + nl + "{[Time].[Difference]}" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: 74,571.95" + nl + "Row #0: 71,943.17" + nl + "Row #0: 125,779.50" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: 84,595.89" + nl + "Row #1: 70,333.90" + nl + "Row #1: 138,013.72" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: 10,023.94" + nl + "Row #2: -1,609.27" + nl + "Row #2: 12,234.22" + nl); } public void testAggregateToSimulateCompoundSlicer(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Time].[1997 H1] as 'Aggregate({[Time].[1997].[Q1], [Time].[1997].[Q2]})'" + nl + " MEMBER [Education Level].[College or higher] as 'Aggregate({[Education Level].[Bachelors Degree], [Education Level].[Graduate Degree]})'" + nl + "SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} on columns," + nl + " {[Product].children} on rows" + nl + "FROM [Sales]" + nl + "WHERE ([Time].[1997 H1], [Education Level].[College or higher], [Gender].[F])", "Axis #0:" + nl + "{[Time].[1997 H1], [Education Level].[College or higher], [Gender].[All Gender].[F]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink]}" + nl + "{[Product].[All Products].[Food]}" + nl + "{[Product].[All Products].[Non-Consumable]}" + nl + "Row #0: 1,797" + nl + "Row #0: 3,620.49" + nl + "Row #1: 15,002" + nl + "Row #1: 31,931.88" + nl + "Row #2: 3,845" + nl + "Row #2: 8,173.22" + nl); } })); define(new FunkResolver("$AggregateChildren", "$AggregateChildren(<Hierarchy>)", "Equivalent to 'Aggregate(<Hierarchy>.CurrentMember.Children); for internal use.", new String[] {"Inh"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); Member member = evaluator.getParent().getContext(hierarchy.getDimension()); List members = (List) member.getPropertyValue(Property.PROPERTY_CONTRIBUTING_CHILDREN); Aggregator aggregator = (Aggregator) evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE); if (aggregator == null) { throw newEvalException(null, "Could not find an aggregator in the current evaluation context"); } Aggregator rollup = aggregator.getRollup(); if (rollup == null) { throw newEvalException(null, "Don't know how to rollup aggregator '" + aggregator + "'"); } return rollup.aggregate(evaluator.push(), members, valueFunCall); } })); define(new FunkResolver( "Avg", "Avg(<Set>[, <Numeric Expression>])", "Returns the average value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return avg(evaluator.push(), members, exp); } public void testAvg(FoodMartTestCase test) { String result = test.executeExpr( "AVG({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("188,412.71", result); } //todo: testAvgWithNulls })); define(new FunkResolver( "Correlation", "Correlation(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the correlation of two series evaluated over a set.", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2, valueFunCall); return correlation(evaluator.push(), members, exp1, exp2); } public void testCorrelation(FoodMartTestCase test) { String result = test.executeExpr("Correlation({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales]) * 1000000"); Assert.assertEquals("999,906", result); } })); defineReserved(new String[] {"EXCLUDEEMPTY","INCLUDEEMPTY"}); define(new FunkResolver( "Count", "Count(<Set>[, EXCLUDEEMPTY | INCLUDEEMPTY])", "Returns the number of tuples in a set, empty cells included unless the optional EXCLUDEEMPTY flag is used.", new String[]{"fnx", "fnxy"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); String empties = getLiteralArg(args, 1, "INCLUDEEMPTY", new String[] {"INCLUDEEMPTY", "EXCLUDEEMPTY"}, null); final boolean includeEmpty = empties.equals("INCLUDEEMPTY"); return count(evaluator, members, includeEmpty); } public void testCount(FoodMartTestCase test) { String result = test.executeExpr( "count({[Promotion Media].[Media Type].members})"); Assert.assertEquals("14", result); } public void testCountExcludeEmpty(FoodMartTestCase test) { test.runQueryCheckResult( "with member [Measures].[Promo Count] as " + nl + " ' Count(Crossjoin({[Measures].[Unit Sales]}," + nl + " {[Promotion Media].[Media Type].members}), EXCLUDEEMPTY)'" + nl + "select {[Measures].[Unit Sales], [Measures].[Promo Count]} on columns," + nl + " {[Product].[Drink].[Beverages].[Carbonated Beverages].[Soda].children} on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Promo Count]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Excellent]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Fabulous]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Skinner]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Token]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Washington]}" + nl + "Row #0: 738" + nl + "Row #0: 14" + nl + "Row #1: 632" + nl + "Row #1: 13" + nl + "Row #2: 655" + nl + "Row #2: 14" + nl + "Row #3: 735" + nl + "Row #3: 14" + nl + "Row #4: 647" + nl + "Row #4: 12" + nl); } //todo: testCountNull, testCountNoExp })); define(new FunkResolver( "Covariance", "Covariance(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the covariance of two series evaluated over a set (biased).", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2); return covariance(evaluator.push(), members, exp1, exp2, true); } public void testCovariance(FoodMartTestCase test) { String result = test.executeExpr("Covariance({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales])"); Assert.assertEquals("1,355,761,899", result); } })); define(new FunkResolver( "CovarianceN", "CovarianceN(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the covariance of two series evaluated over a set (unbiased).", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2, valueFunCall); return covariance(evaluator.push(), members, exp1, exp2, false); } public void testCovarianceN(FoodMartTestCase test) { String result = test.executeExpr("CovarianceN({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales])"); Assert.assertEquals("2,033,642,849", result); } })); define(new FunDefBase("IIf", "IIf(<Logical Expression>, <Numeric Expression1>, <Numeric Expression2>)", "Returns one of two numeric values determined by a logical test.", "fnbnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { boolean logical = getBooleanArg(evaluator, args, 0); return getDoubleArg(evaluator, args, logical ? 1 : 2); } public void testIIfNumeric(FoodMartTestCase test) { String s = test.executeExpr( "IIf(([Measures].[Unit Sales],[Product].[Drink].[Alcoholic Beverages].[Beer and Wine]) > 100, 45, 32)"); Assert.assertEquals("45", s); } }); if (false) define(new FunDefBase("LinRegIntercept", "LinRegIntercept(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of b in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegPoint", "LinRegPoint(<Numeric Expression>, <Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of y in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegR2", "LinRegR2(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns R2 (the coefficient of determination).", "fn*")); if (false) define(new FunDefBase("LinRegSlope", "LinRegSlope(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of a in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegVariance", "LinRegVariance(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the variance associated with the regression line y = ax + b.", "fn*")); define(new FunkResolver( "Max", "Max(<Set>[, <Numeric Expression>])", "Returns the maximum value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return max(evaluator.push(), members, exp); } public void testMax(FoodMartTestCase test) { String result = test.executeExpr( "MAX({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("263,793.22", result); } })); define(new FunkResolver( "Median", "Median(<Set>[, <Numeric Expression>])", "Returns the median value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); //todo: ignore nulls, do we need to ignore the List? return median(evaluator.push(), members, exp); } public void testMedian(FoodMartTestCase test) { String result = test.executeExpr( "MEDIAN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("159,167.84", result); } public void testMedian2(FoodMartTestCase test) { test.runQueryCheckResult( "WITH" + nl + " MEMBER [Time].[1st Half Sales] AS 'Sum({[Time].[1997].[Q1], [Time].[1997].[Q2]})'" + nl + " MEMBER [Time].[2nd Half Sales] AS 'Sum({[Time].[1997].[Q3], [Time].[1997].[Q4]})'" + nl + " MEMBER [Time].[Median] AS 'Median(Time.Members)'" + nl + "SELECT" + nl + " NON EMPTY { [Store].[Store Name].Members} ON COLUMNS," + nl + " { [Time].[1st Half Sales], [Time].[2nd Half Sales], [Time].[Median]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE [Measures].[Store Sales]", "Axis #0:" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills].[Store 6]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles].[Store 7]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego].[Store 24]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco].[Store 14]}" + nl + "{[Store].[All Stores].[USA].[OR].[Portland].[Store 11]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem].[Store 13]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham].[Store 2]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton].[Store 3]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle].[Store 15]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane].[Store 16]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma].[Store 17]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla].[Store 22]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima].[Store 23]}" + nl + "Axis #2:" + nl + "{[Time].[1st Half Sales]}" + nl + "{[Time].[2nd Half Sales]}" + nl + "{[Time].[Median]}" + nl + "Row #0: 20,801.04" + nl + "Row #0: 25,421.41" + nl + "Row #0: 26,275.11" + nl + "Row #0: 2,074.39" + nl + "Row #0: 28,519.18" + nl + "Row #0: 43,423.99" + nl + "Row #0: 2,140.99" + nl + "Row #0: 25,502.08" + nl + "Row #0: 25,293.50" + nl + "Row #0: 23,265.53" + nl + "Row #0: 34,926.91" + nl + "Row #0: 2,159.60" + nl + "Row #0: 12,490.89" + nl + "Row #1: 24,949.20" + nl + "Row #1: 29,123.87" + nl + "Row #1: 28,156.03" + nl + "Row #1: 2,366.79" + nl + "Row #1: 26,539.61" + nl + "Row #1: 43,794.29" + nl + "Row #1: 2,598.24" + nl + "Row #1: 27,394.22" + nl + "Row #1: 27,350.57" + nl + "Row #1: 26,368.93" + nl + "Row #1: 39,917.05" + nl + "Row #1: 2,546.37" + nl + "Row #1: 11,838.34" + nl + "Row #2: 4,577.35" + nl + "Row #2: 5,211.38" + nl + "Row #2: 4,722.87" + nl + "Row #2: 398.24" + nl + "Row #2: 5,039.50" + nl + "Row #2: 7,374.59" + nl + "Row #2: 410.22" + nl + "Row #2: 4,924.04" + nl + "Row #2: 4,569.13" + nl + "Row #2: 4,511.68" + nl + "Row #2: 6,630.91" + nl + "Row #2: 419.51" + nl + "Row #2: 2,169.48" + nl); } })); define(new FunkResolver( "Min", "Min(<Set>[, <Numeric Expression>])", "Returns the minimum value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return min(evaluator.push(), members, exp); } public void testMin(FoodMartTestCase test) { String result = test.executeExpr( "MIN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("142,277.07", result); } })); define(new FunDefBase("Ordinal", "<Level>.Ordinal", "Returns the zero-based ordinal value associated with a level.", "pnl")); if (false) define(new FunDefBase("Rank", "Rank(<Tuple>, <Set>)", "Returns the one-based rank of a tuple in a set.", "fn*")); define(new FunkResolver( "Stddev", "Stddev(<Set>[, <Numeric Expression>])", "Alias for Stdev.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, false); } })); define(new FunkResolver( "Stdev", "Stdev(<Set>[, <Numeric Expression>])", "Returns the standard deviation of a numeric expression evaluated over a set (unbiased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, false); } public void testStdev(FoodMartTestCase test) { String result = test.executeExpr( "STDEV({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("65,825.45", result); } })); define(new FunkResolver( "StddevP", "StddevP(<Set>[, <Numeric Expression>])", "Alias for StdevP.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, true); } })); define(new FunkResolver( "StdevP", "StdevP(<Set>[, <Numeric Expression>])", "Returns the standard deviation of a numeric expression evaluated over a set (biased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, true); } public void testStdevP(FoodMartTestCase test) { String result = test.executeExpr( "STDEVP({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("53,746.26", result); } })); define(new FunkResolver( "Sum", "Sum(<Set>[, <Numeric Expression>])", "Returns the sum of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return sum(evaluator.push(), members, exp); } public void testSumNoExp(FoodMartTestCase test) { String result = test.executeExpr( "SUM({[Promotion Media].[Media Type].members})"); Assert.assertEquals("266,773", result); } })); define(new FunDefBase("Value", "<Measure>.Value", "Returns the value of a measure.", "pnm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.evaluateScalar(evaluator); } }); define(new FunDefBase("_Value", "_Value(<Tuple>)", "Returns the value of the current measure within the context of a tuple.", "fnt") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member[] members = getTupleArg(evaluator, args, 0); Evaluator evaluator2 = evaluator.push(members); return evaluator2.evaluateCurrent(); } }); define(new FunDefBase("_Value", "_Value()", "Returns the value of the current measure.", "fn") { public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluator.evaluateCurrent(); } }); // _Value is a pseudo-function which evaluates a tuple to a number. // It needs a custom resolver. if (false) define(new ResolverBase("_Value", null, null, Syntax.Parentheses) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length == 1 && args[0].getType() == Category.Tuple) { return new ValueFunDef(new int[] {Category.Tuple}); } for (int i = 0; i < args.length; i++) { Exp arg = args[i]; if (!canConvert(arg, Category.Member, conversionCount)) { return null; } } int[] argTypes = new int[args.length]; for (int i = 0; i < argTypes.length; i++) { argTypes[i] = Category.Member; } return new ValueFunDef(argTypes); } }); define(new FunkResolver( "Var", "Var(<Set>[, <Numeric Expression>])", "Returns the variance of a numeric expression evaluated over a set (unbiased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, false); } public void testVar(FoodMartTestCase test) { String result = test.executeExpr( "VAR({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("4,332,990,493.69", result); } })); define(new FunkResolver( "Variance", "Variance(<Set>[, <Numeric Expression>])", "Alias for Var.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, false); } })); define(new FunkResolver( "VarianceP", "VarianceP(<Set>[, <Numeric Expression>])", "Alias for VarP.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, true); } })); define(new FunkResolver( "VarP", "VarP(<Set>[, <Numeric Expression>])", "Returns the variance of a numeric expression evaluated over a set (biased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, true); } public void testVarP(FoodMartTestCase test) { String result = test.executeExpr( "VARP({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("2,888,660,329.13", result); } })); // // SET FUNCTIONS if (false) define(new FunDefBase("AddCalculatedMembers", "AddCalculatedMembers(<Set>)", "Adds calculated members to a set.", "fx*")); define(new FunDefBase("Ascendants", "Ascendants(<Member>)", "Returns the set of the ascendants of a specified member.", "fxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, false); if (member.isNull()) { return new ArrayList(); } Member[] members = member.getAncestorMembers(); final ArrayList result = new ArrayList(members.length + 1); result.add(member); addAll(result, members); return result; } public void testAscendants(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Store].[USA].[CA])", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]"); } public void testAscendantsAll(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Store].DefaultMember)", "[Store].[All Stores]"); } public void testAscendantsNull(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Gender].[F].PrevMember)", ""); } }); define(new FunkResolver( "BottomCount", "BottomCount(<Set>, <Count>[, <Numeric Expression>])", "Returns a specified number of items from the bottom of a set, optionally ordering the set first.", new String[]{"fxxnn", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List list = (List) getArg(evaluator, args, 0); int n = getIntArg(evaluator, args, 1); ExpBase exp = (ExpBase) getArg(evaluator, args, 2, null); if (exp != null) { boolean desc = false, brk = true; sort(evaluator, list, exp, desc, brk); } if (n < list.size()) { list = list.subList(0, n); } return list; } public void testBottomCount(FoodMartTestCase test) { test.assertAxisReturns("BottomCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } //todo: test unordered })); define(new FunkResolver( "BottomPercent", "BottomPercent(<Set>, <Percentage>, <Numeric Expression>)", "Sorts a set and returns the bottom N elements whose cumulative total is at least a specified percentage.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, false, true, n.doubleValue()); } public void testBottomPercent(FoodMartTestCase test) { test.assertAxisReturns("BottomPercent({[Promotion Media].[Media Type].members}, 1, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } //todo: test precision })); define(new FunkResolver( "BottomSum", "BottomSum(<Set>, <Value>, <Numeric Expression>)", "Sorts a set and returns the bottom N elements whose cumulative total is at least a specified value.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, false, false, n.doubleValue()); } public void testBottomSum(FoodMartTestCase test) { test.assertAxisReturns("BottomSum({[Promotion Media].[Media Type].members}, 5000, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } })); define(new FunDefBase("Children", "<Member>.Children", "Returns the children of a member.", "pxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); return Arrays.asList(children); } }); define(new MultiResolver( "Crossjoin", "Crossjoin(<Set1>, <Set2>)", "Returns the cross product of two sets.", new String[]{"fxxx"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { return new CrossJoinFunDef(dummyFunDef); } public void testCrossjoinNested(FoodMartTestCase test) { test.assertAxisReturns( " CrossJoin(" + nl + " CrossJoin(" + nl + " [Gender].members," + nl + " [Marital Status].members)," + nl + " {[Store], [Store].children})", "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}"); } public void testCrossjoinSingletonTuples(FoodMartTestCase test) { test.assertAxisReturns("CrossJoin({([Gender].[M])}, {([Marital Status].[S])})", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}"); } public void testCrossjoinSingletonTuplesNested(FoodMartTestCase test) { test.assertAxisReturns("CrossJoin({([Gender].[M])}, CrossJoin({([Marital Status].[S])}, [Store].children))", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}"); } }); define(new MultiResolver( "*", "<Set1> * <Set2>", "Returns the cross product of two sets.", new String[]{"ixxx", "ixmx", "ixxm", "ixmm"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { return new CrossJoinFunDef(dummyFunDef); } public void testCrossjoinAsterisk(FoodMartTestCase test) { test.assertAxisReturns("{[Gender].[M]} * {[Marital Status].[S]}", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}"); } public void testCrossjoinAsteriskAssoc(FoodMartTestCase test) { test.assertAxisReturns("Order({[Gender].Children} * {[Marital Status].Children} * {[Time].[1997].[Q2].Children}," + "[Measures].[Unit Sales])", "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}"); } public void testCrossjoinAsteriskInsideBraces(FoodMartTestCase test) { test.assertAxisReturns("{[Gender].[M] * [Marital Status].[S] * [Time].[1997].[Q2].Children}", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}"); } public void testCrossJoinAsteriskQuery(FoodMartTestCase test) { test.runQueryCheckResult( "SELECT {[Measures].members * [1997].children} ON COLUMNS," + nl + " {[Store].[USA].children * [Position].[All Position].children} DIMENSION PROPERTIES [Store].[Store SQFT] ON ROWS" + nl + "FROM [HR]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q1]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q2]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q3]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q4]}" + nl + "{[Measures].[Count], [Time].[1997].[Q1]}" + nl + "{[Measures].[Count], [Time].[1997].[Q2]}" + nl + "{[Measures].[Count], [Time].[1997].[Q3]}" + nl + "{[Measures].[Count], [Time].[1997].[Q4]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q1]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q2]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q3]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q4]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Temp Staff]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Temp Staff]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Temp Staff]}" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #2: $1,728.45" + nl + "Row #2: $1,727.02" + nl + "Row #2: $1,727.72" + nl + "Row #2: $1,726.55" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #4: $401.35" + nl + "Row #4: $405.73" + nl + "Row #4: $400.61" + nl + "Row #4: $402.31" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #7: $1,343.62" + nl + "Row #7: $1,342.61" + nl + "Row #7: $1,342.57" + nl + "Row #7: $1,343.65" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #9: $333.20" + nl + "Row #9: $332.65" + nl + "Row #9: $331.28" + nl + "Row #9: $332.43" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #12: $2,768.60" + nl + "Row #12: $2,769.18" + nl + "Row #12: $2,766.78" + nl + "Row #12: $2,769.50" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #14: $674.70" + nl + "Row #14: $674.54" + nl + "Row #14: $676.25" + nl + "Row #14: $676.48" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl); } }); defineReserved(DescendantsFlags.instance); define(new MultiResolver( "Descendants", "Descendants(<Member>[, <Level>[, <Desc_flag>]])", "Returns the set of descendants of a member at a specified level, optionally including or excluding descendants in other levels.", new String[]{"fxm", "fxml", "fxmly", "fxmn", "fxmny"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { int depthLimit = -1; // unlimited boolean depthSpecified = false; int flag = DescendantsFlags.SELF; if (args.length == 1) { depthLimit = -1; flag = DescendantsFlags.SELF_BEFORE_AFTER; } if (args.length >= 2) { if (args[1] instanceof Literal) { Literal literal = (Literal) args[1]; if (literal.getValue() instanceof Number) { Number number = (Number) literal.getValue(); depthLimit = number.intValue(); depthSpecified = true; } } } if (args.length >= 3) { flag = getLiteralArg(args, 2, DescendantsFlags.SELF, DescendantsFlags.instance, dummyFunDef); } final int depthLimitFinal = depthLimit < 0 ? Integer.MAX_VALUE : depthLimit; final int flagFinal = flag; final boolean depthSpecifiedFinal = depthSpecified; return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Level level; if (depthSpecifiedFinal) { level = null; } else if (args.length > 1) { level = getLevelArg(evaluator, args, 1, true); } else { level = member.getLevel(); } // Expand member to its children, until we get to the right // level. We assume that all children are in the same // level. final SchemaReader schemaReader = evaluator.getSchemaReader(); Member[] children = {member}; int depth = 0; List result = new ArrayList(); while (true) { final int currentDepth; final int targetDepth; if (level == null) { currentDepth = depth++; targetDepth = depthLimitFinal; } else { final Member firstChild = children[0]; currentDepth = firstChild.getLevel().getDepth(); targetDepth = level.getDepth(); } if (currentDepth == targetDepth) { if ((flagFinal & DescendantsFlags.SELF) == DescendantsFlags.SELF) { Util.addAll(result, children); } if ((flagFinal & DescendantsFlags.AFTER) != DescendantsFlags.AFTER) { break; // no more results after this level } } else if (currentDepth < targetDepth) { if ((flagFinal & DescendantsFlags.BEFORE) == DescendantsFlags.BEFORE) { Util.addAll(result, children); } } else { if ((flagFinal & DescendantsFlags.AFTER) == DescendantsFlags.AFTER) { Util.addAll(result, children); } else { break; // no more results after this level } } children = schemaReader.getMemberChildren(children); if (children.length == 0) { break; } } return result; } }; } public void testDescendantsM(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997].[Q1])", "[Time].[1997].[Q1]" + nl + "[Time].[1997].[Q1].[1]" + nl + "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]"); } public void testDescendantsML(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month])", months); } public void testDescendantsMLSelf(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF)", quarters); } public void testDescendantsMLSelfBefore(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF_AND_BEFORE)", year1997 + nl + quarters); } public void testDescendantsMLSelfBeforeAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF_BEFORE_AFTER)", year1997 + nl + quarters + nl + months); } public void testDescendantsMLBefore(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], BEFORE)", year1997); } public void testDescendantsMLBeforeAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], BEFORE_AND_AFTER)", year1997 + nl + months); } public void testDescendantsMLAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], AFTER)", months); } public void testDescendantsMLAfterEnd(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month], AFTER)", ""); } public void _testDescendantsMLLeaves(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month], LEAVES)", "foo"); } public void testDescendantsM0(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 0)", year1997); } public void testDescendantsM2(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 2)", months); } public void testDescendantsMNY(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 1, BEFORE_AND_AFTER)", year1997 + nl + months); } public void testDescendantsParentChild(FoodMartTestCase test) { test.assertAxisReturns("HR", "Descendants([Employees], 2)", "[Employees].[All Employees].[Sheri Nowmer].[Derrick Whelply]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Michael Spence]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Maya Gutierrez]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Roberta Damstra]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Rebecca Kanagaki]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Darren Stanz]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Donna Arnold]"); } public void testDescendantsParentChildBefore(FoodMartTestCase test) { test.assertAxisReturns("HR", "Descendants([Employees], 2, BEFORE)", "[Employees].[All Employees]" + nl + "[Employees].[All Employees].[Sheri Nowmer]"); } }); if (false) define(new FunDefBase("Distinct", "Distinct(<Set>)", "Eliminates duplicate tuples from a set.", "fxx")); define(new FunkResolver("DrilldownLevel", "DrilldownLevel(<Set>[, <Level>]) or DrilldownLevel(<Set>, , <Index>)", "Drills down the members of a set, at a specified level, to one level below. Alternatively, drills down on a specified dimension in the set.", new String[]{"fxx", "fxxl"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { //todo add fssl functionality List set0 = (List) getArg(evaluator, args, 0); int[] depthArray = new int[set0.size()]; List drilledSet = new ArrayList(); for (int i = 0, m = set0.size(); i < m; i++) { Member member = (Member) set0.get(i); depthArray[i] = member.getLevel().getDepth(); // Object o0 = set0.get(i); // depthList.addElement(new Object[] {o0}); } Arrays.sort(depthArray); int maxDepth = depthArray[depthArray.length - 1]; for (int i = 0, m = set0.size(); i < m; i++) { Member member = (Member) set0.get(i); drilledSet.add(member); if (member.getLevel().getDepth() == maxDepth) { Member[] childMembers = evaluator.getSchemaReader().getMemberChildren(member); for (int j = 0; j < childMembers.length; j++) { drilledSet.add(childMembers[j]); } } } return drilledSet; } } )); if (false) define(new FunDefBase("DrilldownLevelBottom", "DrilldownLevelBottom(<Set>, <Count>[, [<Level>][, <Numeric Expression>]])", "Drills down the bottom N members of a set, at a specified level, to one level below.", "fx*")); if (false) define(new FunDefBase("DrilldownLevelTop", "DrilldownLevelTop(<Set>, <Count>[, [<Level>][, <Numeric Expression>]])", "Drills down the top N members of a set, at a specified level, to one level below.", "fx*")); if (false) define(new FunDefBase("DrilldownMember", "DrilldownMember(<Set1>, <Set2>[, RECURSIVE])", "Drills down the members in a set that are present in a second specified set.", "fx*")); if (false) define(new FunDefBase("DrilldownMemberBottom", "DrilldownMemberBottom(<Set1>, <Set2>, <Count>[, [<Numeric Expression>][, RECURSIVE]])", "Like DrilldownMember except that it includes only the bottom N children.", "fx*")); if (false) define(new FunDefBase("DrilldownMemberTop", "DrilldownMemberTop(<Set1>, <Set2>, <Count>[, [<Numeric Expression>][, RECURSIVE]])", "Like DrilldownMember except that it includes only the top N children.", "fx*")); if (false) define(new FunDefBase("DrillupLevel", "DrillupLevel(<Set>[, <Level>])", "Drills up the members of a set that are below a specified level.", "fx*")); if (false) define(new FunDefBase("DrillupMember", "DrillupMember(<Set1>, <Set2>)", "Drills up the members in a set that are present in a second specified set.", "fx*")); define(new FunkResolver( "Except", "Except(<Set1>, <Set2>[, ALL])", "Finds the difference between two sets, optionally retaining duplicates.", new String[]{"fxxx", "fxxxs"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { // todo: implement ALL HashSet set = new HashSet(); set.addAll((List) getArg(evaluator, args, 1)); List set1 = (List) getArg(evaluator, args, 0); List result = new ArrayList(); for (int i = 0, count = set1.size(); i < count; i++) { Object o = set1.get(i); if (!set.contains(o)) { result.add(o); } } return result; } })); if (false) define(new FunDefBase("Extract", "Extract(<Set>, <Dimension>[, <Dimension>...])", "Returns a set of tuples from extracted dimension elements. The opposite of Crossjoin.", "fx*")); define(new FunDefBase("Filter", "Filter(<Set>, <Search Condition>)", "Returns the set resulting from filtering a set based on a search condition.", "fxxb") { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); Exp exp = args[1]; List result = new ArrayList(); Evaluator evaluator2 = evaluator.push(); for (int i = 0, count = members.size(); i < count; i++) { Object o = members.get(i); if (o instanceof Member) { evaluator2.setContext((Member) o); } else if (o instanceof Member[]) { evaluator2.setContext((Member[]) o); } else { throw Util.newInternal( "unexpected type in set: " + o.getClass()); } Boolean b = (Boolean) exp.evaluateScalar(evaluator2); if (b.booleanValue()) { result.add(o); } } return result; } /** * Make sure that slicer is in force when expression is applied * on axis, E.g. select filter([Customers].members, [Unit Sales] > 100) * from sales where ([Time].[1998]) **/ public void testFilterWithSlicer(FoodMartTestCase test) { Result result = test.execute( "select {[Measures].[Unit Sales]} on columns," + nl + " filter([Customers].[USA].children," + nl + " [Measures].[Unit Sales] > 20000) on rows" + nl + "from Sales" + nl + "where ([Time].[1997].[Q1])"); Axis rows = result.getAxes()[1]; // if slicer were ignored, there would be 3 rows Assert.assertEquals(1, rows.positions.length); Cell cell = result.getCell(new int[] {0,0}); Assert.assertEquals("30,114", cell.getFormattedValue()); } public void testFilterCompound(FoodMartTestCase test) { Result result = test.execute( "select {[Measures].[Unit Sales]} on columns," + nl + " Filter(" + nl + " CrossJoin(" + nl + " [Gender].Children," + nl + " [Customers].[USA].Children)," + nl + " [Measures].[Unit Sales] > 9500) on rows" + nl + "from Sales" + nl + "where ([Time].[1997].[Q1])"); Position[] rows = result.getAxes()[1].positions; Assert.assertTrue(rows.length == 3); Assert.assertEquals("F", rows[0].members[0].getName()); Assert.assertEquals("WA", rows[0].members[1].getName()); Assert.assertEquals("M", rows[1].members[0].getName()); Assert.assertEquals("OR", rows[1].members[1].getName()); Assert.assertEquals("M", rows[2].members[0].getName()); Assert.assertEquals("WA", rows[2].members[1].getName()); } }); define(new MultiResolver( "Generate", "Generate(<Set1>, <Set2>[, ALL])", "Applies a set to each member of another set and joins the resulting sets by union.", new String[] {"fxxx", "fxxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { final boolean all = getLiteralArg(args, 2, "", new String[] {"ALL"}, dummyFunDef).equalsIgnoreCase("ALL"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); List result = new ArrayList(); HashSet emitted = all ? null : new HashSet(); for (int i = 0; i < members.size(); i++) { Object o = members.get(i); if (o instanceof Member) { evaluator.setContext((Member) o); } else { evaluator.setContext((Member[]) o); } final List result2 = (List) args[1].evaluate(evaluator); if (all) { result.addAll(result2); } else { for (int j = 0; j < result2.size(); j++) { Object row = result2.get(j); if (emitted.add(row)) { result.add(row); } } } } return result; } }; } public void testGenerate(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA], [Store].[USA].[CA]}, {[Store].CurrentMember.Children})", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[WA]" + nl + "[Store].[All Stores].[USA].[CA].[Alameda]" + nl + "[Store].[All Stores].[USA].[CA].[Beverly Hills]" + nl + "[Store].[All Stores].[USA].[CA].[Los Angeles]" + nl + "[Store].[All Stores].[USA].[CA].[San Diego]" + nl + "[Store].[All Stores].[USA].[CA].[San Francisco]"); } public void testGenerateAll(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[OR].[Portland]}," + " Ascendants([Store].CurrentMember)," + " ALL)", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]" + nl + "[Store].[All Stores].[USA].[OR].[Portland]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]"); } public void testGenerateUnique(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[OR].[Portland]}," + " Ascendants([Store].CurrentMember))", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]" + nl + "[Store].[All Stores].[USA].[OR].[Portland]" + nl + "[Store].[All Stores].[USA].[OR]"); } public void testGenerateCrossJoin(FoodMartTestCase test) { // Note that the different regions have different Top 2. test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[CA].[San Francisco]}," + nl + " CrossJoin({[Store].CurrentMember}," + nl + " TopCount([Product].[Brand Name].members, " + nl + " 2," + nl + " [Measures].[Unit Sales])))", "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Hermanos]}" + nl + "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Tell Tale]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Ebony]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[High Top]}"); } }); define(new FunkResolver( "Head", "Head(<Set>[, < Numeric Expression >])", "Returns the first specified number of elements in a set.", new String[] {"fxx", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int count = args.length < 2 ? 1 : getIntArg(evaluator, args, 1); if (count >= members.size()) { return members; } if (count <= 0) { return new ArrayList(); } return members.subList(0, count); } public void testHead(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]"); } public void testHeadNegative(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2 - 3)", ""); } public void testHeadDefault(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children)", "[Store].[All Stores].[Canada]"); } public void testHeadOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2 + 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testHeadEmpty(FoodMartTestCase test) { test.assertAxisReturns("Head([Gender].[F].Children, 2)", ""); } })); defineReserved(new String[] {"PRE","POST"}); define(new MultiResolver( "Hierarchize", "Hierarchize(<Set>[, POST])", "Orders the members of a set in a hierarchy.", new String[] {"fxx", "fxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String order = getLiteralArg(args, 1, "PRE", new String[] {"PRE", "POST"}, dummyFunDef); final boolean post = order.equals("POST"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); hierarchize(members, post); return members; } }; } public void testHierarchize(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]})", "[Product].[All Products]" + nl + "[Product].[All Products].[Drink]" + nl + "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Non-Consumable]"); } public void testHierarchizePost(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " POST)", "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products]"); } public void testHierarchizeCrossJoinPre(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " PRE)", "{[Product].[All Products], [Gender].[All Gender]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[M]}"); } public void testHierarchizeCrossJoinPost(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " POST)", "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products], [Gender].[All Gender]}"); } }); define(new MultiResolver( "Intersect", "Intersect(<Set1>, <Set2>[, ALL])", "Returns the intersection of two input sets, optionally retaining duplicates.", new String[] {"fxxxy", "fxxx"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { final boolean all = getLiteralArg(args, 2, "", new String[] {"ALL"}, dummyFunDef).equalsIgnoreCase("ALL"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List left = (List) getArg(evaluator, args, 0); if (left == null) { left = Collections.EMPTY_LIST; } List right = (List) getArg(evaluator, args, 1); if (right == null) { right = Collections.EMPTY_LIST; } ArrayList result = new ArrayList(); for (Iterator i = left.iterator(); i.hasNext();) { Object leftObject = i.next(); if (right.contains(leftObject)) { if (all || !result.contains(leftObject)) { result.add(leftObject); } } } return result; } }; } public void testIntersect(FoodMartTestCase test) { // Note: duplicates retained from left, not from right; and order is preserved. test.assertAxisReturns("Intersect({[Time].[1997].[Q2], [Time].[1997], [Time].[1997].[Q1], [Time].[1997].[Q2]}, " + "{[Time].[1998], [Time].[1997], [Time].[1997].[Q2], [Time].[1997]}, " + "ALL)", "[Time].[1997].[Q2]" + nl + "[Time].[1997]" + nl + "[Time].[1997].[Q2]"); } public void testIntersectRightEmpty(FoodMartTestCase test) { test.assertAxisReturns("Intersect({[Time].[1997]}, {})", ""); } public void testIntersectLeftEmpty(FoodMartTestCase test) { test.assertAxisReturns("Intersect({}, {[Store].[USA].[CA]})", ""); } }); if (false) define(new FunDefBase("LastPeriods", "LastPeriods(<Index>[, <Member>])", "Returns a set of members prior to and including a specified member.", "fx*")); define(new FunDefBase("Members", "<Dimension>.Members", "Returns the set of all members in a dimension.", "pxd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = (Dimension) getArg(evaluator, args, 0); Hierarchy hierarchy = dimension.getHierarchy(); return addMembers(evaluator.getSchemaReader(), new ArrayList(), hierarchy); } }); define(new FunDefBase("Members", "<Hierarchy>.Members", "Returns the set of all members in a hierarchy.", "pxh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = (Hierarchy) getArg(evaluator, args, 0); return addMembers(evaluator.getSchemaReader(), new ArrayList(), hierarchy); } }); define(new FunDefBase("Members", "<Level>.Members", "Returns the set of all members in a level.", "pxl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = (Level) getArg(evaluator, args, 0); return Arrays.asList(evaluator.getSchemaReader().getLevelMembers(level)); } }); define(new FunkResolver( "Mtd", "Mtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Month.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getMonthLevel(), getMemberArg(evaluator, args, 0, false)); } })); defineReserved(OrderFlags.instance); define(new MultiResolver( "Order", "Order(<Set>, <Value Expression>[, ASC | DESC | BASC | BDESC])", "Arranges members of a set, optionally preserving or breaking the hierarchy.", new String[]{"fxxvy", "fxxv"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { int order = getLiteralArg(args, 2, OrderFlags.ASC, OrderFlags.instance, dummyFunDef); final boolean desc = OrderFlags.isDescending(order); final boolean brk = OrderFlags.isBreak(order); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArgNoEval(args, 1); sort(evaluator, members, exp, desc, brk); return members; } }; } public void testOrder(FoodMartTestCase test) { test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + nl + " order({" + nl + " [Product].[All Products].[Drink]," + nl + " [Product].[All Products].[Drink].[Beverages]," + nl + " [Product].[All Products].[Drink].[Dairy]," + nl + " [Product].[All Products].[Food]," + nl + " [Product].[All Products].[Food].[Baked Goods]," + nl + " [Product].[All Products].[Food].[Eggs]," + nl + " [Product].[All Products]}," + nl + " [Measures].[Unit Sales]) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products]}" + nl + "{[Product].[All Products].[Drink]}" + nl + "{[Product].[All Products].[Drink].[Dairy]}" + nl + "{[Product].[All Products].[Drink].[Beverages]}" + nl + "{[Product].[All Products].[Food]}" + nl + "{[Product].[All Products].[Food].[Eggs]}" + nl + "{[Product].[All Products].[Food].[Baked Goods]}" + nl + "Row #0: 266,773" + nl + "Row #1: 24,597" + nl + "Row #2: 4,186" + nl + "Row #3: 13,573" + nl + "Row #4: 191,940" + nl + "Row #5: 4,132" + nl + "Row #6: 7,870" + nl); } public void testOrderParentsMissing(FoodMartTestCase test) { // Paradoxically, [Alcoholic Beverages] comes before // [Eggs] even though it has a larger value, because // its parent [Drink] has a smaller value than [Food]. test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + " order({" + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages]," + nl + " [Product].[All Products].[Food].[Eggs]}," + nl + " [Measures].[Unit Sales], ASC) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Product].[All Products].[Food].[Eggs]}" + nl + "Row #0: 6,838" + nl + "Row #1: 4,132" + nl); } public void testOrderCrossJoinBreak(FoodMartTestCase test) { test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + nl + " Order(" + nl + " CrossJoin(" + nl + " [Gender].children," + nl + " [Marital Status].children)," + nl + " [Measures].[Unit Sales]," + nl + " BDESC) on rows" + nl + "from Sales" + nl + "where [Time].[1997].[Q1]", "Axis #0:" + nl + "{[Time].[1997].[Q1]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S]}" + nl + "Row #0: 17,070" + nl + "Row #1: 16,790" + nl + "Row #2: 16,311" + nl + "Row #3: 16,120" + nl); } public void testOrderCrossJoin(FoodMartTestCase test) { // Note: // 1. [Alcoholic Beverages] collates before [Eggs] and // [Seafood] because its parent, [Drink], is less // than [Food] // 2. [Seattle] generally sorts after [CA] and [OR] // because invisible parent [WA] is greater. test.runQueryCheckResult( "select CrossJoin(" + nl + " {[Time].[1997]," + nl + " [Time].[1997].[Q1]}," + nl + " {[Measures].[Unit Sales]}) on columns," + nl + " Order(" + nl + " CrossJoin( " + nl + " {[Product].[All Products].[Food].[Eggs]," + nl + " [Product].[All Products].[Food].[Seafood]," + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages]}," + nl + " {[Store].[USA].[WA].[Seattle]," + nl + " [Store].[USA].[CA]," + nl + " [Store].[USA].[OR]})," + nl + " ([Time].[1997].[Q1], [Measures].[Unit Sales])," + nl + " ASC) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Time].[1997], [Measures].[Unit Sales]}" + nl + "{[Time].[1997].[Q1], [Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "Row #0: 1,680" + nl + "Row #0: 393" + nl + "Row #1: 1,936" + nl + "Row #1: 431" + nl + "Row #2: 635" + nl + "Row #2: 142" + nl + "Row #3: 441" + nl + "Row #3: 91" + nl + "Row #4: 451" + nl + "Row #4: 107" + nl + "Row #5: 217" + nl + "Row #5: 44" + nl + "Row #6: 1,116" + nl + "Row #6: 240" + nl + "Row #7: 1,119" + nl + "Row #7: 251" + nl + "Row #8: 373" + nl + "Row #8: 57" + nl); } public void testOrderHierarchicalDesc(FoodMartTestCase test) { test.assertAxisReturns( "Order(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Measures].[Unit Sales]," + nl + " DESC)", "[Product].[All Products]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Non-Consumable]" + nl + "[Product].[All Products].[Drink]" + nl + "[Product].[All Products].[Drink].[Dairy]"); } public void testOrderCrossJoinDesc(FoodMartTestCase test) { test.assertAxisReturns( "Order(" + nl + " CrossJoin(" + nl + " {[Gender].[M], [Gender].[F]}," + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]})," + nl + " [Measures].[Unit Sales]," + nl + " DESC)", "{[Gender].[All Gender].[M], [Product].[All Products]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Food]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Food].[Eggs]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Non-Consumable]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Drink]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Drink].[Dairy]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Food]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Food].[Eggs]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Non-Consumable]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Drink]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Drink].[Dairy]}"); } public void testOrderBug656802(FoodMartTestCase test) { // Note: // 1. [Alcoholic Beverages] collates before [Eggs] and // [Seafood] because its parent, [Drink], is less // than [Food] // 2. [Seattle] generally sorts after [CA] and [OR] // because invisible parent [WA] is greater. test.runQueryCheckResult( "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON columns, " + nl + "Order(" + nl + " ToggleDrillState(" + nl + " {([Promotion Media].[All Media], [Product].[All Products])}," + nl + " {[Product].[All Products]} ), " + nl + " [Measures].[Unit Sales], DESC) ON rows " + nl + "from [Sales] where ([Time].[1997])", "Axis #0:" + nl + "{[Time].[1997]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Cost]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Promotion Media].[All Media], [Product].[All Products]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Food]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Non-Consumable]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Drink]}" + nl + "Row #0: 266,773" + nl + "Row #0: 225,627.23" + nl + "Row #0: 565,238.13" + nl + "Row #1: 191,940" + nl + "Row #1: 163,270.72" + nl + "Row #1: 409,035.59" + nl + "Row #2: 50,236" + nl + "Row #2: 42,879.28" + nl + "Row #2: 107,366.33" + nl + "Row #3: 24,597" + nl + "Row #3: 19,477.23" + nl + "Row #3: 48,836.21" + nl); } public void testOrderBug712702_Simplified(FoodMartTestCase test) { test.runQueryCheckResult("SELECT Order({[Time].[Year].members}, [Measures].[Unit Sales]) on columns" + nl + "from [Sales]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Time].[1998]}" + nl + "{[Time].[1997]}" + nl + "Row #0: (null)" + nl + "Row #0: 266,773" + nl); } public void testOrderBug712702_Original(FoodMartTestCase test) { test.runQueryCheckResult("with member [Measures].[Average Unit Sales] as 'Avg(Descendants([Time].CurrentMember, [Time].[Month]), " + nl + "[Measures].[Unit Sales])' " + nl + "member [Measures].[Max Unit Sales] as 'Max(Descendants([Time].CurrentMember, [Time].[Month]), [Measures].[Unit Sales])' " + nl + "select {[Measures].[Average Unit Sales], [Measures].[Max Unit Sales], [Measures].[Unit Sales]} ON columns, " + nl + " NON EMPTY Order(" + nl + " Crossjoin( " + nl + " {[Store].[All Stores].[USA].[OR].[Portland]," + nl + " [Store].[All Stores].[USA].[OR].[Salem]," + nl + " [Store].[All Stores].[USA].[OR].[Salem].[Store 13]," + nl + " [Store].[All Stores].[USA].[CA].[San Francisco]," + nl + " [Store].[All Stores].[USA].[CA].[San Diego]," + nl + " [Store].[All Stores].[USA].[CA].[Beverly Hills]," + nl + " [Store].[All Stores].[USA].[CA].[Los Angeles]," + nl + " [Store].[All Stores].[USA].[WA].[Walla Walla]," + nl + " [Store].[All Stores].[USA].[WA].[Bellingham]," + nl + " [Store].[All Stores].[USA].[WA].[Yakima]," + nl + " [Store].[All Stores].[USA].[WA].[Spokane]," + nl + " [Store].[All Stores].[USA].[WA].[Seattle], " + nl + " [Store].[All Stores].[USA].[WA].[Bremerton]," + nl + " [Store].[All Stores].[USA].[WA].[Tacoma]}," + nl + " [Time].[Year].Members), " + nl + " [Measures].[Average Unit Sales], ASC) ON rows" + nl + "from [Sales] ", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Average Unit Sales]}" + nl + "{[Measures].[Max Unit Sales]}" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[OR].[Portland], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem].[Store 13], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma], [Time].[1997]}" + nl + "Row #0: 2,173" + nl + "Row #0: 2,933" + nl + "Row #0: 26,079" + nl + "Row #1: 3,465" + nl + "Row #1: 5,891" + nl + "Row #1: 41,580" + nl + "Row #2: 3,465" + nl + "Row #2: 5,891" + nl + "Row #2: 41,580" + nl + "Row #3: 176" + nl + "Row #3: 222" + nl + "Row #3: 2,117" + nl + "Row #4: 1,778" + nl + "Row #4: 2,545" + nl + "Row #4: 21,333" + nl + "Row #5: 2,136" + nl + "Row #5: 2,686" + nl + "Row #5: 25,635" + nl + "Row #6: 2,139" + nl + "Row #6: 2,669" + nl + "Row #6: 25,663" + nl + "Row #7: 184" + nl + "Row #7: 301" + nl + "Row #7: 2,203" + nl + "Row #8: 186" + nl + "Row #8: 275" + nl + "Row #8: 2,237" + nl + "Row #9: 958" + nl + "Row #9: 1,163" + nl + "Row #9: 11,491" + nl + "Row #10: 1,966" + nl + "Row #10: 2,634" + nl + "Row #10: 23,591" + nl + "Row #11: 2,048" + nl + "Row #11: 2,623" + nl + "Row #11: 24,576" + nl + "Row #12: 2,084" + nl + "Row #12: 2,304" + nl + "Row #12: 25,011" + nl + "Row #13: 2,938" + nl + "Row #13: 3,818" + nl + "Row #13: 35,257" + nl); } }); define(new FunkResolver( "PeriodsToDate", "PeriodsToDate([<Level>[, <Member>]])", "Returns a set of periods (members) from a specified level starting with the first period and ending with a specified member.", new String[]{"fx", "fxl", "fxlm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, false); Member member = getMemberArg(evaluator, args, 1, false); return periodsToDate(evaluator, level, member); } })); define(new FunkResolver( "Qtd", "Qtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Quarter.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getQuarterLevel(), getMemberArg(evaluator, args, 0, false)); } })); if (false) define(new FunDefBase("StripCalculatedMembers", "StripCalculatedMembers(<Set>)", "Removes calculated members from a set.", "fx*")); // "Siblings" is not a standard MDX function. define(new FunDefBase("Siblings", "<Member>.Siblings", "Returns the set of siblings of the specified member.", "pxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); final SchemaReader schemaReader = evaluator.getSchemaReader(); Member[] siblings; if (parent == null) { siblings = schemaReader.getHierarchyRootMembers(member.getHierarchy()); } else { siblings = schemaReader.getMemberChildren(parent); } return Arrays.asList(siblings); } public void testSiblingsA(FoodMartTestCase test) { test.assertAxisReturns("{[Time].[1997].Siblings}", "[Time].[1997]" + nl + "[Time].[1998]"); } public void testSiblingsB(FoodMartTestCase test) { test.assertAxisReturns("{[Store].Siblings}", "[Store].[All Stores]"); } public void testSiblingsC(FoodMartTestCase test) { test.assertAxisReturns("{[Store].[USA].[CA].Siblings}", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[WA]"); } }); define(new FunDefBase("StrToSet", "StrToSet(<String Expression>)", "Constructs a set from a string expression.", "fxS") { public Hierarchy getHierarchy(Exp[] args) { // StrToSet(s, <Hie1>, ... <HieN>) is of type [Hie1] x ... x [HieN]; // so, for example, So StrToTuple("[Time].[1997]", [Time]) is of type // [Time]. But if n > 1, we cannot represent the compound type, and we // return null. return (args.length == 2) ? (Hierarchy) args[1] : null; } }); define(new FunkResolver( "Subset", "Subset(<Set>, <Start>[, <Count>])", "Returns a subset of elements from a set.", new String[] {"fxxn", "fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int start = getIntArg(evaluator, args, 1); final int end; if (args.length < 3) { end = members.size(); } else { final int count = getIntArg(evaluator, args, 2); end = start + count; } if (start >= end || start < 0) { return new ArrayList(); } if (start == 0 && end >= members.size()) { return members; } return members.subList(start, end); } public void testSubset(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 7, 2)", "[Promotion Media].[All Media].[Product Attachment]" + nl + "[Promotion Media].[All Media].[Radio]"); } public void testSubsetNegativeCount(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 3, -1)", ""); } public void testSubsetNegativeStart(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, -2, 4)", ""); } public void testSubsetDefault(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 11)", "[Promotion Media].[All Media].[Sunday Paper, Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]" + nl + "[Promotion Media].[All Media].[TV]"); } public void testSubsetOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 15)", ""); } public void testSubsetEmpty(FoodMartTestCase test) { test.assertAxisReturns("Subset([Gender].[F].Children, 1)", ""); } })); define(new FunkResolver( "Tail", "Tail(<Set>[, <Count>])", "Returns a subset from the end of a set.", new String[] {"fxx", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int count = args.length < 2 ? 1 : getIntArg(evaluator, args, 1); if (count >= members.size()) { return members; } if (count <= 0) { return new ArrayList(); } return members.subList(members.size() - count, members.size()); } public void testTail(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2)", "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testTailNegative(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2 - 3)", ""); } public void testTailDefault(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children)", "[Store].[All Stores].[USA]"); } public void testTailOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2 + 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testTailEmpty(FoodMartTestCase test) { test.assertAxisReturns("Tail([Gender].[F].Children, 2)", ""); } })); defineReserved("RECURSIVE"); define(new FunkResolver( "ToggleDrillState", "ToggleDrillState(<Set1>, <Set2>[, RECURSIVE])", "Toggles the drill state of members. This function is a combination of DrillupMember and DrilldownMember.", new String[]{"fxxx", "fxxx#"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List v0 = (List) getArg(evaluator, args, 0), v1 = (List) getArg(evaluator, args, 1); if (args.length > 2) { throw Util.newInternal( "ToggleDrillState(RECURSIVE) not supported"); } if (v1.isEmpty()) { return v0; } if (v0.isEmpty()) { return v0; } HashSet set = new HashSet(); set.addAll(v1); HashSet set1 = set; List result = new ArrayList(); int i = 0, n = v0.size(); while (i < n) { Object o = v0.get(i++); result.add(o); Member m = null; int k = -1; if (o instanceof Member) { if (!set1.contains(o)) { continue; } m = (Member) o; k = -1; } else { Util.assertTrue(o instanceof Member[]); Member[] members = (Member[]) o; for (int j = 0; j < members.length; j++) { Member member = members[j]; if (set1.contains(member)) { k = j; m = member; break; } } if (k == -1) { continue; } } boolean isDrilledDown = false; if (i < n) { Object next = v0.get(i); Member nextMember = (k < 0) ? (Member) next : ((Member[]) next)[k]; boolean strict = true; if (isAncestorOf(m, nextMember, strict)) { isDrilledDown = true; } } if (isDrilledDown) { // skip descendants of this member do { Object next = v0.get(i); Member nextMember = (k < 0) ? (Member) next : ((Member[]) next)[k]; boolean strict = true; if (isAncestorOf(m, nextMember, strict)) { i++; } else { break; } } while (i < n); } else { Member[] children = evaluator.getSchemaReader().getMemberChildren(m); for (int j = 0; j < children.length; j++) { if (k < 0) { result.add(children[j]); } else { Member[] members = (Member[]) ((Member[]) o).clone(); members[k] = children[j]; result.add(members); } } } } return result; } public void testToggleDrillState(FoodMartTestCase test) { test.assertAxisReturns("ToggleDrillState({[Customers].[USA],[Customers].[Canada]},{[Customers].[USA],[Customers].[USA].[CA]})", "[Customers].[All Customers].[USA]" + nl + "[Customers].[All Customers].[USA].[CA]" + nl + "[Customers].[All Customers].[USA].[OR]" + nl + "[Customers].[All Customers].[USA].[WA]" + nl + "[Customers].[All Customers].[Canada]"); } public void testToggleDrillState2(FoodMartTestCase test) { test.assertAxisReturns("ToggleDrillState([Product].[Product Department].members, {[Product].[All Products].[Food].[Snack Foods]})", "[Product].[All Products].[Drink].[Alcoholic Beverages]" + nl + "[Product].[All Products].[Drink].[Beverages]" + nl + "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food].[Baked Goods]" + nl + "[Product].[All Products].[Food].[Baking Goods]" + nl + "[Product].[All Products].[Food].[Breakfast Foods]" + nl + "[Product].[All Products].[Food].[Canned Foods]" + nl + "[Product].[All Products].[Food].[Canned Products]" + nl + "[Product].[All Products].[Food].[Dairy]" + nl + "[Product].[All Products].[Food].[Deli]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Food].[Frozen Foods]" + nl + "[Product].[All Products].[Food].[Meat]" + nl + "[Product].[All Products].[Food].[Produce]" + nl + "[Product].[All Products].[Food].[Seafood]" + nl + "[Product].[All Products].[Food].[Snack Foods]" + nl + "[Product].[All Products].[Food].[Snack Foods].[Snack Foods]" + nl + "[Product].[All Products].[Food].[Snacks]" + nl + "[Product].[All Products].[Food].[Starchy Foods]" + nl + "[Product].[All Products].[Non-Consumable].[Carousel]" + nl + "[Product].[All Products].[Non-Consumable].[Checkout]" + nl + "[Product].[All Products].[Non-Consumable].[Health and Hygiene]" + nl + "[Product].[All Products].[Non-Consumable].[Household]" + nl + "[Product].[All Products].[Non-Consumable].[Periodicals]"); } public void testToggleDrillState3(FoodMartTestCase test) { test.assertAxisReturns( "ToggleDrillState(" + "{[Time].[1997].[Q1]," + " [Time].[1997].[Q2]," + " [Time].[1997].[Q2].[4]," + " [Time].[1997].[Q2].[6]," + " [Time].[1997].[Q3]}," + "{[Time].[1997].[Q2]})", "[Time].[1997].[Q1]" + nl + "[Time].[1997].[Q2]" + nl + "[Time].[1997].[Q3]"); } // bug 634860 public void testToggleDrillStateTuple(FoodMartTestCase test) { test.assertAxisReturns( "ToggleDrillState(" + nl + "{([Store].[All Stores].[USA].[CA]," + " [Product].[All Products].[Drink].[Alcoholic Beverages])," + nl + " ([Store].[All Stores].[USA]," + " [Product].[All Products].[Drink])}," + nl + "{[Store].[All stores].[USA].[CA]})", "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Alameda], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA], [Product].[All Products].[Drink]}"); } })); define(new FunkResolver( "TopCount", "TopCount(<Set>, <Count>[, <Numeric Expression>])", "Returns a specified number of items from the top of a set, optionally ordering the set first.", new String[]{"fxxnn", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List list = (List) getArg(evaluator, args, 0); int n = getIntArg(evaluator, args, 1); ExpBase exp = (ExpBase) getArg(evaluator, args, 2, null); if (exp != null) { boolean desc = true, brk = true; sort(evaluator, list, exp, desc, brk); } if (n < list.size()) { list = list.subList(0, n); } return list; } public void testTopCount(FoodMartTestCase test) { test.assertAxisReturns("TopCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"); } })); define(new FunkResolver( "TopPercent", "TopPercent(<Set>, <Percentage>, <Numeric Expression>)", "Sorts a set and returns the top N elements whose cumulative total is at least a specified percentage.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, true, true, n.doubleValue()); } public void testTopPercent(FoodMartTestCase test) { test.assertAxisReturns("TopPercent({[Promotion Media].[Media Type].members}, 70, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]"); } //todo: test precision })); define(new FunkResolver( "TopSum", "TopSum(<Set>, <Value>, <Numeric Expression>)", "Sorts a set and returns the top N elements whose cumulative total is at least a specified value.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, true, false, n.doubleValue()); } public void testTopSum(FoodMartTestCase test) { test.assertAxisReturns("TopSum({[Promotion Media].[Media Type].members}, 200000, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"); } })); defineReserved(new String[] {"ALL", "DISTINCT"}); define(new MultiResolver( "Union", "Union(<Set1>, <Set2>[, ALL])", "Returns the union of two sets, optionally retaining duplicates.", new String[] {"fxxx", "fxxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String allString = getLiteralArg(args, 2, "DISTINCT", new String[] {"ALL", "DISTINCT"}, dummyFunDef); final boolean all = allString.equalsIgnoreCase("ALL"); checkCompatible(args[0], args[1], dummyFunDef); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List left = (List) getArg(evaluator, args, 0), right = (List) getArg(evaluator, args, 1); if (all) { if (left == null || left.isEmpty()) { return right; } left.addAll(right); return left; } else { HashSet added = new HashSet(); List result = new ArrayList(); addUnique(result, left, added); addUnique(result, right, added); return result; } } }; } public void testUnionAll(FoodMartTestCase test) { test.assertAxisReturns("Union({[Gender].[M]}, {[Gender].[F]}, ALL)", "[Gender].[All Gender].[M]" + nl + "[Gender].[All Gender].[F]"); // order is preserved } public void testUnion(FoodMartTestCase test) { test.assertAxisReturns("Union({[Store].[USA], [Store].[USA], [Store].[USA].[OR]}, {[Store].[USA].[CA], [Store].[USA]})", "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[CA]"); } public void testUnionEmptyBoth(FoodMartTestCase test) { test.assertAxisReturns("Union({}, {})", ""); } public void testUnionEmptyRight(FoodMartTestCase test) { test.assertAxisReturns("Union({[Gender].[M]}, {})", "[Gender].[All Gender].[M]"); } public void testUnionTuple(FoodMartTestCase test) { test.assertAxisReturns( "Union({" + " ([Gender].[M], [Marital Status].[S])," + " ([Gender].[F], [Marital Status].[S])" + "}, {" + " ([Gender].[M], [Marital Status].[M])," + " ([Gender].[M], [Marital Status].[S])" + "})", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M]}"); } public void testUnionQuery(FoodMartTestCase test) { Result result = test.runQuery( "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} on columns," + nl + " Hierarchize( " + nl + " Union(" + nl + " Crossjoin(" + nl + " Crossjoin([Gender].[All Gender].children," + nl + " [Marital Status].[All Marital Status].children )," + nl + " Crossjoin([Customers].[All Customers].children," + nl + " [Product].[All Products].children ) ) ," + nl + " Crossjoin( {([Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M] )}," + nl + " Crossjoin(" + nl + " [Customers].[All Customers].[USA].children," + nl + " [Product].[All Products].children ) ) )) on rows" +nl + "from Sales where ([Time].[1997])"); final Axis rowsAxis = result.getAxes()[1]; Assert.assertEquals(45, rowsAxis.positions.length); } }); if (false) define(new FunDefBase("VisualTotals", "VisualTotals(<Set>, <Pattern>)", "Dynamically totals child members specified in a set using a pattern for the total label in the result set.", "fx*")); define(new FunkResolver( "Wtd", "Wtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Week.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getWeekLevel(), getMemberArg(evaluator, args, 0, false)); } })); define(new FunkResolver( "Ytd", "Ytd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Year.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getYearLevel(), getMemberArg(evaluator, args, 0, false)); } })); define(new FunDefBase( ":", "<Member>:<Member>", "Infix colon operator returns the set of members between a given pair of members.", "ixmm") { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { final Member member0 = getMemberArg(evaluator, args, 0, true); final Member member1 = getMemberArg(evaluator, args, 1, true); if (member0.isNull() || member1.isNull()) { return Collections.EMPTY_LIST; } if (member0.getLevel() != member1.getLevel()) { throw newEvalException(this, "Members must belong to the same level"); } return FunUtil.memberRange(evaluator, member0, member1); } public void testRange(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q1].[2] : [Time].[1997].[Q2].[5]", "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]" + nl + "[Time].[1997].[Q2].[4]" + nl + "[Time].[1997].[Q2].[5]"); // not parents } /** * Large dimensions use a different member reader, therefore need to * be tested separately. */ public void testRangeLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[CA].[San Francisco] : [Customers].[USA].[WA].[Bellingham]", "[Customers].[All Customers].[USA].[CA].[San Francisco]" + nl + "[Customers].[All Customers].[USA].[CA].[San Gabriel]" + nl + "[Customers].[All Customers].[USA].[CA].[San Jose]" + nl + "[Customers].[All Customers].[USA].[CA].[Santa Cruz]" + nl + "[Customers].[All Customers].[USA].[CA].[Santa Monica]" + nl + "[Customers].[All Customers].[USA].[CA].[Spring Valley]" + nl + "[Customers].[All Customers].[USA].[CA].[Torrance]" + nl + "[Customers].[All Customers].[USA].[CA].[West Covina]" + nl + "[Customers].[All Customers].[USA].[CA].[Woodland Hills]" + nl + "[Customers].[All Customers].[USA].[OR].[Albany]" + nl + "[Customers].[All Customers].[USA].[OR].[Beaverton]" + nl + "[Customers].[All Customers].[USA].[OR].[Corvallis]" + nl + "[Customers].[All Customers].[USA].[OR].[Lake Oswego]" + nl + "[Customers].[All Customers].[USA].[OR].[Lebanon]" + nl + "[Customers].[All Customers].[USA].[OR].[Milwaukie]" + nl + "[Customers].[All Customers].[USA].[OR].[Oregon City]" + nl + "[Customers].[All Customers].[USA].[OR].[Portland]" + nl + "[Customers].[All Customers].[USA].[OR].[Salem]" + nl + "[Customers].[All Customers].[USA].[OR].[W. Linn]" + nl + "[Customers].[All Customers].[USA].[OR].[Woodburn]" + nl + "[Customers].[All Customers].[USA].[WA].[Anacortes]" + nl + "[Customers].[All Customers].[USA].[WA].[Ballard]" + nl + "[Customers].[All Customers].[USA].[WA].[Bellingham]"); } public void testRangeStartEqualsEnd(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q3].[7] : [Time].[1997].[Q3].[7]", "[Time].[1997].[Q3].[7]"); } public void testRangeStartEqualsEndLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[CA] : [Customers].[USA].[CA]", "[Customers].[All Customers].[USA].[CA]"); } public void testRangeEndBeforeStart(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q3].[7] : [Time].[1997].[Q2].[5]", "[Time].[1997].[Q2].[5]" + nl + "[Time].[1997].[Q2].[6]" + nl + "[Time].[1997].[Q3].[7]"); // same as if reversed } public void testRangeEndBeforeStartLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[WA] : [Customers].[USA].[CA]", "[Customers].[All Customers].[USA].[CA]" + nl + "[Customers].[All Customers].[USA].[OR]" + nl + "[Customers].[All Customers].[USA].[WA]"); } public void testRangeBetweenDifferentLevelsIsError(FoodMartTestCase test) { test.assertAxisThrows("[Time].[1997].[Q2] : [Time].[1997].[Q2].[5]", "Members must belong to the same level"); } public void testRangeBoundedByAll(FoodMartTestCase test) { test.assertAxisReturns("[Gender] : [Gender]", "[Gender].[All Gender]"); } public void testRangeBoundedByAllLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].DefaultMember : [Customers]", "[Customers].[All Customers]"); } public void testRangeBoundedByNull(FoodMartTestCase test) { test.assertAxisReturns("[Gender].[F] : [Gender].[M].NextMember", ""); } public void testRangeBoundedByNullLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].PrevMember : [Customers].[USA].[OR]", ""); } }); // special resolver for the "{...}" operator define(new ResolverBase( "{}", "{<Member> [, <Member>]...}", "Brace operator constructs a set.", Syntax.Braces) { public FunDef resolve(Exp[] args, int[] conversionCount) { int[] parameterTypes = new int[args.length]; for (int i = 0; i < args.length; i++) { if (canConvert( args[i], Category.Member, conversionCount)) { parameterTypes[i] = Category.Member; continue; } if (canConvert( args[i], Category.Set, conversionCount)) { parameterTypes[i] = Category.Set; continue; } if (canConvert( args[i], Category.Tuple, conversionCount)) { parameterTypes[i] = Category.Tuple; continue; } return null; } return new SetFunDef(this, parameterTypes); } public void testSetContainingLevelFails(FoodMartTestCase test) { test.assertAxisThrows( "[Store].[Store City]", "no function matches signature '{<Level>}'"); } public void testBug715177(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Product].[All Products].[Non-Consumable].[Other] AS" + nl + " 'Sum( Except( [Product].[Product Department].Members," + nl + " TopCount( [Product].[Product Department].Members, 3 ))," + nl + " Measures.[Unit Sales] )'" + nl + "SELECT" + nl + " { [Measures].[Unit Sales] } ON COLUMNS ," + nl + " { TopCount( [Product].[Product Department].Members,3 )," + nl + " [Product].[All Products].[Non-Consumable].[Other] } ON ROWS" + nl + "FROM [Sales]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Product].[All Products].[Drink].[Beverages]}" + nl + "{[Product].[All Products].[Drink].[Dairy]}" + nl + "{[Product].[All Products].[Non-Consumable].[Other]}" + nl + "Row #0: 6,838" + nl + "Row #1: 13,573" + nl + "Row #2: 4,186" + nl + "Row #3: 242,176" + nl); } public void testBug714707(FoodMartTestCase test) { // Same issue as bug 715177 -- "children" returns immutable // list, which set operator must make mutable. test.assertAxisReturns("{[Store].[USA].[CA].children, [Store].[USA]}", "[Store].[All Stores].[USA].[CA].[Alameda]" + nl + "[Store].[All Stores].[USA].[CA].[Beverly Hills]" + nl + "[Store].[All Stores].[USA].[CA].[Los Angeles]" + nl + "[Store].[All Stores].[USA].[CA].[San Diego]" + nl + "[Store].[All Stores].[USA].[CA].[San Francisco]" + nl + "[Store].[All Stores].[USA]"); } public void todo_testBug715177c(FoodMartTestCase test) { test.assertAxisReturns("Order(TopCount({[Store].[USA].[CA].children}, [Measures].[Unit Sales], 2), [Measures].[Unit Sales])", "foo"); } }); // // STRING FUNCTIONS define(new MultiResolver("Format", "Format(<Numeric Expression>, <String Expression>)", "Formats a number to string.", new String[] { "fSmS", "fSnS" }) { protected FunDef createFunDef(final Exp[] args, final FunDef dummyFunDef) { final Locale locale = Locale.getDefault(); // todo: use connection's locale if (args[1] instanceof Literal) { // Constant string expression: optimize by compiling // format string. String formatString = (String) ((Literal) args[1]).getValue(); final Format format = new Format(formatString, locale); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o = getDoubleArg(evaluator, args, 0); return format.format(o); } }; } else { // Variable string expression return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o = getDoubleArg(evaluator, args, 0); String formatString = getStringArg(evaluator, args, 1, null); final Format format = new Format(formatString, locale); return format.format(o); } }; } } public void testFormatFixed(FoodMartTestCase test) { String s = test.executeExpr("Format(12.2, \"#,##0.00\")"); Assert.assertEquals("12.20", s); } public void testFormatVariable(FoodMartTestCase test) { String s = test.executeExpr("Format(1234.5, \"#,#\" || \"#0.00\")"); Assert.assertEquals("1,234.50", s); } }); define(new FunDefBase("IIf", "IIf(<Logical Expression>, <String Expression1>, <String Expression2>)", "Returns one of two string values determined by a logical test.", "fSbSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { boolean logical = getBooleanArg(evaluator, args, 0); return getStringArg(evaluator, args, logical ? 1 : 2, null); } public void testIIf(FoodMartTestCase test) { String s = test.executeExpr( "IIf(([Measures].[Unit Sales],[Product].[Drink].[Alcoholic Beverages].[Beer and Wine]) > 100, \"Yes\",\"No\")"); Assert.assertEquals("Yes", s); } }); define(new FunDefBase("Name", "<Dimension>.Name", "Returns the name of a dimension.", "pSd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getName(); } public void testDimensionName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Dimension.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Name", "<Hierarchy>.Name", "Returns the name of a hierarchy.", "pSh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getName(); } public void testHierarchyName(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].Hierarchy.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Name", "<Level>.Name", "Returns the name of a level.", "pSl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getName(); } public void testLevelName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Level.Name"); Assert.assertEquals("Year", s); } }); define(new FunDefBase("Name", "<Member>.Name", "Returns the name of a member.", "pSm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getName(); } public void testMemberName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Name"); Assert.assertEquals("1997", s); } }); define(new FunDefBase("SetToStr", "SetToStr(<Set>)", "Constructs a string from a set.", "fSx")); define(new FunDefBase("TupleToStr", "TupleToStr(<Tuple>)", "Constructs a string from a tuple.", "fSt")); define(new FunDefBase("UniqueName", "<Dimension>.UniqueName", "Returns the unique name of a dimension.", "pSd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getUniqueName(); } public void testDimensionUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Dimension.UniqueName"); Assert.assertEquals("[Gender]", s); } }); define(new FunDefBase("UniqueName", "<Hierarchy>.UniqueName", "Returns the unique name of a hierarchy.", "pSh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getUniqueName(); } public void testHierarchyUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Hierarchy.UniqueName"); Assert.assertEquals("[Gender]", s); } }); define(new FunDefBase("UniqueName", "<Level>.UniqueName", "Returns the unique name of a level.", "pSl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getUniqueName(); } public void testLevelUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Level.UniqueName"); Assert.assertEquals("[Gender].[(All)]", s); } }); define(new FunDefBase("UniqueName", "<Member>.UniqueName", "Returns the unique name of a member.", "pSm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getUniqueName(); } public void testMemberUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.UniqueName"); Assert.assertEquals("[Gender].[All Gender]", s); } public void testMemberUniqueNameOfNull(FoodMartTestCase test) { String s = test.executeExpr( "[Measures].[Unit Sales].FirstChild.UniqueName"); Assert.assertEquals("[Measures].[#Null]", s); // MSOLAP gives "" here } }); // // TUPLE FUNCTIONS define(new FunDefBase("Current", "<Set>.Current", "Returns the current tuple from a set during an iteration.", "ptx")); if (false) define(new FunDefBase("Item", "<Set>.Item(<String Expression>[, <String Expression>...] | <Index>)", "Returns a tuple from a set.", "mt*")); define(new FunDefBase("StrToTuple", "StrToTuple(<String Expression>)", "Constructs a tuple from a string.", "ftS") { public Hierarchy getHierarchy(Exp[] args) { // StrToTuple(s, <Hie1>, ... <HieN>) is of type [Hie1] x // ... x [HieN]; so, for example, So // StrToTuple("[Time].[1997]", [Time]) is of type [Time]. // But if n > 1, we cannot represent the compound type, and // we return null. return (args.length == 2) ? (Hierarchy) args[1] : null; } }); // special resolver for "()" define(new ResolverBase("()", null, null, Syntax.Parentheses) { public FunDef resolve(Exp[] args, int[] conversionCount) { // Compare with TupleFunDef.getReturnType(). For example, // ([Gender].members) is a set, // ([Gender].[M]) is a member, // (1 + 2) is a numeric, // but // ([Gender].[M], [Marital Status].[S]) is a tuple. if (args.length == 1) { return new ParenthesesFunDef(args[0].getType()); } else { return new TupleFunDef(ExpBase.getTypes(args)); } } }); // // GENERIC VALUE FUNCTIONS define(new ResolverBase( "CoalesceEmpty", "CoalesceEmpty(<Value Expression>[, <Value Expression>]...)", "Coalesces an empty cell value to a different value. All of the expressions must be of the same type (number or string).", Syntax.Function) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 1) { return null; } final int[] types = {Category.Numeric, Category.String}; for (int j = 0; j < types.length; j++) { int type = types[j]; int matchingArgs = 0; conversionCount[0] = 0; for (int i = 0; i < args.length; i++) { if (canConvert(args[i], type, conversionCount)) { matchingArgs++; } } if (matchingArgs == args.length) { return new FunDefBase(this, type, ExpBase.getTypes(args)); } } return null; } public boolean requiresExpression(int k) { return true; } }); define(new ResolverBase( "_CaseTest", "Case When <Logical Expression> Then <Expression> [...] [Else <Expression>] End", "Evaluates various conditions, and returns the corresponding expression for the first which evaluates to true.", Syntax.Case) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 1) { return null; } int j = 0, clauseCount = args.length / 2, mismatchingArgs = 0; int returnType = args[1].getType(); for (int i = 0; i < clauseCount; i++) { if (!canConvert(args[j++], Category.Logical, conversionCount)) { mismatchingArgs++; } if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } if (j < args.length) { if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } Util.assertTrue(j == args.length); if (mismatchingArgs == 0) { return new FunDefBase(this, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseTest(evaluator, args); } }; } else { return null; } } public boolean requiresExpression(int k) { return true; } Object evaluateCaseTest(Evaluator evaluator, Exp[] args) { int clauseCount = args.length / 2, j = 0; for (int i = 0; i < clauseCount; i++) { boolean logical = getBooleanArg(evaluator, args, j++); if (logical) { return getArg(evaluator, args, j); } else { j++; } } if (j < args.length) { return getArg(evaluator, args, j); // ELSE } else { return null; } } public void testCaseTestMatch(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" WHEN 1=1 THEN \"second\" WHEN 1=2 THEN \"third\" ELSE \"fourth\" END"); Assert.assertEquals("second", s); } public void testCaseTestMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" ELSE \"fourth\" END"); Assert.assertEquals("fourth", s); } public void testCaseTestMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" END"); Assert.assertEquals("(null)", s); } }); define(new ResolverBase( "_CaseMatch", "Case <Expression> When <Expression> Then <Expression> [...] [Else <Expression>] End", "Evaluates various expressions, and returns the corresponding expression for the first which matches a particular value.", Syntax.Case) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 3) { return null; } int valueType = args[0].getType(); int returnType = args[2].getType(); int j = 0, clauseCount = (args.length - 1) / 2, mismatchingArgs = 0; if (!canConvert(args[j++], valueType, conversionCount)) { mismatchingArgs++; } for (int i = 0; i < clauseCount; i++) { if (!canConvert(args[j++], valueType, conversionCount)) { mismatchingArgs++; } if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } if (j < args.length) { if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } Util.assertTrue(j == args.length); if (mismatchingArgs == 0) { return new FunDefBase(this, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseMatch(evaluator, args); } }; } else { return null; } } public boolean requiresExpression(int k) { return true; } Object evaluateCaseMatch(Evaluator evaluator, Exp[] args) { int clauseCount = (args.length - 1)/ 2, j = 0; Object value = getArg(evaluator, args, j++); for (int i = 0; i < clauseCount; i++) { Object match = getArg(evaluator, args, j++); if (match.equals(value)) { return getArg(evaluator, args, j); } else { j++; } } if (j < args.length) { return getArg(evaluator, args, j); // ELSE } else { return null; } } public void testCaseMatch(FoodMartTestCase test) { String s = test.executeExpr( "CASE 2 WHEN 1 THEN \"first\" WHEN 2 THEN \"second\" WHEN 3 THEN \"third\" ELSE \"fourth\" END"); Assert.assertEquals("second", s); } public void testCaseMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 7 WHEN 1 THEN \"first\" ELSE \"fourth\" END"); Assert.assertEquals("fourth", s); } public void testCaseMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 8 WHEN 0 THEN \"first\" END"); Assert.assertEquals("(null)", s); } }); define(new ResolverBase( "Properties", "<Member>.Properties(<String Expression>)", "Returns the value of a member property.", Syntax.Method) { public FunDef resolve(Exp[] args, int[] conversionCount) { final int[] argTypes = new int[]{Category.Member, Category.String}; if (args.length != 2 || args[0].getType() != Category.Member || args[1].getType() != Category.String) { return null; } int returnType; if (args[1] instanceof Literal) { String propertyName = (String) ((Literal) args[1]).getValue(); Hierarchy hierarchy = args[0].getHierarchy(); Level[] levels = hierarchy.getLevels(); Property property = lookupProperty( levels[levels.length - 1], propertyName); if (property == null) { // we'll likely get a runtime error returnType = Category.Value; } else { switch (property.getType()) { case Property.TYPE_BOOLEAN: returnType = Category.Logical; break; case Property.TYPE_NUMERIC: returnType = Category.Numeric; break; case Property.TYPE_STRING: returnType = Category.String; break; default: throw Util.newInternal("Unknown property type " + property.getType()); } } } else { returnType = Category.Value; } return new PropertiesFunDef(name, signature, description, syntax, returnType, argTypes); } public boolean requiresExpression(int k) { return true; } public void testPropertiesExpr(FoodMartTestCase test) { String s = test.executeExpr( "[Store].[USA].[CA].[Beverly Hills].[Store 6].Properties(\"Store Type\")"); Assert.assertEquals("Gourmet Supermarket", s); } /** Tests that non-existent property throws an error. **/ public void testPropertiesNonExistent(FoodMartTestCase test) { test.assertExprThrows( "[Store].[USA].[CA].[Beverly Hills].[Store 6].Properties(\"Foo\")", "Property 'Foo' is not valid for"); } public void testPropertiesFilter(FoodMartTestCase test) { Result result = test.execute( "SELECT { [Store Sales] } ON COLUMNS," + nl + " TOPCOUNT( Filter( [Store].[Store Name].Members," + nl + " [Store].CurrentMember.Properties(\"Store Type\") = \"Supermarket\" )," + nl + " 10, [Store Sales]) ON ROWS" + nl + "FROM [Sales]"); Assert.assertEquals(8, result.getAxes()[1].positions.length); } public void testPropertyInCalculatedMember(FoodMartTestCase test) { Result result = test.execute( "WITH MEMBER [Measures].[Store Sales per Sqft]" + nl + "AS '[Measures].[Store Sales] / " + " [Store].CurrentMember.Properties(\"Store Sqft\")'" + nl + "SELECT " + nl + " {[Measures].[Unit Sales], [Measures].[Store Sales per Sqft]} ON COLUMNS," + nl + " {[Store].[Store Name].members} ON ROWS" + nl + "FROM Sales"); Member member; Cell cell; member = result.getAxes()[1].positions[18].members[0]; Assert.assertEquals("[Store].[All Stores].[USA].[WA].[Bellingham].[Store 2]", member.getUniqueName()); cell = result.getCell(new int[] {0,18}); Assert.assertEquals("2,237", cell.getFormattedValue()); cell = result.getCell(new int[] {1,18}); Assert.assertEquals(".17", cell.getFormattedValue()); member = result.getAxes()[1].positions[3].members[0]; Assert.assertEquals("[Store].[All Stores].[Mexico].[DF].[San Andres].[Store 21]", member.getUniqueName()); cell = result.getCell(new int[] {0,3}); Assert.assertEquals("(null)", cell.getFormattedValue()); cell = result.getCell(new int[] {1,3}); Assert.assertEquals("NaN", cell.getFormattedValue()); } }); // // PARAMETER FUNCTIONS defineReserved(new String[] {"NUMERIC","STRING"}); define(new MultiResolver("Parameter", "Parameter(<Name>, <Type>, <DefaultValue>, <Description>)", "Returns default value of parameter.", new String[] { "fS#yS#", "fs#yS", // Parameter(string const, symbol, string[, string const]): string "fn#yn#", "fn#yn", // Parameter(string const, symbol, numeric[, string const]): numeric "fm#hm#", "fm#hm", // Parameter(string const, hierarchy constant, member[, string const]): member }) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String parameterName; if (args[0] instanceof Literal && args[0].getType() == Category.String) { parameterName = (String) ((Literal) args[0]).getValue(); } else { throw newEvalException(dummyFunDef, "Parameter name must be a string constant"); } Exp typeArg = args[1]; Hierarchy hierarchy; int type; switch (typeArg.getType()) { case Category.Hierarchy: case Category.Dimension: hierarchy = typeArg.getHierarchy(); if (hierarchy == null || !isConstantHierarchy(typeArg)) { throw newEvalException(dummyFunDef, "Invalid hierarchy for parameter '" + parameterName + "'"); } type = Category.Member; break; case Category.Symbol: hierarchy = null; String s = (String) ((Literal) typeArg).getValue(); if (s.equalsIgnoreCase("NUMERIC")) { type = Category.Numeric; break; } else if (s.equalsIgnoreCase("STRING")) { type = Category.String; break; } // fall through and throw error default: // Error is internal because the function call has already been // type-checked. throw newEvalException(dummyFunDef, "Invalid type for parameter '" + parameterName + "'; expecting NUMERIC, STRING or a hierarchy"); } Exp exp = args[2]; if (exp.getType() != type) { String typeName = Category.instance.getName(type).toUpperCase(); throw newEvalException(dummyFunDef, "Default value of parameter '" + parameterName + "' is inconsistent with its type, " + typeName); } if (type == Category.Member) { Hierarchy expHierarchy = exp.getHierarchy(); if (expHierarchy != hierarchy) { throw newEvalException(dummyFunDef, "Default value of parameter '" + parameterName + "' must belong to the hierarchy " + hierarchy); } } String parameterDescription = null; if (args.length > 3) { if (args[3] instanceof Literal && args[3].getType() == Category.String) { parameterDescription = (String) ((Literal) args[3]).getValue(); } else { throw newEvalException(dummyFunDef, "Description of parameter '" + parameterName + "' must be a string constant"); } } return new ParameterFunDef(dummyFunDef, parameterName, hierarchy, type, exp, parameterDescription); } }); define(new MultiResolver("ParamRef", "ParamRef(<Name>)", "Returns current value of parameter. If it's null, returns default.", new String[] {"fv#"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String parameterName; if (args[0] instanceof Literal && args[0].getType() == Category.String) { parameterName = (String) ((Literal) args[0]).getValue(); } else { throw newEvalException(dummyFunDef, "Parameter name must be a string constant"); } return new ParameterFunDef(dummyFunDef, parameterName, null, Category.Unknown, null, null); } }); // // OPERATORS define(new FunDefBase("+", "<Numeric Expression> + <Numeric Expression>", "Adds two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() + o1.doubleValue()); } public void testPlus(FoodMartTestCase test) { String s = test.executeExpr("1+2"); Assert.assertEquals("3", s); } }); define(new FunDefBase("-", "<Numeric Expression> - <Numeric Expression>", "Subtracts two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() - o1.doubleValue()); } public void testMinus(FoodMartTestCase test) { String s = test.executeExpr("1-3"); Assert.assertEquals("-2", s); } public void testMinusAssociativity(FoodMartTestCase test) { String s = test.executeExpr("11-7-5"); // right-associative would give 11-(7-5) = 9, which is wrong Assert.assertEquals("-1", s); } }); define(new FunDefBase("*", "<Numeric Expression> * <Numeric Expression>", "Multiplies two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() * o1.doubleValue()); } public void testMultiply(FoodMartTestCase test) { String s = test.executeExpr("4*7"); Assert.assertEquals("28", s); } public void testMultiplyPrecedence(FoodMartTestCase test) { String s = test.executeExpr("3 + 4 * 5 + 6"); Assert.assertEquals("29", s); } /** Bug 774807 caused expressions to be mistaken for the crossjoin * operator. */ public void testMultiplyBug774807(FoodMartTestCase test) { final String desiredResult = "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Store].[All Stores]}" + nl + "Axis #2:" + nl + "{[Measures].[Store Sales]}" + nl + "{[Measures].[A]}" + nl + "Row #0: 565,238.13" + nl + "Row #1: 319,494,143,605.90" + nl; test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '([Measures].[Store Sales] * [Measures].[Store Sales])'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); // as above, no parentheses test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '[Measures].[Store Sales] * [Measures].[Store Sales]'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); // as above, plus 0 test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '[Measures].[Store Sales] * [Measures].[Store Sales] + 0'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); } }); define(new FunDefBase("/", "<Numeric Expression> / <Numeric Expression>", "Divides two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); Double result = new Double(o0.doubleValue() / o1.doubleValue()); return result; } // todo: use this, via reflection public double evaluate(double d1, double d2) { return d1 / d2; } public void testDivide(FoodMartTestCase test) { String s = test.executeExpr("10 / 5"); Assert.assertEquals("2", s); } public void testDivideByZero(FoodMartTestCase test) { String s = test.executeExpr("-3 / (2 - 2)"); Assert.assertEquals("-Infinity", s); } public void testDividePrecedence(FoodMartTestCase test) { String s = test.executeExpr("24 / 4 / 2 * 10 - -1"); Assert.assertEquals("31", s); } }); define(new FunDefBase("-", "- <Numeric Expression>", "Returns the negative of a number.", "Pnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0); return new Double(- o0.doubleValue()); } public void testUnaryMinus(FoodMartTestCase test) { String s = test.executeExpr("-3"); Assert.assertEquals("-3", s); } public void testUnaryMinusMember(FoodMartTestCase test) { String s = test.executeExpr("- ([Measures].[Unit Sales],[Gender].[F])"); Assert.assertEquals("-131,558", s); } public void testUnaryMinusPrecedence(FoodMartTestCase test) { String s = test.executeExpr("1 - -10.5 * 2 -3"); Assert.assertEquals("19", s); } }); define(new FunDefBase("||", "<String Expression> || <String Expression>", "Concatenates two strings.", "iSSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return o0 + o1; } public void testStringConcat(FoodMartTestCase test) { String s = test.executeExpr(" \"foo\" || \"bar\" "); Assert.assertEquals("foobar", s); } public void testStringConcat2(FoodMartTestCase test) { String s = test.executeExpr(" \"foo\" || [Gender].[M].Name || \"\" "); Assert.assertEquals("fooM", s); } }); define(new FunDefBase("AND", "<Logical Expression> AND <Logical Expression>", "Returns the conjunction of two conditions.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { return toBoolean( getBooleanArg(evaluator, args, 0) && getBooleanArg(evaluator, args, 1)); } public void testAnd(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 2=2 "); Assert.assertEquals("true", s); } public void testAnd2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 2=0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("OR", "<Logical Expression> OR <Logical Expression>", "Returns the disjunction of two conditions.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { // Only evaluate 2nd if first is false. return toBoolean( getBooleanArg(evaluator, args, 0) || getBooleanArg(evaluator, args, 1)); } public void testOr(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=0 OR 2=0 "); Assert.assertEquals("false", s); } public void testOr2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=0 OR 0=0 "); Assert.assertEquals("true", s); } public void testOrAssociativity1(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 1=0 OR 1=1 "); // Would give 'false' if OR were stronger than AND (wrong!) Assert.assertEquals("true", s); } public void testOrAssociativity2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 OR 1=0 AND 1=1 "); // Would give 'false' if OR were stronger than AND (wrong!) Assert.assertEquals("true", s); } public void testOrAssociativity3(FoodMartTestCase test) { String s = test.executeBooleanExpr(" (1=0 OR 1=1) AND 1=1 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("XOR", "<Logical Expression> XOR <Logical Expression>", "Returns whether two conditions are mutually exclusive.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { final boolean b0 = getBooleanArg(evaluator, args, 0); final boolean b1 = getBooleanArg(evaluator, args, 1); return toBoolean(b0 != b1); } public void testXor(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 XOR 2=2 "); Assert.assertEquals("false", s); } public void testXorAssociativity(FoodMartTestCase test) { // Would give 'false' if XOR were stronger than AND (wrong!) String s = test.executeBooleanExpr(" 1 = 1 AND 1 = 1 XOR 1 = 0 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("NOT", "NOT <Logical Expression>", "Returns the negation of a condition.", "Pbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { return toBoolean(!getBooleanArg(evaluator, args, 0)); } public void testNot(FoodMartTestCase test) { String s = test.executeBooleanExpr(" NOT 1=1 "); Assert.assertEquals("false", s); } public void testNotNot(FoodMartTestCase test) { String s = test.executeBooleanExpr(" NOT NOT 1=1 "); Assert.assertEquals("true", s); } public void testNotAssociativity(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND NOT 1=1 OR NOT 1=1 AND 1=1 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("=", "<String Expression> = <String Expression>", "Returns whether two expressions are equal.", "ibSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return toBoolean(o0.equals(o1)); } public void testStringEquals(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" = \"bar\" "); Assert.assertEquals("false", s); } public void testStringEqualsAssociativity(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" = \"fo\" || \"o\" "); Assert.assertEquals("true", s); } public void testStringEqualsEmpty(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"\" = \"\" "); Assert.assertEquals("true", s); } }); define(new FunDefBase("=", "<Numeric Expression> = <Numeric Expression>", "Returns whether two expressions are equal.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.equals(o1)); } public void testEq(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1.0 = 1 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("<>", "<String Expression> <> <String Expression>", "Returns whether two expressions are not equal.", "ibSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return toBoolean(!o0.equals(o1)); } public void testStringNe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" <> \"bar\" "); Assert.assertEquals("true", s); } }); define(new FunDefBase("<>", "<Numeric Expression> <> <Numeric Expression>", "Returns whether two expressions are not equal.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(!o0.equals(o1)); } public void testNe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 <> 1.0 + 1.0 "); Assert.assertEquals("false", s); } public void testNeInfinity(FoodMartTestCase test) { String s = test.executeBooleanExpr("(1 / 0) <> (1 / 0)"); // Infinity does not equal itself Assert.assertEquals("false", s); } }); define(new FunDefBase("<", "<Numeric Expression> < <Numeric Expression>", "Returns whether an expression is less than another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) < 0); } public void testLt(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 < 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("<=", "<Numeric Expression> <= <Numeric Expression>", "Returns whether an expression is less than or equal to another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) <= 0); } public void testLe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 <= 1.0 + 1.0 "); Assert.assertEquals("true", s); } }); define(new FunDefBase(">", "<Numeric Expression> > <Numeric Expression>", "Returns whether an expression is greater than another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) > 0); } public void testGt(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 > 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase(">=", "<Numeric Expression> >= <Numeric Expression>", "Returns whether an expression is greater than or equal to another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) >= 0); } public void testGe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 > 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); }
4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/0ab3be7797c0940dd5a113451bfd9a43186433e0/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 4426, 7503, 1435, 288, 202, 202, 11255, 10435, 2932, 8560, 8863, 202, 202, 759, 1122, 1149, 30, 293, 33, 1396, 16, 312, 33, 1305, 16, 277, 33, 382, 904, 16, 453, 33, 2244, 202, 202, 759, 576, 4880, 30, 202, 202, 759, 14884, 13690, 55, 202, 202, 430, 261, 5743, 13, 4426, 12, 2704, 478, 318, 3262, 2171, 2932, 694, 11698, 3113, 315, 694, 11698, 12, 32, 694, 23224, 16, 411, 694, 34, 65, 2777, 63, 16, 411, 9902, 5371, 34, 65, 2225, 16, 315, 5692, 1245, 578, 1898, 1678, 358, 392, 526, 364, 999, 316, 279, 729, 17, 430, 261, 5743, 13, 2553, 445, 1199, 16, 315, 507, 7388, 10019, 202, 202, 759, 202, 202, 759, 463, 3114, 3156, 1146, 13690, 55, 202, 202, 11255, 12, 2704, 478, 318, 3262, 2171, 2932, 8611, 3113, 3532, 12074, 18652, 8611, 3113, 315, 1356, 326, 4968, 716, 1914, 279, 1269, 9360, 1199, 16, 315, 84, 19153, 7923, 288, 1082, 202, 482, 1033, 5956, 12, 15876, 18256, 16, 7784, 8526, 833, 13, 288, 9506, 202, 12074, 9360, 273, 7628, 6000, 4117, 12, 14168, 639, 16, 833, 16, 374, 16, 638, 1769, 9506, 202, 2463, 9360, 18, 588, 8611, 5621, 1082, 202, 97, 202, 202, 22938, 202, 202, 759, 14646, 44, 361, 358, 527, 333, 358, 336, 411, 12074, 18652, 8611, 358, 1440, 35, 202, 202, 11255, 12, 2704, 478, 318, 3262, 2171, 2932, 8611, 3113, 3532, 8611, 18652, 8611, 3113, 315, 1356, 326, 4968, 716, 1914, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 4426, 7503, 1435, 288, 202, 202, 11255, 10435, 2932, 8560, 8863, 202, 202, 759, 1122, 1149, 30, 293, 33, 1396, 16, 312, 33, 1305, 16, 277, 33, 382, 904, 16, 453, 33, 2244, 202, 202, 759, 576, 4880, 30, 202, 202, 759, 14884, 13690, 55, 202, 202, 430, 261, 5743, 13, 4426, 12, 2704, 478, 318, 3262, 2171, 2932, 694, 11698, 3113, 315, 694, 11698, 12, 32, 694, 23224, 16, 411, 694, 34, 65, 2777, 63, 16, 411, 9902, 5371, 34, 65, 2225, 16, 315, 5692, 1245, 578, 1898, 1678, 358, 392, 526, 364, 999, 316, 279, 729, 17, 430, 261, 5743, 13, 2553, 445, 1199, 16, 315, 507, 7388, 10019, 202, 202, 759, 202, 2 ]
if (monitor.isCanceled()) throw new OperationCanceledException();
if (monitor.isCanceled()) { throw new OperationCanceledException(); }
private IFolder createFolder(IFolder folderHandle, IProgressMonitor monitor) throws CoreException { folderHandle.create(false, true, monitor); if (monitor.isCanceled()) throw new OperationCanceledException(); return folderHandle; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ContainerGenerator.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ContainerGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 467, 3899, 752, 3899, 12, 45, 3899, 3009, 3259, 16, 467, 5491, 7187, 6438, 13, 5411, 1216, 30015, 288, 3639, 3009, 3259, 18, 2640, 12, 5743, 16, 638, 16, 6438, 1769, 3639, 309, 261, 10259, 18, 291, 23163, 10756, 5411, 604, 394, 4189, 23163, 503, 5621, 3639, 327, 3009, 3259, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 467, 3899, 752, 3899, 12, 45, 3899, 3009, 3259, 16, 467, 5491, 7187, 6438, 13, 5411, 1216, 30015, 288, 3639, 3009, 3259, 18, 2640, 12, 5743, 16, 638, 16, 6438, 1769, 3639, 309, 261, 10259, 18, 291, 23163, 10756, 5411, 604, 394, 4189, 23163, 503, 5621, 3639, 327, 3009, 3259, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
errors[0]++;
result[0] = unableToCreateEditor(editorMem,null);
public void run() { // Get the input factory. IMemento inputMem = editorMem.getChild(IWorkbenchConstants.TAG_INPUT); String factoryID = inputMem.getString(IWorkbenchConstants.TAG_FACTORY_ID); if (factoryID == null) { WorkbenchPlugin.log("Unable to restore editor - no input factory ID."); //$NON-NLS-1$ errors[0]++; return; } IElementFactory factory = WorkbenchPlugin.getDefault().getElementFactory(factoryID); if (factory == null) { WorkbenchPlugin.log("Unable to restore editor - cannot instantiate input element factory: " + factoryID); //$NON-NLS-1$ errors[0]++; return; } // Get the input element. IAdaptable input = factory.createElement(inputMem); if (input == null) { WorkbenchPlugin.log("Unable to restore editor - createElement returned null for input element factory: " + factoryID); //$NON-NLS-1$ errors[0]++; return; } if (!(input instanceof IEditorInput)) { WorkbenchPlugin.log("Unable to restore editor - createElement result is not an IEditorInput for input element factory: " + factoryID); //$NON-NLS-1$ errors[0]++; return; } IEditorInput editorInput = (IEditorInput) input; // Get the editor descriptor. String editorID = editorMem.getString(IWorkbenchConstants.TAG_ID); EditorDescriptor desc = null; if (editorID != null) { IEditorRegistry reg = WorkbenchPlugin.getDefault().getEditorRegistry(); desc = (EditorDescriptor) reg.findEditor(editorID); } // Open the editor. try { String workbookID = editorMem.getString(IWorkbenchConstants.TAG_WORKBOOK); editorPresentation.setActiveEditorWorkbookFromID(workbookID); if (desc == null) { result[0] = (Editor)openEditorFromInput(ref,editorInput, false); } else { result[0] = (Editor)openInternalEditor(ref,desc, editorInput, false); } result[0].getPane().createChildControl(); } catch (PartInitException e) { WorkbenchPlugin.log("Exception creating editor: " + e.getMessage()); //$NON-NLS-1$ errors[0]++; } }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/49a9dbfbab938deb979d8dde7bb398e791ff2406/EditorManager.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 1086, 1435, 288, 9506, 202, 759, 968, 326, 810, 3272, 18, 9506, 202, 3445, 820, 83, 810, 3545, 273, 4858, 3545, 18, 588, 1763, 12, 45, 2421, 22144, 2918, 18, 7927, 67, 15934, 1769, 9506, 202, 780, 3272, 734, 273, 810, 3545, 18, 588, 780, 12, 45, 2421, 22144, 2918, 18, 7927, 67, 16193, 67, 734, 1769, 9506, 202, 430, 261, 6848, 734, 422, 446, 13, 288, 6862, 202, 2421, 22144, 3773, 18, 1330, 2932, 3370, 358, 5217, 4858, 300, 1158, 810, 3272, 1599, 1199, 1769, 4329, 3993, 17, 5106, 17, 21, 8, 6862, 202, 4324, 63, 20, 3737, 15, 31, 6862, 202, 2463, 31, 9506, 202, 97, 9506, 202, 45, 1046, 1733, 3272, 273, 4147, 22144, 3773, 18, 588, 1868, 7675, 21336, 1733, 12, 6848, 734, 1769, 9506, 202, 430, 261, 6848, 422, 446, 13, 288, 6862, 202, 2421, 22144, 3773, 18, 1330, 2932, 3370, 358, 5217, 4858, 300, 2780, 10275, 810, 930, 3272, 30, 315, 397, 3272, 734, 1769, 4329, 3993, 17, 5106, 17, 21, 8, 6862, 202, 4324, 63, 20, 3737, 15, 31, 6862, 202, 2463, 31, 9506, 202, 97, 9506, 202, 759, 968, 326, 810, 930, 18, 9506, 202, 45, 13716, 429, 810, 273, 3272, 18, 2640, 1046, 12, 2630, 3545, 1769, 9506, 202, 430, 261, 2630, 422, 446, 13, 288, 6862, 202, 2421, 22144, 3773, 18, 1330, 2932, 3370, 358, 5217, 4858, 300, 6310, 2106, 446, 364, 810, 930, 3272, 30, 315, 397, 3272, 734, 1769, 4329, 3993, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 1086, 1435, 288, 9506, 202, 759, 968, 326, 810, 3272, 18, 9506, 202, 3445, 820, 83, 810, 3545, 273, 4858, 3545, 18, 588, 1763, 12, 45, 2421, 22144, 2918, 18, 7927, 67, 15934, 1769, 9506, 202, 780, 3272, 734, 273, 810, 3545, 18, 588, 780, 12, 45, 2421, 22144, 2918, 18, 7927, 67, 16193, 67, 734, 1769, 9506, 202, 430, 261, 6848, 734, 422, 446, 13, 288, 6862, 202, 2421, 22144, 3773, 18, 1330, 2932, 3370, 358, 5217, 4858, 300, 1158, 810, 3272, 1599, 1199, 1769, 4329, 3993, 17, 5106, 17, 21, 8, 6862, 202, 4324, 63, 20, 3737, 15, 31, 6862, 202, 2463, 31, 9506, 202, 97, 9506, 202, 45, 1046, 1733, 3272, 273, 2 ]
throw new Error(JaiI18N.getString("Generic2"));
throw new RuntimeException(JaiI18N.getString("Generic2"));
protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) { // The default interpolation for this class is Bicubic int mlibInterpType = Constants.MLIB_BICUBIC; // Unless a Bicubic2 object is passed in as the interpolation if (interp instanceof InterpolationBicubic2) { mlibInterpType = Constants.MLIB_BICUBIC2; } Raster source = sources[0]; Rectangle srcRect = source.getBounds(); int formatTag = MediaLibAccessor.findCompatibleTag(sources,dest); MediaLibAccessor srcAccessor = new MediaLibAccessor(source,srcRect,formatTag); MediaLibAccessor dstAccessor = new MediaLibAccessor(dest,destRect,formatTag); // // The AffineTransform needs to be readjusted as per the // location of the current source & destination rectangle // // Clone the global transform so as not to write to an instance // variable as this method may be called from different threads. double[] medialib_tr = (double[])this.medialib_tr.clone(); medialib_tr[2] = m_transform[0] * srcRect.x + m_transform[1] * srcRect.y + m_transform[2] - destRect.x; medialib_tr[5] = m_transform[3] * srcRect.x + m_transform[4] * srcRect.y + m_transform[5] - destRect.y; mediaLibImage srcML[], dstML[]; switch (dstAccessor.getDataType()) { case DataBuffer.TYPE_BYTE: case DataBuffer.TYPE_USHORT: case DataBuffer.TYPE_SHORT: case DataBuffer.TYPE_INT: srcML = srcAccessor.getMediaLibImages(); dstML = dstAccessor.getMediaLibImages(); if (setBackground) Image.Affine2(dstML[0], srcML[0], medialib_tr, mlibInterpType, Constants.MLIB_EDGE_DST_NO_WRITE, intBackgroundValues); else Image.Affine(dstML[0], srcML[0], medialib_tr, mlibInterpType, Constants.MLIB_EDGE_DST_NO_WRITE); break; case DataBuffer.TYPE_FLOAT: case DataBuffer.TYPE_DOUBLE: srcML = srcAccessor.getMediaLibImages(); dstML = dstAccessor.getMediaLibImages(); if (setBackground) Image.Affine2_Fp(dstML[0], srcML[0], medialib_tr, mlibInterpType, Constants.MLIB_EDGE_DST_NO_WRITE, backgroundValues); else Image.Affine_Fp(dstML[0], srcML[0], medialib_tr, mlibInterpType, Constants.MLIB_EDGE_DST_NO_WRITE); break; default: String className = this.getClass().getName(); throw new Error(JaiI18N.getString("Generic2")); } if (dstAccessor.isDataCopy()) { dstAccessor.copyDataToRaster(); } }
49628 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49628/681f368f1c05fbaff3a23313e9f1484aef7549a0/MlibAffineBicubicOpImage.java/buggy/src/share/classes/com/sun/media/jai/mlib/MlibAffineBicubicOpImage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 3671, 6120, 12, 18637, 8526, 5550, 16, 1171, 9079, 14505, 18637, 1570, 16, 1171, 9079, 13264, 1570, 6120, 13, 288, 3639, 368, 1021, 805, 12851, 364, 333, 667, 353, 605, 335, 17616, 3639, 509, 312, 2941, 2465, 84, 559, 273, 5245, 18, 1495, 13450, 67, 38, 2871, 3457, 2871, 31, 3639, 368, 1351, 2656, 279, 605, 335, 17616, 22, 733, 353, 2275, 316, 487, 326, 12851, 3639, 309, 261, 24940, 1276, 24301, 367, 38, 335, 17616, 22, 13, 288, 5411, 312, 2941, 2465, 84, 559, 273, 5245, 18, 1495, 13450, 67, 38, 2871, 3457, 2871, 22, 31, 3639, 289, 3639, 30757, 1084, 273, 5550, 63, 20, 15533, 3639, 13264, 1705, 6120, 273, 1084, 18, 588, 5694, 5621, 3639, 509, 740, 1805, 273, 6128, 5664, 8235, 18, 4720, 14599, 1805, 12, 10141, 16, 10488, 1769, 3639, 6128, 5664, 8235, 1705, 8235, 273, 5411, 394, 6128, 5664, 8235, 12, 3168, 16, 4816, 6120, 16, 2139, 1805, 1769, 3639, 6128, 5664, 8235, 3046, 8235, 273, 5411, 394, 6128, 5664, 8235, 12, 10488, 16, 10488, 6120, 16, 2139, 1805, 1769, 3639, 368, 3639, 368, 1021, 23906, 558, 4059, 4260, 358, 506, 855, 3732, 329, 487, 1534, 326, 3639, 368, 2117, 434, 326, 783, 1084, 473, 2929, 11845, 3639, 368, 3639, 368, 12758, 326, 2552, 2510, 1427, 487, 486, 358, 1045, 358, 392, 791, 3639, 368, 2190, 487, 333, 707, 2026, 506, 2566, 628, 3775, 7403, 18, 3639, 1645, 8526, 6735, 649, 495, 67, 313, 273, 261, 9056, 63, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 3671, 6120, 12, 18637, 8526, 5550, 16, 1171, 9079, 14505, 18637, 1570, 16, 1171, 9079, 13264, 1570, 6120, 13, 288, 3639, 368, 1021, 805, 12851, 364, 333, 667, 353, 605, 335, 17616, 3639, 509, 312, 2941, 2465, 84, 559, 273, 5245, 18, 1495, 13450, 67, 38, 2871, 3457, 2871, 31, 3639, 368, 1351, 2656, 279, 605, 335, 17616, 22, 733, 353, 2275, 316, 487, 326, 12851, 3639, 309, 261, 24940, 1276, 24301, 367, 38, 335, 17616, 22, 13, 288, 5411, 312, 2941, 2465, 84, 559, 273, 5245, 18, 1495, 13450, 67, 38, 2871, 3457, 2871, 22, 31, 3639, 289, 3639, 30757, 1084, 273, 5550, 63, 20, 15533, 3639, 13264, 1705, 6120, 273, 1084, 18, 588, 5694, 2 ]
private BeanResolver computeResolver(UIBound toprocess) { Object renderer = toprocess.resolver; if (renderer == null) { return null; } if (renderer instanceof ELReference) { renderer = alterer.getBeanValue(((ELReference) renderer).value, beanlocator); } final Object finalrenderer = renderer; if (renderer instanceof BeanResolver) { return (BeanResolver) renderer; } else if (renderer instanceof LeafObjectParser) { if (toprocess.darreshaper != null && toprocess.resolver instanceof ELReference) { toprocess.darreshaper = (ELReference) toprocess.resolver; } return new BeanResolver() { public String resolveBean(Object bean) { return ((LeafObjectParser) finalrenderer).render(bean); } }; } else throw UniversalRuntimeException.accumulate( new IllegalArgumentException(), "Renderer object for " + toprocess.getFullID() + " of unrecognised " + renderer.getClass() + " (expected BeanResolver or LeafObjectParser)"); }
49142 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49142/e66d0a3e56d12223bc3a6a79459c8c21bd169004/ValueFixer.java/clean/src/uk/org/ponder/rsf/componentprocessor/ValueFixer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 7704, 4301, 3671, 4301, 12, 5370, 3499, 358, 2567, 13, 288, 565, 1033, 5690, 273, 358, 2567, 18, 14122, 31, 565, 309, 261, 14374, 422, 446, 13, 288, 1377, 327, 446, 31, 565, 289, 3639, 309, 261, 14374, 1276, 14801, 2404, 13, 288, 1377, 5690, 273, 10182, 264, 18, 588, 3381, 620, 12443, 12, 2247, 2404, 13, 5690, 2934, 1132, 16, 1850, 3931, 20048, 1769, 565, 289, 565, 727, 1033, 727, 14374, 273, 5690, 31, 565, 309, 261, 14374, 1276, 7704, 4301, 13, 288, 1377, 327, 261, 3381, 4301, 13, 5690, 31, 565, 289, 565, 469, 309, 261, 14374, 1276, 23383, 921, 2678, 13, 288, 1377, 309, 261, 3669, 16127, 18, 72, 297, 1955, 7294, 480, 446, 597, 358, 2567, 18, 14122, 1276, 1850, 14801, 2404, 13, 288, 3639, 358, 2567, 18, 72, 297, 1955, 7294, 273, 261, 2247, 2404, 13, 358, 2567, 18, 14122, 31, 1377, 289, 1377, 327, 394, 7704, 4301, 1435, 288, 3639, 1071, 514, 2245, 3381, 12, 921, 3931, 13, 288, 1850, 327, 14015, 9858, 921, 2678, 13, 727, 14374, 2934, 5902, 12, 14496, 1769, 3639, 289, 1377, 289, 31, 565, 289, 565, 469, 1377, 604, 27705, 11949, 18, 8981, 31284, 12, 1850, 394, 2754, 9334, 315, 6747, 733, 364, 315, 2868, 397, 358, 2567, 18, 588, 5080, 734, 1435, 397, 315, 434, 640, 3927, 4198, 5918, 315, 2868, 397, 5690, 18, 588, 797, 1435, 2868, 397, 315, 261, 3825, 7704, 4301, 578, 23383, 921, 2678, 2225, 1769, 225, 289, 2, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 7704, 4301, 3671, 4301, 12, 5370, 3499, 358, 2567, 13, 288, 565, 1033, 5690, 273, 358, 2567, 18, 14122, 31, 565, 309, 261, 14374, 422, 446, 13, 288, 1377, 327, 446, 31, 565, 289, 3639, 309, 261, 14374, 1276, 14801, 2404, 13, 288, 1377, 5690, 273, 10182, 264, 18, 588, 3381, 620, 12443, 12, 2247, 2404, 13, 5690, 2934, 1132, 16, 1850, 3931, 20048, 1769, 565, 289, 565, 727, 1033, 727, 14374, 273, 5690, 31, 565, 309, 261, 14374, 1276, 7704, 4301, 13, 288, 1377, 327, 261, 3381, 4301, 13, 5690, 31, 565, 289, 565, 469, 309, 261, 14374, 1276, 23383, 921, 2678, 13, 288, 1377, 309, 261, 3669, 16127, 18, 72, 297, 1955, 7294, 480, 446, 2 ]
int LA15_128 = input.LA(1); if ( LA15_128=='t' ) {return s228;}
int LA15_28 = input.LA(1); if ( LA15_28=='a' ) {return s127;}
public DFA.State transition(IntStream input) throws RecognitionException { int LA15_128 = input.LA(1); if ( LA15_128=='t' ) {return s228;} return s51; }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 463, 2046, 18, 1119, 6007, 12, 1702, 1228, 810, 13, 1216, 9539, 288, 7734, 509, 2928, 3600, 67, 10392, 273, 810, 18, 2534, 12, 21, 1769, 7734, 309, 261, 2928, 3600, 67, 10392, 18920, 88, 11, 262, 288, 2463, 272, 3787, 28, 31, 97, 7734, 327, 272, 10593, 31, 5411, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 463, 2046, 18, 1119, 6007, 12, 1702, 1228, 810, 13, 1216, 9539, 288, 7734, 509, 2928, 3600, 67, 10392, 273, 810, 18, 2534, 12, 21, 1769, 7734, 309, 261, 2928, 3600, 67, 10392, 18920, 88, 11, 262, 288, 2463, 272, 3787, 28, 31, 97, 7734, 327, 272, 10593, 31, 5411, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
return (SimpleNode) reparseDocument(doc, false, nature)[0];
info.document = doc; info.reparseIfErrorFound = false; return (SimpleNode) reparseDocument(info)[0];
private static SimpleNode tryReparseChangingLine(IDocument document, int line, PythonNature nature) { String docToParse = PyCodeCompletion.getDocToParseFromLine(document, line); if(docToParse != null){ Document doc = new Document(docToParse); return (SimpleNode) reparseDocument(doc, false, nature)[0]; } return null; }
50371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50371/dba1114acd785e1a29e5368b01145dd7b9f00d12/PyParser.java/clean/org.python.pydev/src/org/python/pydev/parser/PyParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 4477, 907, 775, 426, 2670, 782, 18183, 1670, 12, 734, 504, 650, 1668, 16, 509, 980, 16, 6600, 50, 1231, 28700, 13, 288, 3639, 514, 997, 774, 3201, 273, 4707, 1085, 11238, 18, 588, 1759, 774, 3201, 1265, 1670, 12, 5457, 16, 980, 1769, 3639, 309, 12, 2434, 774, 3201, 480, 446, 15329, 5411, 4319, 997, 273, 394, 4319, 12, 2434, 774, 3201, 1769, 202, 3639, 1123, 18, 5457, 273, 997, 31, 1123, 18, 266, 2670, 2047, 668, 2043, 273, 629, 31, 327, 261, 5784, 907, 13, 283, 2670, 2519, 12, 1376, 25146, 20, 15533, 3639, 289, 3639, 327, 446, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 4477, 907, 775, 426, 2670, 782, 18183, 1670, 12, 734, 504, 650, 1668, 16, 509, 980, 16, 6600, 50, 1231, 28700, 13, 288, 3639, 514, 997, 774, 3201, 273, 4707, 1085, 11238, 18, 588, 1759, 774, 3201, 1265, 1670, 12, 5457, 16, 980, 1769, 3639, 309, 12, 2434, 774, 3201, 480, 446, 15329, 5411, 4319, 997, 273, 394, 4319, 12, 2434, 774, 3201, 1769, 202, 3639, 1123, 18, 5457, 273, 997, 31, 1123, 18, 266, 2670, 2047, 668, 2043, 273, 629, 31, 327, 261, 5784, 907, 13, 283, 2670, 2519, 12, 1376, 25146, 20, 15533, 3639, 289, 3639, 327, 446, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if (!member.isMethod()) {
if (member.isTerm() && !member.isMethod()) {
protected void addValueClassMembers(Tree.ClassDef cDef) { Symbol cSym = cDef.symbol(); Scope.SymbolIterator memberIt = cSym.members().iterator(); while (memberIt.hasNext()) { Symbol member = memberIt.next(); if (!member.isMethod()) { FieldGen fGen = new FieldGen(modifiersStoJ(member.flags), typeStoJ(member.info()), member.name.toString(), currPool); currClass.addField(fGen.getField()); } } }
1156 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1156/1fb5a195b5575e7015be4fd1ee8f89116a78cfb5/GenJVM.java/clean/sources/scalac/backend/jvm/GenJVM.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 17663, 797, 6918, 12, 2471, 18, 797, 3262, 276, 3262, 13, 288, 3639, 8565, 276, 11901, 273, 276, 3262, 18, 7175, 5621, 3639, 5468, 18, 5335, 3198, 3140, 7193, 273, 276, 11901, 18, 7640, 7675, 9838, 5621, 3639, 1323, 261, 5990, 7193, 18, 5332, 2134, 10756, 288, 5411, 8565, 3140, 273, 3140, 7193, 18, 4285, 5621, 5411, 309, 261, 5990, 18, 291, 4065, 1435, 597, 401, 5990, 18, 291, 1305, 10756, 288, 7734, 2286, 7642, 284, 7642, 273, 394, 2286, 7642, 12, 15432, 510, 83, 46, 12, 5990, 18, 7133, 3631, 4766, 2398, 618, 510, 83, 46, 12, 5990, 18, 1376, 1435, 3631, 4766, 2398, 3140, 18, 529, 18, 10492, 9334, 4766, 2398, 4306, 2864, 1769, 7734, 4306, 797, 18, 1289, 974, 12, 74, 7642, 18, 588, 974, 10663, 5411, 289, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 17663, 797, 6918, 12, 2471, 18, 797, 3262, 276, 3262, 13, 288, 3639, 8565, 276, 11901, 273, 276, 3262, 18, 7175, 5621, 3639, 5468, 18, 5335, 3198, 3140, 7193, 273, 276, 11901, 18, 7640, 7675, 9838, 5621, 3639, 1323, 261, 5990, 7193, 18, 5332, 2134, 10756, 288, 5411, 8565, 3140, 273, 3140, 7193, 18, 4285, 5621, 5411, 309, 261, 5990, 18, 291, 4065, 1435, 597, 401, 5990, 18, 291, 1305, 10756, 288, 7734, 2286, 7642, 284, 7642, 273, 394, 2286, 7642, 12, 15432, 510, 83, 46, 12, 5990, 18, 7133, 3631, 4766, 2398, 618, 510, 83, 46, 12, 5990, 18, 1376, 1435, 3631, 4766, 2398, 3140, 18, 529, 18, 10492, 9334, 4766, 2398, 4306, 2864, 1769, 2 ]
hashClass.defineMethod("indexes", CallbackFactory.getOptMethod(RubyHash.class, "indexes")); hashClass.defineMethod("indices", CallbackFactory.getOptMethod(RubyHash.class, "indexes"));
public static RubyClass createHashClass(Ruby ruby) { RubyClass hashClass = ruby.defineClass("Hash", ruby.getClasses().getObjectClass());// rb_include_module(rb_cHash, rb_mEnumerable); hashClass.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyHash.class, "newInstance")); hashClass.defineSingletonMethod("[]", CallbackFactory.getOptSingletonMethod(RubyHash.class, "create")); hashClass.defineMethod("initialize", CallbackFactory.getOptMethod(RubyHash.class, "initialize")); // rb_define_method(rb_cHash,"clone", rb_hash_clone, 0);// rb_define_method(rb_cHash,"rehash", rb_hash_rehash, 0); hashClass.defineMethod("to_hash", CallbackFactory.getMethod(RubyHash.class, "to_hash")); hashClass.defineMethod("to_a", CallbackFactory.getMethod(RubyHash.class, "to_a")); hashClass.defineMethod("to_s", CallbackFactory.getMethod(RubyHash.class, "to_s")); hashClass.defineMethod("inspect", CallbackFactory.getMethod(RubyHash.class, "inspect"));// rb_define_method(rb_cHash,"==", rb_hash_equal, 1); hashClass.defineMethod("[]", CallbackFactory.getMethod(RubyHash.class, "aref", RubyObject.class));// rb_define_method(rb_cHash,"fetch", rb_hash_fetch, -1); hashClass.defineMethod("[]=", CallbackFactory.getMethod(RubyHash.class, "aset", RubyObject.class, RubyObject.class)); hashClass.defineMethod("store", CallbackFactory.getMethod(RubyHash.class, "aset", RubyObject.class, RubyObject.class));// rb_define_method(rb_cHash,"default", rb_hash_default, 0);// rb_define_method(rb_cHash,"default=", rb_hash_set_default, 1);// rb_define_method(rb_cHash,"index", rb_hash_index, 1);// rb_define_method(rb_cHash,"indexes", rb_hash_indexes, -1);// rb_define_method(rb_cHash,"indices", rb_hash_indexes, -1); hashClass.defineMethod("size", CallbackFactory.getMethod(RubyHash.class, "size")); hashClass.defineMethod("length", CallbackFactory.getMethod(RubyHash.class, "size")); hashClass.defineMethod("empty?", CallbackFactory.getMethod(RubyHash.class, "empty_p"));// rb_define_method(rb_cHash,"each", rb_hash_each_pair, 0);// rb_define_method(rb_cHash,"each_value", rb_hash_each_value, 0);// rb_define_method(rb_cHash,"each_key", rb_hash_each_key, 0);// rb_define_method(rb_cHash,"each_pair", rb_hash_each_pair, 0);// rb_define_method(rb_cHash,"sort", rb_hash_sort, 0);// rb_define_method(rb_cHash,"keys", rb_hash_keys, 0);// rb_define_method(rb_cHash,"values", rb_hash_values, 0);// rb_define_method(rb_cHash,"shift", rb_hash_shift, 0);// rb_define_method(rb_cHash,"delete", rb_hash_delete, 1);// rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0);// rb_define_method(rb_cHash,"reject", rb_hash_reject, 0);// rb_define_method(rb_cHash,"reject!", rb_hash_reject_bang, 0);// rb_define_method(rb_cHash,"clear", rb_hash_clear, 0);// rb_define_method(rb_cHash,"invert", rb_hash_invert, 0);// rb_define_method(rb_cHash,"update", rb_hash_update, 1);// rb_define_method(rb_cHash,"replace", rb_hash_replace, 1);// rb_define_method(rb_cHash,"include?", rb_hash_has_key, 1);// rb_define_method(rb_cHash,"member?", rb_hash_has_key, 1);// rb_define_method(rb_cHash,"has_key?", rb_hash_has_key, 1);// rb_define_method(rb_cHash,"has_value?", rb_hash_has_value, 1);// rb_define_method(rb_cHash,"key?", rb_hash_has_key, 1);// rb_define_method(rb_cHash,"value?", rb_hash_has_value, 1); return hashClass; }
47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/6f48980923c4b06bac2890165c858310895f9a14/RubyHash.java/clean/org/jruby/RubyHash.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 19817, 797, 752, 2310, 797, 12, 54, 10340, 22155, 13, 288, 282, 1651, 797, 18, 11255, 1305, 2932, 11265, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 1651, 797, 18, 11255, 1305, 2932, 6836, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 565, 19817, 797, 1651, 797, 273, 22155, 18, 11255, 797, 2932, 2310, 3113, 22155, 18, 588, 4818, 7675, 588, 921, 797, 10663, 759, 565, 7138, 67, 6702, 67, 2978, 12, 6731, 67, 71, 2310, 16, 7138, 67, 81, 3572, 25121, 1769, 282, 1651, 797, 18, 11255, 1305, 2932, 11265, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 1651, 797, 18, 11255, 1305, 2932, 6836, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 565, 1651, 797, 18, 11255, 19571, 1305, 2932, 2704, 3113, 8444, 1733, 18, 588, 6179, 19571, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 2704, 1442, 7923, 1769, 282, 1651, 797, 18, 11255, 1305, 2932, 11265, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 1651, 797, 18, 11255, 1305, 2932, 6836, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 565, 1651, 797, 18, 11255, 19571, 1305, 2932, 8526, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19817, 797, 752, 2310, 797, 12, 54, 10340, 22155, 13, 288, 282, 1651, 797, 18, 11255, 1305, 2932, 11265, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 1651, 797, 18, 11255, 1305, 2932, 6836, 3113, 8444, 1733, 18, 588, 6179, 1305, 12, 54, 10340, 2310, 18, 1106, 16, 315, 11265, 7923, 1769, 565, 19817, 797, 1651, 797, 273, 22155, 18, 11255, 797, 2932, 2310, 3113, 22155, 18, 588, 4818, 7675, 588, 921, 797, 10663, 759, 565, 7138, 67, 6702, 67, 2978, 12, 6731, 67, 71, 2310, 16, 7138, 67, 81, 3572, 25121, 1769, 282, 1651, 797, 18, 11255, 1305, 2932, 11265, 3113, 8444, 1733, 18, 2 ]
startTime = System.currentTimeMillis(); final long myStartTime = startTime;
startTime = System.currentTimeMillis(); final long myStartTime = startTime; state.setCurrentSequence(sequence); state.setAssociatedWindow(workbench.getActiveWorkbenchWindow()); final IPreferenceStore store = WorkbenchPlugin.getDefault() .getPreferenceStore(); if (store.getBoolean(IPreferenceConstants.MULTI_KEY_ASSIST)) { final Display display = workbench.getDisplay(); final int delay = store .getInt(IPreferenceConstants.MULTI_KEY_ASSIST_TIME); display.timerExec(delay, new Runnable() {
private void incrementState(KeySequence sequence) { // Record the starting time. startTime = System.currentTimeMillis(); final long myStartTime = startTime; // Update the state. state.setCurrentSequence(sequence); state.setAssociatedWindow(workbench.getActiveWorkbenchWindow()); // After 1s, open a shell displaying the possible completions. final IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore(); if (store.getBoolean(IPreferenceConstants.MULTI_KEY_ASSIST)) { final Display display = workbench.getDisplay(); final int delay = store.getInt(IPreferenceConstants.MULTI_KEY_ASSIST_TIME); display.timerExec(delay, new Runnable() { public void run() { if ((System.currentTimeMillis() > (myStartTime - delay)) && (startTime == myStartTime)) { openMultiKeyAssistShell(display); } } }); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/52bdedcde9b5aecaf3408ceb20ea4ef30f487849/WorkbenchKeyboard.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 5504, 1119, 12, 653, 4021, 3102, 13, 288, 202, 202, 759, 5059, 326, 5023, 813, 18, 202, 202, 1937, 950, 273, 2332, 18, 2972, 28512, 5621, 202, 202, 6385, 1525, 3399, 13649, 273, 8657, 31, 202, 202, 759, 2315, 326, 919, 18, 202, 202, 2019, 18, 542, 3935, 4021, 12, 6178, 1769, 202, 202, 2019, 18, 542, 19233, 3829, 12, 1252, 22144, 18, 588, 3896, 2421, 22144, 3829, 10663, 202, 202, 759, 7360, 404, 87, 16, 1696, 279, 5972, 23620, 326, 3323, 23738, 18, 202, 202, 6385, 467, 9624, 2257, 1707, 273, 4147, 22144, 3773, 18, 588, 1868, 7675, 588, 9624, 2257, 5621, 202, 202, 430, 261, 2233, 18, 588, 5507, 12, 45, 9624, 2918, 18, 26588, 67, 3297, 67, 8423, 5511, 3719, 288, 1082, 202, 6385, 9311, 2562, 273, 1440, 22144, 18, 588, 4236, 5621, 1082, 202, 6385, 509, 4624, 273, 1707, 18, 588, 1702, 12, 45, 9624, 2918, 18, 26588, 67, 3297, 67, 8423, 5511, 67, 4684, 1769, 1082, 202, 5417, 18, 12542, 1905, 12, 10790, 16, 394, 10254, 1435, 288, 9506, 202, 482, 918, 1086, 1435, 288, 6862, 202, 430, 14015, 3163, 18, 2972, 28512, 1435, 405, 261, 4811, 13649, 300, 4624, 3719, 25083, 202, 10, 10, 261, 1937, 950, 422, 3399, 13649, 3719, 288, 25083, 202, 3190, 5002, 653, 2610, 376, 13220, 12, 5417, 1769, 6862, 202, 97, 9506, 202, 97, 1082, 202, 22938, 202, 202, 97, 202, 97, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 5504, 1119, 12, 653, 4021, 3102, 13, 288, 202, 202, 759, 5059, 326, 5023, 813, 18, 202, 202, 1937, 950, 273, 2332, 18, 2972, 28512, 5621, 202, 202, 6385, 1525, 3399, 13649, 273, 8657, 31, 202, 202, 759, 2315, 326, 919, 18, 202, 202, 2019, 18, 542, 3935, 4021, 12, 6178, 1769, 202, 202, 2019, 18, 542, 19233, 3829, 12, 1252, 22144, 18, 588, 3896, 2421, 22144, 3829, 10663, 202, 202, 759, 7360, 404, 87, 16, 1696, 279, 5972, 23620, 326, 3323, 23738, 18, 202, 202, 6385, 467, 9624, 2257, 1707, 273, 4147, 22144, 3773, 18, 588, 1868, 7675, 588, 9624, 2257, 5621, 202, 202, 430, 261, 2233, 18, 588, 5507, 12, 45, 9624, 2918, 2 ]
IBuildModel model = getBuildModel();
IBuildModel model = getBuildModel(false);
private IBuildEntry getBuildInfo() { IBuildEntry entry = null; IBuildModel model = getBuildModel(); if (model == null) return null; IBuild buildObject = model.getBuild(); entry = buildObject.getEntry(IBuildEntry.SECONDARY_DEPENDENCIES); return entry; }
8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/0cc2f62d219af4680a46401829bc21696de8f631/DependencyManagementSection.java/clean/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 467, 3116, 1622, 21122, 966, 1435, 288, 1082, 202, 45, 3116, 1622, 1241, 273, 446, 31, 1082, 202, 45, 3116, 1488, 938, 273, 21122, 1488, 5621, 1082, 202, 430, 261, 2284, 422, 446, 13, 9506, 202, 2463, 446, 31, 1082, 202, 45, 3116, 1361, 921, 273, 938, 18, 588, 3116, 5621, 1082, 202, 4099, 273, 1361, 921, 18, 588, 1622, 12, 45, 3116, 1622, 18, 16328, 6043, 67, 1639, 25690, 1157, 7266, 3991, 1769, 1082, 202, 2463, 1241, 31, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 467, 3116, 1622, 21122, 966, 1435, 288, 1082, 202, 45, 3116, 1622, 1241, 273, 446, 31, 1082, 202, 45, 3116, 1488, 938, 273, 21122, 1488, 5621, 1082, 202, 430, 261, 2284, 422, 446, 13, 9506, 202, 2463, 446, 31, 1082, 202, 45, 3116, 1361, 921, 273, 938, 18, 588, 3116, 5621, 1082, 202, 4099, 273, 1361, 921, 18, 588, 1622, 12, 45, 3116, 1622, 18, 16328, 6043, 67, 1639, 25690, 1157, 7266, 3991, 1769, 1082, 202, 2463, 1241, 31, 202, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
setServant(a_servant);
manager = a_poa.the_POAManager();
public gnuServantObject(Servant a_servant, byte[] an_id, ORB_1_4 an_orb, gnuPOA a_poa ) { Id = an_id; setServant(a_servant); poa = a_poa; if (poa != null) manager = poa.the_POAManager(); else manager = null; repository_ids = null; orb = an_orb; }
47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/0c6db14fe37c570414a6f9d9ea41538675363ecc/gnuServantObject.java/buggy/gnu/CORBA/Poa/gnuServantObject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 314, 13053, 827, 7445, 921, 12, 827, 7445, 279, 67, 550, 7445, 16, 1160, 8526, 392, 67, 350, 16, 4869, 38, 67, 21, 67, 24, 392, 67, 16640, 16, 12900, 314, 13053, 2419, 37, 279, 67, 1631, 69, 7682, 262, 225, 288, 565, 3124, 273, 392, 67, 350, 31, 565, 3301, 273, 279, 67, 1631, 69, 18, 5787, 67, 2419, 37, 1318, 5621, 565, 8275, 69, 273, 279, 67, 1631, 69, 31, 565, 309, 261, 1631, 69, 480, 446, 13, 1377, 3301, 273, 8275, 69, 18, 5787, 67, 2419, 37, 1318, 5621, 565, 469, 1377, 3301, 273, 446, 31, 565, 3352, 67, 2232, 273, 446, 31, 565, 16823, 273, 392, 67, 16640, 31, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 314, 13053, 827, 7445, 921, 12, 827, 7445, 279, 67, 550, 7445, 16, 1160, 8526, 392, 67, 350, 16, 4869, 38, 67, 21, 67, 24, 392, 67, 16640, 16, 12900, 314, 13053, 2419, 37, 279, 67, 1631, 69, 7682, 262, 225, 288, 565, 3124, 273, 392, 67, 350, 31, 565, 3301, 273, 279, 67, 1631, 69, 18, 5787, 67, 2419, 37, 1318, 5621, 565, 8275, 69, 273, 279, 67, 1631, 69, 31, 565, 309, 261, 1631, 69, 480, 446, 13, 1377, 3301, 273, 8275, 69, 18, 5787, 67, 2419, 37, 1318, 5621, 565, 469, 1377, 3301, 273, 446, 31, 565, 3352, 67, 2232, 273, 446, 31, 565, 16823, 273, 392, 67, 16640, 31, 225, 289, 2, -100, -100 ]
((Workbench)(WorkbenchPlugin.getDefault().getWorkbench())).getFeaturesInfo();
((Workbench)(WorkbenchPlugin.getDefault().getWorkbench())).getConfigurationInfo().getFeaturesInfo();
public IAdaptable createElement(IMemento memento) { // Get the feature id. String featureId = memento.getString(WelcomeEditorInput.FEATURE_ID); if (featureId == null) return null; AboutInfo info = null; AboutInfo [] infos = ((Workbench)(WorkbenchPlugin.getDefault().getWorkbench())).getFeaturesInfo(); for (int i = 0; i < infos.length; i++) { if (featureId.equals(infos[i].getFeatureId())) { info = infos[i]; break; } } if (info == null) return null; return new WelcomeEditorInput(info);}
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d0d7f613d990b6d6bf252aeeaed46185d71d1618/WelcomeEditorInputFactory.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WelcomeEditorInputFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 467, 13716, 429, 6310, 12, 3445, 820, 83, 312, 820, 83, 13, 288, 202, 759, 968, 326, 2572, 612, 18, 202, 780, 2572, 548, 273, 312, 820, 83, 18, 588, 780, 12, 59, 16312, 6946, 1210, 18, 18257, 67, 734, 1769, 202, 430, 261, 7238, 548, 422, 446, 13, 3196, 202, 2463, 446, 31, 202, 24813, 966, 1123, 273, 446, 31, 202, 24813, 966, 5378, 10626, 273, 3196, 202, 12443, 2421, 22144, 21433, 2421, 22144, 3773, 18, 588, 1868, 7675, 588, 2421, 22144, 10756, 2934, 588, 8696, 966, 5621, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 10626, 18, 2469, 31, 277, 27245, 288, 202, 202, 430, 261, 7238, 548, 18, 14963, 12, 18227, 63, 77, 8009, 588, 4595, 548, 1435, 3719, 288, 1082, 202, 1376, 273, 10626, 63, 77, 15533, 1082, 202, 8820, 31, 202, 202, 97, 202, 97, 202, 202, 430, 261, 1376, 422, 446, 13, 202, 202, 2463, 446, 31, 202, 2463, 394, 678, 16312, 6946, 1210, 12, 1376, 1769, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 467, 13716, 429, 6310, 12, 3445, 820, 83, 312, 820, 83, 13, 288, 202, 759, 968, 326, 2572, 612, 18, 202, 780, 2572, 548, 273, 312, 820, 83, 18, 588, 780, 12, 59, 16312, 6946, 1210, 18, 18257, 67, 734, 1769, 202, 430, 261, 7238, 548, 422, 446, 13, 3196, 202, 2463, 446, 31, 202, 24813, 966, 1123, 273, 446, 31, 202, 24813, 966, 5378, 10626, 273, 3196, 202, 12443, 2421, 22144, 21433, 2421, 22144, 3773, 18, 588, 1868, 7675, 588, 2421, 22144, 10756, 2934, 588, 8696, 966, 5621, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 10626, 18, 2469, 31, 277, 27245, 288, 202, 202, 430, 261, 7238, 548, 18, 14963, 12, 18227, 63, 77, 2 ]
if (_offenders != null)
if (_offenders == null) return true; if (rc._offenders == null) return false; for (i = 0; i < _offenders.size(); i++)
public boolean equals(Object obj) { ResolvedCritic rc; int i, j; if (obj == null || !(obj instanceof ResolvedCritic)) return false; rc = (ResolvedCritic) obj; if (_critic == null) { if (rc._critic != null) return false; } else if (!_critic.equals(rc._critic)) return false; if (_offenders != null) { if (rc._offenders == null) return false; for (i = 0; i < _offenders.size(); i++) { if (_offenders.elementAt(i) == null) continue; for (j = 0; j < rc._offenders.size(); j++) if (_offenders.elementAt(i).equals(rc._offenders.elementAt(j))) break; if (j >= rc._offenders.size()) return false; } } return true; }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/23464f9cbc3169e9d2f1919998cae2c59b514985/ResolvedCritic.java/buggy/src_new/org/argouml/cognitive/ResolvedCritic.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1606, 12, 921, 1081, 13, 565, 288, 202, 12793, 39, 583, 335, 4519, 31, 202, 474, 277, 16, 525, 31, 202, 430, 261, 2603, 422, 446, 747, 401, 12, 2603, 1276, 22776, 39, 583, 335, 3719, 202, 565, 327, 629, 31, 202, 1310, 273, 261, 12793, 39, 583, 335, 13, 1081, 31, 202, 430, 261, 67, 27826, 335, 422, 446, 13, 202, 95, 202, 565, 309, 261, 1310, 6315, 27826, 335, 480, 446, 13, 202, 202, 2463, 629, 31, 202, 97, 202, 12107, 309, 16051, 67, 27826, 335, 18, 14963, 12, 1310, 6315, 27826, 335, 3719, 202, 565, 327, 629, 31, 202, 430, 261, 67, 3674, 10130, 480, 446, 13, 202, 95, 202, 565, 309, 261, 1310, 6315, 3674, 10130, 422, 446, 13, 202, 202, 2463, 629, 31, 202, 565, 364, 261, 77, 273, 374, 31, 277, 411, 389, 3674, 10130, 18, 1467, 5621, 277, 27245, 202, 565, 288, 202, 202, 430, 261, 67, 3674, 10130, 18, 2956, 861, 12, 77, 13, 422, 446, 13, 1082, 565, 1324, 31, 202, 202, 1884, 261, 78, 273, 374, 31, 525, 411, 4519, 6315, 3674, 10130, 18, 1467, 5621, 525, 27245, 1082, 565, 309, 261, 67, 3674, 10130, 18, 2956, 861, 12, 77, 2934, 14963, 12, 1310, 6315, 3674, 10130, 18, 2956, 861, 12, 78, 20349, 1082, 202, 8820, 31, 202, 202, 430, 261, 78, 1545, 4519, 6315, 3674, 10130, 18, 1467, 10756, 1082, 565, 327, 629, 31, 202, 565, 289, 202, 97, 202, 2463, 638, 31, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1606, 12, 921, 1081, 13, 565, 288, 202, 12793, 39, 583, 335, 4519, 31, 202, 474, 277, 16, 525, 31, 202, 430, 261, 2603, 422, 446, 747, 401, 12, 2603, 1276, 22776, 39, 583, 335, 3719, 202, 565, 327, 629, 31, 202, 1310, 273, 261, 12793, 39, 583, 335, 13, 1081, 31, 202, 430, 261, 67, 27826, 335, 422, 446, 13, 202, 95, 202, 565, 309, 261, 1310, 6315, 27826, 335, 480, 446, 13, 202, 202, 2463, 629, 31, 202, 97, 202, 12107, 309, 16051, 67, 27826, 335, 18, 14963, 12, 1310, 6315, 27826, 335, 3719, 202, 565, 327, 629, 31, 202, 430, 261, 67, 3674, 10130, 480, 446, 13, 202, 95, 202, 565, 309, 261, 2 ]
all = new ArrayList(1);
all = new ArrayList<MessageListener>(1);
public void registerMessageListener(byte[] guid, MessageListener ml) { ml.registered(guid); synchronized(MESSAGE_LISTENER_LOCK) { Map listeners = new TreeMap(GUID.GUID_BYTE_COMPARATOR); listeners.putAll(_messageListeners); List all = (List)listeners.get(guid); if(all == null) { all = new ArrayList(1); all.add(ml); } else { List temp = new ArrayList(all.size() + 1); temp.addAll(all); all = temp; all.add(ml); } listeners.put(guid, Collections.unmodifiableList(all)); _messageListeners = Collections.unmodifiableMap(listeners); } }
5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/ac7c3a1539ad35dc668f1d225a6c2676877599ab/MessageRouter.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/MessageRouter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1744, 1079, 2223, 12, 7229, 8526, 9875, 16, 2350, 2223, 12931, 13, 288, 3639, 12931, 18, 14327, 12, 14066, 1769, 3639, 3852, 12, 8723, 67, 26421, 67, 6589, 13, 288, 5411, 1635, 4679, 273, 394, 16381, 12, 17525, 18, 17525, 67, 15377, 67, 4208, 4255, 1769, 5411, 4679, 18, 458, 1595, 24899, 2150, 5583, 1769, 5411, 987, 777, 273, 261, 682, 13, 16072, 18, 588, 12, 14066, 1769, 5411, 309, 12, 454, 422, 446, 13, 288, 7734, 777, 273, 394, 2407, 32, 1079, 2223, 34, 12, 21, 1769, 7734, 777, 18, 1289, 12, 781, 1769, 5411, 289, 469, 288, 7734, 987, 1906, 273, 394, 2407, 12, 454, 18, 1467, 1435, 397, 404, 1769, 7734, 1906, 18, 1289, 1595, 12, 454, 1769, 7734, 777, 273, 1906, 31, 7734, 777, 18, 1289, 12, 781, 1769, 5411, 289, 5411, 4679, 18, 458, 12, 14066, 16, 5737, 18, 318, 13388, 682, 12, 454, 10019, 5411, 389, 2150, 5583, 273, 5737, 18, 318, 13388, 863, 12, 16072, 1769, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1744, 1079, 2223, 12, 7229, 8526, 9875, 16, 2350, 2223, 12931, 13, 288, 3639, 12931, 18, 14327, 12, 14066, 1769, 3639, 3852, 12, 8723, 67, 26421, 67, 6589, 13, 288, 5411, 1635, 4679, 273, 394, 16381, 12, 17525, 18, 17525, 67, 15377, 67, 4208, 4255, 1769, 5411, 4679, 18, 458, 1595, 24899, 2150, 5583, 1769, 5411, 987, 777, 273, 261, 682, 13, 16072, 18, 588, 12, 14066, 1769, 5411, 309, 12, 454, 422, 446, 13, 288, 7734, 777, 273, 394, 2407, 32, 1079, 2223, 34, 12, 21, 1769, 7734, 777, 18, 1289, 12, 781, 1769, 5411, 289, 469, 288, 7734, 987, 1906, 273, 394, 2407, 12, 454, 18, 1467, 1435, 397, 404, 1769, 7734, 1906, 18, 2 ]
List evanescent = (List)domainClass.getPropertyOrStaticPropertyOrFieldValue( EVANESCENT, List.class ); if(evanescent != null) { if(transientProps == null) transientProps = new ArrayList(); transientProps.addAll(evanescent); } if(optionalProps != null) { for(Iterator i = optionalProps.iterator();i.hasNext();) { Object currentObj = i.next(); if(currentObj instanceof String) { String propertyName = (String)currentObj; if(propertyName.equals( this.name )) { this.optional = true; break; } } } } if(transientProps != null) { for(Iterator i = transientProps.iterator();i.hasNext();) { Object currentObj = i.next(); if(currentObj instanceof String) { String propertyName = (String)currentObj; if(propertyName.equals( this.name )) { this.persistant = false; break; } } } }
establishFetchMode();
public DefaultGrailsDomainClassProperty(DefaultGrailsDomainClass domainClass, PropertyDescriptor descriptor) { this.domainClass = domainClass; // required by default this.optional = false; // persistant by default this.persistant = true; this.name = descriptor.getName(); this.naturalName = GrailsClassUtils.getNaturalName(descriptor.getName()); this.type = descriptor.getPropertyType(); this.identity = descriptor.getName().equals( IDENTITY ); // figure out if this property is inherited if(!domainClass.isRoot()) { Class superClass = domainClass.getClazz().getSuperclass(); PropertyDescriptor pd = BeanUtils.getPropertyDescriptor(superClass, this.name); if (pd != null && pd.getReadMethod() != null) { this.inherited = true; } } // get the not required descritor from the owner bean List optionalProps; List transientProps; optionalProps = (List)domainClass.getPropertyOrStaticPropertyOrFieldValue( OPTIONAL, List.class ); transientProps= (List)domainClass.getPropertyOrStaticPropertyOrFieldValue( TRANSIENT, List.class ); // Undocumented feature alert! Steve insisted on this :-) List evanescent = (List)domainClass.getPropertyOrStaticPropertyOrFieldValue( EVANESCENT, List.class ); if(evanescent != null) { if(transientProps == null) transientProps = new ArrayList(); transientProps.addAll(evanescent); } // establish of property is required if(optionalProps != null) { for(Iterator i = optionalProps.iterator();i.hasNext();) { // make sure its a string otherwise ignore. Note: Maybe put a warning here? Object currentObj = i.next(); if(currentObj instanceof String) { String propertyName = (String)currentObj; // if the property name in the not required list // matches this property name set not required if(propertyName.equals( this.name )) { this.optional = true; break; } } } } // establish if property is persistant if(transientProps != null) { for(Iterator i = transientProps.iterator();i.hasNext();) { // make sure its a string otherwise ignore. Note: Again maybe a warning? Object currentObj = i.next(); if(currentObj instanceof String) { String propertyName = (String)currentObj; // if the property name is on the not persistant list // then set persistant to false if(propertyName.equals( this.name )) { this.persistant = false; break; } } } } }
55385 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55385/6c47cbe485713fe8d2b500632651590033abed59/DefaultGrailsDomainClassProperty.java/buggy/src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClassProperty.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2989, 14571, 14573, 3748, 797, 1396, 12, 1868, 14571, 14573, 3748, 797, 2461, 797, 16, 26761, 4950, 13, 225, 288, 3639, 333, 18, 4308, 797, 273, 2461, 797, 31, 3639, 368, 1931, 635, 805, 3639, 333, 18, 10444, 273, 629, 31, 3639, 368, 3898, 970, 635, 805, 3639, 333, 18, 19251, 970, 273, 638, 31, 3639, 333, 18, 529, 273, 4950, 18, 17994, 5621, 3639, 333, 18, 18757, 3766, 461, 273, 10812, 14573, 797, 1989, 18, 588, 23779, 3766, 461, 12, 12628, 18, 17994, 10663, 3639, 333, 18, 723, 273, 4950, 18, 588, 22802, 5621, 3639, 333, 18, 10781, 273, 4950, 18, 17994, 7675, 14963, 12, 1599, 11101, 11272, 3639, 368, 7837, 596, 309, 333, 1272, 353, 12078, 3639, 309, 12, 5, 4308, 797, 18, 291, 2375, 10756, 288, 540, 202, 797, 18846, 273, 2461, 797, 18, 588, 14616, 7675, 588, 28471, 5621, 540, 202, 540, 202, 1396, 3187, 4863, 273, 7704, 1989, 18, 588, 1396, 3187, 12, 9565, 797, 16, 333, 18, 529, 1769, 540, 202, 430, 261, 22353, 480, 446, 597, 4863, 18, 588, 1994, 1305, 1435, 480, 446, 13, 288, 540, 202, 202, 2211, 18, 6018, 329, 273, 638, 31, 540, 202, 97, 3639, 289, 7734, 368, 336, 326, 486, 1931, 3044, 583, 280, 628, 326, 3410, 3931, 3639, 987, 3129, 5047, 31, 3639, 987, 12315, 5047, 31, 3639, 3129, 5047, 273, 261, 682, 13, 4308, 797, 18, 588, 1396, 1162, 5788, 1396, 1162, 13559, 12, 14930, 16, 987, 18, 1106, 11272, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2989, 14571, 14573, 3748, 797, 1396, 12, 1868, 14571, 14573, 3748, 797, 2461, 797, 16, 26761, 4950, 13, 225, 288, 3639, 333, 18, 4308, 797, 273, 2461, 797, 31, 3639, 368, 1931, 635, 805, 3639, 333, 18, 10444, 273, 629, 31, 3639, 368, 3898, 970, 635, 805, 3639, 333, 18, 19251, 970, 273, 638, 31, 3639, 333, 18, 529, 273, 4950, 18, 17994, 5621, 3639, 333, 18, 18757, 3766, 461, 273, 10812, 14573, 797, 1989, 18, 588, 23779, 3766, 461, 12, 12628, 18, 17994, 10663, 3639, 333, 18, 723, 273, 4950, 18, 588, 22802, 5621, 3639, 333, 18, 10781, 273, 4950, 18, 17994, 7675, 14963, 12, 1599, 11101, 11272, 3639, 368, 7837, 596, 309, 333, 1272, 353, 2 ]
if (XMLConstants.MODULE_STRING.equalsIgnoreCase(nameOfElement)) {
if (XMLConstants.MODULE_STRING.equalsIgnoreCase(nameOfElement) || XMLConstants.PAGE_STRING.equalsIgnoreCase(nameOfElement)) {
public void checkElementForReferencesNoteNecessaryModules(XMLElement element,IBExportImportData metadata) throws IOException { String nameOfElement = element.getName(); // is it a module? if (XMLConstants.MODULE_STRING.equalsIgnoreCase(nameOfElement)) { // ask for the class String moduleClass = element.getAttributeValue(XMLConstants.CLASS_STRING); // mark the module as necessary metadata.addNecessaryModule(moduleClass); if (moduleReference.containsKey(moduleClass)) { IBReference reference = (IBReference) moduleReference.get(moduleClass); Collection entries = reference.getEntries(); Iterator iterator = entries.iterator(); while (iterator.hasNext()) { IBReference.Entry entry = (IBReference.Entry) iterator.next(); entry.addSource(element, metadata); } } } List children = element.getChildren(); Iterator childrenIterator = children.iterator(); while (childrenIterator.hasNext()) { XMLElement childElement = (XMLElement) childrenIterator.next(); checkElementForReferencesNoteNecessaryModules(childElement, metadata); } }
54061 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54061/4f7b25786b01011d8c649ba93c7ef68f6eef2d58/IBReferences.java/buggy/src/java/com/idega/builder/data/IBReferences.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 866, 1046, 1290, 8221, 8067, 23961, 7782, 12, 15223, 930, 16, 13450, 6144, 5010, 751, 1982, 13, 1216, 1860, 288, 202, 202, 780, 508, 951, 1046, 273, 930, 18, 17994, 5621, 202, 202, 759, 353, 518, 279, 1605, 35, 202, 202, 430, 261, 4201, 2918, 18, 12194, 67, 5804, 18, 14963, 5556, 12, 529, 951, 1046, 3719, 288, 1082, 202, 759, 6827, 364, 326, 667, 1082, 202, 780, 1605, 797, 273, 930, 18, 588, 14942, 12, 4201, 2918, 18, 5237, 67, 5804, 1769, 1082, 202, 759, 2267, 326, 1605, 487, 4573, 1082, 202, 4165, 18, 1289, 23961, 3120, 12, 2978, 797, 1769, 1082, 202, 430, 261, 2978, 2404, 18, 12298, 653, 12, 2978, 797, 3719, 288, 9506, 202, 13450, 2404, 2114, 273, 261, 13450, 2404, 13, 1605, 2404, 18, 588, 12, 2978, 797, 1769, 9506, 202, 2532, 3222, 273, 2114, 18, 588, 5400, 5621, 9506, 202, 3198, 2775, 273, 3222, 18, 9838, 5621, 9506, 202, 17523, 261, 9838, 18, 5332, 2134, 10756, 288, 6862, 202, 13450, 2404, 18, 1622, 1241, 273, 261, 13450, 2404, 18, 1622, 13, 2775, 18, 4285, 5621, 6862, 202, 4099, 18, 1289, 1830, 12, 2956, 16, 1982, 1769, 9506, 202, 97, 1082, 202, 97, 202, 202, 97, 202, 202, 682, 2325, 273, 930, 18, 588, 4212, 5621, 202, 202, 3198, 2325, 3198, 273, 2325, 18, 9838, 5621, 202, 202, 17523, 261, 5906, 3198, 18, 5332, 2134, 10756, 288, 1082, 202, 15223, 1151, 1046, 273, 261, 15223, 13, 2325, 3198, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 866, 1046, 1290, 8221, 8067, 23961, 7782, 12, 15223, 930, 16, 13450, 6144, 5010, 751, 1982, 13, 1216, 1860, 288, 202, 202, 780, 508, 951, 1046, 273, 930, 18, 17994, 5621, 202, 202, 759, 353, 518, 279, 1605, 35, 202, 202, 430, 261, 4201, 2918, 18, 12194, 67, 5804, 18, 14963, 5556, 12, 529, 951, 1046, 3719, 288, 1082, 202, 759, 6827, 364, 326, 667, 1082, 202, 780, 1605, 797, 273, 930, 18, 588, 14942, 12, 4201, 2918, 18, 5237, 67, 5804, 1769, 1082, 202, 759, 2267, 326, 1605, 487, 4573, 1082, 202, 4165, 18, 1289, 23961, 3120, 12, 2978, 797, 1769, 1082, 202, 430, 261, 2978, 2404, 18, 12298, 653, 12, 2978, 797, 3719, 2 ]
public void testInsertSiblingWithFilterFiltered() { //This test is no use here as it is //based on the assumption that all items //are created. }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/0118da8e5d97b45ec28a07f59aef6c7d2b6c6bb3/VirtualTableViewerTest.java/clean/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualTableViewerTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 4600, 10291, 1190, 1586, 14478, 1435, 288, 202, 202, 759, 2503, 1842, 353, 1158, 999, 2674, 487, 518, 353, 202, 202, 759, 12261, 603, 326, 24743, 716, 777, 1516, 3196, 202, 759, 834, 2522, 18, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 4600, 10291, 1190, 1586, 14478, 1435, 288, 202, 202, 759, 2503, 1842, 353, 1158, 999, 2674, 487, 518, 353, 202, 202, 759, 12261, 603, 326, 24743, 716, 777, 1516, 3196, 202, 759, 834, 2522, 18, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
viewToolBar = new ToolBar(control.getParent(), SWT.HORIZONTAL
viewToolBar = new ToolBar(control.getControl(), SWT.HORIZONTAL
public BasicStackPresentation(CTabFolder control, IStackPresentationSite stackSite) { super(stackSite); tabFolder = control; tabFolder.setMinimizeVisible(stackSite.supportsState(IStackPresentationSite.STATE_MINIMIZED)); tabFolder.setMaximizeVisible(stackSite.supportsState(IStackPresentationSite.STATE_MAXIMIZED)); layout = new TabFolderLayout(tabFolder); titleLabel = new Label(control.getParent(), SWT.WRAP); titleLabel.setVisible(false); ColorSchemeService.setViewTitleFont(this, titleLabel); viewToolBar = new ToolBar(control.getParent(), SWT.HORIZONTAL | SWT.FLAT | SWT.WRAP); ToolItem pullDownButton = new ToolItem(viewToolBar, SWT.PUSH); // Image img = WorkbenchImages.getImage(IWorkbenchGraphicConstants.IMG_LCL_VIEW_MENU); Image hoverImage = WorkbenchImages.getImage(IWorkbenchGraphicConstants.IMG_LCL_VIEW_MENU_HOVER); pullDownButton.setDisabledImage(hoverImage); // TODO: comment this out? // PR#1GE56QT - Avoid creation of unnecessary image. pullDownButton.setImage(hoverImage); pullDownButton.setToolTipText(WorkbenchMessages.getString("Menu")); //$NON-NLS-1$ pullDownButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { showPaneMenu(); } }); // listener to switch between visible tabItems tabFolder.addListener(SWT.Selection, selectionListener); // listener to resize visible components tabFolder.addListener(SWT.Resize, resizeListener); // listen for mouse down on tab to set focus. tabFolder.addMouseListener(mouseListener); tabFolder.addListener(SWT.MenuDetect, menuListener); tabFolder.addCTabFolder2Listener(closeListener); tabFolder.addCTabFolder2Listener(expandListener); dragListener = new Listener() { public void handleEvent(Event event) { Point localPos = new Point(event.x, event.y); // Ignore drags unless they are on the title area if ((tabFolder.getStyle() & SWT.TOP) != 0) { if (localPos.y > tabFolder.getTabHeight()) { return; } } else { if (localPos.y < tabFolder.getBounds().height - tabFolder.getTabHeight()) { return; } } CTabItem tabUnderPointer = tabFolder.getItem(localPos); if (tabUnderPointer == null) { getSite().dragStart(tabFolder.toDisplay(localPos), false); return; } IPresentablePart part = getPartForTab(tabUnderPointer); if (getSite().isMoveable(part)) { dragStart = tabFolder.indexOf(tabUnderPointer); getSite().dragStart(part, tabFolder.toDisplay(localPos), false); dragStart = -1; } } }; PresentationUtil.addDragListener(tabFolder, dragListener); // Uncomment to allow dragging from the title label// PresentationUtil.addDragListener(titleLabel, new Listener() {// public void handleEvent(Event event) {// if (layout.isTrimOnTop()) {// Point localPos = new Point(event.x, event.y);// getSite().dragStart(titleLabel.toDisplay(localPos), false);// }// }// }); titleLabel.addMouseListener(mouseListener); // Compute the tab height int toolbarHeight = viewToolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT).y; // Add enough space for the margin int tabHeight = toolbarHeight + 1; // Enforce a minimum tab height if (tabHeight < 20) { tabHeight = 20; } tabFolder.setTabHeight(tabHeight); final Color darkShadowColour = tabFolder.getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); final Color lightShadowColour = tabFolder.getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW); tabFolder.addPaintListener(new PaintListener() { public void paintControl(PaintEvent e) { GC gc = e.gc; gc.setForeground(darkShadowColour); Rectangle clientBounds = Geometry.copy(layout.getClientBounds()); Rectangle bounds = tabFolder.getBounds(); clientBounds.x -= bounds.x; clientBounds.y -= bounds.y; if (activeState) { if (layout.isAnyTrimBelow()) { gc.drawLine(clientBounds.x, clientBounds.y - 1, clientBounds.x + clientBounds.width - 1, clientBounds.y - 1); } } else { gc.drawLine(1, clientBounds.y - 1, bounds.width - 1, clientBounds.y - 1); } } }); populateSystemMenu(systemMenuManager); }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/db95d896a9728c87e103baad4b7543446b1ff52f/BasicStackPresentation.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/BasicStackPresentation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 7651, 2624, 6351, 367, 12, 1268, 378, 3899, 3325, 16, 467, 2624, 6351, 367, 4956, 2110, 4956, 13, 288, 202, 565, 2240, 12, 3772, 4956, 1769, 202, 202, 7032, 3899, 273, 3325, 31, 9506, 202, 7032, 3899, 18, 542, 2930, 10153, 6207, 12, 3772, 4956, 18, 28064, 1119, 12, 45, 2624, 6351, 367, 4956, 18, 7998, 67, 6236, 3445, 24131, 10019, 202, 202, 7032, 3899, 18, 542, 2747, 10153, 6207, 12, 3772, 4956, 18, 28064, 1119, 12, 45, 2624, 6351, 367, 4956, 18, 7998, 67, 6694, 3445, 24131, 10019, 9506, 202, 6741, 273, 394, 9483, 3899, 3744, 12, 7032, 3899, 1769, 202, 202, 2649, 2224, 273, 394, 5287, 12, 7098, 18, 588, 3054, 9334, 348, 8588, 18, 27664, 1769, 202, 202, 2649, 2224, 18, 542, 6207, 12, 5743, 1769, 202, 202, 2957, 9321, 1179, 18, 542, 1767, 4247, 5711, 12, 2211, 16, 2077, 2224, 1769, 9506, 202, 1945, 6364, 5190, 273, 394, 13288, 5190, 12, 7098, 18, 588, 3367, 9334, 348, 8588, 18, 44, 20344, 4697, 202, 96, 348, 8588, 18, 42, 12190, 571, 348, 8588, 18, 27664, 1769, 9506, 202, 6364, 1180, 6892, 4164, 3616, 273, 394, 13288, 1180, 12, 1945, 6364, 5190, 16, 348, 8588, 18, 30348, 1769, 202, 202, 759, 9506, 202, 2040, 3774, 273, 4147, 22144, 8946, 18, 588, 2040, 12, 45, 2421, 22144, 29459, 2918, 18, 3445, 43, 67, 48, 5017, 67, 12145, 67, 29227, 1769, 202, 202, 2040, 15758, 2040, 273, 1082, 202, 2421, 22144, 8946, 18, 588, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 7651, 2624, 6351, 367, 12, 1268, 378, 3899, 3325, 16, 467, 2624, 6351, 367, 4956, 2110, 4956, 13, 288, 202, 565, 2240, 12, 3772, 4956, 1769, 202, 202, 7032, 3899, 273, 3325, 31, 9506, 202, 7032, 3899, 18, 542, 2930, 10153, 6207, 12, 3772, 4956, 18, 28064, 1119, 12, 45, 2624, 6351, 367, 4956, 18, 7998, 67, 6236, 3445, 24131, 10019, 202, 202, 7032, 3899, 18, 542, 2747, 10153, 6207, 12, 3772, 4956, 18, 28064, 1119, 12, 45, 2624, 6351, 367, 4956, 18, 7998, 67, 6694, 3445, 24131, 10019, 9506, 202, 6741, 273, 394, 9483, 3899, 3744, 12, 7032, 3899, 1769, 202, 202, 2649, 2224, 273, 394, 5287, 12, 7098, 18, 588, 3054, 9334, 348, 8588, 2 ]
List resources = getSelectedResources(); if (resources.size() == 0) return false;
if (resources.length == 0) return false;
boolean canDelete() { // allow only projects or only non-projects to be selected; // note that the selection may contain multiple types of resource if (!(containsOnlyProjects() || containsOnlyNonProjects())) { return false; } List resources = getSelectedResources(); if (resources.size() == 0) return false; // Return true if everything in the selection exists. for (Iterator e = resources.iterator(); e.hasNext();) { IResource next = (IResource)e.next(); if (next.isPhantom()) { return false; } } return true;}
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/d9613eca2eb909a155f4ea74a194620b3b527443/DeleteResourceAction.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1250, 848, 2613, 1435, 288, 202, 759, 1699, 1338, 10137, 578, 1338, 1661, 17, 13582, 358, 506, 3170, 31, 225, 202, 759, 4721, 716, 326, 4421, 2026, 912, 3229, 1953, 434, 1058, 202, 430, 16051, 12, 12298, 3386, 15298, 1435, 747, 1914, 3386, 3989, 15298, 1435, 3719, 288, 202, 202, 2463, 629, 31, 202, 97, 202, 202, 682, 2703, 273, 16625, 3805, 5621, 202, 430, 261, 4683, 18, 1467, 1435, 422, 374, 13, 327, 629, 31, 202, 202, 759, 2000, 638, 309, 7756, 316, 326, 4421, 1704, 18, 202, 1884, 261, 3198, 425, 273, 2703, 18, 9838, 5621, 425, 18, 5332, 2134, 5621, 13, 288, 202, 202, 45, 1420, 1024, 273, 261, 45, 1420, 13, 73, 18, 4285, 5621, 202, 202, 430, 261, 4285, 18, 291, 3731, 16317, 10756, 288, 1082, 202, 2463, 629, 31, 202, 202, 97, 202, 97, 202, 2463, 638, 31, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1250, 848, 2613, 1435, 288, 202, 759, 1699, 1338, 10137, 578, 1338, 1661, 17, 13582, 358, 506, 3170, 31, 225, 202, 759, 4721, 716, 326, 4421, 2026, 912, 3229, 1953, 434, 1058, 202, 430, 16051, 12, 12298, 3386, 15298, 1435, 747, 1914, 3386, 3989, 15298, 1435, 3719, 288, 202, 202, 2463, 629, 31, 202, 97, 202, 202, 682, 2703, 273, 16625, 3805, 5621, 202, 430, 261, 4683, 18, 1467, 1435, 422, 374, 13, 327, 629, 31, 202, 202, 759, 2000, 638, 309, 7756, 316, 326, 4421, 1704, 18, 202, 1884, 261, 3198, 425, 273, 2703, 18, 9838, 5621, 425, 18, 5332, 2134, 5621, 13, 288, 202, 202, 45, 1420, 1024, 273, 261, 45, 1420, 13, 73, 18, 4285, 5621, 2 ]
for (int i = statuses.length - 1; i >= 0; i--) { ISVNStatus status = statuses[i]; IPath path = new Path(status.getPath()); IResource changedResource = null; if ( SVNNodeKind.DIR == status.getNodeKind() ) { changedResource = workspaceRoot.getContainerForLocation(path); } else if ( SVNNodeKind.FILE == status.getNodeKind() ) { changedResource = workspaceRoot.getFileForLocation(path); } else if ( SVNNodeKind.UNKNOWN == status.getNodeKind() ) { changedResource = workspaceRoot.getContainerForLocation(path); if( changedResource.exists() ) containerSet.add( changedResource ); else if( !containerSet.contains( changedResource ) ) changedResource = workspaceRoot.getFileForLocation(path); } if( changedResource != null ) { containerSet.add(changedResource.getParent()); allChanges.add(new StatusResourcePair(changedResource, status)); } } IResource[] result = new IResource[allChanges.size()]; int i= 0; for (ListIterator iter = allChanges.listIterator(allChanges.size()); iter.hasPrevious(); i++) { StatusResourcePair changedResourcePair = (StatusResourcePair) iter.previous(); result[i] = changedResourcePair.getResource();
IResource[] result = new IResource[statuses.length]; for (int i = 0; i < statuses.length; i++) { result[i] = statuses[i].getResource();
private IResource[] findChanges(IResource resource, int depth) throws TeamException { System.out.println("SVNWorkspaceSubscriber.refresh()"+resource+" "+depth); IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceRoot workspaceRoot = workspace.getRoot(); remoteSyncStateStore.flushBytes(resource, depth); ISVNClientAdapter client = SVNProviderPlugin.getPlugin().createSVNClient(); ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor( resource ); boolean descend = (depth == IResource.DEPTH_INFINITE)? true : false; try { List allChanges = new ArrayList(); Set containerSet = new HashSet(); StatusCommand cmd = new StatusCommand(svnResource.getFile(), descend, false, true ); cmd.execute( client ); ISVNStatus[] statuses = cmd.getStatuses(); Arrays.sort(statuses, new Comparator() { public int compare(Object o1, Object o2) { return ((ISVNStatus) o1).getPath().compareTo(((ISVNStatus) o2).getPath()); } }); //Collect changed resources (in reverse order so dirs are properly identified for (int i = statuses.length - 1; i >= 0; i--) { ISVNStatus status = statuses[i]; IPath path = new Path(status.getPath()); IResource changedResource = null; if ( SVNNodeKind.DIR == status.getNodeKind() ) { changedResource = workspaceRoot.getContainerForLocation(path); } else if ( SVNNodeKind.FILE == status.getNodeKind() ) { changedResource = workspaceRoot.getFileForLocation(path); } else if ( SVNNodeKind.UNKNOWN == status.getNodeKind() ) { changedResource = workspaceRoot.getContainerForLocation(path); if( changedResource.exists() ) containerSet.add( changedResource ); else if( !containerSet.contains( changedResource ) ) changedResource = workspaceRoot.getFileForLocation(path); } if( changedResource != null ) { containerSet.add(changedResource.getParent()); allChanges.add(new StatusResourcePair(changedResource, status)); } } IResource[] result = new IResource[allChanges.size()]; int i= 0; //In reverse-reverse order so dir syncInfos are created sooner then files ... for (ListIterator iter = allChanges.listIterator(allChanges.size()); iter.hasPrevious(); i++) { StatusResourcePair changedResourcePair = (StatusResourcePair) iter.previous(); result[i] = changedResourcePair.getResource(); if (isSupervised(changedResourcePair.getResource())) { StatusInfo remoteInfo = new StatusInfo(cmd.getRevision(), changedResourcePair.getStatus().getRepositoryTextStatus(), changedResourcePair.getStatus().getRepositoryPropStatus() ); remoteSyncStateStore.setBytes( changedResourcePair.getResource(), remoteInfo.asBytes() ); } //System.out.println(cmd.getRevision()+" "+changedResource+" R:"+status.getLastChangedRevision()+" L:"+status.getTextStatus()+" R:"+status.getRepositoryTextStatus()); } return result; } catch (SVNClientException e) { throw new TeamException("Error getting status for resource "+resource, e); } }
6016 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6016/efbf15e3da08ab8dc4b3d22606a5879c1494050b/SVNWorkspaceSubscriber.java/buggy/subclipse/core/src/org/tigris/subversion/subclipse/core/sync/SVNWorkspaceSubscriber.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 467, 1420, 8526, 1104, 7173, 12, 45, 1420, 1058, 16, 509, 3598, 13, 1216, 10434, 503, 288, 3639, 2332, 18, 659, 18, 8222, 2932, 23927, 50, 8241, 11118, 18, 9144, 10031, 15, 3146, 9078, 13773, 5979, 1769, 1082, 3639, 467, 8241, 6003, 273, 8128, 3773, 18, 588, 8241, 5621, 3639, 467, 8241, 2375, 6003, 2375, 273, 6003, 18, 588, 2375, 5621, 7734, 2632, 4047, 1119, 2257, 18, 11330, 2160, 12, 3146, 16, 3598, 1769, 3639, 4437, 58, 50, 1227, 4216, 1004, 273, 29537, 50, 2249, 3773, 18, 588, 3773, 7675, 2640, 23927, 50, 1227, 5621, 3639, 4437, 58, 50, 2042, 1420, 5893, 82, 1420, 273, 29537, 50, 8241, 2375, 18, 588, 23927, 50, 1420, 1290, 12, 1058, 11272, 3639, 1250, 10653, 273, 261, 5979, 422, 467, 1420, 18, 27479, 67, 706, 7263, 5398, 9945, 638, 294, 629, 31, 3639, 775, 288, 5411, 987, 777, 7173, 273, 394, 2407, 5621, 5411, 1000, 1478, 694, 273, 394, 6847, 5621, 5411, 2685, 2189, 1797, 273, 394, 2685, 2189, 12, 31505, 1420, 18, 29925, 9334, 10653, 16, 629, 16, 638, 11272, 5411, 1797, 18, 8837, 12, 1004, 11272, 5411, 4437, 58, 50, 1482, 8526, 13516, 273, 1797, 18, 588, 15220, 5621, 5411, 5647, 18, 3804, 12, 21655, 16, 394, 13359, 1435, 288, 9506, 202, 482, 509, 3400, 12, 921, 320, 21, 16, 1033, 320, 22, 13, 288, 6862, 202, 2463, 14015, 5127, 58, 50, 1482, 13, 320, 21, 2934, 588, 743, 7675, 9877, 774, 12443, 12, 5127, 58, 50, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 467, 1420, 8526, 1104, 7173, 12, 45, 1420, 1058, 16, 509, 3598, 13, 1216, 10434, 503, 288, 3639, 2332, 18, 659, 18, 8222, 2932, 23927, 50, 8241, 11118, 18, 9144, 10031, 15, 3146, 9078, 13773, 5979, 1769, 1082, 3639, 467, 8241, 6003, 273, 8128, 3773, 18, 588, 8241, 5621, 3639, 467, 8241, 2375, 6003, 2375, 273, 6003, 18, 588, 2375, 5621, 7734, 2632, 4047, 1119, 2257, 18, 11330, 2160, 12, 3146, 16, 3598, 1769, 3639, 4437, 58, 50, 1227, 4216, 1004, 273, 29537, 50, 2249, 3773, 18, 588, 3773, 7675, 2640, 23927, 50, 1227, 5621, 3639, 4437, 58, 50, 2042, 1420, 5893, 82, 1420, 273, 29537, 50, 8241, 2375, 18, 588, 23927, 50, 1420, 1290, 12, 1058, 2 ]
while (rs.next()) { importLoop(tuples, rs); }
while (rs.next()) { parseConstraint(rs,tuples); }
public java.sql.ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { // Added by Ola Sundell <ola@miranda.org> // FIXME: error checking galore! java.sql.ResultSet rsret; Field f[] = new Field[14]; byte tuple[][]; f[0] = new Field(connection, "PKTABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "PKTABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "PKTABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "PKCOLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "FKTABLE_CAT", iVarcharOid, 32); f[5] = new Field(connection, "FKTABLE_SCHEM", iVarcharOid, 32); f[6] = new Field(connection, "FKTABLE_NAME", iVarcharOid, 32); f[7] = new Field(connection, "FKCOLUMN_NAME", iVarcharOid, 32); f[8] = new Field(connection, "KEY_SEQ", iInt2Oid, 2); f[9] = new Field(connection, "UPDATE_RULE", iInt2Oid, 2); f[10] = new Field(connection, "DELETE_RULE", iInt2Oid, 2); f[11] = new Field(connection, "FK_NAME", iVarcharOid, 32); f[12] = new Field(connection, "PK_NAME", iVarcharOid, 32); f[13] = new Field(connection, "DEFERRABILITY", iInt2Oid, 2); java.sql.ResultSet rs = connection.ExecSQL("select t.tgargs " + "from pg_class as c, pg_trigger as t " + "where c.relname like '" + table + "' and c.relfilenode=t.tgrelid"); Vector tuples = new Vector(); while (rs.next()) { importLoop(tuples, rs); } rsret = new ResultSet(connection, f, tuples, "OK", 1); return rsret; }
45497 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45497/0b1289e67d0c0be0f1089b298113652333eb6299/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2252, 18, 4669, 18, 13198, 336, 24934, 2396, 12, 780, 6222, 16, 514, 1963, 16, 514, 1014, 13, 1216, 6483, 202, 95, 202, 202, 759, 25808, 635, 531, 11821, 348, 1074, 1165, 411, 355, 69, 36, 81, 481, 464, 69, 18, 3341, 34, 202, 202, 759, 9852, 30, 555, 6728, 24902, 479, 5, 202, 202, 6290, 18, 4669, 18, 13198, 3597, 1349, 31, 202, 202, 974, 284, 8526, 273, 394, 2286, 63, 3461, 15533, 202, 202, 7229, 3193, 63, 6362, 15533, 202, 202, 74, 63, 20, 65, 273, 394, 2286, 12, 4071, 16, 315, 8784, 7775, 67, 14130, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 202, 202, 74, 63, 21, 65, 273, 394, 2286, 12, 4071, 16, 315, 8784, 7775, 67, 55, 10390, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 202, 202, 74, 63, 22, 65, 273, 394, 2286, 12, 4071, 16, 315, 8784, 7775, 67, 1985, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 202, 202, 74, 63, 23, 65, 273, 394, 2286, 12, 4071, 16, 315, 8784, 11009, 67, 1985, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 202, 202, 74, 63, 24, 65, 273, 394, 2286, 12, 4071, 16, 315, 13121, 7775, 67, 14130, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 202, 202, 74, 63, 25, 65, 273, 394, 2286, 12, 4071, 16, 315, 13121, 7775, 67, 55, 10390, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 202, 202, 74, 63, 26, 65, 273, 394, 2286, 12, 4071, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2252, 18, 4669, 18, 13198, 336, 24934, 2396, 12, 780, 6222, 16, 514, 1963, 16, 514, 1014, 13, 1216, 6483, 202, 95, 202, 202, 759, 25808, 635, 531, 11821, 348, 1074, 1165, 411, 355, 69, 36, 81, 481, 464, 69, 18, 3341, 34, 202, 202, 759, 9852, 30, 555, 6728, 24902, 479, 5, 202, 202, 6290, 18, 4669, 18, 13198, 3597, 1349, 31, 202, 202, 974, 284, 8526, 273, 394, 2286, 63, 3461, 15533, 202, 202, 7229, 3193, 63, 6362, 15533, 202, 202, 74, 63, 20, 65, 273, 394, 2286, 12, 4071, 16, 315, 8784, 7775, 67, 14130, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 202, 202, 74, 63, 21, 65, 273, 394, 2286, 12, 2 ]
return theWatchdog;
return theWatchdog;
public Watchdog getWatchdog() { return theWatchdog; }
47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/d4f817efab178e73e483e869f48c06a7985ceadf/SMTPHandler.java/buggy/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9736, 20330, 336, 5234, 20330, 1435, 288, 565, 327, 326, 5234, 20330, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9736, 20330, 336, 5234, 20330, 1435, 288, 565, 327, 326, 5234, 20330, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0 ){
if (fDocument.errorChecking && (fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0 ) {
protected Node normalizeNode (Node node){ int type = node.getNodeType(); boolean wellformed; fLocator.fRelatedNode=node; switch (type) { case Node.DOCUMENT_TYPE_NODE: { if (DEBUG_ND) { System.out.println("==>normalizeNode:{doctype}"); } //REVISIT: well-formness encoding info break; } case Node.ELEMENT_NODE: { if (DEBUG_ND) { System.out.println("==>normalizeNode:{element} "+node.getNodeName()); } //do the name check only when version of the document was changed & //application has set the value of well-formed features to true if ( ((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0) && fDocument.isXMLVersionChanged()){ if(fNamespaceValidation){ wellformed = CoreDocumentImpl.isValidQName(node.getPrefix() , node.getLocalName(), fDocument.isXML11Version()) ; } else{ wellformed = CoreDocumentImpl.isXMLName(node.getNodeName() , fDocument.isXML11Version()); } if (!wellformed){ String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "wf-invalid-character-in-node-name", new Object[]{"Element", node.getNodeName()}); reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_ERROR, "wf-invalid-character-in-node-name"); } } // push namespace context fNamespaceContext.pushContext(); fLocalNSBinder.reset(); ElementImpl elem = (ElementImpl)node; if (elem.needsSyncChildren()) { elem.synchronizeChildren(); } AttributeMap attributes = (elem.hasAttributes()) ? (AttributeMap) elem.getAttributes() : null; // fix namespaces and remove default attributes if ((fConfiguration.features & DOMConfigurationImpl.NAMESPACES) !=0) { // fix namespaces // normalize attribute values // remove default attributes namespaceFixUp(elem, attributes); if ((fConfiguration.features & DOMConfigurationImpl.NSDECL) == 0 && attributes != null ) { for (int i = 0; i < attributes.getLength(); ++i) { Attr att = (Attr)attributes.getItem(i); if (XMLSymbols.PREFIX_XMLNS.equals(att.getPrefix()) || XMLSymbols.PREFIX_XMLNS.equals(att.getName())) { elem.removeAttributeNode(att); --i; } } } } else { if ( attributes!=null ) { for ( int i=0; i<attributes.getLength(); ++i ) { Attr attr = (Attr)attributes.item(i); //removeDefault(attr, attributes); attr.normalize(); if ( ((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0)){ isAttrValueWF(fErrorHandler, fError, fLocator, attributes, (AttrImpl)attr, attr.getValue(), fDocument.isXML11Version()); if (fDocument.isXMLVersionChanged()){ wellformed=CoreDocumentImpl.isXMLName(node.getNodeName() , fDocument.isXML11Version()); if (!wellformed){ String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "wf-invalid-character-in-node-name", new Object[]{"Attr",node.getNodeName()}); reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_ERROR, "wf-invalid-character-in-node-name"); } } } } } } if (fValidationHandler != null) { // REVISIT: possible solutions to discard default content are: // either we pass some flag to XML Schema validator // or rely on the PSVI information. fAttrProxy.setAttributes(attributes, fDocument, elem); updateQName(elem, fQName); // updates global qname // set error node in the dom error wrapper // so if error occurs we can report an error node fConfiguration.fErrorHandlerWrapper.fCurrentNode = node; fCurrentNode = node; // call re-validation handler fValidationHandler.startElement(fQName, fAttrProxy, null); } // normalize children Node kid, next; for (kid = elem.getFirstChild(); kid != null; kid = next) { next = kid.getNextSibling(); kid = normalizeNode(kid); if (kid !=null) { next = kid; // don't advance } } if (DEBUG_ND) { // normalized subtree System.out.println("***The children of {"+node.getNodeName()+"} are normalized"); for (kid = elem.getFirstChild(); kid != null; kid = next) { next = kid.getNextSibling(); System.out.println(kid.getNodeName() +"["+kid.getNodeValue()+"]"); } } if (fValidationHandler != null) { updateQName(elem, fQName); // updates global qname // // set error node in the dom error wrapper // so if error occurs we can report an error node fConfiguration.fErrorHandlerWrapper.fCurrentNode = node; fCurrentNode = node; fValidationHandler.endElement(fQName, null); } // pop namespace context fNamespaceContext.popContext(); break; } case Node.COMMENT_NODE: { if (DEBUG_ND) { System.out.println("==>normalizeNode:{comments}"); } if ((fConfiguration.features & DOMConfigurationImpl.COMMENTS) == 0) { Node prevSibling = node.getPreviousSibling(); Node parent = node.getParentNode(); // remove the comment node parent.removeChild(node); if (prevSibling != null && prevSibling.getNodeType() == Node.TEXT_NODE) { Node nextSibling = prevSibling.getNextSibling(); if (nextSibling != null && nextSibling.getNodeType() == Node.TEXT_NODE) { ((TextImpl)nextSibling).insertData(0, prevSibling.getNodeValue()); parent.removeChild(prevSibling); return nextSibling; } } }//if comment node need not be removed else { if ( ((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0)){ String commentdata = ((Comment)node).getData(); // check comments for invalid xml chracter as per the version // of the document isCommentWF(fErrorHandler, fError, fLocator, commentdata, fDocument.isXML11Version()); } }//end-else if comment node is not to be removed. break; } case Node.ENTITY_REFERENCE_NODE: { if (DEBUG_ND) { System.out.println("==>normalizeNode:{entityRef} "+node.getNodeName()); } if ((fConfiguration.features & DOMConfigurationImpl.ENTITIES) == 0) { Node prevSibling = node.getPreviousSibling(); Node parent = node.getParentNode(); ((EntityReferenceImpl)node).setReadOnly(false, true); expandEntityRef (parent, node); parent.removeChild(node); Node next = (prevSibling != null)?prevSibling.getNextSibling():parent.getFirstChild(); // The list of children #text -> &ent; // and entity has a first child as a text // we should not advance if (prevSibling != null && next != null && prevSibling.getNodeType() == Node.TEXT_NODE && next.getNodeType() == Node.TEXT_NODE) { return prevSibling; // Don't advance } return next; } else { if ( ((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0) && fDocument.isXMLVersionChanged()){ CoreDocumentImpl.isXMLName(node.getNodeName() , fDocument.isXML11Version()); } // REVISIT: traverse entity reference and send appropriate calls to the validator // (no normalization should be performed for the children). } break; } case Node.CDATA_SECTION_NODE: { if (DEBUG_ND) { System.out.println("==>normalizeNode:{cdata}"); } if ((fConfiguration.features & DOMConfigurationImpl.CDATA) == 0) { // convert CDATA to TEXT nodes Node prevSibling = node.getPreviousSibling(); if (prevSibling != null && prevSibling.getNodeType() == Node.TEXT_NODE){ ((Text)prevSibling).appendData(node.getNodeValue()); node.getParentNode().removeChild(node); return prevSibling; //don't advance } else { Text text = fDocument.createTextNode(node.getNodeValue()); Node parent = node.getParentNode(); node = parent.replaceChild(text, node); return text; //don't advance } } // send characters call for CDATA if (fValidationHandler != null) { // set error node in the dom error wrapper // so if error occurs we can report an error node fConfiguration.fErrorHandlerWrapper.fCurrentNode = node; fCurrentNode = node; fValidationHandler.startCDATA(null); fValidationHandler.characterData(node.getNodeValue(), null); fValidationHandler.endCDATA(null); } String value = node.getNodeValue(); if ((fConfiguration.features & DOMConfigurationImpl.SPLITCDATA) != 0) { int index; Node parent = node.getParentNode(); isXMLCharWF(fErrorHandler, fError, fLocator, node.getNodeValue(), fDocument.isXML11Version()); while ( (index=value.indexOf("]]>")) >= 0 ) { node.setNodeValue(value.substring(0, index+2)); value = value.substring(index +2); Node firstSplitNode = node; Node newChild = fDocument.createCDATASection(value); parent.insertBefore(newChild, node.getNextSibling()); node = newChild; // issue warning fLocator.fRelatedNode = firstSplitNode; String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "cdata-sections-splitted", null); reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_WARNING, "cdata-sections-splitted"); } } else { // check well-formness isCDataWF(fErrorHandler, fError, fLocator, value, fDocument.isXML11Version()); } break; } case Node.TEXT_NODE: { if (DEBUG_ND) { System.out.println("==>normalizeNode(text):{"+node.getNodeValue()+"}"); } // If node is a text node, we need to check for one of two // conditions: // 1) There is an adjacent text node // 2) There is no adjacent text node, but node is // an empty text node. Node next = node.getNextSibling(); // If an adjacent text node, merge it with this node if ( next!=null && next.getNodeType() == Node.TEXT_NODE ) { ((Text)node).appendData(next.getNodeValue()); node.getParentNode().removeChild( next ); // We don't need to check well-formness here since we are not yet // done with this node. return node; // Don't advance; } else if (node.getNodeValue().length()==0) { // If kid is empty, remove it node.getParentNode().removeChild( node ); } else { // validator.characters() call and well-formness // Don't send characters or check well-formness in the following cases: // 1. entities is false, next child is entity reference: expand tree first // 2. comments is false, and next child is comment // 3. cdata is false, and next child is cdata short nextType = (next != null)?next.getNodeType():-1; if (nextType == -1 || !(((fConfiguration.features & DOMConfigurationImpl.ENTITIES) == 0 && nextType == Node.ENTITY_NODE) || ((fConfiguration.features & DOMConfigurationImpl.COMMENTS) == 0 && nextType == Node.COMMENT_NODE) || ((fConfiguration.features & DOMConfigurationImpl.CDATA) == 0) && nextType == Node.CDATA_SECTION_NODE)) { if ( ((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0) ){ isXMLCharWF(fErrorHandler, fError, fLocator, node.getNodeValue(), fDocument.isXML11Version()); } if (fValidationHandler != null) { fConfiguration.fErrorHandlerWrapper.fCurrentNode = node; fCurrentNode = node; fValidationHandler.characterData(node.getNodeValue(), null); if (DEBUG_ND) { System.out.println("=====>characterData(),"+nextType); } } } else { if (DEBUG_ND) { System.out.println("=====>don't send characters(),"+nextType); } } } break; } case Node.PROCESSING_INSTRUCTION_NODE: { //do the well-formed valid PI target name , data check when application has set the value of well-formed feature to true if((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0 ){ ProcessingInstruction pinode = (ProcessingInstruction)node ; String target = pinode.getTarget(); //1.check PI target name if(fDocument.isXML11Version()){ wellformed = XML11Char.isXML11ValidName(target); } else{ wellformed = XMLChar.isValidName(target); } if (!wellformed) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "wf-invalid-character-in-node-name", new Object[]{"Element", node.getNodeName()}); reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_ERROR, "wf-invalid-character-in-node-name"); } //2. check PI data //processing isntruction data may have certain characters //which may not be valid XML character isXMLCharWF(fErrorHandler, fError, fLocator, pinode.getData(), fDocument.isXML11Version()); } }//end case Node.PROCESSING_INSTRUCTION_NODE }//end of switch return null; }//normalizeNode
46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/7f734e130552bea3e730d01769efd7e14eaf96e6/DOMNormalizer.java/clean/src/org/apache/xerces/dom/DOMNormalizer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 2029, 3883, 907, 261, 907, 756, 15329, 3639, 509, 618, 273, 756, 18, 588, 15101, 5621, 3639, 1250, 5492, 7312, 31, 3639, 284, 5786, 18, 74, 8017, 907, 33, 2159, 31, 7734, 1620, 261, 723, 13, 288, 3639, 648, 2029, 18, 18450, 67, 2399, 67, 8744, 30, 288, 7734, 309, 261, 9394, 67, 2908, 13, 288, 10792, 2332, 18, 659, 18, 8222, 2932, 631, 34, 12237, 907, 18611, 2896, 12387, 1532, 1769, 7734, 289, 7734, 368, 862, 26780, 1285, 30, 5492, 17, 687, 4496, 2688, 1123, 7734, 898, 31, 5411, 289, 3639, 648, 2029, 18, 10976, 67, 8744, 30, 288, 5375, 309, 261, 9394, 67, 2908, 13, 288, 10792, 2332, 18, 659, 18, 8222, 2932, 631, 34, 12237, 907, 18611, 2956, 97, 13773, 2159, 18, 588, 18948, 10663, 7734, 289, 27573, 368, 2896, 326, 508, 866, 1338, 1347, 1177, 434, 326, 1668, 1703, 3550, 473, 7734, 368, 3685, 711, 444, 326, 460, 434, 5492, 17, 7312, 4467, 358, 638, 7734, 309, 261, 14015, 74, 1750, 18, 7139, 473, 4703, 1750, 2828, 18, 59, 21943, 7473, 25773, 13, 480, 374, 13, 597, 5397, 284, 2519, 18, 291, 4201, 1444, 5033, 10756, 95, 10792, 309, 12, 74, 3402, 4354, 15329, 13491, 5492, 7312, 273, 4586, 2519, 2828, 18, 26810, 13688, 12, 2159, 18, 588, 2244, 1435, 269, 756, 18, 588, 29583, 9334, 225, 284, 2519, 18, 291, 4201, 2499, 1444, 10756, 274, 10792, 289, 10792, 469, 95, 13491, 5492, 7312, 273, 4586, 2519, 2828, 18, 291, 4201, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 2029, 3883, 907, 261, 907, 756, 15329, 3639, 509, 618, 273, 756, 18, 588, 15101, 5621, 3639, 1250, 5492, 7312, 31, 3639, 284, 5786, 18, 74, 8017, 907, 33, 2159, 31, 7734, 1620, 261, 723, 13, 288, 3639, 648, 2029, 18, 18450, 67, 2399, 67, 8744, 30, 288, 7734, 309, 261, 9394, 67, 2908, 13, 288, 10792, 2332, 18, 659, 18, 8222, 2932, 631, 34, 12237, 907, 18611, 2896, 12387, 1532, 1769, 7734, 289, 7734, 368, 862, 26780, 1285, 30, 5492, 17, 687, 4496, 2688, 1123, 7734, 898, 31, 5411, 289, 3639, 648, 2029, 18, 10976, 67, 8744, 30, 288, 5375, 309, 261, 9394, 67, 2908, 13, 288, 10792, 2332, 18, 659, 18, 8222, 2932, 631, 34, 2 ]
sql.append( " ) " + "order by" + " c.relname, a.attnum");
if(((org.postgresql.ResultSet)dr).getTupleCount()==1) { dr.next(); tuple[11] = dr.getBytes(1); } else tuple[11] = null; dr.close();
public java.sql.ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { Vector v = new Vector(); // The new ResultSet tuple stuff Field f[] = new Field[18]; // The field descriptors for the new ResultSet f[ 0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); f[ 1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); f[ 2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); f[ 3] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); f[ 4] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); f[ 5] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); f[ 6] = new Field(connection, "COLUMN_SIZE", iInt4Oid, 4); f[ 7] = new Field(connection, "BUFFER_LENGTH", iVarcharOid, 32); f[ 8] = new Field(connection, "DECIMAL_DIGITS", iInt4Oid, 4); f[ 9] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); f[10] = new Field(connection, "NULLABLE", iInt4Oid, 4); f[11] = new Field(connection, "REMARKS", iVarcharOid, 32); f[12] = new Field(connection, "COLUMN_DEF", iVarcharOid, 32); f[13] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); f[14] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); f[15] = new Field(connection, "CHAR_OCTET_LENGTH", iVarcharOid, 32); f[16] = new Field(connection, "ORDINAL_POSITION", iInt4Oid,4); f[17] = new Field(connection, "IS_NULLABLE", iVarcharOid, 32); StringBuffer sql = new StringBuffer(512); sql.append("select " + (connection.haveMinimumServerVersion("7.2") ? "a.attrelid, " : "a.oid, ") + " c.relname, " + " a.attname, " + " a.atttypid, " + " a.attnum, " + " a.attnotnull, " + " a.attlen, " + " a.atttypmod, " + " d.adsrc, " + " t.typname, " + " e.description " + "from" + " (" + " (pg_class c inner join pg_attribute a on" + " (" + " a.attrelid=c.oid"); if ((tableNamePattern != null) && ! tableNamePattern.equals("%")) { sql.append(" and c.relname like \'" + tableNamePattern + "\'"); } if ((columnNamePattern != null) && ! columnNamePattern.equals("%")) { sql.append(" and a.attname like \'" + columnNamePattern + "\'"); } sql.append( " and a.attnum > 0" + " )" + " ) inner join pg_type t on" + " (" + " t.oid = a.atttypid" + " )" + " )" + " left outer join pg_attrdef d on" + " (" + " c.oid = d.adrelid" + " and a.attnum = d.adnum" + " )" + " left outer join pg_description e on" + " (" + " e.objoid = a.attrelid"); if (connection.haveMinimumServerVersion("7.2")) { sql.append( " and e.objsubid = a.attnum" + " and e.classoid = (select oid from pg_class where relname = \'pg_class\')"); } sql.append( " ) " + "order by" + " c.relname, a.attnum"); java.sql.ResultSet r = connection.ExecSQL(sql.toString()); while (r.next()) { byte[][] tuple = new byte[18][0]; String nullFlag = r.getString(6); String typname = r.getString(10); tuple[0] = "".getBytes(); // Catalog name tuple[1] = "".getBytes(); // Schema name tuple[2] = r.getBytes(2); // Table name tuple[3] = r.getBytes(3); // Column name tuple[4] = Integer.toString(connection.getSQLType(typname)).getBytes(); // Data type tuple[5] = typname.getBytes(); // Type name // Column size // Looking at the psql source, // I think the length of a varchar as specified when the table was created // should be extracted from atttypmod which contains this length + sizeof(int32) if (typname.equals("bpchar") || typname.equals("varchar")) { int atttypmod = r.getInt(8); tuple[6] = Integer.toString(atttypmod != -1 ? atttypmod - VARHDRSZ : 0).getBytes(); } else { tuple[6] = r.getBytes(7); } tuple[7] = null; // Buffer length tuple[8] = "0".getBytes(); // Decimal Digits - how to get this? tuple[9] = "10".getBytes(); // Num Prec Radix - assume decimal tuple[10] = Integer.toString(nullFlag.equals("f") ? java.sql.DatabaseMetaData.columnNullable : java.sql.DatabaseMetaData.columnNoNulls).getBytes(); // Nullable tuple[11] = r.getBytes(11); // Description (if any) tuple[12] = r.getBytes(9); // Column default tuple[13] = null; // sql data type (unused) tuple[14] = null; // sql datetime sub (unused) tuple[15] = tuple[6]; // char octet length tuple[16] = r.getBytes(5); // ordinal position tuple[17] = (nullFlag.equals("f") ? "YES" : "NO").getBytes(); // Is nullable v.addElement(tuple); } r.close(); return new ResultSet(connection, f, v, "OK", 1); }
52628 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52628/6b50f9af333a2795b82dd3331df55c7e703f1bea/DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2252, 18, 4669, 18, 13198, 14226, 12, 780, 6222, 16, 514, 1963, 3234, 16, 514, 4775, 3234, 16, 514, 7578, 3234, 13, 1216, 6483, 225, 288, 565, 5589, 331, 273, 394, 5589, 5621, 202, 202, 759, 1021, 394, 10842, 3193, 10769, 202, 974, 284, 8526, 273, 394, 2286, 63, 2643, 15533, 202, 202, 759, 1021, 652, 14215, 364, 326, 394, 10842, 565, 284, 63, 374, 65, 273, 394, 2286, 12, 4071, 16, 315, 7775, 67, 14130, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 565, 284, 63, 404, 65, 273, 394, 2286, 12, 4071, 16, 315, 7775, 67, 55, 10390, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 565, 284, 63, 576, 65, 273, 394, 2286, 12, 4071, 16, 315, 7775, 67, 1985, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 565, 284, 63, 890, 65, 273, 394, 2286, 12, 4071, 16, 315, 11009, 67, 1985, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 565, 284, 63, 1059, 65, 273, 394, 2286, 12, 4071, 16, 315, 4883, 67, 2399, 3113, 277, 1702, 22, 19105, 16, 576, 1769, 565, 284, 63, 1381, 65, 273, 394, 2286, 12, 4071, 16, 315, 2399, 67, 1985, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 565, 284, 63, 1666, 65, 273, 394, 2286, 12, 4071, 16, 315, 11009, 67, 4574, 3113, 277, 1702, 24, 19105, 16, 1059, 1769, 565, 284, 63, 2371, 65, 273, 394, 2286, 12, 4071, 16, 315, 11302, 67, 7096, 3113, 277, 58, 22483, 19105, 16, 3847, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2252, 18, 4669, 18, 13198, 14226, 12, 780, 6222, 16, 514, 1963, 3234, 16, 514, 4775, 3234, 16, 514, 7578, 3234, 13, 1216, 6483, 225, 288, 565, 5589, 331, 273, 394, 5589, 5621, 202, 202, 759, 1021, 394, 10842, 3193, 10769, 202, 974, 284, 8526, 273, 394, 2286, 63, 2643, 15533, 202, 202, 759, 1021, 652, 14215, 364, 326, 394, 10842, 565, 284, 63, 374, 65, 273, 394, 2286, 12, 4071, 16, 315, 7775, 67, 14130, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 565, 284, 63, 404, 65, 273, 394, 2286, 12, 4071, 16, 315, 7775, 67, 55, 10390, 3113, 277, 58, 22483, 19105, 16, 3847, 1769, 565, 284, 63, 576, 65, 273, 394, 2286, 12, 2 ]
if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; if ((int) optInTimePeriod == (Integer.MIN_VALUE )) optInTimePeriod = 10; else if (((int) optInTimePeriod < 1) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; if (startIdx < optInTimePeriod) startIdx = optInTimePeriod;
int inIdx, outIdx, trailingIdx; double tempReal;
public TA_RetCode ROCR100(int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { int inIdx, outIdx, trailingIdx; double tempReal; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; if ((int) optInTimePeriod == (Integer.MIN_VALUE )) optInTimePeriod = 10; else if (((int) optInTimePeriod < 1) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; if (startIdx < optInTimePeriod) startIdx = optInTimePeriod; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } outIdx = 0; inIdx = startIdx; trailingIdx = startIdx - optInTimePeriod; while (inIdx <= endIdx) { tempReal = inReal[trailingIdx++]; if (tempReal != 0.0) outReal[outIdx++] = (inReal[inIdx] / tempReal) * 100.0; else outReal[outIdx++] = 0.0; inIdx++; } outNbElement.value = outIdx; outBegIdx.value = startIdx; return TA_RetCode.TA_SUCCESS; }
51465 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51465/cf65b93eedaca922be2993fe424b023f73c7562d/Core.java/buggy/trunk/ta-lib/java/src/TA/Lib/Core.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 399, 37, 67, 7055, 1085, 6525, 5093, 6625, 12, 474, 27108, 16, 509, 679, 4223, 16, 1645, 316, 6955, 63, 6487, 1082, 202, 474, 2153, 382, 26540, 16, 490, 4522, 596, 24059, 4223, 16, 490, 4522, 596, 22816, 1046, 16, 1082, 202, 9056, 29205, 63, 5717, 288, 202, 202, 474, 316, 4223, 16, 596, 4223, 16, 7341, 4223, 31, 202, 202, 9056, 31497, 31, 202, 202, 430, 261, 1937, 4223, 411, 374, 13, 1082, 202, 2463, 399, 37, 67, 7055, 1085, 18, 9833, 67, 5069, 67, 3932, 67, 15928, 67, 7570, 67, 9199, 31, 202, 202, 430, 14015, 409, 4223, 411, 374, 13, 747, 261, 409, 4223, 411, 27108, 3719, 1082, 202, 2463, 399, 37, 67, 7055, 1085, 18, 9833, 67, 5069, 67, 3932, 67, 15928, 67, 4415, 67, 9199, 31, 202, 202, 430, 14015, 474, 13, 2153, 382, 26540, 422, 261, 4522, 18, 6236, 67, 4051, 8623, 1082, 202, 3838, 382, 26540, 273, 1728, 31, 202, 202, 12107, 309, 261, 12443, 474, 13, 2153, 382, 26540, 411, 404, 13, 9506, 202, 20081, 14015, 474, 13, 2153, 382, 26540, 405, 25259, 3719, 1082, 202, 2463, 399, 37, 67, 7055, 1085, 18, 9833, 67, 16234, 67, 8388, 31, 202, 202, 430, 261, 1937, 4223, 411, 2153, 382, 26540, 13, 1082, 202, 1937, 4223, 273, 2153, 382, 26540, 31, 202, 202, 430, 261, 1937, 4223, 405, 679, 4223, 13, 288, 1082, 202, 659, 24059, 4223, 18, 1132, 273, 374, 31, 1082, 202, 659, 22816, 1046, 18, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 399, 37, 67, 7055, 1085, 6525, 5093, 6625, 12, 474, 27108, 16, 509, 679, 4223, 16, 1645, 316, 6955, 63, 6487, 1082, 202, 474, 2153, 382, 26540, 16, 490, 4522, 596, 24059, 4223, 16, 490, 4522, 596, 22816, 1046, 16, 1082, 202, 9056, 29205, 63, 5717, 288, 202, 202, 474, 316, 4223, 16, 596, 4223, 16, 7341, 4223, 31, 202, 202, 9056, 31497, 31, 202, 202, 430, 261, 1937, 4223, 411, 374, 13, 1082, 202, 2463, 399, 37, 67, 7055, 1085, 18, 9833, 67, 5069, 67, 3932, 67, 15928, 67, 7570, 67, 9199, 31, 202, 202, 430, 14015, 409, 4223, 411, 374, 13, 747, 261, 409, 4223, 411, 27108, 3719, 1082, 202, 2463, 399, 37, 67, 2 ]
properties.clear(); }
properties.clear(); }
public void clearAllProperties(){ properties.clear(); }
5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/e4909e722f1523c0d2d11da738a69b2ea24f683e/ServiceDescription.java/clean/src/jade/domain/FIPAAgentManagement/ServiceDescription.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 29453, 2297, 1435, 95, 1377, 1790, 18, 8507, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 29453, 2297, 1435, 95, 1377, 1790, 18, 8507, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if (other instanceof RubyBignum) { return ((RubyBignum)other).compareValue(this) * -1; } else if (other instanceof RubyFloat) { double otherVal = other.getDoubleValue(); double thisVal = getDoubleValue(); return thisVal > otherVal ? 1 : thisVal < otherVal ? -1 : 0; } else { long otherVal = other.getLongValue(); return getLongValue() > otherVal ? 1 : getLongValue() < otherVal ? -1 : 0; } }
if (other instanceof RubyBignum) { return ((RubyBignum)other).compareValue(this) * -1; } else if (other instanceof RubyFloat) { double otherVal = other.getDoubleValue(); double thisVal = getDoubleValue(); return thisVal > otherVal ? 1 : thisVal < otherVal ? -1 : 0; } else { long otherVal = other.getLongValue(); return getLongValue() > otherVal ? 1 : getLongValue() < otherVal ? -1 : 0; } }
protected int compareValue(RubyNumeric other) { if (other instanceof RubyBignum) { return ((RubyBignum)other).compareValue(this) * -1; } else if (other instanceof RubyFloat) { double otherVal = other.getDoubleValue(); double thisVal = getDoubleValue(); return thisVal > otherVal ? 1 : thisVal < otherVal ? -1 : 0; } else { long otherVal = other.getLongValue(); return getLongValue() > otherVal ? 1 : getLongValue() < otherVal ? -1 : 0; } }
45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/1cc89bd397c0f049e6fa3045916fd6d9a3cdada8/RubyFixnum.java/clean/org/jruby/RubyFixnum.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 509, 3400, 620, 12, 54, 10340, 9902, 1308, 13, 288, 3639, 309, 261, 3011, 1276, 19817, 38, 724, 379, 13, 288, 5411, 327, 14015, 54, 10340, 38, 724, 379, 13, 3011, 2934, 9877, 620, 12, 2211, 13, 380, 300, 21, 31, 3639, 289, 469, 309, 261, 3011, 1276, 19817, 4723, 13, 288, 5411, 1645, 1308, 3053, 273, 1308, 18, 588, 5265, 620, 5621, 5411, 1645, 333, 3053, 273, 16097, 620, 5621, 5411, 327, 333, 3053, 405, 1308, 3053, 692, 404, 294, 333, 3053, 411, 1308, 3053, 692, 300, 21, 294, 374, 31, 3639, 289, 469, 288, 5411, 1525, 1308, 3053, 273, 1308, 18, 588, 3708, 620, 5621, 5411, 327, 11105, 620, 1435, 405, 1308, 3053, 692, 404, 294, 11105, 620, 1435, 411, 1308, 3053, 692, 300, 21, 294, 374, 31, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 509, 3400, 620, 12, 54, 10340, 9902, 1308, 13, 288, 3639, 309, 261, 3011, 1276, 19817, 38, 724, 379, 13, 288, 5411, 327, 14015, 54, 10340, 38, 724, 379, 13, 3011, 2934, 9877, 620, 12, 2211, 13, 380, 300, 21, 31, 3639, 289, 469, 309, 261, 3011, 1276, 19817, 4723, 13, 288, 5411, 1645, 1308, 3053, 273, 1308, 18, 588, 5265, 620, 5621, 5411, 1645, 333, 3053, 273, 16097, 620, 5621, 5411, 327, 333, 3053, 405, 1308, 3053, 692, 404, 294, 333, 3053, 411, 1308, 3053, 692, 300, 21, 294, 374, 31, 3639, 289, 469, 288, 5411, 1525, 1308, 3053, 273, 1308, 18, 588, 3708, 620, 5621, 5411, 327, 11105, 620, 1435, 405, 1308, 3053, 692, 404, 2 ]
_cnt59++;
_cnt60++;
public final void mMONDRIDX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = MONDRIDX; int _saveIndex; match("[#"); { int _cnt59=0; _loop59: do { if (((LA(1) >= '0' && LA(1) <= '9'))) { mDIGIT(false); } else { if ( _cnt59>=1 ) { break _loop59; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} } _cnt59++; } while (true); } match(']'); if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; }
9031 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9031/82a288b0b7137fe310abdde70cd2f81182eb9dc6/MappingLexer.java/buggy/jasperreports/src/net/sf/jasperreports/olap/mapping/MappingLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 312, 17667, 6331, 25647, 12, 6494, 389, 2640, 1345, 13, 1216, 9539, 16, 3703, 1228, 503, 16, 3155, 1228, 503, 288, 202, 202, 474, 389, 88, 723, 31, 3155, 389, 2316, 33, 2011, 31, 509, 389, 10086, 33, 955, 18, 2469, 5621, 202, 202, 67, 88, 723, 273, 30215, 6331, 25647, 31, 202, 202, 474, 389, 5688, 1016, 31, 9506, 202, 1916, 2932, 63, 7, 8863, 202, 202, 95, 202, 202, 474, 389, 13085, 6162, 33, 20, 31, 202, 202, 67, 6498, 6162, 30, 202, 202, 2896, 288, 1082, 202, 430, 261, 12443, 2534, 12, 21, 13, 1545, 296, 20, 11, 597, 2928, 12, 21, 13, 1648, 296, 29, 11, 20349, 288, 9506, 202, 81, 21243, 1285, 12, 5743, 1769, 1082, 202, 97, 1082, 202, 12107, 288, 9506, 202, 430, 261, 389, 13085, 6162, 34, 33, 21, 262, 288, 898, 389, 6498, 6162, 31, 289, 469, 288, 12849, 394, 17093, 1290, 2156, 503, 12443, 3001, 13, 2534, 12, 21, 3631, 14632, 9334, 9851, 9334, 6716, 10663, 97, 1082, 202, 97, 25083, 202, 67, 13085, 6162, 9904, 31, 202, 202, 97, 1323, 261, 3767, 1769, 202, 202, 97, 202, 202, 1916, 2668, 3864, 1769, 202, 202, 430, 261, 389, 2640, 1345, 597, 389, 2316, 631, 2011, 597, 389, 88, 723, 5, 33, 1345, 18, 22589, 262, 288, 1082, 202, 67, 2316, 273, 1221, 1345, 24899, 88, 723, 1769, 1082, 202, 67, 2316, 18, 542, 1528, 12, 2704, 514, 12, 955, 18, 588, 1892, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 312, 17667, 6331, 25647, 12, 6494, 389, 2640, 1345, 13, 1216, 9539, 16, 3703, 1228, 503, 16, 3155, 1228, 503, 288, 202, 202, 474, 389, 88, 723, 31, 3155, 389, 2316, 33, 2011, 31, 509, 389, 10086, 33, 955, 18, 2469, 5621, 202, 202, 67, 88, 723, 273, 30215, 6331, 25647, 31, 202, 202, 474, 389, 5688, 1016, 31, 9506, 202, 1916, 2932, 63, 7, 8863, 202, 202, 95, 202, 202, 474, 389, 13085, 6162, 33, 20, 31, 202, 202, 67, 6498, 6162, 30, 202, 202, 2896, 288, 1082, 202, 430, 261, 12443, 2534, 12, 21, 13, 1545, 296, 20, 11, 597, 2928, 12, 21, 13, 1648, 296, 29, 11, 20349, 288, 9506, 202, 2 ]
BPalette zoomPalette = PaletteFactory.getZoomPalette(model,topModel); topModel.addPalette(UIConstants.ZOOM_PALETTE_NAME,zoomPalette);
public void loadDataset(int datasetID) { BrowserManager manager = env.getBrowserManager(); int index; if((index = manager.hasBrowser(datasetID)) != BrowserManager.NOT_FOUND) { manager.setActiveBrowser(index); return; } DataManagementService dms = registry.getDataManagementService(); DatasetData dataset; final BrowserModel model = new BrowserModel(); model.setLayoutMethod(new NumColsLayoutMethod(8)); BrowserTopModel topModel = new BrowserTopModel(); BPalette zoomPalette = PaletteFactory.getZoomPalette(model,topModel); topModel.addPalette(UIConstants.ZOOM_PALETTE_NAME,zoomPalette); BPalette optionPalette = PaletteFactory.getOptionPalette(model,topModel); topModel.addPalette(UIConstants.OPTIONS_PALETTE_NAME,optionPalette); zoomPalette.setOffset(0,0); optionPalette.setOffset(0,75); BrowserView view = new BrowserView(model,topModel); BrowserController controller = new BrowserController(model,topModel,view); controller.setStatusView(new StatusBar()); final int browserIndex = 0; // default behavior for new browser final BrowserInternalFrame bif = new BrowserInternalFrame(controller); env.getBrowserManager().addBrowser(bif); StatusBar status = controller.getStatusView(); tf.addToDesktop(bif,TopFrame.PALETTE_LAYER); bif.setClosable(true); bif.setIconifiable(true); bif.setMaximizable(true); bif.setResizable(true); bif.show(); final int theDataset = datasetID; KillableThread retrieveThread = new KillableThread() { public void run() { addLoaderThread(bif.getController(),this); try { DataManagementService dms = registry.getDataManagementService(); DatasetData dataset = dms.retrieveDataset(theDataset); model.setDataset(dataset); if(!kill) { bif.setTitle("Image Browser: "+dataset.getName()); loadDataset(browserIndex,dataset); } else { System.err.println("killed OK"); } } catch(DSAccessException dsae) { UserNotifier notifier = registry.getUserNotifier(); notifier.notifyError("Data retrieval failure", "Unable to retrieve dataset (id = " + theDataset + ")", dsae); return; } catch(DSOutOfServiceException dsoe) { // pop up new login window (eventually caught) throw new RuntimeException(dsoe); } removeLoaderThread(bif.getController(),this); } }; retrieveThread.start(); writeStatusImmediately(status,"Loading dataset from DB..."); }
55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1262, 10656, 12, 474, 3709, 734, 13, 565, 288, 3639, 15408, 1318, 3301, 273, 1550, 18, 588, 9132, 1318, 5621, 3639, 509, 770, 31, 3639, 309, 12443, 1615, 273, 3301, 18, 5332, 9132, 12, 8682, 734, 3719, 5411, 480, 15408, 1318, 18, 4400, 67, 9294, 13, 3639, 288, 5411, 3301, 18, 542, 3896, 9132, 12, 1615, 1769, 5411, 327, 31, 3639, 289, 3639, 1910, 10998, 1179, 302, 959, 273, 4023, 18, 588, 751, 10998, 1179, 5621, 3639, 10778, 751, 3709, 31, 7734, 727, 15408, 1488, 938, 273, 394, 15408, 1488, 5621, 3639, 938, 18, 542, 3744, 1305, 12, 2704, 6805, 8011, 3744, 1305, 12, 28, 10019, 3639, 15408, 3401, 1488, 1760, 1488, 273, 394, 15408, 3401, 1488, 5621, 7734, 605, 25863, 7182, 25863, 273, 453, 8786, 1733, 18, 588, 11497, 25863, 12, 2284, 16, 3669, 1488, 1769, 3639, 1760, 1488, 18, 1289, 25863, 12, 5370, 2918, 18, 62, 51, 1872, 67, 4066, 15146, 1448, 67, 1985, 16, 14932, 25863, 1769, 7734, 605, 25863, 1456, 25863, 273, 453, 8786, 1733, 18, 588, 1895, 25863, 12, 2284, 16, 3669, 1488, 1769, 3639, 1760, 1488, 18, 1289, 25863, 12, 5370, 2918, 18, 12422, 67, 4066, 15146, 1448, 67, 1985, 16, 3482, 25863, 1769, 7734, 7182, 25863, 18, 542, 2335, 12, 20, 16, 20, 1769, 3639, 1456, 25863, 18, 542, 2335, 12, 20, 16, 5877, 1769, 3639, 15408, 1767, 1476, 273, 394, 15408, 1767, 12, 2284, 16, 3669, 1488, 1769, 3639, 15408, 2933, 2596, 273, 394, 15408, 2933, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1262, 10656, 12, 474, 3709, 734, 13, 565, 288, 3639, 15408, 1318, 3301, 273, 1550, 18, 588, 9132, 1318, 5621, 3639, 509, 770, 31, 3639, 309, 12443, 1615, 273, 3301, 18, 5332, 9132, 12, 8682, 734, 3719, 5411, 480, 15408, 1318, 18, 4400, 67, 9294, 13, 3639, 288, 5411, 3301, 18, 542, 3896, 9132, 12, 1615, 1769, 5411, 327, 31, 3639, 289, 3639, 1910, 10998, 1179, 302, 959, 273, 4023, 18, 588, 751, 10998, 1179, 5621, 3639, 10778, 751, 3709, 31, 7734, 727, 15408, 1488, 938, 273, 394, 15408, 1488, 5621, 3639, 938, 18, 542, 3744, 1305, 12, 2704, 6805, 8011, 3744, 1305, 12, 28, 10019, 3639, 15408, 3401, 1488, 1760, 1488, 273, 394, 15408, 3401, 2 ]
updatedRevision = update(wcDir, SVNRevision.HEAD, true);
update(wcDir, SVNRevision.HEAD, true);
public static void main(String[] args) { /* * Default values: */ /* * Assuming that 'svn://localhost/testRep' is an existing * repository path * SVNURL is a wrapper for URL strings that refer to repository locations. */ SVNURL repositoryURL = null; try { repositoryURL = SVNURL.parseURIEncoded("svn://localhost/testRep"); } catch (SVNException e) { } String name = "userName"; String password = "userPassword"; String myWorkingCopyPath = "/MyWorkingCopy"; String importDir = "/importDir"; String importFile = importDir + "/importFile.txt"; String importFileText = "This unversioned file is imported into a repository"; String newDir = "/newDir"; String newFile = newDir + "/newFile.txt"; String fileText = "This is a new file added to the working copy"; if (args != null) { /* * Obtains a URL that represents an already existing repository */ try { repositoryURL = (args.length >= 1) ? SVNURL.parseURIEncoded(args[0]) : repositoryURL; } catch (SVNException e) { System.err.println("'" + args[0] + "' is not valid URL"); System.exit(1); } /* * Obtains a path to be a working copy root directory */ myWorkingCopyPath = (args.length >= 2) ? args[1] : myWorkingCopyPath; /* * Obtains an account name */ name = (args.length >= 3) ? args[2] : name; /* * Obtains a password */ password = (args.length >= 4) ? args[3] : password; } /* * That's where a new directory will be created */ SVNURL url = repositoryURL.appendPath("MyRepos", false); /* * That's where '/MyRepos' will be copied to (branched) */ SVNURL copyURL = repositoryURL.appendPath("MyReposCopy", false); /* * That's where a local directory will be imported into. * Note that it's not necessary that the '/importDir' directory must already * exist - the SVN repository will take care of creating it. */ SVNURL importToURL = url.appendPath(importDir, false); /* * Initializes the library (it must be done before ever using the * library itself) */ setupLibrary(); myCommitEventHandler = new CommitEventHandler(); myUpdateEventHandler = new UpdateEventHandler(); myWCEventHandler = new WCEventHandler(); /* * Creates default run-time configuration options. Default options created * in this way use the Subversion run-time configuration area (for instance, * on Windows platform it can be found in the * 'Documents and Settings\UserName\%APPDATA%\Subversion directory). * * readonly = true - not to save any configuration changes that can be done * during the program run to a config file (config settings will only * be read to initialize; to enable changes the readonly flag should be set * to false). * * SVNWCUtil is a utility class that creates default options. */ ISVNOptions options = SVNWCUtil.createDefaultOptions(true); /* * Creates an instance of SVNClientManager providing authentication * information (name, password) and run-time configuration options */ ourClientManager = SVNClientManager.newInstance(options, name, password); /* * Sets a custom event handler for operations handled by an SVNCommitClient * instance */ ourClientManager.getCommitClient().setEventHandler(myCommitEventHandler); /* * Sets a custom event handler for operations handled by an SVNUpdateClient * instance */ ourClientManager.getUpdateClient().setEventHandler(myUpdateEventHandler); /* * Sets a custom event handler for operations handled by an SVNWCClient * instance */ ourClientManager.getWCClient().setEventHandler(myWCEventHandler); long committedRevision = -1; System.out.println("Making a new directory at '" + url + "'..."); try{ /* * creating a new version comtrolled directory in a repository and * displaying what revision the repository was committed to */ committedRevision = makeDirectory(url, "making a new directory at '" + url + "'").getNewRevision(); }catch(SVNException svne){ error("error while making a new directory at '" + url + "'", svne); } System.out.println("Committed to revision " + committedRevision); System.out.println(); File anImportDir = new File(importDir); File anImportFile = new File(anImportDir, SVNPathUtil.tail(importFile)); /* * creating a new local directory - "./importDir" and a new file - * "./importDir/importFile.txt" that will be imported into the repository * (into the '/MyRepos/importDir' directory) */ createLocalDir(anImportDir, new File[]{anImportFile}, new String[]{importFileText}); System.out.println("Importing a new directory into '" + importToURL + "'..."); try{ /* * recursively importing an unversioned directory into a repository * and displaying what revision the repository was committed to */ boolean isRecursive = true; committedRevision = importDirectory(anImportDir, importToURL, "importing a new directory '" + anImportDir.getAbsolutePath() + "'", isRecursive).getNewRevision(); }catch(SVNException svne){ error("error while importing a new directory '" + anImportDir.getAbsolutePath() + "' into '" + importToURL + "'", svne); } System.out.println("Committed to revision " + committedRevision); System.out.println(); /* * creates a local directory where the working copy will be checked out into */ File wcDir = new File(myWorkingCopyPath); if (wcDir.exists()) { error("the destination directory '" + wcDir.getAbsolutePath() + "' already exists!", null); } wcDir.mkdirs(); System.out.println("Checking out a working copy from '" + url + "'..."); long checkoutRevision = -1; try { /* * recursively checking out a working copy from url into wcDir, * SVNRevision.HEAD means the latest revision to be checked out */ checkoutRevision = checkout(url, SVNRevision.HEAD, wcDir, true); } catch (SVNException svne) { error("error while checking out a working copy for the location '" + url + "'", svne); } System.out.println(); /* * recursively displaying info for wcDir at the current working revision * in the manner of 'svn info -R' command */ try { showInfo(wcDir, SVNRevision.WORKING, true); } catch (SVNException svne) { error("error while recursively getting info for the working copy at'" + wcDir.getAbsolutePath() + "'", svne); } System.out.println(); File aNewDir = new File(wcDir, newDir); File aNewFile = new File(aNewDir, SVNPathUtil.tail(newFile)); /* * creating a new local directory - "wcDir/newDir" and a new file - * "/MyWorkspace/newDir/newFile.txt" */ createLocalDir(aNewDir, new File[]{aNewFile}, new String[]{fileText}); System.out.println("Recursively scheduling a new directory '" + aNewDir.getAbsolutePath() + "' for addition..."); try { /* * recursively scheduling aNewDir for addition */ addEntry(aNewDir); } catch (SVNException svne) { error("error while recursively adding the directory '" + aNewDir.getAbsolutePath() + "'", svne); } System.out.println(); boolean isRecursive = true; boolean isRemote = true; boolean isReportAll = false; boolean isIncludeIgnored = true; boolean isCollectParentExternals = false; System.out.println("Status for '" + wcDir.getAbsolutePath() + "':"); try { /* * status will be recursive on wcDir, will also cover the repository, * won't cover unmodified entries, will disregard * svn:ignore property ignores (if any), will ignore externals definitions * (anyway this program doesn't deal with externals;)) */ showStatus(wcDir, isRecursive, isRemote, isReportAll, isIncludeIgnored, isCollectParentExternals); } catch (SVNException svne) { error("error while recursively performing status for '" + wcDir.getAbsolutePath() + "'", svne); } System.out.println(); System.out.println("Updating '" + wcDir.getAbsolutePath() + "'..."); long updatedRevision = -1; try { /* * recursively updates wcDir to the latest revision (SVNRevision.HEAD); * it's useful to do in real life as a working copy may contain out * of date entries:) */ updatedRevision = update(wcDir, SVNRevision.HEAD, true); } catch (SVNException svne) { error("error while recursively updating the working copy at '" + wcDir.getAbsolutePath() + "'", svne); } System.out.println(); System.out.println("Committing changes for '" + wcDir.getAbsolutePath() + "'..."); try { /* * commiting changes in wcDir to the repository with not saving items * locked (if any) after the commit succeeds; this will add aNewDir & * aNewFile to the repository. */ committedRevision = commit(wcDir, false, "'/newDir' with '/newDir/newFile.txt' were added") .getNewRevision(); } catch (SVNException svne) { error("error while committing changes to the working copy at '" + wcDir.getAbsolutePath() + "'", svne); } System.out.println("Committed to revision " + committedRevision); System.out.println(); System.out .println("Locking (with stealing if the entry is already locked) '" + aNewFile.getAbsolutePath() + "'."); try { /* * locking aNewFile with stealing (if it has been already locked by someone * else) and a lock comment */ lock(aNewFile, true, "locking '/newDir/newFile.txt'"); } catch (SVNException svne) { error("error while locking the working copy file '" + aNewFile.getAbsolutePath() + "'", svne); } System.out.println(); System.out.println("Status for '" + wcDir.getAbsolutePath() + "':"); try { /* * displaying status once again to see the file is really locked */ showStatus(wcDir, isRecursive, isRemote, isReportAll, isIncludeIgnored, isCollectParentExternals); } catch (SVNException svne) { error("error while recursively performing status for '" + wcDir.getAbsolutePath() + "'", svne); } System.out.println(); System.out.println("Copying '" + url + "' to '" + copyURL + "'..."); try { /* * making a branch of url at copyURL - that is URL->URL copying * with history; not moving url, only copying; * * checkoutRevision is to concretize url */ committedRevision = copy(url, SVNRevision.create(checkoutRevision), copyURL, false, "remotely copying '" + url + "' to '" + copyURL + "'") .getNewRevision(); } catch (SVNException svne) { error("error while copying '" + url + "' to '" + copyURL + "'", svne); } /* * displaying what revision the repository was committed to */ System.out.println("Committed to revision " + committedRevision); System.out.println(); System.out.println("Switching '" + wcDir.getAbsolutePath() + "' to '" + copyURL + "'..."); try { /* * recursively switching wcDir to copyURL to the latest revision * (SVNRevision.HEAD) */ updatedRevision = switchToURL(wcDir, copyURL, SVNRevision.HEAD, true); } catch (SVNException svne) { error("error while switching '" + wcDir.getAbsolutePath() + "' to '" + copyURL + "'", svne); } System.out.println(); /* * recursively displaying info for the working copy once again to see * it was really switched to a new URL */ try { showInfo(wcDir, SVNRevision.WORKING, true); } catch (SVNException svne) { error("error while recursively getting info for the working copy at'" + wcDir.getAbsolutePath() + "'", svne); } System.out.println(); System.out.println("Scheduling '" + aNewDir.getAbsolutePath() + "' for deletion ..."); try { /* * forcing aNewDir to be scheduled for deletion */ delete(aNewDir, true); } catch (SVNException svne) { error("error while schediling '" + wcDir.getAbsolutePath() + "' for deletion", svne); } System.out.println(); System.out.println("Status for '" + wcDir.getAbsolutePath() + "':"); try { /* * recursively displaying status once more to see whether aNewDir * was really scheduled for deletion */ showStatus(wcDir, isRecursive, isRemote, isReportAll, isIncludeIgnored, isCollectParentExternals); } catch (SVNException svne) { error("error while recursively performing status for '" + wcDir.getAbsolutePath() + "'", svne); } System.out.println(); System.out.println("Committing changes for '" + wcDir.getAbsolutePath() + "'..."); try { /* * lastly committing changes in wcDir to the repository; all items that * were locked by the user (if any) will be unlocked after the commit * succeeds; this commit will remove aNewDir from the repository. */ committedRevision = commit( wcDir, false, "deleting '" + aNewDir.getAbsolutePath() + "' from the filesystem as well as from the repository").getNewRevision(); } catch (SVNException svne) { error("error while committing changes to the working copy '" + wcDir.getAbsolutePath() + "'", svne); } System.out.println("Committed to revision " + committedRevision); System.exit(0); }
5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/3923f5416342d8fbfe28509bee38b5bd27c711aa/WorkingCopy.java/clean/doc/examples/src/org/tmatesoft/svn/examples/wc/WorkingCopy.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 3639, 1748, 540, 380, 2989, 924, 30, 540, 1195, 3639, 1748, 540, 380, 4725, 21249, 716, 296, 31505, 2207, 13014, 19, 3813, 18933, 11, 353, 392, 2062, 1850, 380, 3352, 589, 540, 380, 29537, 50, 1785, 353, 279, 4053, 364, 1976, 2064, 716, 8884, 358, 3352, 7838, 18, 540, 1195, 3639, 29537, 50, 1785, 3352, 1785, 273, 446, 31, 3639, 775, 288, 5411, 3352, 1785, 273, 29537, 50, 1785, 18, 2670, 3098, 10397, 2932, 31505, 2207, 13014, 19, 3813, 18933, 8863, 3639, 289, 1044, 261, 23927, 50, 503, 425, 13, 288, 3639, 289, 3639, 514, 508, 273, 315, 1355, 461, 14432, 3639, 514, 2201, 273, 315, 1355, 3913, 14432, 3639, 514, 3399, 14836, 2951, 743, 273, 2206, 12062, 14836, 2951, 14432, 3639, 514, 1930, 1621, 273, 2206, 5666, 1621, 14432, 3639, 514, 1930, 812, 273, 1930, 1621, 397, 2206, 5666, 812, 18, 5830, 14432, 3639, 514, 1930, 812, 1528, 273, 315, 2503, 29645, 585, 353, 9101, 1368, 279, 3352, 14432, 7734, 514, 394, 1621, 273, 2206, 2704, 1621, 14432, 3639, 514, 20592, 273, 394, 1621, 397, 2206, 2704, 812, 18, 5830, 14432, 3639, 514, 585, 1528, 273, 315, 2503, 353, 279, 394, 585, 3096, 358, 326, 5960, 1610, 14432, 3639, 309, 261, 1968, 480, 446, 13, 288, 5411, 1748, 2398, 380, 19659, 16598, 279, 1976, 716, 8686, 392, 1818, 2062, 3352, 2398, 1195, 5411, 775, 288, 7734, 3352, 1785, 273, 261, 1968, 18, 2469, 1545, 404, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 3639, 1748, 540, 380, 2989, 924, 30, 540, 1195, 3639, 1748, 540, 380, 4725, 21249, 716, 296, 31505, 2207, 13014, 19, 3813, 18933, 11, 353, 392, 2062, 1850, 380, 3352, 589, 540, 380, 29537, 50, 1785, 353, 279, 4053, 364, 1976, 2064, 716, 8884, 358, 3352, 7838, 18, 540, 1195, 3639, 29537, 50, 1785, 3352, 1785, 273, 446, 31, 3639, 775, 288, 5411, 3352, 1785, 273, 29537, 50, 1785, 18, 2670, 3098, 10397, 2932, 31505, 2207, 13014, 19, 3813, 18933, 8863, 3639, 289, 1044, 261, 23927, 50, 503, 425, 13, 288, 3639, 289, 3639, 514, 508, 273, 315, 1355, 461, 14432, 3639, 514, 2201, 273, 315, 1355, 3913, 2 ]
}
public void dispose() { if (dropDownMenuMgr != null) { dropDownMenuMgr.dispose(); dropDownMenuMgr = null; }}
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/89367d793e5e563c84ffe78274bc12ad95dd473c/NewWizardDropDownAction.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NewWizardDropDownAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 15825, 1435, 288, 202, 430, 261, 7285, 4164, 4599, 9455, 480, 446, 13, 288, 202, 202, 7285, 4164, 4599, 9455, 18, 2251, 4150, 5621, 202, 202, 7285, 4164, 4599, 9455, 273, 446, 31, 202, 9090, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 15825, 1435, 288, 202, 430, 261, 7285, 4164, 4599, 9455, 480, 446, 13, 288, 202, 202, 7285, 4164, 4599, 9455, 18, 2251, 4150, 5621, 202, 202, 7285, 4164, 4599, 9455, 273, 446, 31, 202, 9090, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
case 8: c=s.charAt(0); if (c=='f') { X="fontsize";id=Id_fontsize; } else if (c=='t') { X="toString";id=Id_toString; }
case 8: c=s.charAt(4); if (c=='r') { X="toString";id=Id_toString; } else if (c=='s') { X="fontsize";id=Id_fontsize; } else if (c=='u') { X="toSource";id=Id_toSource; }
private static int toPrototypeId(String s) { int id;// #generated# Last update: 2001-04-23 12:50:07 GMT+02:00 L0: { id = 0; String X = null; int c; L: switch (s.length()) { case 3: c=s.charAt(2); if (c=='b') { if (s.charAt(0)=='s' && s.charAt(1)=='u') {id=Id_sub; break L0;} } else if (c=='g') { if (s.charAt(0)=='b' && s.charAt(1)=='i') {id=Id_big; break L0;} } else if (c=='p') { if (s.charAt(0)=='s' && s.charAt(1)=='u') {id=Id_sup; break L0;} } break L; case 4: c=s.charAt(0); if (c=='b') { X="bold";id=Id_bold; } else if (c=='l') { X="link";id=Id_link; } break L; case 5: switch (s.charAt(4)) { case 'd': X="fixed";id=Id_fixed; break L; case 'e': X="slice";id=Id_slice; break L; case 'h': X="match";id=Id_match; break L; case 'k': X="blink";id=Id_blink; break L; case 'l': X="small";id=Id_small; break L; case 't': X="split";id=Id_split; break L; } break L; case 6: switch (s.charAt(1)) { case 'e': c=s.charAt(0); if (c=='l') { X="length";id=Id_length; } else if (c=='s') { X="search";id=Id_search; } break L; case 'h': X="charAt";id=Id_charAt; break L; case 'n': X="anchor";id=Id_anchor; break L; case 'o': X="concat";id=Id_concat; break L; case 'q': X="equals";id=Id_equals; break L; case 't': X="strike";id=Id_strike; break L; case 'u': X="substr";id=Id_substr; break L; } break L; case 7: switch (s.charAt(1)) { case 'a': X="valueOf";id=Id_valueOf; break L; case 'e': X="replace";id=Id_replace; break L; case 'n': X="indexOf";id=Id_indexOf; break L; case 't': X="italics";id=Id_italics; break L; } break L; case 8: c=s.charAt(0); if (c=='f') { X="fontsize";id=Id_fontsize; } else if (c=='t') { X="toString";id=Id_toString; } break L; case 9: c=s.charAt(0); if (c=='f') { X="fontcolor";id=Id_fontcolor; } else if (c=='s') { X="substring";id=Id_substring; } break L; case 10: X="charCodeAt";id=Id_charCodeAt; break L; case 11: switch (s.charAt(2)) { case 'L': X="toLowerCase";id=Id_toLowerCase; break L; case 'U': X="toUpperCase";id=Id_toUpperCase; break L; case 'n': X="constructor";id=Id_constructor; break L; case 's': X="lastIndexOf";id=Id_lastIndexOf; break L; } break L; case 16: X="equalsIgnoreCase";id=Id_equalsIgnoreCase; break L; } if (X!=null && X!=s && !X.equals(s)) id = 0; }// #/generated# return id; }
47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/46abef99b96acbce8fc70d1fda52378933e3d9c8/NativeString.java/buggy/js/rhino/src/org/mozilla/javascript/NativeString.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 509, 358, 15846, 548, 12, 780, 272, 13, 565, 288, 3639, 509, 612, 31, 759, 468, 11168, 7, 6825, 1089, 30, 4044, 21, 17, 3028, 17, 4366, 2593, 30, 3361, 30, 8642, 21706, 15, 3103, 30, 713, 3639, 511, 20, 30, 288, 612, 273, 374, 31, 514, 1139, 273, 446, 31, 509, 276, 31, 5411, 511, 30, 1620, 261, 87, 18, 2469, 10756, 288, 5411, 648, 890, 30, 276, 33, 87, 18, 3001, 861, 12, 22, 1769, 7734, 309, 261, 71, 18920, 70, 6134, 288, 309, 261, 87, 18, 3001, 861, 12, 20, 13, 18920, 87, 11, 597, 272, 18, 3001, 861, 12, 21, 13, 18920, 89, 6134, 288, 350, 33, 548, 67, 1717, 31, 898, 511, 20, 31, 97, 289, 7734, 469, 309, 261, 71, 18920, 75, 6134, 288, 309, 261, 87, 18, 3001, 861, 12, 20, 13, 18920, 70, 11, 597, 272, 18, 3001, 861, 12, 21, 13, 18920, 77, 6134, 288, 350, 33, 548, 67, 14002, 31, 898, 511, 20, 31, 97, 289, 7734, 469, 309, 261, 71, 18920, 84, 6134, 288, 309, 261, 87, 18, 3001, 861, 12, 20, 13, 18920, 87, 11, 597, 272, 18, 3001, 861, 12, 21, 13, 18920, 89, 6134, 288, 350, 33, 548, 67, 2859, 31, 898, 511, 20, 31, 97, 289, 7734, 898, 511, 31, 5411, 648, 1059, 30, 276, 33, 87, 18, 3001, 861, 12, 20, 1769, 7734, 309, 261, 71, 18920, 70, 6134, 288, 1139, 1546, 16390, 14432, 350, 33, 548, 67, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 509, 358, 15846, 548, 12, 780, 272, 13, 565, 288, 3639, 509, 612, 31, 759, 468, 11168, 7, 6825, 1089, 30, 4044, 21, 17, 3028, 17, 4366, 2593, 30, 3361, 30, 8642, 21706, 15, 3103, 30, 713, 3639, 511, 20, 30, 288, 612, 273, 374, 31, 514, 1139, 273, 446, 31, 509, 276, 31, 5411, 511, 30, 1620, 261, 87, 18, 2469, 10756, 288, 5411, 648, 890, 30, 276, 33, 87, 18, 3001, 861, 12, 22, 1769, 7734, 309, 261, 71, 18920, 70, 6134, 288, 309, 261, 87, 18, 3001, 861, 12, 20, 13, 18920, 87, 11, 597, 272, 18, 3001, 861, 12, 21, 13, 18920, 89, 6134, 288, 350, 33, 548, 67, 1717, 31, 898, 2 ]
static public String generateConstraintEnrichedDocComment(
public String generateConstraintEnrichedDocComment(
static public String generateConstraintEnrichedDocComment( MModelElement me, boolean documented, String indent) { // Retrieve any existing doccomment String s = (VERBOSE_DOCS || DocumentationManager.hasDocs(me)) ? DocumentationManager.getDocs(me, indent) : null; StringBuffer sDocComment = new StringBuffer(80); if (s != null && s.trim().length() > 0) { sDocComment.append(s).append(LINE_SEPARATOR); } if (!documented) return sDocComment.toString(); // Extract constraints Collection cConstraints = me.getConstraints(); if (cConstraints.size() == 0) { return sDocComment.toString(); } // Prepare doccomment if (s != null) { // Just remove closing */ s = sDocComment.toString(); sDocComment = new StringBuffer(s.substring(0, s.indexOf("*/") + 1)); } else { sDocComment .append(INDENT) .append("/**").append(LINE_SEPARATOR) .append(INDENT) .append(" * ").append(LINE_SEPARATOR) .append(INDENT) .append(" *"); } // Add each constraint class TagExtractor extends tudresden.ocl.parser.analysis.DepthFirstAdapter { private LinkedList m_llsTags = new LinkedList(); private String m_sConstraintName; private int m_nConstraintID = 0; public TagExtractor(String sConstraintName) { super(); m_sConstraintName = sConstraintName; } public Iterator getTags() { return m_llsTags.iterator(); } public void caseAConstraintBody( tudresden.ocl.parser.node.AConstraintBody node) { // We don't care for anything below this node, so we do not use apply anymore. String sKind = (node.getStereotype() != null) ? (node.getStereotype().toString()) : (null); String sExpression = (node.getExpression() != null) ? (node.getExpression().toString()) : (null); String sName = (node.getName() != null) ? (node.getName().getText().toString()) : (m_sConstraintName + "_" + (m_nConstraintID++)); if ((sKind == null) || (sExpression == null)) { return; } String sTag; if (sKind.equals("inv ")) { sTag = "@invariant "; } else if (sKind.equals("post ")) { sTag = "@postcondition "; } else if (sKind.equals("pre ")) { sTag = "@precondition "; } else { return; } sTag += sName + ": " + sExpression; m_llsTags.addLast(sTag); } } tudresden.ocl.check.types.ModelFacade mf = new org.argouml.ocl.ArgoFacade(me); for (Iterator i = cConstraints.iterator(); i.hasNext();) { MConstraint mc = (MConstraint)i.next(); try { tudresden.ocl.OclTree otParsed = tudresden.ocl.OclTree.createTree( mc.getBody().getBody(), mf); TagExtractor te = new TagExtractor(mc.getName()); otParsed.apply(te); for (Iterator j = te.getTags(); j.hasNext();) { sDocComment.append(' ').append(j.next()).append( LINE_SEPARATOR).append( INDENT).append( " *"); } } catch (java.io.IOException ioe) { // Nothing to be done, should not happen anyway ;-) } } sDocComment.append("/").append(LINE_SEPARATOR); return sDocComment.toString(); }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/1ce896ad0f797771279af0ca1a1533274d877b88/GeneratorJava.java/buggy/src_new/org/argouml/language/java/generator/GeneratorJava.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2103, 5806, 664, 12761, 329, 1759, 4469, 12, 3639, 490, 1488, 1046, 1791, 16, 3639, 1250, 23051, 16, 3639, 514, 3504, 13, 288, 3639, 368, 10708, 1281, 2062, 997, 3469, 3639, 514, 272, 273, 5411, 261, 21900, 67, 3191, 4596, 747, 20495, 1318, 18, 5332, 12656, 12, 3501, 3719, 7734, 692, 20495, 1318, 18, 588, 12656, 12, 3501, 16, 3504, 13, 7734, 294, 446, 31, 3639, 6674, 272, 1759, 4469, 273, 394, 6674, 12, 3672, 1769, 3639, 309, 261, 87, 480, 446, 597, 272, 18, 5290, 7675, 2469, 1435, 405, 374, 13, 288, 5411, 272, 1759, 4469, 18, 6923, 12, 87, 2934, 6923, 12, 5997, 67, 4550, 1769, 3639, 289, 3639, 309, 16051, 5457, 329, 13, 5411, 327, 272, 1759, 4469, 18, 10492, 5621, 3639, 368, 8152, 6237, 3639, 2200, 276, 4878, 273, 1791, 18, 588, 4878, 5621, 3639, 309, 261, 71, 4878, 18, 1467, 1435, 422, 374, 13, 288, 5411, 327, 272, 1759, 4469, 18, 10492, 5621, 3639, 289, 3639, 368, 7730, 997, 3469, 3639, 309, 261, 87, 480, 446, 13, 288, 5411, 368, 12526, 1206, 7647, 1195, 5411, 272, 273, 272, 1759, 4469, 18, 10492, 5621, 5411, 272, 1759, 4469, 273, 394, 6674, 12, 87, 18, 28023, 12, 20, 16, 272, 18, 31806, 2932, 14, 4898, 13, 397, 404, 10019, 3639, 289, 469, 288, 5411, 272, 1759, 4469, 7734, 263, 6923, 12, 2356, 2222, 13, 7734, 263, 6923, 2932, 26873, 20387, 6923, 12, 5997, 67, 4550, 13, 7734, 263, 6923, 12, 2356, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2103, 5806, 664, 12761, 329, 1759, 4469, 12, 3639, 490, 1488, 1046, 1791, 16, 3639, 1250, 23051, 16, 3639, 514, 3504, 13, 288, 3639, 368, 10708, 1281, 2062, 997, 3469, 3639, 514, 272, 273, 5411, 261, 21900, 67, 3191, 4596, 747, 20495, 1318, 18, 5332, 12656, 12, 3501, 3719, 7734, 692, 20495, 1318, 18, 588, 12656, 12, 3501, 16, 3504, 13, 7734, 294, 446, 31, 3639, 6674, 272, 1759, 4469, 273, 394, 6674, 12, 3672, 1769, 3639, 309, 261, 87, 480, 446, 597, 272, 18, 5290, 7675, 2469, 1435, 405, 374, 13, 288, 5411, 272, 1759, 4469, 18, 6923, 12, 87, 2934, 6923, 12, 5997, 67, 4550, 1769, 3639, 289, 3639, 309, 16051, 5457, 329, 13, 2 ]
Object[] errArgs = { id }; String message = Context.getMessage("msg.dup.label", errArgs);
String message = Context.getMessage1( "msg.dup.label", id);
public Node transform(Node tree, Node enclosing, TokenStream ts, Scriptable scope) { loops = new Stack(); loopEnds = new Stack(); inFunction = tree.getType() == TokenStream.FUNCTION; if (!inFunction) { addVariables(tree, getVariableTable(tree)); } irFactory = createIRFactory(ts, scope); // to save against upchecks if no finally blocks are used. boolean hasFinally = false; PreorderNodeIterator iterator = tree.getPreorderIterator(); Node node; while ((node = iterator.nextNode()) != null) { int type = node.getType(); typeswitch: switch (type) { case TokenStream.FUNCTION: if (node == tree) { // Add the variables to variable table, the // parameters were added earlier. VariableTable vars = getVariableTable(tree); addVariables(tree, vars); // Add return to end if needed. Node stmts = node.getLastChild(); Node lastStmt = stmts.getLastChild(); if (lastStmt == null || lastStmt.getType() != TokenStream.RETURN) { stmts.addChildToBack(new Node(TokenStream.RETURN)); } } else { if (inFunction) { // Nested functions require activation objects. ((FunctionNode) tree).setRequiresActivation(true); } FunctionNode fnNode = (FunctionNode) node.getProp(Node.FUNCTION_PROP); addParameters(fnNode); NodeTransformer inner = newInstance(); fnNode = (FunctionNode) inner.transform(fnNode, tree, ts, scope); node.putProp(Node.FUNCTION_PROP, fnNode); Vector fns = (Vector) tree.getProp(Node.FUNCTION_PROP); if (fns == null) { fns = new Vector(7); tree.putProp(Node.FUNCTION_PROP, fns); } fns.addElement(fnNode); } break; case TokenStream.LABEL: { Node child = node.getFirstChild(); node.removeChild(child); String id = child.getString(); // check against duplicate labels... for (int i=loops.size()-1; i >= 0; i--) { Node n = (Node) loops.elementAt(i); if (n.getType() == TokenStream.LABEL) { String otherId = (String)n.getProp(Node.LABEL_PROP); if (id.equals(otherId)) { Object[] errArgs = { id }; String message = Context.getMessage("msg.dup.label", errArgs); reportMessage(Context.getContext(), message, node, tree, true, scope); break typeswitch; } } } node.putProp(Node.LABEL_PROP, id); /* Make a target and put it _after_ the following * node. And in the LABEL node, so breaks get the * right target. */ Node breakTarget = new Node(TokenStream.TARGET); Node parent = iterator.getCurrentParent(); Node next = node.getNextSibling(); while (next != null && (next.getType() == TokenStream.LABEL || next.getType() == TokenStream.TARGET)) next = next.getNextSibling(); if (next == null) break; parent.addChildAfter(breakTarget, next); node.putProp(Node.BREAK_PROP, breakTarget); if (next.getType() == TokenStream.LOOP) { node.putProp(Node.CONTINUE_PROP, next.getProp(Node.CONTINUE_PROP)); } loops.push(node); loopEnds.push(breakTarget); break; } case TokenStream.SWITCH: { Node breakTarget = new Node(TokenStream.TARGET); Node parent = iterator.getCurrentParent(); parent.addChildAfter(breakTarget, node); // make all children siblings except for selector Node sib = node; Node child = node.getFirstChild().next; while (child != null) { Node next = child.next; node.removeChild(child); parent.addChildAfter(child, sib); sib = child; child = next; } node.putProp(Node.BREAK_PROP, breakTarget); loops.push(node); loopEnds.push(breakTarget); node.putProp(Node.CASES_PROP, new Vector(13)); break; } case TokenStream.DEFAULT: case TokenStream.CASE: { Node sw = (Node) loops.peek(); if (type == TokenStream.CASE) { Vector cases = (Vector) sw.getProp(Node.CASES_PROP); cases.addElement(node); } else { sw.putProp(Node.DEFAULT_PROP, node); } break; } case TokenStream.NEWLOCAL : { Integer localCount = (Integer)(tree.getProp(Node.LOCALCOUNT_PROP)); if (localCount == null) { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(1)); } else { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(localCount.intValue() + 1)); } } break; case TokenStream.LOOP: loops.push(node); loopEnds.push(node.getProp(Node.BREAK_PROP)); break; case TokenStream.WITH: { if (inFunction) { // With statements require an activation object. ((FunctionNode) tree).setRequiresActivation(true); } loops.push(node); Node leave = node.getNextSibling(); if (leave.getType() != TokenStream.LEAVEWITH) { throw new RuntimeException("Unexpected tree"); } loopEnds.push(leave); break; } case TokenStream.TRY: { Node finallytarget = (Node)node.getProp(Node.FINALLY_PROP); if (finallytarget != null) { hasFinally = true; loops.push(node); loopEnds.push(finallytarget); } Integer localCount = (Integer)(tree.getProp(Node.LOCALCOUNT_PROP)); if (localCount == null) { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(1)); } else { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(localCount.intValue() + 1)); } break; } case TokenStream.TARGET: case TokenStream.LEAVEWITH: if (!loopEnds.empty() && loopEnds.peek() == node) { loopEnds.pop(); loops.pop(); } break; case TokenStream.RETURN: { /* If we didn't support try/finally, it wouldn't be * necessary to put LEAVEWITH nodes here... but as * we do need a series of JSR FINALLY nodes before * each RETURN, we need to ensure that each finally * block gets the correct scope... which could mean * that some LEAVEWITH nodes are necessary. */ if (!hasFinally) break; // skip the whole mess. Node parent = iterator.getCurrentParent(); for (int i=loops.size()-1; i >= 0; i--) { Node n = (Node) loops.elementAt(i); int elemtype = n.getType(); if (elemtype == TokenStream.TRY) { Node jsrnode = new Node(TokenStream.JSR); Object jsrtarget = n.getProp(Node.FINALLY_PROP); jsrnode.putProp(Node.TARGET_PROP, jsrtarget); parent.addChildBefore(jsrnode, node); } else if (elemtype == TokenStream.WITH) { parent.addChildBefore(new Node(TokenStream.LEAVEWITH), node); } } break; } case TokenStream.BREAK: case TokenStream.CONTINUE: { Node loop = null; boolean labelled = node.hasChildren(); String id = null; if (labelled) { /* get the label */ Node child = node.getFirstChild(); id = child.getString(); node.removeChild(child); } int i; Node parent = iterator.getCurrentParent(); for (i=loops.size()-1; i >= 0; i--) { Node n = (Node) loops.elementAt(i); int elemtype = n.getType(); if (elemtype == TokenStream.WITH) { parent.addChildBefore(new Node(TokenStream.LEAVEWITH), node); } else if (elemtype == TokenStream.TRY) { Node jsrFinally = new Node(TokenStream.JSR); Object jsrTarget = n.getProp(Node.FINALLY_PROP); jsrFinally.putProp(Node.TARGET_PROP, jsrTarget); parent.addChildBefore(jsrFinally, node); } else if (!labelled && (elemtype == TokenStream.LOOP || (elemtype == TokenStream.SWITCH && type == TokenStream.BREAK))) { /* if it's a simple break/continue, break from the * nearest enclosing loop or switch */ loop = n; break; } else if (labelled && elemtype == TokenStream.LABEL && id.equals((String)n.getProp(Node.LABEL_PROP))) { loop = n; break; } } int propType = type == TokenStream.BREAK ? Node.BREAK_PROP : Node.CONTINUE_PROP; Node target = loop == null ? null : (Node) loop.getProp(propType); if (loop == null || target == null) { String message; if (!labelled) { // didn't find an appropriate target if (type == TokenStream.CONTINUE) { message = Context.getMessage ("msg.continue.outside", null); } else { message = Context.getMessage ("msg.bad.break", null); } } else if (loop != null) { message = Context.getMessage("msg.continue.nonloop", null); } else { Object[] errArgs = { id }; message = Context.getMessage ("msg.undef.label", errArgs); } reportMessage(Context.getContext(), message, node, tree, true, scope); node.setType(TokenStream.NOP); break; } node.setType(TokenStream.GOTO); node.putProp(Node.TARGET_PROP, target); break; } case TokenStream.CALL: if (isSpecialCallName(tree, node)) node.putProp(Node.SPECIALCALL_PROP, Boolean.TRUE); visitCall(node, tree); break; case TokenStream.NEW: if (isSpecialCallName(tree, node)) node.putProp(Node.SPECIALCALL_PROP, Boolean.TRUE); visitNew(node, tree); break; case TokenStream.DOT: { Node right = node.getLastChild(); right.setType(TokenStream.STRING); break; } case TokenStream.EXPRSTMT: node.setType(inFunction ? TokenStream.POP : TokenStream.POPV); break; case TokenStream.OBJECT: { Vector regexps = (Vector) tree.getProp(Node.REGEXP_PROP); if (regexps == null) { regexps = new Vector(3); tree.putProp(Node.REGEXP_PROP, regexps); } regexps.addElement(node); Node n = new Node(TokenStream.OBJECT); iterator.replaceCurrent(n); n.putProp(Node.REGEXP_PROP, node); break; } case TokenStream.VAR: { ShallowNodeIterator i = node.getChildIterator(); Node result = new Node(TokenStream.BLOCK); while (i.hasMoreElements()) { Node n = i.nextNode(); if (!n.hasChildren()) continue; Node init = n.getFirstChild(); n.removeChild(init); Node asn = (Node) irFactory.createAssignment( TokenStream.NOP, n, init, null, false); Node pop = new Node(TokenStream.POP, asn, node.getDatum()); result.addChildToBack(pop); } iterator.replaceCurrent(result); break; } case TokenStream.DELPROP: case TokenStream.SETNAME: { if (!inFunction || inWithStatement()) break; Node bind = node.getFirstChild(); if (bind == null || bind.getType() != TokenStream.BINDNAME) break; String name = bind.getString(); if (name.equals("arguments")) { // use of "arguments" requires an activation object. ((FunctionNode) tree).setRequiresActivation(true); } VariableTable vars = getVariableTable(tree); if (vars.getVariable(name) != null) { if (type == TokenStream.SETNAME) { node.setType(TokenStream.SETVAR); bind.setType(TokenStream.STRING); } else { // Local variables are by definition permanent Node n = new Node(TokenStream.PRIMARY, new Integer(TokenStream.FALSE)); iterator.replaceCurrent(n); } } break; } case TokenStream.GETPROP: if (inFunction) { Node n = node.getFirstChild().getNextSibling(); String name = n == null ? "" : n.getString(); if (name.equals("arguments") || (name.equals("length") && Context.getContext().getLanguageVersion() == Context.VERSION_1_2)) { // Use of "arguments" or "length" in 1.2 requires // an activation object. ((FunctionNode) tree).setRequiresActivation(true); } } break; case TokenStream.NAME: { if (!inFunction || inWithStatement()) break; String name = node.getString(); if (name.equals("arguments")) { // Use of "arguments" requires an activation object. ((FunctionNode) tree).setRequiresActivation(true); } VariableTable vars = getVariableTable(tree); if (vars.getVariable(name) != null) { node.setType(TokenStream.GETVAR); } break; } } } return tree; }
12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/45820b15541f8822cc8d463aa50caef2201b19b4/NodeTransformer.java/clean/org/mozilla/javascript/NodeTransformer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 2510, 12, 907, 2151, 16, 2029, 16307, 16, 3155, 1228, 3742, 16, 12900, 22780, 2146, 13, 377, 288, 3639, 14075, 273, 394, 7283, 5621, 3639, 2798, 24980, 273, 394, 7283, 5621, 3639, 316, 2083, 273, 2151, 18, 588, 559, 1435, 422, 3155, 1228, 18, 7788, 31, 3639, 309, 16051, 267, 2083, 13, 288, 5411, 527, 6158, 12, 3413, 16, 13522, 1388, 12, 3413, 10019, 3639, 289, 3639, 9482, 1733, 273, 752, 7937, 1733, 12, 3428, 16, 2146, 1769, 3639, 368, 358, 1923, 5314, 731, 12366, 309, 1158, 3095, 4398, 854, 1399, 18, 3639, 1250, 711, 29987, 273, 629, 31, 3639, 2962, 1019, 907, 3198, 2775, 273, 2151, 18, 588, 1386, 1019, 3198, 5621, 3639, 2029, 756, 31, 3639, 1323, 14015, 2159, 273, 2775, 18, 4285, 907, 10756, 480, 446, 13, 288, 5411, 509, 618, 273, 756, 18, 588, 559, 5621, 1850, 1953, 30390, 30, 5411, 1620, 261, 723, 13, 288, 2868, 648, 3155, 1228, 18, 7788, 30, 7734, 309, 261, 2159, 422, 2151, 13, 288, 10792, 368, 1436, 326, 3152, 358, 2190, 1014, 16, 326, 10792, 368, 1472, 4591, 3096, 13805, 18, 10792, 7110, 1388, 4153, 273, 13522, 1388, 12, 3413, 1769, 10792, 527, 6158, 12, 3413, 16, 4153, 1769, 10792, 368, 1436, 327, 358, 679, 309, 3577, 18, 10792, 2029, 15452, 273, 756, 18, 588, 3024, 1763, 5621, 10792, 2029, 1142, 8952, 273, 15452, 18, 588, 3024, 1763, 5621, 10792, 309, 261, 2722, 8952, 422, 446, 747, 13491, 1142, 8952, 18, 588, 559, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 2510, 12, 907, 2151, 16, 2029, 16307, 16, 3155, 1228, 3742, 16, 12900, 22780, 2146, 13, 377, 288, 3639, 14075, 273, 394, 7283, 5621, 3639, 2798, 24980, 273, 394, 7283, 5621, 3639, 316, 2083, 273, 2151, 18, 588, 559, 1435, 422, 3155, 1228, 18, 7788, 31, 3639, 309, 16051, 267, 2083, 13, 288, 5411, 527, 6158, 12, 3413, 16, 13522, 1388, 12, 3413, 10019, 3639, 289, 3639, 9482, 1733, 273, 752, 7937, 1733, 12, 3428, 16, 2146, 1769, 3639, 368, 358, 1923, 5314, 731, 12366, 309, 1158, 3095, 4398, 854, 1399, 18, 3639, 1250, 711, 29987, 273, 629, 31, 3639, 2962, 1019, 907, 3198, 2775, 273, 2151, 18, 588, 1386, 1019, 3198, 5621, 3639, 2029, 756, 2 ]
{ pg_stream.SendInteger(4+4+SM_DATABASE+SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY,4); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MAJOR,2); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MINOR,2); pg_stream.Send(database.getBytes(),SM_DATABASE);
{ pg_stream.SendInteger(4+4+SM_DATABASE+SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY,4); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MAJOR,2); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MINOR,2); pg_stream.Send(database.getBytes(),SM_DATABASE);
protected void openConnection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { // Throw an exception if the user or password properties are missing // This occasionally occurs when the client uses the properties version // of getConnection(), and is a common question on the email lists if(info.getProperty("user")==null) throw new PSQLException("postgresql.con.user"); if(info.getProperty("password")==null) throw new PSQLException("postgresql.con.pass"); this_driver = d; this_url = url; PG_DATABASE = database; PG_PASSWORD = info.getProperty("password"); PG_USER = info.getProperty("user"); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; if(info.getProperty("compatible")==null) { compatible = d.getMajorVersion() + "." + d.getMinorVersion(); } else { compatible = info.getProperty("compatible"); } // Now make the initial connection try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed",e); } // Now we need to construct and send a startup packet try { // Ver 6.3 code pg_stream.SendInteger(4+4+SM_DATABASE+SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY,4); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MAJOR,2); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MINOR,2); pg_stream.Send(database.getBytes(),SM_DATABASE); // This last send includes the unused fields pg_stream.Send(PG_USER.getBytes(),SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY); // now flush the startup packets to the backend pg_stream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new SQLException(pg_stream.ReceiveString(encoding)); case 'R': // Get the type of request areq = pg_stream.ReceiveIntegerR(4); // Get the password salt if there is one if(areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst,0,2); DriverManager.println("Salt="+salt); } // now send the auth packet switch(areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: DriverManager.println("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: DriverManager.println("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: DriverManager.println("postgresql: PASSWORD"); pg_stream.SendInteger(5+PG_PASSWORD.length(),4); pg_stream.Send(PG_PASSWORD.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: DriverManager.println("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt,PG_PASSWORD); pg_stream.SendInteger(5+crypted.length(),4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth",new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while(areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed",e); } // As of protocol version 2.0, we should now receive the cancellation key and the pid int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'K': pid = pg_stream.ReceiveInteger(4); ckey = pg_stream.ReceiveInteger(4); break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(encoding)); default: throw new PSQLException("postgresql.con.setup"); } // Expect ReadyForQuery packet beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'Z': break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(encoding)); default: throw new PSQLException("postgresql.con.setup"); } firstWarning = null; // "pg_encoding_to_char(1)" will return 'EUC_JP' for a backend compiled with multibyte, // otherwise it's hardcoded to 'SQL_ASCII'. // If the backend doesn't know about multibyte we can't assume anything about the encoding // used, so we denote this with 'UNKNOWN'. final String encodingQuery = "case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"; // Set datestyle and fetch db encoding in a single call, to avoid making // more than one round trip to the backend during connection startup. java.sql.ResultSet resultSet = ExecSQL("set datestyle to 'ISO'; select version(), " + encodingQuery + ";"); if (! resultSet.next()) { throw new PSQLException("postgresql.con.failed", "failed getting backend encoding"); } String version = resultSet.getString(1); dbVersionNumber = extractVersionNumber(version); String dbEncoding = resultSet.getString(2); encoding = Encoding.getEncoding(dbEncoding, info.getProperty("charSet")); // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup firstWarning = null; PG_STATUS = CONNECTION_OK; }
46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/839b9bc0117946afd62ee385a4c8a36c01b3053b/Connection.java/buggy/src/interfaces/jdbc/org/postgresql/Connection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 24982, 12, 780, 1479, 16, 509, 1756, 16, 6183, 1123, 16, 514, 2063, 16, 514, 880, 16, 9396, 302, 13, 1216, 6483, 565, 288, 565, 368, 3743, 392, 1520, 309, 326, 729, 578, 2201, 1790, 854, 3315, 565, 368, 1220, 9145, 345, 285, 1230, 9938, 1347, 326, 1004, 4692, 326, 1790, 1177, 565, 368, 434, 6742, 9334, 471, 353, 279, 2975, 5073, 603, 326, 2699, 6035, 565, 309, 12, 1376, 18, 588, 1396, 2932, 1355, 7923, 631, 2011, 13, 1377, 604, 394, 453, 23116, 2932, 2767, 24330, 18, 591, 18, 1355, 8863, 565, 309, 12, 1376, 18, 588, 1396, 2932, 3664, 7923, 631, 2011, 13, 1377, 604, 394, 453, 23116, 2932, 2767, 24330, 18, 591, 18, 5466, 8863, 565, 333, 67, 7407, 273, 302, 31, 565, 333, 67, 718, 273, 880, 31, 565, 22116, 67, 22366, 273, 2063, 31, 565, 22116, 67, 13784, 273, 1123, 18, 588, 1396, 2932, 3664, 8863, 565, 22116, 67, 4714, 273, 1123, 18, 588, 1396, 2932, 1355, 8863, 565, 22116, 67, 6354, 273, 1756, 31, 565, 22116, 67, 8908, 273, 1479, 31, 565, 22116, 67, 8608, 273, 20695, 67, 16234, 31, 565, 309, 12, 1376, 18, 588, 1396, 2932, 10943, 7923, 631, 2011, 13, 288, 1377, 7318, 273, 302, 18, 588, 17581, 1444, 1435, 397, 4585, 397, 302, 18, 588, 19549, 1444, 5621, 565, 289, 469, 288, 1377, 7318, 273, 1123, 18, 588, 1396, 2932, 10943, 8863, 565, 289, 565, 368, 4494, 1221, 326, 2172, 1459, 565, 775, 1377, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 24982, 12, 780, 1479, 16, 509, 1756, 16, 6183, 1123, 16, 514, 2063, 16, 514, 880, 16, 9396, 302, 13, 1216, 6483, 565, 288, 565, 368, 3743, 392, 1520, 309, 326, 729, 578, 2201, 1790, 854, 3315, 565, 368, 1220, 9145, 345, 285, 1230, 9938, 1347, 326, 1004, 4692, 326, 1790, 1177, 565, 368, 434, 6742, 9334, 471, 353, 279, 2975, 5073, 603, 326, 2699, 6035, 565, 309, 12, 1376, 18, 588, 1396, 2932, 1355, 7923, 631, 2011, 13, 1377, 604, 394, 453, 23116, 2932, 2767, 24330, 18, 591, 18, 1355, 8863, 565, 309, 12, 1376, 18, 588, 1396, 2932, 3664, 7923, 631, 2011, 13, 1377, 604, 394, 453, 23116, 2932, 2767, 24330, 18, 591, 18, 2 ]
match(input,ID,FOLLOW_ID_in_enum_constraint2676); match(input,18,FOLLOW_18_in_enum_constraint2678);
match(input,ID,FOLLOW_ID_in_enum_constraint2681); match(input,18,FOLLOW_18_in_enum_constraint2683);
public String enum_constraint() throws RecognitionException { String text; Token cls=null; Token en=null; text = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:991:17: ( (cls= ID '.' en= ID ) ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:991:17: (cls= ID '.' en= ID ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:991:17: (cls= ID '.' en= ID ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:991:18: cls= ID '.' en= ID { cls=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_enum_constraint2676); match(input,18,FOLLOW_18_in_enum_constraint2678); en=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_enum_constraint2682); } text = cls.getText() + "." + en.getText(); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return text; }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/12c8feffd968f958100f654d836fa3c2ee21ded8/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2792, 67, 13364, 1435, 1216, 9539, 288, 6647, 514, 977, 31, 3639, 3155, 2028, 33, 2011, 31, 3639, 3155, 570, 33, 2011, 31, 540, 202, 202, 955, 273, 446, 31, 540, 202, 3639, 775, 288, 5411, 368, 342, 8712, 19, 81, 1354, 69, 292, 19, 13582, 19, 10649, 8464, 17, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 4683, 19, 3341, 19, 12215, 19, 4936, 19, 72, 1321, 18, 75, 30, 2733, 21, 30, 4033, 30, 261, 261, 6429, 33, 1599, 2611, 570, 33, 1599, 262, 262, 5411, 368, 342, 8712, 19, 81, 1354, 69, 292, 19, 13582, 19, 10649, 8464, 17, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 4683, 19, 3341, 19, 12215, 19, 4936, 19, 72, 1321, 18, 75, 30, 2733, 21, 30, 4033, 30, 261, 6429, 33, 1599, 2611, 570, 33, 1599, 262, 5411, 288, 5411, 368, 342, 8712, 19, 81, 1354, 69, 292, 19, 13582, 19, 10649, 8464, 17, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 4683, 19, 3341, 19, 12215, 19, 4936, 19, 72, 1321, 18, 75, 30, 2733, 21, 30, 4033, 30, 261, 6429, 33, 1599, 2611, 570, 33, 1599, 262, 5411, 368, 342, 8712, 19, 81, 1354, 69, 292, 19, 13582, 19, 10649, 8464, 17, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 4683, 19, 3341, 19, 12215, 19, 4936, 19, 72, 1321, 18, 75, 30, 2733, 21, 30, 2643, 30, 2028, 33, 1599, 2611, 570, 33, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2792, 67, 13364, 1435, 1216, 9539, 288, 6647, 514, 977, 31, 3639, 3155, 2028, 33, 2011, 31, 3639, 3155, 570, 33, 2011, 31, 540, 202, 202, 955, 273, 446, 31, 540, 202, 3639, 775, 288, 5411, 368, 342, 8712, 19, 81, 1354, 69, 292, 19, 13582, 19, 10649, 8464, 17, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 4683, 19, 3341, 19, 12215, 19, 4936, 19, 72, 1321, 18, 75, 30, 2733, 21, 30, 4033, 30, 261, 261, 6429, 33, 1599, 2611, 570, 33, 1599, 262, 262, 5411, 368, 342, 8712, 19, 81, 1354, 69, 292, 19, 13582, 19, 10649, 8464, 17, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 4683, 19, 2 ]
public List subList(int fromIndex, int toIndex);
List subList(int fromIndex, int toIndex);
public List subList(int fromIndex, int toIndex);
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/b37b39a8e8ee762cc74efa7e8d06368d13147150/List.java/buggy/libraries/javalib/java/util/List.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 987, 21802, 12, 474, 15065, 16, 509, 20209, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 987, 21802, 12, 474, 15065, 16, 509, 20209, 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, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
} else if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x3c, (byte) 0x00)) { encoding = ENCODING_UCS_4_2143;
else if (tryEncoding(signature, (byte) 0xfe, (byte) 0xff)) { encoding = ENCODING_UCS_2_12; is.read(); is.read(); } else if (tryEncoding(signature, (byte) 0xff, (byte) 0xfe)) { encoding = ENCODING_UCS_2_21; is.read(); is.read(); } else if (tryEncoding(signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x3f)) { encoding = ENCODING_UCS_2_12; error("no byte-order mark for UCS-2 entity"); } else if (tryEncoding(signature, (byte) 0x3c, (byte) 0x00, (byte) 0x3f, (byte) 0x00)) { encoding = ENCODING_UCS_2_21; error("no byte-order mark for UCS-2 entity"); }
private void detectEncoding () throws SAXException, IOException { byte signature[] = new byte [4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x3c)) { // UCS-4 must begin with "<?xml" // 0x00 0x00 0x00 0x3c: UCS-4, big-endian (1234) // "UTF-32BE" encoding = ENCODING_UCS_4_1234; } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x00)) { // 0x3c 0x00 0x00 0x00: UCS-4, little-endian (4321) // "UTF-32LE" encoding = ENCODING_UCS_4_4321; } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x3c, (byte) 0x00)) { // 0x00 0x00 0x3c 0x00: UCS-4, unusual (2143) encoding = ENCODING_UCS_4_2143; } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x00)) { // 0x00 0x3c 0x00 0x00: UCS-4, unusual (3421) encoding = ENCODING_UCS_4_3412; // 00 00 fe ff UCS_4_1234 (with BOM) // ff fe 00 00 UCS_4_4321 (with BOM) } // // SECOND: two byte encodings // note ... with 1/14/2000 errata the XML spec identifies some // more "broken UTF-16" autodetection cases, with no XML decl, // which we don't handle here (that's legal too). // else if (tryEncoding (signature, (byte) 0xfe, (byte) 0xff)) { // UCS-2 with a byte-order marker. (UTF-16) // 0xfe 0xff: UCS-2, big-endian (12) encoding = ENCODING_UCS_2_12; is.read (); is.read (); } else if (tryEncoding (signature, (byte) 0xff, (byte) 0xfe)) { // UCS-2 with a byte-order marker. (UTF-16) // 0xff 0xfe: UCS-2, little-endian (21) encoding = ENCODING_UCS_2_21; is.read (); is.read (); } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x3f)) { // UTF-16BE (otherwise, malformed UTF-16) // 0x00 0x3c 0x00 0x3f: UCS-2, big-endian, no byte-order mark encoding = ENCODING_UCS_2_12; error ("no byte-order mark for UCS-2 entity"); } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00, (byte) 0x3f, (byte) 0x00)) { // UTF-16LE (otherwise, malformed UTF-16) // 0x3c 0x00 0x3f 0x00: UCS-2, little-endian, no byte-order mark encoding = ENCODING_UCS_2_21; error ("no byte-order mark for UCS-2 entity"); } // // THIRD: ASCII-derived encodings, fixed and variable lengths // else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x3f, (byte) 0x78, (byte) 0x6d)) { // ASCII derived // 0x3c 0x3f 0x78 0x6d: UTF-8 or other 8-bit markup (read ENCODING) encoding = ENCODING_UTF_8; prefetchASCIIEncodingDecl (); } else if (signature [0] == (byte) 0xef && signature [1] == (byte) 0xbb && signature [2] == (byte) 0xbf) { // 0xef 0xbb 0xbf: UTF-8 BOM (not part of document text) // this un-needed notion slipped into XML 2nd ed through a // "non-normative" erratum; now required by MSFT and UDDI, // and E22 made it normative. encoding = ENCODING_UTF_8; is.read (); is.read (); is.read (); } else { // 4c 6f a7 94 ... we don't understand EBCDIC flavors // ... but we COULD at least kick in some fixed code page // (default) UTF-8 without encoding/XML declaration encoding = ENCODING_UTF_8; } }
27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/7fb7568e63c3fe14af521de4699cb37898923ca7/XmlParser.java/buggy/libjava/gnu/xml/aelfred2/XmlParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5966, 4705, 1832, 565, 1216, 14366, 16, 1860, 565, 288, 202, 7229, 3372, 8526, 273, 394, 1160, 306, 24, 15533, 202, 759, 2720, 326, 1122, 12792, 1731, 364, 202, 759, 2059, 369, 278, 794, 18, 202, 291, 18, 3355, 261, 24, 1769, 202, 291, 18, 896, 261, 8195, 1769, 202, 291, 18, 6208, 261, 1769, 202, 759, 202, 759, 21786, 30, 225, 12792, 1160, 24118, 261, 3350, 83, 4692, 4259, 8535, 202, 759, 202, 430, 261, 698, 4705, 261, 8195, 16, 261, 7229, 13, 374, 92, 713, 16, 261, 7229, 13, 374, 92, 713, 16, 9506, 225, 261, 7229, 13, 374, 92, 713, 16, 261, 7229, 13, 374, 92, 23, 71, 3719, 288, 202, 565, 368, 587, 4596, 17, 24, 1297, 2376, 598, 20410, 2902, 6, 202, 565, 368, 374, 92, 713, 374, 92, 713, 374, 92, 713, 374, 92, 23, 71, 30, 587, 4596, 17, 24, 16, 5446, 17, 22910, 261, 28462, 13, 202, 565, 368, 315, 5159, 17, 1578, 5948, 6, 202, 565, 2688, 273, 22810, 67, 57, 4596, 67, 24, 67, 28462, 31, 202, 97, 469, 309, 261, 698, 4705, 261, 8195, 16, 261, 7229, 13, 374, 92, 23, 71, 16, 261, 7229, 13, 374, 92, 713, 16, 6862, 261, 7229, 13, 374, 92, 713, 16, 261, 7229, 13, 374, 92, 713, 3719, 288, 202, 565, 368, 374, 92, 23, 71, 374, 92, 713, 374, 92, 713, 374, 92, 713, 30, 587, 4596, 17, 24, 16, 12720, 17, 22910, 261, 24, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5966, 4705, 1832, 565, 1216, 14366, 16, 1860, 565, 288, 202, 7229, 3372, 8526, 273, 394, 1160, 306, 24, 15533, 202, 759, 2720, 326, 1122, 12792, 1731, 364, 202, 759, 2059, 369, 278, 794, 18, 202, 291, 18, 3355, 261, 24, 1769, 202, 291, 18, 896, 261, 8195, 1769, 202, 291, 18, 6208, 261, 1769, 202, 759, 202, 759, 21786, 30, 225, 12792, 1160, 24118, 261, 3350, 83, 4692, 4259, 8535, 202, 759, 202, 430, 261, 698, 4705, 261, 8195, 16, 261, 7229, 13, 374, 92, 713, 16, 261, 7229, 13, 374, 92, 713, 16, 9506, 225, 261, 7229, 13, 374, 92, 713, 16, 261, 7229, 13, 374, 92, 23, 71, 3719, 288, 202, 565, 368, 2 ]
}
private static ICHelpProvider getCHelpProvider(IConfigurationElement element){ String id = element.getAttribute(ATTRIBUTE_ID); if(id == null || "".equals(id)) //$NON-NLS-1$ return null; Map providersMap = getProvidersMap(); try{ ICHelpProvider provider = (ICHelpProvider)providersMap.get(id); if(provider == null){ provider = (ICHelpProvider)element.createExecutableExtension(CLASS); providersMap.put(id,provider); } final ICHelpProvider c = provider; // Run the initialiser the class ISafeRunnable runnable = new ISafeRunnable() { public void run() throws Exception { // Initialize c.initialize(); } public void handleException(Throwable exception) { } }; Platform.run(runnable); return provider; } catch(Exception e){ return null; } }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/3b2143318d1c10a2df37ee859de691e310705b5d/CHelpProviderDescriptor.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 467, 1792, 1992, 2249, 336, 1792, 1992, 2249, 12, 45, 1750, 1046, 930, 15329, 202, 202, 780, 612, 273, 930, 18, 588, 1499, 12, 11616, 67, 734, 1769, 202, 202, 430, 12, 350, 422, 446, 747, 1408, 18, 14963, 12, 350, 3719, 4329, 3993, 17, 5106, 17, 21, 8, 1082, 202, 2463, 446, 31, 202, 202, 863, 9165, 863, 273, 3570, 7979, 863, 5621, 202, 202, 698, 95, 1082, 202, 45, 1792, 1992, 2249, 2893, 273, 261, 45, 1792, 1992, 2249, 13, 17520, 863, 18, 588, 12, 350, 1769, 1082, 202, 430, 12, 6778, 422, 446, 15329, 9506, 202, 6778, 273, 261, 45, 1792, 1992, 2249, 13, 2956, 18, 2640, 17709, 3625, 12, 5237, 1769, 9506, 202, 17520, 863, 18, 458, 12, 350, 16, 6778, 1769, 1082, 202, 97, 1082, 202, 6385, 467, 1792, 1992, 2249, 276, 273, 2893, 31, 1082, 202, 759, 1939, 326, 2172, 15914, 326, 667, 1082, 202, 5127, 2513, 20013, 14685, 273, 394, 4437, 2513, 20013, 1435, 288, 9506, 202, 482, 918, 1086, 1435, 1216, 1185, 288, 6862, 202, 759, 9190, 6862, 202, 71, 18, 11160, 5621, 9506, 202, 97, 9506, 202, 482, 918, 20879, 12, 15155, 1520, 13, 288, 9506, 202, 97, 1082, 202, 20451, 1082, 202, 8201, 18, 2681, 12, 2681, 6914, 1769, 1082, 202, 2463, 2893, 31, 202, 202, 97, 202, 202, 14683, 12, 503, 425, 15329, 1082, 202, 2463, 446, 31, 202, 202, 97, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 467, 1792, 1992, 2249, 336, 1792, 1992, 2249, 12, 45, 1750, 1046, 930, 15329, 202, 202, 780, 612, 273, 930, 18, 588, 1499, 12, 11616, 67, 734, 1769, 202, 202, 430, 12, 350, 422, 446, 747, 1408, 18, 14963, 12, 350, 3719, 4329, 3993, 17, 5106, 17, 21, 8, 1082, 202, 2463, 446, 31, 202, 202, 863, 9165, 863, 273, 3570, 7979, 863, 5621, 202, 202, 698, 95, 1082, 202, 45, 1792, 1992, 2249, 2893, 273, 261, 45, 1792, 1992, 2249, 13, 17520, 863, 18, 588, 12, 350, 1769, 1082, 202, 430, 12, 6778, 422, 446, 15329, 9506, 202, 6778, 273, 261, 45, 1792, 1992, 2249, 13, 2956, 18, 2640, 17709, 3625, 12, 5237, 1769, 2 ]
String catalogueId = null;
String catalogueID = null;
private Attributes translateAttributes(String name, Attributes attr) { if (attr == null) { return attr; } AttributesImpl temp_attr = new AttributesImpl(attr); // Translate all attributes from i18n:attr="name1 name2 ..." // using their values as keys int i18n_attr_index = temp_attr.getIndex(I18N_NAMESPACE_URI,I18N_ATTR_ATTRIBUTE); if (i18n_attr_index == -1) { // Try the old namespace i18n_attr_index = temp_attr.getIndex(I18N_OLD_NAMESPACE_URI,I18N_ATTR_ATTRIBUTE); } if (i18n_attr_index != -1) { StringTokenizer st = new StringTokenizer(temp_attr.getValue(i18n_attr_index)); // remove the i18n:attr attribute - we don't need it anymore temp_attr.removeAttribute(i18n_attr_index); // iterate through listed attributes and translate them while (st.hasMoreElements()) { String attr_name = st.nextToken(); int attr_index = temp_attr.getIndex(attr_name); if (attr_index != -1) { String text2translate = temp_attr.getValue(attr_index); // check if the text2translate contains a colon, if so the text before // the colon denotes a catalogue id int colonPos = text2translate.indexOf(":"); String catalogueId = null; if (colonPos != -1) { catalogueId = text2translate.substring(0, colonPos); text2translate = text2translate.substring(colonPos + 1, text2translate.length()); } String result = getString(text2translate, catalogueId, (untranslated == null) ? text2translate : untranslated); // set the translated value if (result != null) { temp_attr.setValue(attr_index, result); } else { getLogger().warn("translation not found for attribute " + attr_name + " in element: " + name); } } else { getLogger().warn("i18n attribute '" + attr_name + "' not found in element: " + name); } } return temp_attr; } // nothing to translate, just return return attr; }
46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/42f934e1b34d65b4b4d5d33391c9a2c8a5c48360/I18nTransformer.java/buggy/src/java/org/apache/cocoon/transformation/I18nTransformer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 9055, 4204, 2498, 12, 780, 508, 16, 9055, 1604, 13, 288, 3639, 309, 261, 1747, 422, 446, 13, 288, 5411, 327, 1604, 31, 3639, 289, 3639, 9055, 2828, 1906, 67, 1747, 273, 394, 9055, 2828, 12, 1747, 1769, 3639, 368, 16820, 777, 1677, 628, 277, 2643, 82, 30, 1747, 1546, 529, 21, 508, 22, 18483, 3639, 368, 1450, 3675, 924, 487, 1311, 3639, 509, 277, 2643, 82, 67, 1747, 67, 1615, 273, 1906, 67, 1747, 18, 588, 1016, 12, 45, 2643, 50, 67, 11368, 67, 3098, 16, 45, 2643, 50, 67, 12043, 67, 11616, 1769, 3639, 309, 261, 77, 2643, 82, 67, 1747, 67, 1615, 422, 300, 21, 13, 288, 5411, 368, 6161, 326, 1592, 1981, 5411, 277, 2643, 82, 67, 1747, 67, 1615, 273, 1906, 67, 1747, 18, 588, 1016, 12, 45, 2643, 50, 67, 11846, 67, 11368, 67, 3098, 16, 45, 2643, 50, 67, 12043, 67, 11616, 1769, 3639, 289, 3639, 309, 261, 77, 2643, 82, 67, 1747, 67, 1615, 480, 300, 21, 13, 288, 5411, 16370, 384, 273, 10792, 394, 16370, 12, 5814, 67, 1747, 18, 24805, 12, 77, 2643, 82, 67, 1747, 67, 1615, 10019, 5411, 368, 1206, 326, 277, 2643, 82, 30, 1747, 1566, 300, 732, 2727, 1404, 1608, 518, 16828, 5411, 1906, 67, 1747, 18, 4479, 1499, 12, 77, 2643, 82, 67, 1747, 67, 1615, 1769, 5411, 368, 7401, 3059, 12889, 1677, 471, 4204, 2182, 5411, 1323, 261, 334, 18, 5332, 7417, 3471, 10756, 288, 7734, 514, 1604, 67, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 9055, 4204, 2498, 12, 780, 508, 16, 9055, 1604, 13, 288, 3639, 309, 261, 1747, 422, 446, 13, 288, 5411, 327, 1604, 31, 3639, 289, 3639, 9055, 2828, 1906, 67, 1747, 273, 394, 9055, 2828, 12, 1747, 1769, 3639, 368, 16820, 777, 1677, 628, 277, 2643, 82, 30, 1747, 1546, 529, 21, 508, 22, 18483, 3639, 368, 1450, 3675, 924, 487, 1311, 3639, 509, 277, 2643, 82, 67, 1747, 67, 1615, 273, 1906, 67, 1747, 18, 588, 1016, 12, 45, 2643, 50, 67, 11368, 67, 3098, 16, 45, 2643, 50, 67, 12043, 67, 11616, 1769, 3639, 309, 261, 77, 2643, 82, 67, 1747, 67, 1615, 422, 300, 21, 13, 288, 5411, 368, 6161, 326, 1592, 1981, 5411, 2 ]