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 |
|---|---|---|---|---|---|---|
for (int i = 0; i < javaLibPaths.size(); i++) { | String [] libPaths = ProxyLaunchSupport.convertURLsToStrings((URL[]) javaLibPaths.toArray(new URL[javaLibPaths.size()])); for (int i = 0; i < libPaths.length; i++) { | public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor pm) throws CoreException { String launchKey = configuration.getAttribute(IProxyConstants.ATTRIBUTE_LAUNCH_KEY, (String) null); if (launchKey == null) abort(ProxyRemoteMessages.getString("ProxyRemoteNoLaunchKey"), null, 0); //$NON-NLS-1$ // In Eclipse, even if private, a launch will show up in the debug process tree and in the console viewer. // To be absolutely private, we need to remove the launch which has already been added. if (ProxyLaunchSupport.ATTR_PRIVATE != null && configuration.getAttribute(ProxyLaunchSupport.ATTR_PRIVATE, false)) DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch); if (pm == null) { pm = new NullProgressMonitor(); } IJavaProject project = getJavaProject(configuration); String name = configuration.getAttribute(IProxyConstants.ATTRIBUTE_VM_TITLE, (String) null); if (name == null) name = MessageFormat.format(ProxyRemoteMessages.getString("ProxyRemoteVMName"), new Object[] { project != null ? project.getProject().getName() : "" }); //$NON-NLS-1$ else name = MessageFormat.format(ProxyRemoteMessages.getString("ProxyRemoteVMNameWithComment"), new Object[] { project != null ? project.getProject().getName() : "", name }); //$NON-NLS-1$ // Problem with launch, can't have double-quotes in vmName. if (name.indexOf('"') != -1) name = name.replace('"', '\''); pm.beginTask("", 500); //$NON-NLS-1$ pm.subTask(MessageFormat.format(ProxyRemoteMessages.getString("ProxyRemoteLaunchVM"), new Object[] { name })); //$NON-NLS-1$ // check for cancellation if (pm.isCanceled()) return; IVMInstall vm = verifyVMInstall(configuration); IVMRunner runner = vm.getVMRunner(mode); if (runner == null) { abort(MessageFormat.format(ProxyRemoteMessages.getString("Proxy_NoRunner_ERROR_"), new Object[] { name }), null, 0); //$NON-NLS-1$ } File workingDir = verifyWorkingDirectory(configuration); String workingDirName = null; if (workingDir != null) { workingDirName = workingDir.getAbsolutePath(); } // Environment variables String[] envp = DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration); // Program & VM args String pgmArgs = getProgramArguments(configuration); String vmArgs = getVMArguments(configuration); ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs); // VM-specific attributes Map vmAttributesMap = getVMSpecificAttributesMap(configuration); pm.worked(100); // Now let's get the classpaths created through the contributors. URL[] classpath = ProxyLaunchSupport.convertStringPathsToURL(getClasspath(configuration)); String[][] bootpathInfoStrings = getBootpathExt(vmAttributesMap); URL[][] bootpathInfo = new URL[][]{ ProxyLaunchSupport.convertStringPathsToURL(bootpathInfoStrings[0]), ProxyLaunchSupport.convertStringPathsToURL(bootpathInfoStrings[1]), ProxyLaunchSupport.convertStringPathsToURL(bootpathInfoStrings[2]), }; ProxyLaunchSupport.LaunchInfo launchInfo = ProxyLaunchSupport.getInfo(launchKey); final IConfigurationContributor[] contributors = launchInfo.contributors; final LocalFileConfigurationContributorController controller = new LocalFileConfigurationContributorController(classpath, bootpathInfo, launchInfo); if (contributors != null) { for (int i = 0; i < contributors.length; i++) { // Run in safe mode so that anything happens we don't go away. final int ii = i; Platform.run(new ISafeRunnable() { public void handleException(Throwable exception) { // Don't need to do anything. Platform.run logs it for me. } public void run() throws Exception { contributors[ii].contributeClasspaths(controller); } }); } } // Add in the required ones by the Proxy support. These are hard-coded since they are // required. ProxyRemoteUtil.updateClassPaths(controller); classpath = controller.getFinalClasspath(); if (bootpathInfo[0] != controller.getFinalPrependBootpath()) { if (vmAttributesMap == null) vmAttributesMap = new HashMap(2); vmAttributesMap.put(IJavaLaunchConfigurationConstants.ATTR_BOOTPATH_PREPEND, ProxyLaunchSupport.convertURLsToStrings(bootpathInfo[0])); } if (bootpathInfo[2] != controller.getFinalAppendBootpath()) { if (vmAttributesMap == null) vmAttributesMap = new HashMap(2); vmAttributesMap.put(IJavaLaunchConfigurationConstants.ATTR_BOOTPATH_APPEND, ProxyLaunchSupport.convertURLsToStrings(bootpathInfo[2])); } // check for cancellation if (pm.isCanceled()) return; pm.worked(100); // Create VM config VMRunnerConfiguration runConfig = new VMRunnerConfiguration("org.eclipse.jem.internal.proxy.vm.remote.RemoteVMApplication", ProxyLaunchSupport.convertURLsToStrings(classpath)); //$NON-NLS-1$ REMProxyFactoryRegistry registry = new REMProxyFactoryRegistry(ProxyRemoteUtil.getRegistryController(), name); Integer registryKey = registry.getRegistryKey(); Integer bufSize = Integer.getInteger("proxyvm.bufsize"); //$NON-NLS-1$ if (bufSize == null) bufSize = new Integer(16000); int masterServerPort = ProxyRemoteUtil.getRegistryController().getMasterSocketPort(); // See if debug mode is requested. DebugModeHelper dh = new DebugModeHelper(); boolean debugMode = dh.debugMode(name); String[] evmArgs = execArgs.getVMArgumentsArray(); int extraArgs = 4; // Number of extra standard args added (if number changes below, this must change) if (debugMode) extraArgs+=4; // Number of extra args added for debug mode (if number changes below, this must change). List javaLibPaths = controller.getFinalJavaLibraryPath(); int existingLibpaths = -1; if (!javaLibPaths.isEmpty()) { // first need to see if java lib path also specified in standard args by someone configuring the configuration by hand. for (int i = 0; i < evmArgs.length; i++) { if (evmArgs[i].startsWith("-Djava.library.path")) { //$NON-NLS-1$ // We found one already here, save the spot so we update it later. existingLibpaths = i; break; } } if (existingLibpaths == -1) ++extraArgs; // Need to have room for one more. } String[] cvmArgs = new String[evmArgs.length + extraArgs]; System.arraycopy(evmArgs, 0, cvmArgs, extraArgs, evmArgs.length); // Put existing into new list at the end. cvmArgs[0] = "-Dproxyvm.registryKey=" + registryKey; //$NON-NLS-1$ cvmArgs[1] = "-Dproxyvm.masterPort=" + String.valueOf(masterServerPort); //$NON-NLS-1$ cvmArgs[2] = "-Dproxyvm.bufsize=" + bufSize; //$NON-NLS-1$ cvmArgs[3] = "-Dproxyvm.servername=" + name; //$NON-NLS-1$ // If in debug mode, we need to find a port for it to use. int dport = -1; if (debugMode) { dport = findUnusedLocalPort("localhost", 5000, 15000, new int[0]); //$NON-NLS-1$ cvmArgs[4] = "-Djava.compiler=NONE"; //$NON-NLS-1$ cvmArgs[5] = "-Xdebug"; //$NON-NLS-1$ cvmArgs[6] = "-Xnoagent"; //$NON-NLS-1$ cvmArgs[7] = "-Xrunjdwp:transport=dt_socket,server=y,address=" + dport; //$NON-NLS-1$ } if (!javaLibPaths.isEmpty()) { StringBuffer appendTo = null; if (existingLibpaths != -1) { appendTo = new StringBuffer(evmArgs[existingLibpaths]); appendTo.append(File.pathSeparatorChar); // Plus a separator so we can append } else appendTo = new StringBuffer("-Djava.library.path="); //$NON-NLS-1$ for (int i = 0; i < javaLibPaths.size(); i++) { if (i != 0) appendTo.append(File.pathSeparator); appendTo.append((String) javaLibPaths.get(i)); } if (existingLibpaths != -1) cvmArgs[extraArgs+existingLibpaths] = appendTo.toString(); else cvmArgs[extraArgs-1] = appendTo.toString(); } runConfig.setProgramArguments(execArgs.getProgramArgumentsArray()); runConfig.setEnvironment(envp); runConfig.setVMArguments(cvmArgs); runConfig.setWorkingDirectory(workingDirName); runConfig.setVMSpecificAttributesMap(vmAttributesMap); // Bootpath runConfig.setBootClassPath(getBootpath(configuration)); // check for cancellation if (pm.isCanceled()) return; pm.worked(100); // set the default source locator if required setDefaultSourceLocator(launch, configuration); // Launch the configuration - 1 unit of work runner.run(runConfig, launch, new SubProgressMonitor(pm, 100)); // check for cancellation if (pm.isCanceled()) return; IProcess[] processes = launch.getProcesses(); IProcess process = processes[0]; // There is only one. // Check if it is already terminated. If it is, then there was a bad error, so just // print out the results from it. if (process.isTerminated()) { IStreamsProxy stProxy = process.getStreamsProxy(); // Using a printWriter for println capability, but it needs to be on another // writer, which will be string java.io.StringWriter s = new java.io.StringWriter(); java.io.PrintWriter w = new java.io.PrintWriter(s); w.println(ProxyRemoteMessages.getString(ProxyRemoteMessages.VM_TERMINATED)); w.println(ProxyRemoteMessages.getString(ProxyRemoteMessages.VM_TERMINATED_LINE1)); w.println(stProxy.getErrorStreamMonitor().getContents()); w.println(ProxyRemoteMessages.getString(ProxyRemoteMessages.VM_TERMINATED_LINE2)); w.println(stProxy.getOutputStreamMonitor().getContents()); w.println(ProxyRemoteMessages.getString(ProxyRemoteMessages.VM_TERMINATED_LINE3)); w.close(); String msg = MessageFormat.format(ProxyRemoteMessages.getString("Proxy_Terminated_too_soon_ERROR_"), new Object[] { name }); //$NON-NLS-1$ dh.displayErrorMessage(ProxyRemoteMessages.getString("Proxy_Error_Title"), msg); //$NON-NLS-1$ throw new CoreException( new Status(IStatus.WARNING, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, s.toString(), null)); } else { final String traceName = name; IStreamsProxy fStreamsProxy = process.getStreamsProxy(); class StreamListener implements IStreamListener { String tracePrefix; Level level; public StreamListener(String type, Level level) { tracePrefix = traceName + ':' + type + '>'; this.level = level; } public void streamAppended(String newText, IStreamMonitor monitor) { ProxyPlugin.getPlugin().getLogger().log(tracePrefix + newText, level); } }; // Always listen to System.err output. IStreamMonitor monitor = fStreamsProxy.getErrorStreamMonitor(); if (monitor != null) monitor.addListener(new StreamListener("err", Level.WARNING)); //$NON-NLS-1$ // If debug trace is requested, then attach trace listener for System.out if ("true".equalsIgnoreCase(Platform.getDebugOption(ProxyPlugin.getPlugin().getBundle().getSymbolicName() + ProxyRemoteUtil.DEBUG_VM_TRACEOUT))) { //$NON-NLS-1$ // Want to trace the output of the remote vm's. monitor = fStreamsProxy.getOutputStreamMonitor(); if (monitor != null) monitor.addListener(new StreamListener("out", Level.INFO)); //$NON-NLS-1$ } } // If in debug mode, tester must start debugger before going on. if (debugMode) { if (!dh.promptPort(dport)) { process.terminate(); throw new CoreException( new Status( IStatus.WARNING, ProxyPlugin.getPlugin().getBundle().getSymbolicName(), 0, "Debugger attach canceled", //$NON-NLS-1$ null)); } } // Now set up the registry. registry.initializeRegistry(process); new REMStandardBeanTypeProxyFactory(registry); new REMStandardBeanProxyFactory(registry); new REMMethodProxyFactory(registry); if (debugMode || REMProxyFactoryRegistry.fGlobalNoTimeouts) registry.fNoTimeouts = true; if (configuration.getAttribute(IProxyConstants.ATTRIBUTE_AWT_SWING, true)) REMRegisterAWT.registerAWT(registry); launchInfo.resultRegistry = registry; pm.done(); } | 8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/77e9488304d8e3e48fdc9582512ac67ccfe05035/LocalProxyLaunchDelegate.java/clean/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalProxyLaunchDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
8037,
12,
2627,
4760,
1750,
1664,
16,
514,
1965,
16,
467,
9569,
8037,
16,
467,
5491,
7187,
7430,
13,
1216,
30015,
288,
202,
202,
780,
8037,
653,
273,
1664,
18,
588,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
8037,
12,
2627,
4760,
1750,
1664,
16,
514,
1965,
16,
467,
9569,
8037,
16,
467,
5491,
7187,
7430,
13,
1216,
30015,
288,
202,
202,
780,
8037,
653,
273,
1664,
18,
588,
1499,... |
Result result = runQuery( "SELECT {[Customers].[All Customers].[USA].[CA]} DIMENSION PROPERTIES "+nl+ " CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, " + nl + " HIERARCHY_UNIQUE_NAME, LEVEL_UNIQUE_NAME, LEVEL_NUMBER, MEMBER_UNIQUE_NAME, " + nl + " MEMBER_NAME, MEMBER_TYPE, MEMBER_GUID, MEMBER_CAPTION, MEMBER_ORDINAL, CHILDREN_CARDINALITY," + nl + " PARENT_LEVEL, PARENT_UNIQUE_NAME, PARENT_COUNT, DESCRIPTION ON COLUMNS" + nl + "FROM [Sales]"); | Result result = executeQuery("SELECT {[Customers].[All Customers].[USA].[CA]} DIMENSION PROPERTIES "+nl+ " CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, " + nl + " HIERARCHY_UNIQUE_NAME, LEVEL_UNIQUE_NAME, LEVEL_NUMBER, MEMBER_UNIQUE_NAME, " + nl + " MEMBER_NAME, MEMBER_TYPE, MEMBER_GUID, MEMBER_CAPTION, MEMBER_ORDINAL, CHILDREN_CARDINALITY," + nl + " PARENT_LEVEL, PARENT_UNIQUE_NAME, PARENT_COUNT, DESCRIPTION ON COLUMNS" + nl + "FROM [Sales]"); | public void _testPropertiesMDX() { Result result = runQuery( "SELECT {[Customers].[All Customers].[USA].[CA]} DIMENSION PROPERTIES "+nl+ " CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, " + nl + " HIERARCHY_UNIQUE_NAME, LEVEL_UNIQUE_NAME, LEVEL_NUMBER, MEMBER_UNIQUE_NAME, " + nl + " MEMBER_NAME, MEMBER_TYPE, MEMBER_GUID, MEMBER_CAPTION, MEMBER_ORDINAL, CHILDREN_CARDINALITY," + nl + " PARENT_LEVEL, PARENT_UNIQUE_NAME, PARENT_COUNT, DESCRIPTION ON COLUMNS" + nl + "FROM [Sales]"); Axis[] axes = result.getAxes(); Object[] axesProperties = null; // Commented out because axis properties are not implemented as of 1.2.// axesProperties = axes[0].properties; assertEquals(axesProperties[0],"CATALOG_NAME"); assertEquals(axesProperties[1],"SCHEMA_NAME"); assertEquals(axesProperties[2],"CUBE_NAME"); assertEquals(axesProperties[3],"DIMENSION_UNIQUE_NAME"); assertEquals(axesProperties[4],"HIERARCHY_UNIQUE_NAME"); assertEquals(axesProperties[5],"LEVEL_UNIQUE_NAME"); assertEquals(axesProperties[6],"LEVEL_NUMBER"); assertEquals(axesProperties[7],"MEMBER_UNIQUE_NAME"); assertEquals(axesProperties[8],"MEMBER_NAME"); assertEquals(axesProperties[9],"MEMBER_TYPE"); assertEquals(axesProperties[10],"MEMBER_GUID"); assertEquals(axesProperties[11],"MEMBER_CAPTION"); assertEquals(axesProperties[12],"MEMBER_ORDINAL"); assertEquals(axesProperties[13],"CHILDREN_CARDINALITY"); assertEquals(axesProperties[14],"PARENT_LEVEL"); assertEquals(axesProperties[15],"PARENT_UNIQUE_NAME"); assertEquals(axesProperties[16],"PARENT_COUNT"); assertEquals(axesProperties[17],"DESCRIPTION"); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/3041f930b5fc4bf6aa3339845b828801c1d8b366/PropertiesTest.java/clean/testsrc/main/mondrian/test/PropertiesTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
389,
3813,
2297,
6188,
60,
1435,
288,
3639,
3438,
563,
273,
1086,
1138,
12,
7734,
315,
4803,
288,
63,
3802,
414,
8009,
63,
1595,
6082,
414,
8009,
63,
3378,
37,
8009,
63,
3587... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
3813,
2297,
6188,
60,
1435,
288,
3639,
3438,
563,
273,
1086,
1138,
12,
7734,
315,
4803,
288,
63,
3802,
414,
8009,
63,
1595,
6082,
414,
8009,
63,
3378,
37,
8009,
63,
3587... |
String errorMsg = "getMapOutput(" + mapId + "," + reduceId + ") failed :\n"+ StringUtils.stringifyException(ie); | String errorMsg = ("getMapOutput(" + mapId + "," + reduceId + ") failed :\n"+ StringUtils.stringifyException(ie)); | public void doGet(HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { String mapId = request.getParameter("map"); String reduceId = request.getParameter("reduce"); if (mapId == null || reduceId == null) { throw new IOException("map and reduce parameters are required"); } ServletContext context = getServletContext(); int reduce = Integer.parseInt(reduceId); byte[] buffer = new byte[64*1024]; OutputStream outStream = response.getOutputStream(); JobConf conf = (JobConf) context.getAttribute("conf"); FileSystem fileSys = (FileSystem) context.getAttribute("local.file.system"); Path filename = conf.getLocalPath(mapId+"/part-"+reduce+".out"); response.setContentLength((int) fileSys.getLength(filename)); InputStream inStream = null; try { inStream = fileSys.open(filename); try { int len = inStream.read(buffer); while (len > 0) { outStream.write(buffer, 0, len); len = inStream.read(buffer); } } finally { inStream.close(); outStream.close(); } } catch (IOException ie) { TaskTracker tracker = (TaskTracker) context.getAttribute("task.tracker"); Log log = (Log) context.getAttribute("log"); String errorMsg = "getMapOutput(" + mapId + "," + reduceId + ") failed :\n"+ StringUtils.stringifyException(ie); log.warn(errorMsg); tracker.mapOutputLost(mapId, errorMsg); response.sendError(HttpServletResponse.SC_GONE, errorMsg); throw ie; } } | 55137 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55137/161e86891d1289d22d9636b0b84d32ae4b00853f/TaskTracker.java/buggy/src/java/org/apache/hadoop/mapred/TaskTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
7682,
12446,
766,
15604,
262,
1216,
16517,
16,
1860,
288,
3639,
514,
852,
548,
273,
590,
18,
588,
1662,
2932,
1458,
8863,
3639,
514,
5459,
548... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
7682,
12446,
766,
15604,
262,
1216,
16517,
16,
1860,
288,
3639,
514,
852,
548,
273,
590,
18,
588,
1662,
2932,
1458,
8863,
3639,
514,
5459,
548... |
return wizard.getRepositoryClient() != null; | return wizard.getRepositoryConnector() != null; | public boolean canFlipToNextPage() { return wizard.getRepositoryClient() != null; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/0e9216c5160dcb4bbfc03d2e326a3e5f9aa0e1cf/SelectRepositoryClientPage.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryClientPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
28535,
774,
21563,
1435,
288,
202,
202,
2463,
24204,
18,
588,
3305,
1227,
1435,
480,
446,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
28535,
774,
21563,
1435,
288,
202,
202,
2463,
24204,
18,
588,
3305,
1227,
1435,
480,
446,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
results = compare(retEnv, tempPath); assertTrue(results); | compareXML(retEnv, tempPath); | public void testR2GCEchoFloat() throws AxisFault { url = "http://localhost:8010/interopC.cgi"; soapAction = "http://soapinterop.org/"; util = new GroupcFloatUtil(); retEnv = SunRound2Client.sendMsg(util, url, soapAction); tempPath = resFilePath + "GroupcFloatRes.xml"; results = compare(retEnv, tempPath); assertTrue(results); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/6295a3864398ed319578fb0b345f1adafef73782/SLRound2InteropTest.java/buggy/modules/integration/itest/test/interop/whitemesa/round2/SLRound2InteropTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
54,
22,
43,
1441,
2599,
4723,
1435,
1216,
15509,
7083,
288,
3639,
880,
273,
315,
2505,
2207,
13014,
30,
28,
23254,
19,
30376,
39,
18,
19062,
14432,
3639,
9930,
1803,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
54,
22,
43,
1441,
2599,
4723,
1435,
1216,
15509,
7083,
288,
3639,
880,
273,
315,
2505,
2207,
13014,
30,
28,
23254,
19,
30376,
39,
18,
19062,
14432,
3639,
9930,
1803,
273,... |
getOwner( ).getViewer( ) .setSelection( new StructuredSelection( list ) ); | if (getOwner( ).getViewer( ).getControl().isVisible()) { getOwner( ).getViewer( ) .setSelection( new StructuredSelection( list ) ); } | public void run( ) { getOwner( ).getViewer( ) .setSelection( new StructuredSelection( list ) ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/5495381640a77875e5cbf18f5f5d7159e3ccaa3f/TableLayout.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/layout/TableLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
12,
262,
9506,
202,
95,
6862,
202,
588,
5541,
12,
262,
18,
588,
18415,
12,
262,
6862,
1082,
202,
18,
542,
6233,
12,
394,
7362,
2862,
6233,
12,
666,
262,
11272,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
12,
262,
9506,
202,
95,
6862,
202,
588,
5541,
12,
262,
18,
588,
18415,
12,
262,
6862,
1082,
202,
18,
542,
6233,
12,
394,
7362,
2862,
6233,
12,
666,
262,
11272,
9... |
following.push(FOLLOW_constraint_in_constraints1651); | following.push(FOLLOW_constraint_in_constraints1655); | public List constraints() throws RecognitionException { List constraints; constraints = new ArrayList(); try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:668:17: ( opt_eol ( constraint[constraints] | predicate[constraints] ) ( opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) )* opt_eol ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:668:17: opt_eol ( constraint[constraints] | predicate[constraints] ) ( opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) )* opt_eol { following.push(FOLLOW_opt_eol_in_constraints1628); opt_eol(); following.pop(); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:669:17: ( constraint[constraints] | predicate[constraints] ) int alt46=2; int LA46_0 = input.LA(1); if ( LA46_0==EOL||LA46_0==15 ) { alt46=1; } else if ( LA46_0==ID ) { int LA46_2 = input.LA(2); if ( LA46_2==30 ) { int LA46_3 = input.LA(3); if ( LA46_3==ID ) { int LA46_8 = input.LA(4); if ( LA46_8==50 ) { alt46=2; } else if ( LA46_8==EOL||LA46_8==15||(LA46_8>=22 && LA46_8<=23)||(LA46_8>=40 && LA46_8<=47) ) { alt46=1; } else { NoViableAltException nvae = new NoViableAltException("669:17: ( constraint[constraints] | predicate[constraints] )", 46, 8, input); throw nvae; } } else if ( LA46_3==EOL||LA46_3==15 ) { alt46=1; } else { NoViableAltException nvae = new NoViableAltException("669:17: ( constraint[constraints] | predicate[constraints] )", 46, 3, input); throw nvae; } } else if ( LA46_2==EOL||LA46_2==15||(LA46_2>=22 && LA46_2<=23)||(LA46_2>=40 && LA46_2<=47) ) { alt46=1; } else { NoViableAltException nvae = new NoViableAltException("669:17: ( constraint[constraints] | predicate[constraints] )", 46, 2, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("669:17: ( constraint[constraints] | predicate[constraints] )", 46, 0, input); throw nvae; } switch (alt46) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:669:18: constraint[constraints] { following.push(FOLLOW_constraint_in_constraints1633); constraint(constraints); following.pop(); } break; case 2 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:669:42: predicate[constraints] { following.push(FOLLOW_predicate_in_constraints1636); predicate(constraints); following.pop(); } break; } // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:670:17: ( opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) )* loop48: do { int alt48=2; alt48 = dfa48.predict(input); switch (alt48) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:670:19: opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) { following.push(FOLLOW_opt_eol_in_constraints1644); opt_eol(); following.pop(); match(input,22,FOLLOW_22_in_constraints1646); following.push(FOLLOW_opt_eol_in_constraints1648); opt_eol(); following.pop(); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:670:39: ( constraint[constraints] | predicate[constraints] ) int alt47=2; int LA47_0 = input.LA(1); if ( LA47_0==EOL||LA47_0==15 ) { alt47=1; } else if ( LA47_0==ID ) { int LA47_2 = input.LA(2); if ( LA47_2==30 ) { int LA47_3 = input.LA(3); if ( LA47_3==ID ) { int LA47_8 = input.LA(4); if ( LA47_8==50 ) { alt47=2; } else if ( LA47_8==EOL||LA47_8==15||(LA47_8>=22 && LA47_8<=23)||(LA47_8>=40 && LA47_8<=47) ) { alt47=1; } else { NoViableAltException nvae = new NoViableAltException("670:39: ( constraint[constraints] | predicate[constraints] )", 47, 8, input); throw nvae; } } else if ( LA47_3==EOL||LA47_3==15 ) { alt47=1; } else { NoViableAltException nvae = new NoViableAltException("670:39: ( constraint[constraints] | predicate[constraints] )", 47, 3, input); throw nvae; } } else if ( LA47_2==EOL||LA47_2==15||(LA47_2>=22 && LA47_2<=23)||(LA47_2>=40 && LA47_2<=47) ) { alt47=1; } else { NoViableAltException nvae = new NoViableAltException("670:39: ( constraint[constraints] | predicate[constraints] )", 47, 2, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("670:39: ( constraint[constraints] | predicate[constraints] )", 47, 0, input); throw nvae; } switch (alt47) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:670:40: constraint[constraints] { following.push(FOLLOW_constraint_in_constraints1651); constraint(constraints); following.pop(); } break; case 2 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:670:64: predicate[constraints] { following.push(FOLLOW_predicate_in_constraints1654); predicate(constraints); following.pop(); } break; } } break; default : break loop48; } } while (true); following.push(FOLLOW_opt_eol_in_constraints1662); opt_eol(); following.pop(); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return constraints; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/e3fb9256ae6e5fcb8c78a2c3dbd47f678d9b1287/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
6237,
1435,
1216,
9539,
288,
6647,
987,
6237,
31,
1171,
202,
202,
11967,
273,
394,
2407,
5621,
540,
202,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
6237,
1435,
1216,
9539,
288,
6647,
987,
6237,
31,
1171,
202,
202,
11967,
273,
394,
2407,
5621,
540,
202,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,... |
for (Enumeration e = mc.getRecipients().elements(); e.hasMoreElements(); ) { | for (Enumeration e = mail.getRecipients().elements(); e.hasMoreElements(); ) { | public Vector match(MessageContainer mc, String condition) { Vector matchingRecipients = new Vector(); for (Enumeration e = mc.getRecipients().elements(); e.hasMoreElements(); ) { String rec = (String) e.nextElement(); if (condition.indexOf(getHost(rec)) != -1) { matchingRecipients.addElement(rec); } } return matchingRecipients; } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/47e1f1dd324aaa19b69c89398ecab34856a55c89/HostIs.java/clean/trunk/src/org/apache/james/james/match/HostIs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5589,
845,
12,
1079,
2170,
6108,
16,
514,
2269,
13,
288,
3639,
5589,
3607,
22740,
273,
394,
5589,
5621,
3639,
364,
261,
21847,
425,
273,
4791,
18,
588,
22740,
7675,
6274,
5621,
425,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5589,
845,
12,
1079,
2170,
6108,
16,
514,
2269,
13,
288,
3639,
5589,
3607,
22740,
273,
394,
5589,
5621,
3639,
364,
261,
21847,
425,
273,
4791,
18,
588,
22740,
7675,
6274,
5621,
425,... |
return getLaunchManager().getLaunchConfigurationType(WOJavaLocalApplicationLaunchConfigurationDelegate.WOJavaLocalApplicationID); | ILaunchConfigurationType launchConfigurationType = getLaunchManager() .getLaunchConfigurationType( WOJavaLocalApplicationLaunchConfigurationDelegate.WOJavaLocalApplicationID); return launchConfigurationType; | protected ILaunchConfigurationType getJavaLaunchConfigType() { return getLaunchManager().getLaunchConfigurationType(WOJavaLocalApplicationLaunchConfigurationDelegate.WOJavaLocalApplicationID); } | 50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/f992bd5b8e5aeca42a66af65f4ec3d6e14d2352b/WOJavaApplicationLaunchShortcut.java/clean/projects/wolips/plugins/org.objectstyle.wolips.launching/java/org/objectstyle/wolips/launching/WOJavaApplicationLaunchShortcut.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
9569,
1750,
559,
18911,
9569,
809,
559,
1435,
288,
202,
202,
2463,
9014,
4760,
1318,
7675,
588,
9569,
1750,
559,
12,
59,
51,
5852,
2042,
3208,
9569,
1750,
9586,
18,
59,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
9569,
1750,
559,
18911,
9569,
809,
559,
1435,
288,
202,
202,
2463,
9014,
4760,
1318,
7675,
588,
9569,
1750,
559,
12,
59,
51,
5852,
2042,
3208,
9569,
1750,
9586,
18,
59,
... |
sdf = DateFormatWrapperFactory.getPreferredDateFormat( iUnit ); | sdf = DateFormatWrapperFactory.getPreferredDateFormat( iUnit, rtc.getULocale( ) ); | public final void renderEachAxis( IPrimitiveRenderer ipr, Plot pl, OneAxis ax, int iWhatToDraw ) throws ChartException { final RunTimeContext rtc = getRunTimeContext( ); final Axis axModel = ax.getModelAxis( ); final PlotWithAxes pwa = (PlotWithAxes) getComputations( ); final Insets insCA = pwa.getAxes( ).getInsets( ); final ScriptHandler sh = getRunTimeContext( ).getScriptHandler( ); final double dLocation = ax.getAxisCoordinate( ); final AutoScale sc = ax.getScale( ); final IntersectionValue iv = ax.getIntersectionValue( ); final int iMajorTickStyle = ax.getGrid( ) .getTickStyle( IConstants.MAJOR ); final int iMinorTickStyle = ax.getGrid( ) .getTickStyle( IConstants.MINOR ); final int iLabelLocation = ax.getLabelPosition( ); final int iOrientation = ax.getOrientation( ); final IDisplayServer xs = this.getDevice( ).getDisplayServer( ); Label la = LabelImpl.copyInstance( ax.getLabel( ) ); final double[] daEndPoints = sc.getEndPoints( ); final double[] da = sc.getTickCordinates( ); final double[] daMinor = sc.getMinorCoordinates( ax.getGrid( ) .getMinorCountPerMajor( ) ); String sText = null; final int iDimension = pwa.getDimension( ); final double dSeriesThickness = pwa.getSeriesThickness( ); final NumberDataElement nde = NumberDataElementImpl.create( 0 ); final FormatSpecifier fs = ax.getModelAxis( ).getFormatSpecifier( ); final double dStaggeredLabelOffset = sc.computeStaggeredAxisLabelOffset( xs, la, iOrientation ); final boolean bAxisLabelStaggered = sc.isAxisLabelStaggered( ); DecimalFormat df = null; final LineAttributes lia = ax.getLineAttributes( ); final LineAttributes liaMajorTick = ax.getGrid( ) .getTickAttributes( IConstants.MAJOR ); final LineAttributes liaMinorTick = ax.getGrid( ) .getTickAttributes( IConstants.MINOR ); if ( !lia.isSetVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.unset.axis.visibility", //$NON-NLS-1$ Messages.getResourceBundle( getRunTimeContext( ).getULocale( ) ) ); } final boolean bRenderAxisLabels = ( ( iWhatToDraw & IConstants.LABELS ) == IConstants.LABELS && la.isVisible( ) ); final boolean bRenderAxisTitle = ( ( iWhatToDraw & IConstants.LABELS ) == IConstants.LABELS ); Location lo = LocationImpl.create( 0, 0 ); final TransformationEvent trae = (TransformationEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), TransformationEvent.class ); final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), TextRenderEvent.class ); tre.setLabel( la ); tre.setTextPosition( iLabelLocation ); tre.setLocation( lo ); final LineRenderEvent lre = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( 0, 0 ) ); lre.setEnd( LocationImpl.create( 0, 0 ) ); // Prepare 3D rendering variables. final boolean bRendering3D = iDimension == IConstants.THREE_D; final boolean bRenderOrthogonal3DAxis = ( iWhatToDraw & IConstants.ORTHOGONAL_AXIS ) == IConstants.ORTHOGONAL_AXIS && bRendering3D; final boolean bRenderBase3DAxis = ( iWhatToDraw & IConstants.BASE_AXIS ) == IConstants.BASE_AXIS && bRendering3D; final boolean bRenderAncillary3DAxis = ( iWhatToDraw & IConstants.ANCILLARY_AXIS ) == IConstants.ANCILLARY_AXIS && bRendering3D; final DeferredCache dc = getDeferredCache( ); final int axisType = ax.getAxisType( ); final Location panningOffset = getPanningOffset( ); final boolean bTransposed = ( (ChartWithAxes) getModel( ) ).isTransposed( ); double[] daEndPoints3D = null; double[] da3D = null; Location3D lo3d = null; Text3DRenderEvent t3dre = null; Line3DRenderEvent l3dre = null; double dXStart = 0; double dZStart = 0; double dXEnd = 0; double dZEnd = 0; if ( iDimension == IConstants.THREE_D ) { AllAxes aax = pwa.getAxes( ); dXEnd = aax.getPrimaryBase( ).getScale( ).getEnd( ); dZEnd = aax.getAncillaryBase( ).getScale( ).getEnd( ); dXStart = aax.getPrimaryBase( ).getScale( ).getStart( ); dZStart = aax.getAncillaryBase( ).getScale( ).getStart( ); daEndPoints3D = sc.getEndPoints( ); da3D = sc.getTickCordinates( ); lo3d = Location3DImpl.create( 0, 0, 0 ); t3dre = (Text3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Text3DRenderEvent.class ); t3dre.setLabel( la ); t3dre.setAction( Text3DRenderEvent.RENDER_TEXT_AT_LOCATION ); t3dre.setTextPosition( iLabelLocation ); t3dre.setLocation3D( lo3d ); l3dre = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dre.setLineAttributes( lia ); l3dre.setStart3D( Location3DImpl.create( 0, 0, 0 ) ); l3dre.setEnd3D( Location3DImpl.create( 0, 0, 0 ) ); } if ( iOrientation == IConstants.VERTICAL ) { int y; int y3d = 0; double dX = dLocation; double dZ = 0; if ( bRendering3D ) { Location3D l3d = ax.getAxisCoordinate3D( ); dX = l3d.getX( ); dZ = l3d.getZ( ); } if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTransform( TransformationEvent.TRANSLATE ); trae.setTranslation( dSeriesThickness, -dSeriesThickness ); ipr.applyTransformation( trae ); } double dXTick1 = ( ( iMajorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXTick2 = ( ( iMajorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS && lia.isVisible( ) ) { if ( bRenderOrthogonal3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); // center l3dre.setStart3D( dX, dStart, dZ ); l3dre.setEnd3D( dX, dEnd, dZ ); dc.addLine( l3dre ); // left l3dre.setStart3D( dX, dStart, dZEnd ); l3dre.setEnd3D( dX, dEnd, dZEnd ); dc.addLine( l3dre ); // right l3dre.setStart3D( dXEnd, dStart, dZ ); l3dre.setEnd3D( dXEnd, dEnd, dZ ); dc.addLine( l3dre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { ArrayList cachedTriggers = null; Location3D[] loaHotspot = new Location3D[4]; Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); // process center y-axis. loaHotspot[0] = Location3DImpl.create( dX - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[1] = Location3DImpl.create( dX + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[2] = Location3DImpl.create( dX + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[3] = Location3DImpl.create( dX - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, panningOffset.getX( ), panningOffset.getY( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); cachedTriggers = new ArrayList( ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); cachedTriggers.add( tg ); iev.addTrigger( TriggerImpl.copyInstance( tg ) ); } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } // process left y-axis. pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dXStart - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[1] = Location3DImpl.create( dXStart + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[2] = Location3DImpl.create( dXStart + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[3] = Location3DImpl.create( dXStart - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, panningOffset.getX( ), panningOffset.getY( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); if ( cachedTriggers == null ) { cachedTriggers = new ArrayList( ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); cachedTriggers.add( tg ); iev.addTrigger( TriggerImpl.copyInstance( tg ) ); } } else { for ( int t = 0; t < cachedTriggers.size( ); t++ ) { iev.addTrigger( TriggerImpl.copyInstance( (Trigger) cachedTriggers.get( t ) ) ); } } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } // process right y-axis. pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dXEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZStart + IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[1] = Location3DImpl.create( dXEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZStart - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[2] = Location3DImpl.create( dXEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZStart - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[3] = Location3DImpl.create( dXEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZStart + IConstants.LINE_EXPAND_DOUBLE_SIZE ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, panningOffset.getX( ), panningOffset.getY( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); if ( cachedTriggers == null ) { for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } } else { for ( int t = 0; t < cachedTriggers.size( ); t++ ) { iev.addTrigger( (Trigger) cachedTriggers.get( t ) ); } } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } } } } else { double dStart = daEndPoints[0] + insCA.getBottom( ), dEnd = daEndPoints[1] - insCA.getTop( ); if ( sc.getDirection( ) == IConstants.FORWARD ) { dStart = daEndPoints[1] + insCA.getBottom( ); dEnd = daEndPoints[0] - insCA.getTop( ); } if ( iv != null && iv.getType( ) == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D ) { final Location[] loa = new Location[4]; loa[0] = LocationImpl.create( dX, dStart ); loa[1] = LocationImpl.create( dX + dSeriesThickness, dStart - dSeriesThickness ); loa[2] = LocationImpl.create( dX + dSeriesThickness, dEnd - dSeriesThickness ); loa[3] = LocationImpl.create( dX, dEnd ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loa ); pre.setBackground( ColorDefinitionImpl.create( 255, 255, 255, 127 ) ); pre.setOutline( lia ); ipr.fillPolygon( pre ); } lre.setLineAttributes( lia ); lre.getStart( ).set( dX, dStart ); lre.getEnd( ).set( dX, dEnd ); ipr.drawLine( lre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } Location[] loaHotspot = new Location[4]; loaHotspot[0] = LocationImpl.create( dX - IConstants.LINE_EXPAND_SIZE, dStart ); loaHotspot[1] = LocationImpl.create( dX + IConstants.LINE_EXPAND_SIZE, dStart ); loaHotspot[2] = LocationImpl.create( dX + IConstants.LINE_EXPAND_SIZE, dEnd ); loaHotspot[3] = LocationImpl.create( dX - IConstants.LINE_EXPAND_SIZE, dEnd ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loaHotspot ); iev.setHotSpot( pre ); ipr.enableInteraction( iev ); } } } } // The vertical axis directon, -1 means bottom->top, 1 means // top->bottom. final int iDirection = sc.getDirection( ) != IConstants.FORWARD ? -1 : 1; if ( ( sc.getType( ) & IConstants.TEXT ) == IConstants.TEXT || sc.isCategoryScale( ) ) { final double dUnitSize = iDirection * sc.getUnitSize( ); final double dOffset = dUnitSize / 2; DataSetIterator dsi = sc.getData( ); final int iDateTimeUnit = ( sc.getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; final ITextMetrics itmText = xs.getTextMetrics( la ); double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; dsi.reset( ); for ( int i = 0; i < da.length - 1; i++ ) { if ( bRenderAxisLabels ) { la.getCaption( ) .setValue( sc.formatCategoryValue( sc.getType( ), dsi.next( ), iDateTimeUnit ) ); if ( sc.isTickLabelVisible( i ) ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); itmText.reuse( la ); // RECYCLED } } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y + iDirection * daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y + iDirection * daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d + dOffset, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d + dOffset, dZ - pwa.getHorizontalSpacingInPixels( ) ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y + dOffset ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } } y = (int) da[da.length - 1]; if ( bRendering3D ) { y3d = (int) da3D[da3D.length - 1]; } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } itmText.dispose( );// DISPOSED } else if ( ( sc.getType( ) & IConstants.LINEAR ) == IConstants.LINEAR ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( ) ); } dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX, dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { if ( y3d + daMinor[k] >= da3D[i + 1] ) { // if current minor tick exceed the // range of current unit, skip continue; } l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { if ( ( iDirection == -1 && y - daMinor[k] <= da[i + 1] ) || ( iDirection == 1 && y + daMinor[k] >= da[i + 1] ) ) { // if current minor tick exceed the // range of current unit, skip continue; } lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y + iDirection * daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y + iDirection * daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d, dZ - pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } if ( i == da.length - 2 ) { // This is the last tick, use pre-computed value to // handle // non-equal scale unit case. dAxisValue = Methods.asDouble( sc.getMaximum( ) ) .doubleValue( ); } else { dAxisValue += dAxisStep; } } } else if ( ( sc.getType( ) & IConstants.LOGARITHMIC ) == IConstants.LOGARITHMIC ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { if ( bRenderAxisLabels ) // PERFORM COMPUTATIONS ONLY IF // AXIS LABEL IS VISIBLE { if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y + iDirection * daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y + iDirection * daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } // RENDER LABELS ONLY IF REQUESTED if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d, dZ - pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue *= dAxisStep; } } else if ( ( sc.getType( ) & IConstants.DATE_TIME ) == IConstants.DATE_TIME ) { CDateTime cdt, cdtAxisValue = Methods.asDateTime( sc.getMinimum( ) ); final int iUnit = Methods.asInteger( sc.getUnit( ) ); final int iStep = Methods.asInteger( sc.getStep( ) ); IDateFormatWrapper sdf = null; if ( fs == null ) { sdf = DateFormatWrapperFactory.getPreferredDateFormat( iUnit ); } cdt = cdtAxisValue; double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { try { sText = ValueFormatter.format( cdt, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX, dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y + iDirection * daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y + iDirection * daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d, dZ - pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } // ALWAYS W.R.T START VALUE cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); } } la = LabelImpl.copyInstance( ax.getTitle( ) ); // TEMPORARILY USE // FOR AXIS TITLE if ( la.isVisible( ) && bRenderAxisTitle ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la ); final String sRestoreValue = la.getCaption( ).getValue( ); la.getCaption( ) .setValue( rtc.externalizedMessage( sRestoreValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, ax.getTitlePosition( ), la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } if ( ax.getTitle( ).isVisible( ) ) { if ( bRendering3D ) { Bounds cbo = getPlotBounds( ); tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ) / 2d, cbo.getTop( ) + 30, bb.getWidth( ), bb.getHeight( ) ) ); tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + cbo.getWidth( ) - bb.getWidth( ), cbo.getTop( ) + 30 * 2, bb.getWidth( ), bb.getHeight( ) ) ); ipr.drawText( tre ); } else { final Bounds bo = BoundsImpl.create( ax.getTitleCoordinate( ), daEndPoints[1], bb.getWidth( ), daEndPoints[0] - daEndPoints[1] ); tre.setBlockBounds( bo ); tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); if ( ax.getTitle( ).isVisible( ) ) { ipr.drawText( tre ); } } } la.getCaption( ).setValue( sRestoreValue ); ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la ); } la = LabelImpl.copyInstance( ax.getLabel( ) ); if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTranslation( -dSeriesThickness, dSeriesThickness ); ipr.applyTransformation( trae ); } } else if ( iOrientation == IConstants.HORIZONTAL ) { int x; int x3d = 0; int z3d = 0; double dY = dLocation; double dX = 0; double dZ = 0; if ( bRendering3D ) { Location3D l3d = ax.getAxisCoordinate3D( ); dX = l3d.getX( ); dY = l3d.getY( ); dZ = l3d.getZ( ); } double dYTick1 = ( ( iMajorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYTick2 = ( ( iMajorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( iv != null && iDimension == IConstants.TWO_5_D && ( ( bTransposed && isRightToLeft( ) && iv.getType( ) == IntersectionValue.MIN ) || ( !isRightToLeft( ) && iv.getType( ) == IntersectionValue.MAX ) ) ) { trae.setTransform( TransformationEvent.TRANSLATE ); trae.setTranslation( dSeriesThickness, -dSeriesThickness ); ipr.applyTransformation( trae ); } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS && lia.isVisible( ) ) { if ( bRenderBase3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); l3dre.setStart3D( dStart, dY, dZ ); l3dre.setEnd3D( dEnd, dY, dZ ); dc.addLine( l3dre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); Location3D[] loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dStart, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); loaHotspot[1] = Location3DImpl.create( dStart, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); loaHotspot[2] = Location3DImpl.create( dEnd, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); loaHotspot[3] = Location3DImpl.create( dEnd, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, panningOffset.getX( ), panningOffset.getY( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } } } } else if ( bRenderAncillary3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); l3dre.setStart3D( dX, dY, dStart ); l3dre.setEnd3D( dX, dY, dEnd ); dc.addLine( l3dre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); Location3D[] loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dX, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart ); loaHotspot[1] = Location3DImpl.create( dX, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart ); loaHotspot[2] = Location3DImpl.create( dX, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd ); loaHotspot[3] = Location3DImpl.create( dX, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, panningOffset.getX( ), panningOffset.getY( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } } } } else { double dStart = daEndPoints[0] - insCA.getLeft( ), dEnd = daEndPoints[1] + insCA.getRight( ); if ( sc.getDirection( ) == IConstants.BACKWARD ) { dStart = daEndPoints[1] - insCA.getLeft( ); dEnd = daEndPoints[0] + insCA.getRight( ); } if ( iv != null && iv.getType( ) == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D ) { // Zero plane. final Location[] loa = new Location[4]; loa[0] = LocationImpl.create( dStart, dY ); loa[1] = LocationImpl.create( dStart + dSeriesThickness, dY - dSeriesThickness ); loa[2] = LocationImpl.create( dEnd + dSeriesThickness, dY - dSeriesThickness ); loa[3] = LocationImpl.create( dEnd, dY ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loa ); pre.setBackground( ColorDefinitionImpl.create( 255, 255, 255, 127 ) ); pre.setOutline( lia ); ipr.fillPolygon( pre ); } lre.setLineAttributes( lia ); lre.getStart( ).set( dStart, dY ); lre.getEnd( ).set( dEnd, dY ); ipr.drawLine( lre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } Location[] loaHotspot = new Location[4]; loaHotspot[0] = LocationImpl.create( dStart, dY - IConstants.LINE_EXPAND_SIZE ); loaHotspot[1] = LocationImpl.create( dEnd, dY - IConstants.LINE_EXPAND_SIZE ); loaHotspot[2] = LocationImpl.create( dEnd, dY + IConstants.LINE_EXPAND_SIZE ); loaHotspot[3] = LocationImpl.create( dStart, dY + IConstants.LINE_EXPAND_SIZE ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loaHotspot ); iev.setHotSpot( pre ); ipr.enableInteraction( iev ); } } } } // The horizontal axis direction. -1 means right->left, 1 means // left->right. final int iDirection = sc.getDirection( ) == IConstants.BACKWARD ? -1 : 1; if ( ( sc.getType( ) & IConstants.TEXT ) == IConstants.TEXT || sc.isCategoryScale( ) ) { final double dUnitSize = iDirection * sc.getUnitSize( ); final double dOffset = dUnitSize / 2; DataSetIterator dsi = sc.getData( ); final int iDateTimeUnit = ( sc.getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; final ITextMetrics itmText = xs.getTextMetrics( la ); double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); dsi.reset( ); for ( int i = 0; i < da.length - 1; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) { la.getCaption( ) .setValue( sc.formatCategoryValue( sc.getType( ), dsi.next( ), // step to next value. iDateTimeUnit ) ); if ( sc.isTickLabelVisible( i ) ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); itmText.reuse( la );// RECYCLED double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d + dOffset, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d + dOffset ); } t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x + dOffset, sy ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } } } // ONE LAST TICK x = (int) da[da.length - 1]; if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } itmText.dispose( ); // DISPOSED } else if ( ( sc.getType( ) & IConstants.LINEAR ) == IConstants.LINEAR ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( ) ); } dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { if ( x3d + daMinor[k] >= da3D[i + 1] ) { // if current minor tick exceed the // range of current unit, skip continue; } l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { if ( z3d + daMinor[k] >= da3D[i + 1] ) { // if current minor tick exceed the // range of current unit, skip continue; } l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { if ( ( iDirection == 1 && x + daMinor[k] >= da[i + 1] ) || ( iDirection == -1 && x - daMinor[k] <= da[i + 1] ) ) { // if current minor tick exceed the // range of current unit, skip continue; } lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } // OPTIMIZED: ONLY PROCESS IF AXES LABELS ARE VISIBLE OR // REQUESTED FOR if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, sy ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } if ( i == da.length - 2 ) { // This is the last tick, use pre-computed value to // handle // non-equal scale unit case. dAxisValue = Methods.asDouble( sc.getMaximum( ) ) .doubleValue( ); } else { dAxisValue += dAxisStep; } } } else if ( ( sc.getType( ) & IConstants.LOGARITHMIC ) == IConstants.LOGARITHMIC ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( lia ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } // OPTIMIZED: ONLY PROCESS IF AXES LABELS ARE VISIBLE OR // REQUESTED FOR if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, sy ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue *= dAxisStep; } } else if ( ( sc.getType( ) & IConstants.DATE_TIME ) == IConstants.DATE_TIME ) { CDateTime cdt, cdtAxisValue = Methods.asDateTime( sc.getMinimum( ) ); final int iUnit = Methods.asInteger( sc.getUnit( ) ); final int iStep = Methods.asInteger( sc.getStep( ) ); IDateFormatWrapper sdf = null; if ( fs == null ) { sdf = DateFormatWrapperFactory.getPreferredDateFormat( iUnit ); } cdt = cdtAxisValue; double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + iDirection * daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } // OPTIMIZED: ONLY PROCESS IF AXES LABELS ARE VISIBLE OR // REQUESTED FOR if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { try { sText = ValueFormatter.format( cdt, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, sy ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } // ALWAYS W.R.T START VALUE cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); } } // RENDER THE AXIS TITLE la = LabelImpl.copyInstance( ax.getTitle( ) ); // TEMPORARILY USE // FOR AXIS TITLE if ( la.isVisible( ) && bRenderAxisTitle ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la ); final String sRestoreValue = la.getCaption( ).getValue( ); la.getCaption( ) .setValue( rtc.externalizedMessage( sRestoreValue ) ); // EXTERNALIZE la.getCaption( ) .getFont( ) .setAlignment( switchTextAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, ax.getTitlePosition( ), la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } if ( ax.getTitle( ).isVisible( ) ) { if ( bRendering3D ) { Bounds cbo = getPlotBounds( ); if ( axisType == IConstants.BASE_AXIS ) { tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ), cbo.getTop( ) + cbo.getHeight( ) - Math.min( bb.getHeight( ), bb.getWidth( ) ) - 30, bb.getWidth( ), bb.getHeight( ) ) ); } else { tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + cbo.getWidth( ) * 2 / 3d + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ) / 2d, cbo.getTop( ) + cbo.getHeight( ) - Math.min( bb.getHeight( ), bb.getWidth( ) ) - 30 * 2, bb.getWidth( ), bb.getHeight( ) ) ); } tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } else { final Bounds bo = BoundsImpl.create( daEndPoints[0], ax.getTitleCoordinate( ), daEndPoints[1] - daEndPoints[0], bb.getHeight( ) ); tre.setBlockBounds( bo ); tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la ); } la = LabelImpl.copyInstance( ax.getLabel( ) ); // RESTORE BACK TO // AXIS LABEL if ( iv != null && iDimension == IConstants.TWO_5_D && ( ( bTransposed && isRightToLeft( ) && iv.getType( ) == IntersectionValue.MIN ) || ( !isRightToLeft( ) && iv.getType( ) == IntersectionValue.MAX ) ) ) { trae.setTranslation( -dSeriesThickness, dSeriesThickness ); ipr.applyTransformation( trae ); } } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/eae7a65cbbb0c080e7d35c810673937db25d4da7/AxesRenderer.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1743,
3442,
6558,
12,
467,
9840,
6747,
277,
683,
16,
15211,
886,
16,
1082,
202,
3335,
6558,
1740,
16,
509,
277,
23801,
774,
6493,
262,
1216,
14804,
503,
202,
95,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1743,
3442,
6558,
12,
467,
9840,
6747,
277,
683,
16,
15211,
886,
16,
1082,
202,
3335,
6558,
1740,
16,
509,
277,
23801,
774,
6493,
262,
1216,
14804,
503,
202,
95,
202... |
int to = from + len; for (int off = from; off < to; off++) { h = 31 * h + chars[off]; | int to = chars.length(); for (int off = 0; off < to; off++) { h = 31 * h + chars.charAt(off); | public static int stringHashCode(char[] chars, int from, int len) { int h = 0; int to = from + len; for (int off = from; off < to; off++) { h = 31 * h + chars[off]; } return h; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/0299e8d114b64d07dfd8fdd89d166f62316dd01c/StringUtil.java/buggy/util/src/com/intellij/openapi/util/text/StringUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
533,
21952,
12,
3001,
8526,
5230,
16,
509,
628,
16,
509,
562,
13,
288,
565,
509,
366,
273,
374,
31,
565,
509,
358,
273,
628,
397,
562,
31,
565,
364,
261,
474,
3397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
533,
21952,
12,
3001,
8526,
5230,
16,
509,
628,
16,
509,
562,
13,
288,
565,
509,
366,
273,
374,
31,
565,
509,
358,
273,
628,
397,
562,
31,
565,
364,
261,
474,
3397,
... |
public JavaSupport getJavaSupport() { throw new MockException(); } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/f11f183fa177acbe7f7b2685c56f38fb3261856d/BaseMockRuby.java/buggy/test/org/jruby/test/BaseMockRuby.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5852,
6289,
588,
5852,
6289,
1435,
95,
202,
202,
12849,
2704,
9865,
503,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5852,
6289,
588,
5852,
6289,
1435,
95,
202,
202,
12849,
2704,
9865,
503,
5621,
1082,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | ||
short seq = 0; if (rs.next()) | while ( rs.next() ) | private java.sql.ResultSet getImportedExportedKeys(String catalog, String schema, String primaryTable, String foreignTable) throws SQLException { Field f[] = new Field[14]; 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 c.relname,c2.relname," + "t.tgconstrname,ic.relname," + "t.tgdeferrable,t.tginitdeferred," + "t.tgnargs,t.tgargs,p.proname " + "FROM pg_trigger t,pg_class c,pg_class c2," + "pg_class ic,pg_proc p, pg_index i " + "WHERE t.tgrelid=c.oid AND t.tgconstrrelid=c2.oid " + "AND t.tgfoid=p.oid AND tgisconstraint " + ((primaryTable != null) ? "AND c.relname='" + primaryTable + "' " : "") + ((foreignTable != null) ? "AND c2.relname='" + foreignTable + "' " : "") + "AND i.indrelid=c.oid " + "AND i.indexrelid=ic.oid AND i.indisprimary " + "ORDER BY c.relname,c2.relname" ); Vector tuples = new Vector(); short seq = 0; if (rs.next()) { boolean hasMore; do { byte tuple[][] = new byte[14][0]; for (int k = 0;k < 14;k++) tuple[k] = null; String fKeyName = rs.getString(3); boolean foundRule = false; do { String proname = rs.getString(9); if (proname != null && proname.startsWith("RI_FKey_")) { int col = -1; if (proname.endsWith("_upd")) col = 9; // UPDATE_RULE else if (proname.endsWith("_del")) col = 10; // DELETE_RULE if (col > -1) { String rule = proname.substring(8, proname.length() - 4); int action = importedKeyNoAction; if ("cascade".equals(rule)) action = importedKeyCascade; else if ("setnull".equals(rule)) action = importedKeySetNull; else if ("setdefault".equals(rule)) action = importedKeySetDefault; tuple[col] = Integer.toString(action).getBytes(); if (!foundRule) { tuple[2] = rs.getBytes(1); //PKTABLE_NAME tuple[6] = rs.getBytes(2); //FKTABLE_NAME // Parse the tgargs data StringBuffer fkeyColumns = new StringBuffer(); StringBuffer pkeyColumns = new StringBuffer(); int numColumns = (rs.getInt(7) >> 1) - 2; String s = rs.getString(8); int pos = s.lastIndexOf("\\000"); for (int c = 0;c < numColumns;c++) { if (pos > -1) { int pos2 = s.lastIndexOf("\\000", pos - 1); if (pos2 > -1) { if (pkeyColumns.length() > 0) pkeyColumns.insert(0, ','); pkeyColumns.insert(0, s.substring(pos2 + 4, pos)); //PKCOLUMN_NAME pos = s.lastIndexOf("\\000", pos2 - 1); if (pos > -1) { if (fkeyColumns.length() > 0) fkeyColumns.insert(0, ','); fkeyColumns.insert(0, s.substring(pos + 4, pos2)); //FKCOLUMN_NAME } } } } tuple[3] = pkeyColumns.toString().getBytes(); //PKCOLUMN_NAME tuple[7] = fkeyColumns.toString().getBytes(); //FKCOLUMN_NAME tuple[8] = Integer.toString(seq++).getBytes(); //KEY_SEQ tuple[11] = fKeyName.getBytes(); //FK_NAME tuple[12] = rs.getBytes(4); //PK_NAME // DEFERRABILITY int deferrability = importedKeyNotDeferrable; boolean deferrable = rs.getBoolean(5); boolean initiallyDeferred = rs.getBoolean(6); if (deferrable) { if (initiallyDeferred) deferrability = importedKeyInitiallyDeferred; else deferrability = importedKeyInitiallyImmediate; } tuple[13] = Integer.toString(deferrability).getBytes(); foundRule = true; } } } } while ((hasMore = rs.next()) && fKeyName.equals(rs.getString(3))); if(foundRule) tuples.addElement(tuple); } while (hasMore); } return new ResultSet(connection, f, tuples, "OK", 1); } | 2413 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2413/54ced94856bd6d174a4e50caa72f009d60060534/DatabaseMetaData.java/buggy/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2252,
18,
4669,
18,
13198,
336,
24934,
31140,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
3354,
1388,
16,
514,
5523,
1388,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2252,
18,
4669,
18,
13198,
336,
24934,
31140,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
3354,
1388,
16,
514,
5523,
1388,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,... |
public RichStreamReader(BufferedReader reader, | public RichStreamReader(InputStream is, | public RichStreamReader(BufferedReader reader, RichSequenceFormat format, SymbolTokenization symParser, RichSequenceBuilderFactory sf, Namespace ns) { this.reader = reader; this.format = format; this.symParser = symParser; this.sf = sf; this.ns = ns; } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/234ac83aca7c4c358045c77b994f8347c4243524/RichStreamReader.java/buggy/src/org/biojavax/bio/seq/io/RichStreamReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
534,
1354,
31495,
12,
4348,
353,
16,
5411,
534,
1354,
4021,
1630,
740,
16,
5411,
8565,
1345,
1588,
5382,
2678,
16,
5411,
534,
1354,
4021,
20692,
9033,
16,
5411,
6005,
3153,
13,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
534,
1354,
31495,
12,
4348,
353,
16,
5411,
534,
1354,
4021,
1630,
740,
16,
5411,
8565,
1345,
1588,
5382,
2678,
16,
5411,
534,
1354,
4021,
20692,
9033,
16,
5411,
6005,
3153,
13,
225,... |
private void updateClass(ModelClass clazz, JClass jClass, ArrayList alwaysExisting) { String className = clazz.getName(); String uncapClassName = uncapitalise( className ); String clazzTagName = null; if (clazz.hasMetadata(XmlFieldMetadata.ID)) { XmlFieldMetadata clazzMetadata = (XmlFieldMetadata) clazz.getMetadata(XmlFieldMetadata.ID); clazzTagName = clazzMetadata.getTagName(); } JMethod marshall = new JMethod( null, "update" + className); marshall.addParameter( new JParameter( new JClass( className ), "value" ) ); marshall.addParameter( new JParameter( new JClass( "String" ), "xmlTag") ); marshall.addParameter( new JParameter( new JClass( "Counter" ), "counter" ) ); marshall.addParameter( new JParameter( new JClass( "Element" ), "element" ) ); if (clazzTagName == null ) { clazzTagName = uncapClassName; } JSourceCode sc = marshall.getSourceCode(); if (alwaysExisting.contains(clazz)) { sc.add("Element root = element;"); } else { sc.add("boolean shouldExist = value != null;"); sc.add("Element root = updateElement(counter, element, xmlTag, shouldExist);"); sc.add("if (shouldExist) {"); sc.indent(); } sc.add("Counter innerCount = new Counter();"); for ( Iterator i = clazz.getAllFields( getGeneratedVersion(), true ).iterator(); i.hasNext(); ) { ModelField field = (ModelField) i.next(); XmlFieldMetadata fieldMetadata = (XmlFieldMetadata) field.getMetadata( XmlFieldMetadata.ID ); JavaFieldMetadata javaFieldMetadata = (JavaFieldMetadata) field.getMetadata( JavaFieldMetadata.ID ); String fieldTagName = fieldMetadata.getTagName(); if ( fieldTagName == null ) { fieldTagName = field.getName(); } String singularTagName = fieldMetadata.getAssociationTagName(); if ( singularTagName == null ) { singularTagName = singular( fieldTagName ); } boolean wrappedList = XmlFieldMetadata.LIST_STYLE_WRAPPED.equals( fieldMetadata.getListStyle() ); String type = field.getType(); String value = "value." + getPrefix( javaFieldMetadata ) + capitalise( field.getName() ) + "()"; if ( fieldMetadata.isAttribute() ) { continue; } if ( field instanceof ModelAssociation ) { ModelAssociation association = (ModelAssociation) field; String associationName = association.getName(); ModelClass toClass = association.getToClass(); if ( ModelAssociation.ONE_MULTIPLICITY.equals( association.getMultiplicity() ) ) { sc.add("update" + capitalise(field.getType()) + "( " + value + ", \"" + fieldTagName + "\", innerCount, root);"); } else { //MANY_MULTIPLICITY// // type = association.getType();// String toType = association.getTo();// if ( ModelDefault.LIST.equals( type ) || ModelDefault.SET.equals( type ) ) {// type = association.getType(); String toType = association.getTo(); if (toClass != null) { sc.add("iterate" + capitalise(toType) + "(innerCount, root, " + value + ");"); createIterateMethod(field.getName(), toClass, singular(fieldTagName), jClass); alwaysExisting.add(toClass); } else { //list of strings? sc.add("findAndReplaceSimpleLists(innerCount, root, " + value + ", \"" + fieldTagName + "\", \"" + singular(fieldTagName) + "\");"); } } else { //Map or Properties sc.add("findAndReplaceProperties(innerCount, root, \"" + fieldTagName + "\", " + value + ");"); } } } else { if ( "DOM".equals( field.getType() ) ) { sc.add("findAndReplaceXpp3DOM(innerCount, root, \"" + fieldTagName + "\", (Xpp3Dom)" + value + ");");// // sc.add( "((Xpp3Dom) " + value + ").writeToSerializer( NAMESPACE, serializer );" ); } else { sc.add("findAndReplaceSimpleElement(innerCount, root, \"" + fieldTagName + "\", " + getValueChecker( type, value, field ) + getValue( type, value) + ");");// sc.add( "serializer.startTag( NAMESPACE, " + "\"" + fieldTagName + "\" ).text( " +// getValue( field.getType(), value ) + " ).endTag( NAMESPACE, " + "\"" + fieldTagName + "\" );" ); } } } if (!alwaysExisting.contains(clazz)) { sc.unindent(); sc.add("}"); } jClass.addMethod(marshall); } | 47828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47828/713251ef10d316c5306d2d02000cc42e5f75b7e1/JDOMWriterGenerator.java/buggy/modello-plugins/modello-plugin-jdom/src/main/java/org/codehaus/modello/plugin/jdom/JDOMWriterGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
1089,
797,
12,
1488,
797,
4003,
16,
804,
797,
525,
797,
16,
2407,
3712,
9895,
13,
288,
780,
2658,
273,
4003,
18,
17994,
5621,
780,
6301,
438,
3834,
273,
6301,
438,
7053,
784,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
1089,
797,
12,
1488,
797,
4003,
16,
804,
797,
525,
797,
16,
2407,
3712,
9895,
13,
288,
780,
2658,
273,
4003,
18,
17994,
5621,
780,
6301,
438,
3834,
273,
6301,
438,
7053,
784,
12,
... | ||
m_buttonBackward10 = addButton("images/player_rew.png", | m_buttonBackward10 = addButton("player_rew.png", | ToolBar(ActionListener listener, Preferences prefs) { m_listener = listener; m_buttonNew = addButton("images/filenew.png", "new-game", "New game"); m_buttonOpen = addButton("images/fileopen.png", "open", "Load game"); m_buttonSave = addButton("images/filesave2.png", "save", "Save game"); add(new JToolBar.Separator()); m_buttonBeginning = addButton("images/player_start.png", "beginning", "Beginning of game"); m_buttonBackward10 = addButton("images/player_rew.png", "backward-10", "Take back 10 moves"); m_buttonBackward = addButton("images/player_back.png", "backward", "Take back move"); m_buttonForward = addButton("images/player_next.png", "forward", "Replay move"); m_buttonForward10 = addButton("images/player_fwd.png", "forward-10", "Replay 10 moves"); m_buttonEnd = addButton("images/player_end.png", "end", "End of game"); add(new JToolBar.Separator()); m_buttonPass = addButton("images/pass.png", "pass", "Pass"); m_buttonEnter = addButton("images/next.png", "play", "Computer play"); m_buttonInterrupt = addButton("images/stop.png", "interrupt", "Interrupt"); add(new JToolBar.Separator()); m_buttonGtpShell = addButton("images/openterm.png", "gtp-shell", "GTP shell"); } | 51310 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51310/b23a394c8ba6d65b045147f9fe902ba446fb00e9/ToolBar.java/clean/src/gui/ToolBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
13288,
5190,
12,
1803,
2223,
2991,
16,
28310,
15503,
13,
565,
288,
3639,
312,
67,
12757,
273,
2991,
31,
3639,
312,
67,
5391,
1908,
273,
527,
3616,
2932,
7369,
19,
7540,
275,
359,
18,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13288,
5190,
12,
1803,
2223,
2991,
16,
28310,
15503,
13,
565,
288,
3639,
312,
67,
12757,
273,
2991,
31,
3639,
312,
67,
5391,
1908,
273,
527,
3616,
2932,
7369,
19,
7540,
275,
359,
18,
64... |
if (enableZoom.isSelected()) { Dimension2D docSize = svgCanvas.getSVGDocumentSize(); Rectangle2D nb = textNode.getBounds(); AffineTransform at = gn.getGlobalTransform(); | if (highlightButton.isSelected()) { return; } | protected void showSelectedGraphicsNode() { GraphicsNode gn = walker.getCurrentGraphicsNode(); if (!(gn instanceof TextNode)) { return; } TextNode textNode = (TextNode)gn; // mark the selection of the substring found String text = textNode.getText(); String pattern = search.getText(); AttributedCharacterIterator aci = textNode.getAttributedCharacterIterator(); aci.first(); for (int i=0; i < text.indexOf(pattern, currentIndex); ++i) { aci.next(); } Mark startMark = textNode.getMarkerForChar(aci.getIndex(), true); for (int i = 0; i < pattern.length()-1; ++i) { aci.next(); } Mark endMark = textNode.getMarkerForChar(aci.getIndex(), false); svgCanvas.select(startMark, endMark); // zoom on the TextNode if needed if (enableZoom.isSelected()) { Dimension2D docSize = svgCanvas.getSVGDocumentSize(); Rectangle2D nb = textNode.getBounds(); AffineTransform at = gn.getGlobalTransform(); Rectangle2D gnb = at.createTransformedShape(nb).getBounds(); Dimension canvasSize = svgCanvas.getSize(); Point2D p = at.deltaTransform (new Point2D.Float(canvasSize.width, canvasSize.height), null); AffineTransform Tx = AffineTransform.getTranslateInstance (-gnb.getX() - gnb.getWidth() / 2 + p.getX() / 2, -gnb.getY() - gnb.getHeight() / 2 + p.getY() / 2); svgCanvas.setRenderingTransform(Tx); } } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/9473cbcb0a4cfebc299cb17dbe9f48aea470670e/FindDialog.java/buggy/sources/org/apache/batik/apps/svgbrowser/FindDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2405,
7416,
17558,
907,
1435,
288,
3639,
16830,
907,
22908,
273,
14810,
18,
588,
3935,
17558,
907,
5621,
3639,
309,
16051,
12,
1600,
1276,
3867,
907,
3719,
288,
5411,
327,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
2405,
7416,
17558,
907,
1435,
288,
3639,
16830,
907,
22908,
273,
14810,
18,
588,
3935,
17558,
907,
5621,
3639,
309,
16051,
12,
1600,
1276,
3867,
907,
3719,
288,
5411,
327,
31,
... |
klass = ent.getOrigin(); id = ent.getMid0(); noex = ent.getNoex(); body = ent.getMethod(); } else { GetMethodBodyResult gmbr = getMethodBody(id, 0); klass = gmbr.getRecvClass(); id = gmbr.getId(); noex = gmbr.getNoex(); body = gmbr.getBody(); | klass = ent.getOrigin(); id = ent.getMid0(); noex = ent.getNoex(); body = ent.getMethod(); } else { GetMethodBodyResult gmbr = getMethodBody(id, 0); klass = gmbr.getRecvClass(); id = gmbr.getId(); noex = gmbr.getNoex(); body = gmbr.getBody(); | public RubyObject call( RubyObject recv, RubyId mid, RubyPointer args, int scope) { RubyMethodCacheEntry ent = RubyMethodCacheEntry.getEntry(getRuby(), this, mid); RubyModule klass = this; RubyId id = mid; int noex; Node body; if (ent != null) { if (ent.getMethod() == null) { throw new RuntimeException("undefined method " + mid.toName() + " for " + recv + ":" + recv.getRubyClass().toName()); } klass = ent.getOrigin(); id = ent.getMid0(); noex = ent.getNoex(); body = ent.getMethod(); } else { GetMethodBodyResult gmbr = getMethodBody(id, 0); klass = gmbr.getRecvClass(); id = gmbr.getId(); noex = gmbr.getNoex(); body = gmbr.getBody(); if (body == null) { if (scope == 3) { throw new RubyNameException( getRuby(), "super: no superclass method '" + mid.toName() + "'"); } throw new RuntimeException("undefined method " + mid.toName() + " for " + recv + ":" + recv.getRubyClass().toName()); } } // if (mid != missing) { // /* receiver specified form for private method */ // if ((noex & NOEX_PRIVATE) && scope == 0) // return rb_undefined(recv, mid, argc, argv, CSTAT_PRIV); // /* self must be kind of a specified form for private method */ // if ((noex & NOEX_PROTECTED)) { // VALUE defined_class = klass; // while (TYPE(defined_class) == T_ICLASS) // defined_class = RBASIC(defined_class)->klass; // if (!rb_obj_is_kind_of(ruby_frame->self, defined_class)) // return rb_undefined(recv, mid, argc, argv, CSTAT_PROT); // } // } // ... return klass.call0(recv, id, args, body, false); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
745,
12,
202,
202,
54,
10340,
921,
10665,
16,
202,
202,
54,
10340,
548,
7501,
16,
202,
202,
54,
10340,
4926,
833,
16,
202,
202,
474,
2146,
13,
288,
202,
202,
54,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
745,
12,
202,
202,
54,
10340,
921,
10665,
16,
202,
202,
54,
10340,
548,
7501,
16,
202,
202,
54,
10340,
4926,
833,
16,
202,
202,
474,
2146,
13,
288,
202,
202,
54,... |
this.j2eeServerObjectName = ObjectName.getInstance(j2eeDomainName + ":j2eeType=J2EEServer,name=" + j2eeServerName); AxisGeronimoUtils.startGBean(j2eeServerObjectName, j2eeServerGBean, kernel); GBeanMBean tmGBean = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO); Set patterns = new HashSet(); patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=ActivationSpec,*")); tmGBean.setReferencePatterns("resourceManagers", patterns); AxisGeronimoUtils.startGBean(transactionManagerObjectName, tmGBean, kernel); GBeanMBean connectionTrackerGBean = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO); ObjectName connectionTrackerObjectName = ObjectName.getInstance(j2eeDomainName + ":type=ConnectionTracker"); AxisGeronimoUtils.startGBean(connectionTrackerObjectName, connectionTrackerGBean, kernel); | ObjectName j2eeServerObjectName = ObjectName.getInstance(AxisGeronimoConstants.J2EE_SERVER_OBJECT_NAME); kernel.loadGBean(j2eeServerObjectName, j2eeServerGBean); kernel.startGBean(j2eeServerObjectName); | private void startJ2EEServer() throws DeploymentException { try { String str = System.getProperty(javax.naming.Context.URL_PKG_PREFIXES); if (str == null) { str = ":org.apache.geronimo.naming"; } else { str = str + ":org.apache.geronimo.naming"; } System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, str); GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO); serverInfoGBean.setAttribute("baseDirectory", "."); this.serverInfoObjectName = ObjectName.getInstance(j2eeDomainName + ":type=ServerInfo"); AxisGeronimoUtils.startGBean(serverInfoObjectName, serverInfoGBean, kernel); GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO); j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName)); this.j2eeServerObjectName = ObjectName.getInstance(j2eeDomainName + ":j2eeType=J2EEServer,name=" + j2eeServerName); AxisGeronimoUtils.startGBean(j2eeServerObjectName, j2eeServerGBean, kernel); GBeanMBean tmGBean = new GBeanMBean(GeronimoTransactionManager.GBEAN_INFO); Set patterns = new HashSet(); patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*")); patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=ActivationSpec,*")); tmGBean.setReferencePatterns("resourceManagers", patterns); AxisGeronimoUtils.startGBean(transactionManagerObjectName, tmGBean, kernel); GBeanMBean connectionTrackerGBean = new GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO); ObjectName connectionTrackerObjectName = ObjectName.getInstance(j2eeDomainName + ":type=ConnectionTracker"); AxisGeronimoUtils.startGBean(connectionTrackerObjectName, connectionTrackerGBean, kernel); // //load mock resource adapter for mdb // DeploymentHelper.setUpResourceAdapter(kernel); } catch (Exception e) { throw new DeploymentException(e); } } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/11d9b16ee7a34a17c5ba86650eceb652d2824445/DependancyEJBManager.java/clean/modules/axis/src/java/org/apache/geronimo/axis/DependancyEJBManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
787,
46,
22,
9383,
2081,
1435,
1216,
8587,
503,
288,
3639,
775,
288,
5411,
514,
609,
273,
10792,
2332,
18,
588,
1396,
12,
28384,
18,
82,
7772,
18,
1042,
18,
1785,
67,
8784,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
46,
22,
9383,
2081,
1435,
1216,
8587,
503,
288,
3639,
775,
288,
5411,
514,
609,
273,
10792,
2332,
18,
588,
1396,
12,
28384,
18,
82,
7772,
18,
1042,
18,
1785,
67,
8784,
... |
if (JavaEnvUtils.isKaffe()) { | public void testSetFollowLinks() throws IOException { if (supportsSymlinks) { File linkFile = new File(System.getProperty("root"), "src/main/org/apache/tools/ThisIsALink"); if (JavaEnvUtils.isKaffe()) { System.err.println("link exists pre-test? " + linkFile.exists()); } try { // add conditions and more commands as soon as the need arises String[] command = new String[] { "ln", "-s", "ant", linkFile.getAbsolutePath() }; try { Runtime.getRuntime().exec(command); // give ourselves some time for the system call // to execute... tweak if you have a really over // loaded system. Thread.sleep(1000); } catch (IOException ioe) { fail("IOException making link "+ioe); } catch (InterruptedException ie) { } File dir = new File(System.getProperty("root"), "src/main/org/apache/tools"); if (JavaEnvUtils.isKaffe()) { System.err.println("link exists after exec? " + linkFile.exists()); System.err.println("Ant knows it is a link? " + FileUtils.getFileUtils().isSymbolicLink(dir, "ThisIsALink")); } DirectoryScanner ds = new DirectoryScanner(); // followLinks should be true by default, but if this ever // changes we will need this line. ds.setFollowSymlinks(true); ds.setBasedir(dir); ds.setExcludes(new String[] {"ant/**"}); ds.scan(); boolean haveZipPackage = false; boolean haveTaskdefsPackage = false; String[] included = ds.getIncludedDirectories(); for (int i=0; i<included.length; i++) { if (included[i].equals("zip")) { haveZipPackage = true; } else if (included[i].equals("ThisIsALink" + File.separator + "taskdefs")) { haveTaskdefsPackage = true; } } // if we followed the symlink we just made we should // bypass the excludes. assertTrue("(1) zip package included", haveZipPackage); assertTrue("(1) taskdefs package included", haveTaskdefsPackage); ds = new DirectoryScanner(); ds.setFollowSymlinks(false); ds.setBasedir(dir); ds.setExcludes(new String[] {"ant/**"}); ds.scan(); haveZipPackage = false; haveTaskdefsPackage = false; included = ds.getIncludedDirectories(); for (int i=0; i<included.length; i++) { if (included[i].equals("zip")) { haveZipPackage = true; } else if (included[i].equals("ThisIsALink" + File.separator + "taskdefs")) { haveTaskdefsPackage = true; } } assertTrue("(2) zip package included", haveZipPackage); assertTrue("(2) taskdefs package not included", !haveTaskdefsPackage); } finally { if (JavaEnvUtils.isKaffe()) { System.err.println("link exists pre-delete? " + linkFile.exists()); } if (!linkFile.delete()) { throw new RuntimeException("Failed to delete " + linkFile); } if (JavaEnvUtils.isKaffe()) { System.err.println("link exists post-delete? " + linkFile.exists()); } } } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/9c0047961d3de89fca1814d6055ec03955fb0c36/DirectoryScannerTest.java/clean/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
694,
8328,
7100,
1435,
1216,
1860,
288,
3639,
309,
261,
28064,
18475,
87,
13,
288,
5411,
1387,
1692,
812,
273,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
3085,
6,
3631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
694,
8328,
7100,
1435,
1216,
1860,
288,
3639,
309,
261,
28064,
18475,
87,
13,
288,
5411,
1387,
1692,
812,
273,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
3085,
6,
3631,
... | |
Block newBlock = new Block(var, method, self, frame, scope, klass, iter, new DynamicVariableSet(dynamicVariables)); | Block newBlock = new Block(var, method, self, frame, cref, scope, klass, iter, new DynamicVariableSet(dynamicVariables)); | public Block cloneBlock() { Block newBlock = new Block(var, method, self, frame, scope, klass, iter, new DynamicVariableSet(dynamicVariables)); newBlock.isLambda = isLambda; if (getNext() != null) { newBlock.setNext(getNext()); } return newBlock; } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Block.java/buggy/src/org/jruby/runtime/Block.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3914,
3236,
1768,
1435,
288,
3639,
3914,
28482,
273,
394,
3914,
12,
1401,
16,
707,
16,
365,
16,
2623,
16,
1519,
74,
16,
2146,
16,
7352,
16,
1400,
16,
394,
12208,
3092,
694,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3914,
3236,
1768,
1435,
288,
3639,
3914,
28482,
273,
394,
3914,
12,
1401,
16,
707,
16,
365,
16,
2623,
16,
1519,
74,
16,
2146,
16,
7352,
16,
1400,
16,
394,
12208,
3092,
694,
12,
... |
break; | continue; | public List translateRelativePaths(IFile file, String fileName, List includes) { List translatedIncludes = new ArrayList(includes.size()); for (Iterator i = includes.iterator(); i.hasNext(); ) { String include = (String) i.next(); IPath includePath = new Path(include); if (!includePath.isAbsolute()) { // check if it is a relative path if (include.startsWith("..") || include.startsWith(".")) { //$NON-NLS-1$ //$NON-NLS-2$ // First try the current working directory IPath pwd = getWorkingDirectory(); if (!pwd.isAbsolute()) { pwd = fProject.getLocation().append(pwd); } IPath candidatePath = pwd.append(includePath); File dir = candidatePath.makeAbsolute().toFile(); if (dir.exists()) { translatedIncludes.add(candidatePath.toString()); break; } else { // try to deduce a current path from the fileName format if (file != null && fileName != null) { // TODO VMIR implement heuristics to translate relative path when the working directory is invalid // For now create a marker to identify prospective cases generateMarker(file.getProject(), -1, "Ambiguous include path: "+include, //$NON-NLS-1$ IMarkerGenerator.SEVERITY_WARNING, fileName); } } } } // TODO VMIR for now add unresolved paths as well translatedIncludes.add(include); } return translatedIncludes; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/e75bafa4a4e6c14b60634418bc08cee3200fcd49/ScannerInfoConsoleParserUtility.java/buggy/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/ScannerInfoConsoleParserUtility.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
4204,
8574,
4466,
12,
45,
812,
585,
16,
514,
3968,
16,
987,
6104,
13,
288,
202,
202,
682,
9955,
16815,
273,
394,
2407,
12,
18499,
18,
1467,
10663,
202,
202,
1884,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
4204,
8574,
4466,
12,
45,
812,
585,
16,
514,
3968,
16,
987,
6104,
13,
288,
202,
202,
682,
9955,
16815,
273,
394,
2407,
12,
18499,
18,
1467,
10663,
202,
202,
1884,
261,
... |
public DurableSubscriptionHolder(String name, LocalTopic topic, LocalQueue queue) | public DurableSubscriptionHolder(String name, LocalTopic topic, LocalQueue queue, String selector) | public DurableSubscriptionHolder(String name, LocalTopic topic, LocalQueue queue) { this.name = name; this.queue = queue; this.topic = topic; } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/f7221d281ba7a07fb4ac87aab18e01ea4018e629/DurableSubscriptionHolder.java/buggy/src/main/org/jboss/jms/server/DurableSubscriptionHolder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
463,
7463,
6663,
6064,
12,
780,
508,
16,
3566,
6657,
3958,
16,
3566,
3183,
2389,
16,
514,
3451,
13,
282,
288,
1377,
333,
18,
529,
273,
508,
31,
1377,
333,
18,
4000,
273,
2389,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
463,
7463,
6663,
6064,
12,
780,
508,
16,
3566,
6657,
3958,
16,
3566,
3183,
2389,
16,
514,
3451,
13,
282,
288,
1377,
333,
18,
529,
273,
508,
31,
1377,
333,
18,
4000,
273,
2389,
3... |
Object boundClosure = binding.getVariable(name); if (boundClosure != null && boundClosure instanceof Closure) { return ((Closure) boundClosure).call(args); } else { | try { if (name.equals(mme.getMethod())) { Object boundClosure = binding.getVariable(name); if (boundClosure != null && boundClosure instanceof Closure) { return ((Closure) boundClosure).call(args); } else { throw mme; } } else { throw mme; } } catch (MissingPropertyException mpe) { | public Object invokeMethod(String name, Object args) { try { return super.invokeMethod(name, args); } // if the method was not found in the current scope (the script's methods) // let's try to see if there's a method closure with the same name in the binding catch (MissingMethodException mme) { Object boundClosure = binding.getVariable(name); if (boundClosure != null && boundClosure instanceof Closure) { return ((Closure) boundClosure).call(args); } else { throw mme; } } } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/f8e7058e4da417dc2b5f0c3c1fab691b7c1e11d4/Script.java/buggy/src/main/groovy/lang/Script.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
27632,
12,
780,
508,
16,
1033,
833,
13,
288,
3639,
775,
288,
5411,
327,
2240,
18,
14407,
1305,
12,
529,
16,
833,
1769,
3639,
289,
7734,
368,
309,
326,
707,
1703,
486,
1392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
27632,
12,
780,
508,
16,
1033,
833,
13,
288,
3639,
775,
288,
5411,
327,
2240,
18,
14407,
1305,
12,
529,
16,
833,
1769,
3639,
289,
7734,
368,
309,
326,
707,
1703,
486,
1392,
... |
}); } catch (Exception e) { __log.error("DbError", e); throw new ProcessingException("DbError",e); | return ret; | public InstanceInfoListDocument listInstances(String filter, String order, int limit) { InstanceInfoListDocument ret = InstanceInfoListDocument.Factory.newInstance(); final TInstanceInfoList infolist = ret.addNewInstanceInfoList(); final InstanceFilter instanceFilter = new InstanceFilter(filter, order, limit); try { _db.exec(new BpelDatabase.Callable<Object>() { public Object run(BpelDAOConnection conn) { Collection<ProcessInstanceDAO> instances = conn.instanceQuery(instanceFilter); for (ProcessInstanceDAO instance : instances) { fillInstanceInfo(infolist.addNewInstanceInfo(), instance); } return null; } }); } catch (Exception e) { __log.error("DbError", e); throw new ProcessingException("DbError",e); } return ret; } | 47044 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47044/40604da2488c0e0e9de3a307e5a05bd456b9a02a/ProcessAndInstanceManagementImpl.java/clean/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5180,
17914,
2519,
666,
5361,
12,
780,
1034,
16,
514,
1353,
16,
509,
1800,
13,
288,
565,
5180,
17914,
2519,
325,
273,
5180,
17914,
2519,
18,
1733,
18,
2704,
1442,
5621,
565,
727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5180,
17914,
2519,
666,
5361,
12,
780,
1034,
16,
514,
1353,
16,
509,
1800,
13,
288,
565,
5180,
17914,
2519,
325,
273,
5180,
17914,
2519,
18,
1733,
18,
2704,
1442,
5621,
565,
727,
... |
throw new TckInternalError("A timeout collect was attempted when the timeoutCollector was null"); | throw new TckInternalError( "A timeout collect was attempted when the timeoutCollector was null"); | public TimeoutEvent extractCollectedTimeoutEvent() { if (timeoutCollector == null) throw new TckInternalError("A timeout collect was attempted when the timeoutCollector was null"); TimeoutEvent collectedEvent = timeoutCollector.collectedEvent; sipProvider.removeSipListener(timeoutCollector); resetCollectors(); return collectedEvent; } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/d3bce65e49e71ee7df15bd72fd338535d4501bc1/SipEventCollector.java/buggy/trunk/src/test/tck/msgflow/SipEventCollector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7804,
1133,
2608,
10808,
329,
2694,
1133,
1435,
288,
202,
202,
430,
261,
4538,
7134,
422,
446,
13,
1082,
202,
12849,
394,
399,
363,
20980,
2932,
37,
2021,
3274,
1703,
18121,
134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7804,
1133,
2608,
10808,
329,
2694,
1133,
1435,
288,
202,
202,
430,
261,
4538,
7134,
422,
446,
13,
1082,
202,
12849,
394,
399,
363,
20980,
2932,
37,
2021,
3274,
1703,
18121,
134... |
public synchronized void write (byte[] buffer, int offset, int add) | public synchronized void write (int oneByte) | public synchronized void write (byte[] buffer, int offset, int add) { // If ADD < 0 then arraycopy will throw the appropriate error for // us. if (add >= 0) resize (add); System.arraycopy(buffer, offset, buf, count, add); count += add; } | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/daca25b853b52ea5035f6979a325fe030df38870/ByteArrayOutputStream.java/buggy/libjava/java/io/ByteArrayOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3852,
918,
1045,
261,
474,
1245,
3216,
13,
225,
288,
565,
368,
971,
11689,
411,
374,
1508,
8817,
903,
604,
326,
5505,
555,
364,
565,
368,
584,
18,
565,
309,
261,
1289,
1545,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3852,
918,
1045,
261,
474,
1245,
3216,
13,
225,
288,
565,
368,
971,
11689,
411,
374,
1508,
8817,
903,
604,
326,
5505,
555,
364,
565,
368,
584,
18,
565,
309,
261,
1289,
1545,
374,
... |
Frame frame = new Frame("PostgreSQL ImageViewer v6.3 rev 1"); | Frame frame = new Frame("PostgreSQL ImageViewer v6.4 rev 1"); | public static void main(String args[]) { if(args.length!=3) { instructions(); System.exit(1); } try { Frame frame = new Frame("PostgreSQL ImageViewer v6.3 rev 1"); frame.setLayout(new BorderLayout()); ImageViewer viewer = new ImageViewer(frame,args[0],args[1],args[2]); frame.pack(); frame.setVisible(true); } catch(Exception ex) { System.err.println("Exception caught.\n"+ex); ex.printStackTrace(); } } | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/03ab5f01740a7c2c3fe570d5253aa9bd039d0c70/ImageViewer.java/clean/src/interfaces/jdbc/example/ImageViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
225,
288,
565,
309,
12,
1968,
18,
2469,
5,
33,
23,
13,
288,
1377,
12509,
5621,
1377,
2332,
18,
8593,
12,
21,
1769,
565,
289,
3639,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
225,
288,
565,
309,
12,
1968,
18,
2469,
5,
33,
23,
13,
288,
1377,
12509,
5621,
1377,
2332,
18,
8593,
12,
21,
1769,
565,
289,
3639,
775,
... |
segments[i] = new Segment(splitfileType, dataBlocks, checkBlocks, this, archiveContext, ctx, maxTempLength, splitUseLengths); | segments[i] = new Segment(splitfileType, dataBlocks, checkBlocks, this, archiveContext, ctx, maxTempLength, splitUseLengths, blockLength); | public SplitFetcher(Metadata metadata, long maxTempLength, ArchiveContext archiveContext, FetcherContext ctx) throws MetadataParseException { actx = archiveContext; fctx = ctx; overrideLength = metadata.dataLength; this.maxTempLength = maxTempLength; splitfileType = metadata.getSplitfileType(); splitfileDataBlocks = metadata.getSplitfileDataKeys(); splitfileCheckBlocks = metadata.getSplitfileCheckKeys(); splitUseLengths = metadata.splitUseLengths; if(splitfileType == Metadata.SPLITFILE_NONREDUNDANT) { // Don't need to do much - just fetch everything and piece it together. blocksPerSegment = -1; checkBlocksPerSegment = -1; segmentCount = 1; } else if(splitfileType == Metadata.SPLITFILE_ONION_STANDARD) { blocksPerSegment = 128; checkBlocksPerSegment = 64; segmentCount = (splitfileDataBlocks.length / blocksPerSegment) + (splitfileDataBlocks.length % blocksPerSegment == 0 ? 0 : 1); // Onion, 128/192. // Will be segmented. } else throw new MetadataParseException("Unknown splitfile format: "+splitfileType); segments = new Segment[segmentCount]; // initially null on all entries if(segmentCount == 1) { segments[0] = new Segment(splitfileType, splitfileDataBlocks, splitfileCheckBlocks, this, archiveContext, ctx, maxTempLength, splitUseLengths); } else { int dataBlocksPtr = 0; int checkBlocksPtr = 0; for(int i=0;i<segments.length;i++) { // Create a segment. Give it its keys. int copyDataBlocks = Math.min(splitfileDataBlocks.length - dataBlocksPtr, blocksPerSegment); int copyCheckBlocks = Math.min(splitfileCheckBlocks.length - checkBlocksPtr, checkBlocksPerSegment); FreenetURI[] dataBlocks = new FreenetURI[copyDataBlocks]; FreenetURI[] checkBlocks = new FreenetURI[copyCheckBlocks]; if(copyDataBlocks > 0) System.arraycopy(splitfileDataBlocks, dataBlocksPtr, dataBlocks, 0, copyDataBlocks); if(copyCheckBlocks > 0) System.arraycopy(splitfileCheckBlocks, checkBlocksPtr, checkBlocks, 0, copyCheckBlocks); dataBlocksPtr += copyDataBlocks; checkBlocksPtr += copyCheckBlocks; segments[i] = new Segment(splitfileType, dataBlocks, checkBlocks, this, archiveContext, ctx, maxTempLength, splitUseLengths); } } unstartedSegments = segments; unstartedSegmentsCount = segments.length; } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/6409afdcb2a1c16496544e23537bea624c517930/SplitFetcher.java/clean/src/freenet/client/SplitFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5385,
16855,
12,
2277,
1982,
16,
1525,
943,
7185,
1782,
16,
13124,
1042,
5052,
1042,
16,
8065,
264,
1042,
1103,
13,
1216,
6912,
13047,
288,
202,
202,
621,
92,
273,
5052,
1042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5385,
16855,
12,
2277,
1982,
16,
1525,
943,
7185,
1782,
16,
13124,
1042,
5052,
1042,
16,
8065,
264,
1042,
1103,
13,
1216,
6912,
13047,
288,
202,
202,
621,
92,
273,
5052,
1042,
... |
mouseEventTarget = pressedComponent; | mouseEventTarget = pressedComponent; | private void acquireComponentForMouseEvent(MouseEvent me) { int x = me.getX(); int y = me.getY(); // Find the candidate which should receive this event. Component parent = frame.getContentPane(); if (parent == null) return; Component candidate = null; Point p = me.getPoint(); while (candidate == null && parent != null) { candidate = SwingUtilities.getDeepestComponentAt(parent, p.x, p.y); if (candidate == null) { p = SwingUtilities.convertPoint(parent, p.x, p.y, parent.getParent()); parent = parent.getParent(); } } // If the only candidate we found was the native container itself, // don't dispatch any event at all. We only care about the lightweight // children here. if (candidate == frame.getContentPane()) candidate = null; // If our candidate is new, inform the old target we're leaving. if (lastComponentEntered != null && lastComponentEntered.isShowing() && lastComponentEntered != candidate) { Point tp = SwingUtilities.convertPoint(frame.getContentPane(), x, y, lastComponentEntered); MouseEvent exited = new MouseEvent(lastComponentEntered, MouseEvent.MOUSE_EXITED, me.getWhen(), me.getModifiersEx(), tp.x, tp.y, me.getClickCount(), me.isPopupTrigger(), me.getButton()); tempComponent = lastComponentEntered; lastComponentEntered = null; tempComponent.dispatchEvent(exited); } // If we have a candidate, maybe enter it. if (candidate != null) { mouseEventTarget = candidate; if (candidate.isLightweight() && candidate.isShowing() && candidate != frame.getContentPane() && candidate != lastComponentEntered) { lastComponentEntered = mouseEventTarget; Point cp = SwingUtilities.convertPoint(frame.getContentPane(), x, y, lastComponentEntered); MouseEvent entered = new MouseEvent(lastComponentEntered, MouseEvent.MOUSE_ENTERED, me.getWhen(), me.getModifiersEx(), cp.x, cp.y, me.getClickCount(), me.isPopupTrigger(), me.getButton()); lastComponentEntered.dispatchEvent(entered); } } if (me.getID() == MouseEvent.MOUSE_RELEASED || me.getID() == MouseEvent.MOUSE_PRESSED && pressCount > 0 || me.getID() == MouseEvent.MOUSE_DRAGGED) // If any of the following events occur while a button is held down, // they should be dispatched to the same component to which the // original MOUSE_PRESSED event was dispatched: // - MOUSE_RELEASED // - MOUSE_PRESSED: another button pressed while the first is held down // - MOUSE_DRAGGED mouseEventTarget = pressedComponent; else if (me.getID() == MouseEvent.MOUSE_CLICKED) { // Don't dispatch CLICKED events whose target is not the same as the // target for the original PRESSED event. if (candidate != pressedComponent) mouseEventTarget = null; else if (pressCount == 0) pressedComponent = null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicInternalFrameUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10533,
1841,
1290,
9186,
1133,
12,
9186,
1133,
1791,
13,
565,
288,
1377,
509,
619,
273,
1791,
18,
588,
60,
5621,
1377,
509,
677,
273,
1791,
18,
588,
61,
5621,
1377,
368,
4163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10533,
1841,
1290,
9186,
1133,
12,
9186,
1133,
1791,
13,
565,
288,
1377,
509,
619,
273,
1791,
18,
588,
60,
5621,
1377,
509,
677,
273,
1791,
18,
588,
61,
5621,
1377,
368,
4163... |
ve.init(velocityPropertiesFile.getAbsolutePath()); | String file = velocityPropertiesFile.getAbsolutePath(); ExtendedProperties config = new ExtendedProperties(file); ve.setExtendedProperties(config); | public void execute () throws BuildException { DirectoryScanner scanner; String[] list; String[] dirs; if (baseDir == null) { baseDir = project.resolveFile("."); } if (destDir == null ) { String msg = "destdir attribute must be set!"; throw new BuildException(msg); } if (style == null) { throw new BuildException("style attribute must be set!"); } if (velocityPropertiesFile == null) { velocityPropertiesFile = new File("velocity.properties"); } /* * If the props file doesn't exist AND a templatePath hasn't * been defined, then throw the exception. */ if ( !velocityPropertiesFile.exists() && templatePath == null ) { throw new BuildException ("No template path and could not " + "locate velocity.properties file: " + velocityPropertiesFile.getAbsolutePath()); } log("Transforming into: " + destDir.getAbsolutePath(), Project.MSG_INFO); // projectFile relative to baseDir if (projectAttribute != null && projectAttribute.length() > 0) { projectFile = new File(baseDir, projectAttribute); if (projectFile.exists()) { projectFileLastModified = projectFile.lastModified(); } else { log ("Project file is defined, but could not be located: " + projectFile.getAbsolutePath(), Project.MSG_INFO ); projectFile = null; } } Document projectDocument = null; try { if ( velocityPropertiesFile.exists() ) { ve.init(velocityPropertiesFile.getAbsolutePath()); } else if (templatePath != null && templatePath.length() > 0) { ve.setProperty( RuntimeConstants.FILE_RESOURCE_LOADER_PATH, templatePath); ve.init(); } // get the last modification of the VSL stylesheet styleSheetLastModified = ve.getTemplate( style ).getLastModified(); // Build the Project file document if (projectFile != null) { projectDocument = builder.build(projectFile); } } catch (Exception e) { log("Error: " + e.toString(), Project.MSG_INFO); throw new BuildException(e); } // find the files/directories scanner = getDirectoryScanner(baseDir); // get a list of files to work on list = scanner.getIncludedFiles(); for (int i = 0;i < list.length; ++i) { process( baseDir, list[i], destDir, projectDocument ); } } | 55820 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55820/ad6c98037f434ce1784fa9bd2c639688997402e5/AnakiaTask.java/buggy/src/java/org/apache/velocity/anakia/AnakiaTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1832,
1216,
18463,
565,
288,
3639,
8930,
11338,
7683,
31,
3639,
514,
8526,
540,
666,
31,
3639,
514,
8526,
540,
7717,
31,
3639,
309,
261,
1969,
1621,
422,
446,
13,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1832,
1216,
18463,
565,
288,
3639,
8930,
11338,
7683,
31,
3639,
514,
8526,
540,
666,
31,
3639,
514,
8526,
540,
7717,
31,
3639,
309,
261,
1969,
1621,
422,
446,
13,
3639,
... |
AST __t824 = _t; | AST __t829 = _t; | public final void framephrase(AST _t) throws RecognitionException { AST framephrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t817 = _t; AST tmp133_AST_in = (AST)_t; match(_t,WITH); _t = _t.getFirstChild(); { _loop846: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ACCUMULATE: { AST __t819 = _t; AST tmp134_AST_in = (AST)_t; match(_t,ACCUMULATE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_3.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t819; _t = _t.getNextSibling(); break; } case ATTRSPACE: { AST tmp135_AST_in = (AST)_t; match(_t,ATTRSPACE); _t = _t.getNextSibling(); break; } case NOATTRSPACE: { AST tmp136_AST_in = (AST)_t; match(_t,NOATTRSPACE); _t = _t.getNextSibling(); break; } case CANCELBUTTON: { AST __t821 = _t; AST tmp137_AST_in = (AST)_t; match(_t,CANCELBUTTON); _t = _t.getFirstChild(); fld(_t,CQ.SYMBOL); _t = _retTree; _t = __t821; _t = _t.getNextSibling(); break; } case CENTERED: { AST tmp138_AST_in = (AST)_t; match(_t,CENTERED); _t = _t.getNextSibling(); break; } case COLUMN: { AST __t822 = _t; AST tmp139_AST_in = (AST)_t; match(_t,COLUMN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t822; _t = _t.getNextSibling(); break; } case CONTEXTHELP: { AST tmp140_AST_in = (AST)_t; match(_t,CONTEXTHELP); _t = _t.getNextSibling(); break; } case CONTEXTHELPFILE: { AST tmp141_AST_in = (AST)_t; match(_t,CONTEXTHELPFILE); _t = _t.getNextSibling(); expression(_t); _t = _retTree; break; } case DEFAULTBUTTON: { AST __t823 = _t; AST tmp142_AST_in = (AST)_t; match(_t,DEFAULTBUTTON); _t = _t.getFirstChild(); fld(_t,CQ.SYMBOL); _t = _retTree; _t = __t823; _t = _t.getNextSibling(); break; } case EXPORT: { AST tmp143_AST_in = (AST)_t; match(_t,EXPORT); _t = _t.getNextSibling(); break; } case FITLASTCOLUMN: { AST tmp144_AST_in = (AST)_t; match(_t,FITLASTCOLUMN); _t = _t.getNextSibling(); break; } case FONT: { AST __t824 = _t; AST tmp145_AST_in = (AST)_t; match(_t,FONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t824; _t = _t.getNextSibling(); break; } case FONTBASEDLAYOUT: { AST tmp146_AST_in = (AST)_t; match(_t,FONTBASEDLAYOUT); _t = _t.getNextSibling(); break; } case FRAME: { frame_ref(_t); _t = _retTree; break; } case LABELFONT: { AST __t825 = _t; AST tmp147_AST_in = (AST)_t; match(_t,LABELFONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t825; _t = _t.getNextSibling(); break; } case LABELDCOLOR: { AST __t826 = _t; AST tmp148_AST_in = (AST)_t; match(_t,LABELDCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t826; _t = _t.getNextSibling(); break; } case LABELFGCOLOR: { AST __t827 = _t; AST tmp149_AST_in = (AST)_t; match(_t,LABELFGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t827; _t = _t.getNextSibling(); break; } case LABELBGCOLOR: { AST __t828 = _t; AST tmp150_AST_in = (AST)_t; match(_t,LABELBGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t828; _t = _t.getNextSibling(); break; } case MULTIPLE: { AST tmp151_AST_in = (AST)_t; match(_t,MULTIPLE); _t = _t.getNextSibling(); break; } case SINGLE: { AST tmp152_AST_in = (AST)_t; match(_t,SINGLE); _t = _t.getNextSibling(); break; } case SEPARATORS: { AST tmp153_AST_in = (AST)_t; match(_t,SEPARATORS); _t = _t.getNextSibling(); break; } case NOSEPARATORS: { AST tmp154_AST_in = (AST)_t; match(_t,NOSEPARATORS); _t = _t.getNextSibling(); break; } case NOASSIGN: { AST tmp155_AST_in = (AST)_t; match(_t,NOASSIGN); _t = _t.getNextSibling(); break; } case NOROWMARKERS: { AST tmp156_AST_in = (AST)_t; match(_t,NOROWMARKERS); _t = _t.getNextSibling(); break; } case NOSCROLLBARVERTICAL: { AST tmp157_AST_in = (AST)_t; match(_t,NOSCROLLBARVERTICAL); _t = _t.getNextSibling(); break; } case SCROLLBARVERTICAL: { AST tmp158_AST_in = (AST)_t; match(_t,SCROLLBARVERTICAL); _t = _t.getNextSibling(); break; } case ROWHEIGHTCHARS: { AST __t829 = _t; AST tmp159_AST_in = (AST)_t; match(_t,ROWHEIGHTCHARS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t829; _t = _t.getNextSibling(); break; } case ROWHEIGHTPIXELS: { AST __t830 = _t; AST tmp160_AST_in = (AST)_t; match(_t,ROWHEIGHTPIXELS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t830; _t = _t.getNextSibling(); break; } case EXPANDABLE: { AST tmp161_AST_in = (AST)_t; match(_t,EXPANDABLE); _t = _t.getNextSibling(); break; } case DROPTARGET: { AST tmp162_AST_in = (AST)_t; match(_t,DROPTARGET); _t = _t.getNextSibling(); break; } case NOAUTOVALIDATE: { AST tmp163_AST_in = (AST)_t; match(_t,NOAUTOVALIDATE); _t = _t.getNextSibling(); break; } case NOCOLUMNSCROLLING: { AST tmp164_AST_in = (AST)_t; match(_t,NOCOLUMNSCROLLING); _t = _t.getNextSibling(); break; } case KEEPTABORDER: { AST tmp165_AST_in = (AST)_t; match(_t,KEEPTABORDER); _t = _t.getNextSibling(); break; } case NOBOX: { AST tmp166_AST_in = (AST)_t; match(_t,NOBOX); _t = _t.getNextSibling(); break; } case NOEMPTYSPACE: { AST tmp167_AST_in = (AST)_t; match(_t,NOEMPTYSPACE); _t = _t.getNextSibling(); break; } case NOHIDE: { AST tmp168_AST_in = (AST)_t; match(_t,NOHIDE); _t = _t.getNextSibling(); break; } case NOLABELS: { AST tmp169_AST_in = (AST)_t; match(_t,NOLABELS); _t = _t.getNextSibling(); break; } case USEDICTEXPS: { AST tmp170_AST_in = (AST)_t; match(_t,USEDICTEXPS); _t = _t.getNextSibling(); break; } case NOVALIDATE: { AST tmp171_AST_in = (AST)_t; match(_t,NOVALIDATE); _t = _t.getNextSibling(); break; } case NOHELP: { AST tmp172_AST_in = (AST)_t; match(_t,NOHELP); _t = _t.getNextSibling(); break; } case NOUNDERLINE: { AST tmp173_AST_in = (AST)_t; match(_t,NOUNDERLINE); _t = _t.getNextSibling(); break; } case OVERLAY: { AST tmp174_AST_in = (AST)_t; match(_t,OVERLAY); _t = _t.getNextSibling(); break; } case PAGEBOTTOM: { AST tmp175_AST_in = (AST)_t; match(_t,PAGEBOTTOM); _t = _t.getNextSibling(); break; } case PAGETOP: { AST tmp176_AST_in = (AST)_t; match(_t,PAGETOP); _t = _t.getNextSibling(); break; } case NOTABSTOP: { AST tmp177_AST_in = (AST)_t; match(_t,NOTABSTOP); _t = _t.getNextSibling(); break; } case RETAIN: { AST __t831 = _t; AST tmp178_AST_in = (AST)_t; match(_t,RETAIN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t831; _t = _t.getNextSibling(); break; } case ROW: { AST __t832 = _t; AST tmp179_AST_in = (AST)_t; match(_t,ROW); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t832; _t = _t.getNextSibling(); break; } case SCREENIO: { AST tmp180_AST_in = (AST)_t; match(_t,SCREENIO); _t = _t.getNextSibling(); break; } case STREAMIO: { AST tmp181_AST_in = (AST)_t; match(_t,STREAMIO); _t = _t.getNextSibling(); break; } case SCROLL: { AST __t833 = _t; AST tmp182_AST_in = (AST)_t; match(_t,SCROLL); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t833; _t = _t.getNextSibling(); break; } case SCROLLABLE: { AST tmp183_AST_in = (AST)_t; match(_t,SCROLLABLE); _t = _t.getNextSibling(); break; } case SIDELABELS: { AST tmp184_AST_in = (AST)_t; match(_t,SIDELABELS); _t = _t.getNextSibling(); break; } case STREAM: { stream_name(_t); _t = _retTree; break; } case THREED: { AST tmp185_AST_in = (AST)_t; match(_t,THREED); _t = _t.getNextSibling(); break; } case TOOLTIP: { tooltip_expr(_t); _t = _retTree; break; } case TOPONLY: { AST tmp186_AST_in = (AST)_t; match(_t,TOPONLY); _t = _t.getNextSibling(); break; } case USETEXT: { AST tmp187_AST_in = (AST)_t; match(_t,USETEXT); _t = _t.getNextSibling(); break; } case V6FRAME: { AST tmp188_AST_in = (AST)_t; match(_t,V6FRAME); _t = _t.getNextSibling(); break; } case USEREVVIDEO: { AST tmp189_AST_in = (AST)_t; match(_t,USEREVVIDEO); _t = _t.getNextSibling(); break; } case USEUNDERLINE: { AST tmp190_AST_in = (AST)_t; match(_t,USEUNDERLINE); _t = _t.getNextSibling(); break; } case VIEWAS: { AST __t834 = _t; AST tmp191_AST_in = (AST)_t; match(_t,VIEWAS); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DIALOGBOX: { AST __t836 = _t; AST tmp192_AST_in = (AST)_t; match(_t,DIALOGBOX); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DIALOGHELP: { AST tmp193_AST_in = (AST)_t; match(_t,DIALOGHELP); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_3.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t836; _t = _t.getNextSibling(); break; } case MESSAGELINE: { AST tmp194_AST_in = (AST)_t; match(_t,MESSAGELINE); _t = _t.getNextSibling(); break; } case STATUSBAR: { AST tmp195_AST_in = (AST)_t; match(_t,STATUSBAR); _t = _t.getNextSibling(); break; } case TOOLBAR: { AST __t839 = _t; AST tmp196_AST_in = (AST)_t; match(_t,TOOLBAR); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ATTACHMENT: { AST tmp197_AST_in = (AST)_t; match(_t,ATTACHMENT); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TOP: { AST tmp198_AST_in = (AST)_t; match(_t,TOP); _t = _t.getNextSibling(); break; } case BOTTOM: { AST tmp199_AST_in = (AST)_t; match(_t,BOTTOM); _t = _t.getNextSibling(); break; } case LEFT: { AST tmp200_AST_in = (AST)_t; match(_t,LEFT); _t = _t.getNextSibling(); break; } case RIGHT: { AST tmp201_AST_in = (AST)_t; match(_t,RIGHT); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t839; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } _t = __t834; _t = _t.getNextSibling(); break; } case WIDTH: { AST __t842 = _t; AST tmp202_AST_in = (AST)_t; match(_t,WIDTH); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t842; _t = _t.getNextSibling(); break; } case IN_KW: { AST __t843 = _t; AST tmp203_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getFirstChild(); AST tmp204_AST_in = (AST)_t; match(_t,WINDOW); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t843; _t = _t.getNextSibling(); break; } case BGCOLOR: case COLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { colorspecification(_t); _t = _retTree; break; } case AT: { atphrase(_t); _t = _retTree; break; } case SIZE: case SIZECHARS: case SIZEPIXELS: { sizephrase(_t); _t = _retTree; break; } case TITLE: { titlephrase(_t); _t = _retTree; break; } case With_columns: { AST __t844 = _t; AST tmp205_AST_in = (AST)_t; match(_t,With_columns); _t = _t.getFirstChild(); expression(_t); _t = _retTree; AST tmp206_AST_in = (AST)_t; match(_t,COLUMNS); _t = _t.getNextSibling(); _t = __t844; _t = _t.getNextSibling(); break; } case With_down: { AST __t845 = _t; AST tmp207_AST_in = (AST)_t; match(_t,With_down); _t = _t.getFirstChild(); expression(_t); _t = _retTree; AST tmp208_AST_in = (AST)_t; match(_t,DOWN); _t = _t.getNextSibling(); _t = __t845; _t = _t.getNextSibling(); break; } case DOWN: { AST tmp209_AST_in = (AST)_t; match(_t,DOWN); _t = _t.getNextSibling(); break; } case WIDGETID: { widget_id(_t); _t = _retTree; break; } case WITH: { AST tmp210_AST_in = (AST)_t; match(_t,WITH); _t = _t.getNextSibling(); break; } default: { break _loop846; } } } while (true); } _t = __t817; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2623,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2623,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2623,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2623,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
throw new PainterException("eq: wrong arguments"); | throw new PainterException("lt: wrong arguments"); | public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("eq: wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("eq: wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 == d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("eq: wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) == 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/3cd4a973dbdca1f7072d8e189d388c5a878cc9a6/PAContext.java/buggy/itext/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
1769,
3639,
309,
16051,
261,
892,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
1769,
3639,
309,
16051,
261,
892,
63... |
int featureID, Class baseClass, NotificationChain msgs ) | int featureID, NotificationChain msgs ) | public NotificationChain eInverseRemove( InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs ) { if ( featureID >= 0 ) { switch ( eDerivedStructuralFeatureID( featureID, baseClass ) ) { case ComponentPackage.GRID__LINE_ATTRIBUTES : return basicSetLineAttributes( null, msgs ); case ComponentPackage.GRID__TICK_ATTRIBUTES : return basicSetTickAttributes( null, msgs ); default : return eDynamicInverseRemove( otherEnd, featureID, baseClass, msgs ); } } return eBasicSetContainer( null, featureID, msgs ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/036e8c78765730b146e5854b9d6c397a296fed86/GridImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/component/impl/GridImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27050,
425,
16376,
3288,
12,
3186,
8029,
1308,
1638,
16,
1082,
202,
474,
6966,
16,
1659,
23955,
16,
27050,
8733,
262,
202,
95,
202,
202,
430,
261,
6966,
1545,
374,
262,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27050,
425,
16376,
3288,
12,
3186,
8029,
1308,
1638,
16,
1082,
202,
474,
6966,
16,
1659,
23955,
16,
27050,
8733,
262,
202,
95,
202,
202,
430,
261,
6966,
1545,
374,
262,
202,
2... |
return _editable && (_modified || ((ByteArrayEditor) viewTabbedPane.getSelectedComponent()).isModified()); | ByteArrayEditor ed = ((ByteArrayEditor) viewTabbedPane.getSelectedComponent()); boolean selectedModified = false; if (ed != null) { selectedModified = ed.isModified(); } return _editable && (_modified || selectedModified); | public boolean isModified() { return _editable && (_modified || ((ByteArrayEditor) viewTabbedPane.getSelectedComponent()).isModified()); } | 8554 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8554/7817e8f194a2d7456129959e37d9bb627437dd6c/ContentPanel.java/clean/src/org/owasp/webscarab/ui/swing/ContentPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
22502,
1435,
288,
3639,
7964,
6946,
1675,
273,
14015,
8826,
6946,
13,
1476,
5661,
2992,
8485,
18,
588,
7416,
1841,
10663,
1250,
3170,
4575,
273,
629,
31,
309,
261,
329,
480,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
22502,
1435,
288,
3639,
7964,
6946,
1675,
273,
14015,
8826,
6946,
13,
1476,
5661,
2992,
8485,
18,
588,
7416,
1841,
10663,
1250,
3170,
4575,
273,
629,
31,
309,
261,
329,
480,
4... |
public SimpleDeclarationWrapper() | public SimpleDeclarationWrapper( IParent item ) | public SimpleDeclarationWrapper() { } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0ff98a152ca4ebe0c2b3707e158d5194dc4acfeb/SimpleDeclarationWrapper.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4477,
6094,
3611,
1435,
202,
95,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4477,
6094,
3611,
1435,
202,
95,
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,
... |
static int get_map_element_count(java.lang.Object c, java.lang.Object n) { | static int get_map_element_count(java.lang.Object p0, java.lang.Object p1) { | static int get_map_element_count(java.lang.Object c, java.lang.Object n) { int count = 0; Map mc = (Map) c; if (mc != null) { java.lang.Object[] a = mc.names; int i = 0; int size = ArrayHandler.get_array_size(a); java.lang.Object name = null; while (i < size) { name = ArrayHandler.get_array_element(a, i); if (name != null) { if (((java.lang.String) name).startsWith((java.lang.String) n)) {/*?? int begin = 0; java.lang.String sub = null; int number = 0; begin = ((java.lang.String) name).indexOf("_"); sub = ((java.lang.String) name).substring(begin + 1); number = Integer.parseInt(sub); if (number > count) { count = number; }*/ count++; } } else { // Reached last valid name. Only null entries left. break; } i++; } } else { java.lang.System.out.println("ERROR: Could not get element count. The map is null."); } return count; } | 11597 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11597/388a5a9cdb34f205f11095f15decba522814d968/MapHandler.java/buggy/trunk/src/cyboi/cyboi/MapHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
509,
336,
67,
1458,
67,
2956,
67,
1883,
12,
6290,
18,
4936,
18,
921,
293,
20,
16,
2252,
18,
4936,
18,
921,
293,
21,
13,
288,
3639,
509,
1056,
273,
374,
31,
3639,
1635,
6108,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
509,
336,
67,
1458,
67,
2956,
67,
1883,
12,
6290,
18,
4936,
18,
921,
293,
20,
16,
2252,
18,
4936,
18,
921,
293,
21,
13,
288,
3639,
509,
1056,
273,
374,
31,
3639,
1635,
6108,
27... |
page.printAhref(overviewLink, ROOT_FRAME_NAME, "Overview"); | page.printAhref(overviewLink, ROOT_FRAME, "Overview"); | protected void addNavigationBar(Symbol sym) { try { String overviewLink = Location.asSeenFrom(new URI(ROOT_PAGE), uri).toString(); String indexLink = Location.asSeenFrom(new URI(INDEX_PAGE_NAME), uri).toString(); String helpLink = Location.asSeenFrom(new URI(PAGE_HELP), uri).toString(); page.printlnOTag("table", ATTRS_NAVIGATION).indent(); page.printlnOTag("tr").indent(); page.printlnOTag("td", ATTRS_NAVIGATION_LINKS).indent(); page.printlnOTag("table").indent(); page.printlnOTag("tr").indent(); // overview link if (sym.isRoot()) page.printlnTag("td", ATTRS_NAVIGATION_SELECTED, "Overview"); else { page.printOTag("td", ATTRS_NAVIGATION_ENABLED); page.printAhref(overviewLink, ROOT_FRAME_NAME, "Overview"); page.printlnCTag("td"); } // index link if (sym == indexPage) page.printlnTag("td", ATTRS_NAVIGATION_SELECTED, "Index"); else { page.printOTag("td", ATTRS_NAVIGATION_ENABLED); page.printAhref(indexLink, ROOT_FRAME_NAME, "Index"); page.printlnCTag("td"); } // help link if (sym == helpPage) page.printlnTag("td", ATTRS_NAVIGATION_SELECTED, "Help"); else { page.printOTag("td", ATTRS_NAVIGATION_ENABLED); page.printAhref(helpLink, ROOT_FRAME_NAME, "Help"); page.printlnCTag("td"); } page.undent(); page.printlnCTag("tr").undent(); page.printlnCTag("table").undent(); page.printlnCTag("td"); // product & version page.printlnOTag("td", ATTRS_NAVIGATION_PRODUCT).indent(); addDocumentationTitle(new XMLAttribute[]{ new XMLAttribute("class", "doctitle")}); page.undent(); page.printlnCTag("td").undent(); page.printlnCTag("tr"); page.printlnOTag("tr").indent(); page.printlnTag("td", " ").undent(); page.printlnCTag("tr").undent(); page.printlnCTag("table"); } catch(Exception e) { throw Debug.abort(e); } } | 10130 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10130/d498875b09190325828a3310e400a110336e38af/HTMLGenerator.java/buggy/sources/scala/tools/scaladoc/HTMLGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
14301,
5190,
12,
5335,
5382,
13,
288,
202,
698,
288,
202,
565,
514,
18471,
2098,
273,
7050,
18,
345,
15160,
1265,
12,
2704,
3699,
12,
9185,
67,
11219,
3631,
2003,
2934,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
14301,
5190,
12,
5335,
5382,
13,
288,
202,
698,
288,
202,
565,
514,
18471,
2098,
273,
7050,
18,
345,
15160,
1265,
12,
2704,
3699,
12,
9185,
67,
11219,
3631,
2003,
2934,
... |
try { setLength((String) evalAttr("length", getLengthExpr(), String.class)); } catch (NullAttributeException ex) { } | if ((string = EvalHelper.evalString("length", getLengthExpr(), this, pageContext)) != null) setLength(string); | private void evaluateExpressions() throws JspException { try { setCollection(evalAttr("collection", getCollectionExpr(), Object.class)); } catch (NullAttributeException ex) { } try { setId((String) evalAttr("id", getIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setIndexId((String) evalAttr("indexId", getIndexIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setLength((String) evalAttr("length", getLengthExpr(), String.class)); } catch (NullAttributeException ex) { } try { setName((String) evalAttr("name", getNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOffset((String) evalAttr("offset", getOffsetExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setScope((String) evalAttr("scope", getScopeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setType((String) evalAttr("type", getTypeExpr(), String.class)); } catch (NullAttributeException ex) { } } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/022bd23c954cf673e53731849d562b3c295473f1/ELIterateTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/logic/ELIterateTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
2532,
12,
8622,
3843,
2932,
5548,
3113,
12075,
4742,
9334,
4766,
565,
1033,
18,
1106,
10019,
3639,
289,
1044,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
2532,
12,
8622,
3843,
2932,
5548,
3113,
12075,
4742,
9334,
4766,
565,
1033,
18,
1106,
10019,
3639,
289,
1044,
261,
... |
java.sql.ResultSet r = connection.ExecSQL("SELECT relname, relacl FROM pg_class, pg_user WHERE ( relkind = 'r' OR relkind = 'i') and relname !~ '^pg_' and relname !~ '^xin[vx][0-9]+' and usesysid = relowner and relname like '"+table.toLowerCase()+"' ORDER BY relname"); | java.sql.ResultSet r = connection.ExecSQL(null, "SELECT relname, relacl FROM pg_class, pg_user WHERE ( relkind = 'r' OR relkind = 'i') and relname !~ '^pg_' and relname !~ '^xin[vx][0-9]+' and usesysid = relowner and relname like '"+table.toLowerCase()+"' ORDER BY relname"); | public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException { Field f[] = new Field[8]; Vector v = new Vector(); if(table==null) table="%"; if(columnNamePattern==null) columnNamePattern="%"; else columnNamePattern=columnNamePattern.toLowerCase(); 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,"GRANTOR",iVarcharOid,32); f[5] = new Field(connection,"GRANTEE",iVarcharOid,32); f[6] = new Field(connection,"PRIVILEGE",iVarcharOid,32); f[7] = new Field(connection,"IS_GRANTABLE",iVarcharOid,32); // This is taken direct from the psql source java.sql.ResultSet r = connection.ExecSQL("SELECT relname, relacl FROM pg_class, pg_user WHERE ( relkind = 'r' OR relkind = 'i') and relname !~ '^pg_' and relname !~ '^xin[vx][0-9]+' and usesysid = relowner and relname like '"+table.toLowerCase()+"' ORDER BY relname"); while(r.next()) { byte[][] tuple = new byte[8][0]; tuple[0] = tuple[1]= "".getBytes(); DriverManager.println("relname=\""+r.getString(1)+"\" relacl=\""+r.getString(2)+"\""); // For now, don't add to the result as relacl needs to be processed. //v.addElement(tuple); } return new ResultSet(connection,f,v,"OK",1); } | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/5383b5d8ed6da5c90bcbdb63401b7d1d75db563d/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,
6716,
27692,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
16,
514,
7578,
3234,
13,
1216,
6483,
225,
288,
565,
2286,
284,
8526,
273,
394,
2286,
63,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2252,
18,
4669,
18,
13198,
6716,
27692,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
16,
514,
7578,
3234,
13,
1216,
6483,
225,
288,
565,
2286,
284,
8526,
273,
394,
2286,
63,
28,
... |
if (!identifierListeners.contains(identifierListener)) identifierListeners.add(identifierListener); | if (!identifierListeners.contains(identifierListener)) { identifierListeners.add(identifierListener); } | public void addIdentifierListener(IIdentifierListener identifierListener) { if (identifierListener == null) throw new NullPointerException(); if (identifierListeners == null) identifierListeners = new ArrayList(); if (!identifierListeners.contains(identifierListener)) identifierListeners.add(identifierListener); strongReferences.add(this); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/Identifier.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/Identifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
3004,
2223,
12,
45,
3004,
2223,
2756,
2223,
13,
288,
3639,
309,
261,
5644,
2223,
422,
446,
13,
5411,
604,
394,
10108,
5621,
3639,
309,
261,
5644,
5583,
422,
446,
13,
541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
3004,
2223,
12,
45,
3004,
2223,
2756,
2223,
13,
288,
3639,
309,
261,
5644,
2223,
422,
446,
13,
5411,
604,
394,
10108,
5621,
3639,
309,
261,
5644,
5583,
422,
446,
13,
541... |
public void visitTIsNewArray(TIsNewArray n) throws IOException { | public void visitTIsNewArray(/*@non_null*/TIsNewArray n) throws IOException { | public void visitTIsNewArray(TIsNewArray n) throws IOException { visitSons(n); // TODO Auto-generated method stub } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/67867c1e55343e2e2d3135b09cf373b0d4c4adac/TProofTyperVisitor.java/buggy/src/escjava/trunk/ESCTools/Escjava/java/escjava/vcGeneration/coq/TProofTyperVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
56,
2520,
1908,
1076,
12,
56,
2520,
1908,
1076,
290,
13,
1216,
1860,
288,
202,
202,
11658,
55,
7008,
12,
82,
1769,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
56,
2520,
1908,
1076,
12,
56,
2520,
1908,
1076,
290,
13,
1216,
1860,
288,
202,
202,
11658,
55,
7008,
12,
82,
1769,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
... |
byte[] b = new byte[ 4 ]; inputStream.read( b ); | byte[] b = new byte[ 4 ]; /* be sure that 4 bytes are in the stream */ int pos = 0; while ( pos < 4 ) { pos += inputStream.read( b, pos, ( int ) 4 - pos ); } | public static int readInt32( InputStream inputStream ) throws IOException { byte[] b = new byte[ 4 ]; inputStream.read( b ); return ( ( ( int ) b[ 0 ] ) & 0xFF ) + ( ( ( ( int ) b[ 1 ] ) & 0xFF ) << 8 ) + ( ( ( ( int ) b[ 2 ] ) & 0xFF ) << 16 ) + ( ( ( ( int ) b[ 3 ] ) & 0xFF ) << 24 ); } | 11075 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11075/c806622ab8f808bbfdd2afd2f6455a7566bd873d/Message.java/buggy/g2gui/src/net/mldonkey/g2gui/comm/Message.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
13731,
1578,
12,
5037,
10010,
262,
1216,
1860,
288,
202,
202,
7229,
8526,
324,
273,
394,
1160,
63,
1059,
308,
31,
3196,
202,
2630,
1228,
18,
896,
12,
324,
11272,
950... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
13731,
1578,
12,
5037,
10010,
262,
1216,
1860,
288,
202,
202,
7229,
8526,
324,
273,
394,
1160,
63,
1059,
308,
31,
3196,
202,
2630,
1228,
18,
896,
12,
324,
11272,
950... |
new PathVariableSelectionDialog(linkTargetField.getShell(), IResource.FILE | IResource.FOLDER); | new PathVariableSelectionDialog(linkTargetField.getShell(), variableTypes); | private void handleVariablesButtonPressed() { PathVariableSelectionDialog dialog = new PathVariableSelectionDialog(linkTargetField.getShell(), IResource.FILE | IResource.FOLDER); if (dialog.open() == IDialogConstants.OK_ID) { String[] variableNames = (String[]) dialog.getResult(); if (variableNames != null) { linkTargetField.setText(variableNames[0]); } }} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/b1ebb14a89ca9d7843879389da850e0ff4cf4a25/CreateLinkedResourceGroup.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CreateLinkedResourceGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
1640,
6158,
3616,
24624,
1435,
288,
202,
743,
3092,
6233,
6353,
6176,
273,
3196,
202,
2704,
2666,
3092,
6233,
6353,
12,
1232,
2326,
974,
18,
588,
13220,
9334,
467,
1420,
18,
3776,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
1640,
6158,
3616,
24624,
1435,
288,
202,
743,
3092,
6233,
6353,
6176,
273,
3196,
202,
2704,
2666,
3092,
6233,
6353,
12,
1232,
2326,
974,
18,
588,
13220,
9334,
467,
1420,
18,
3776,
5... |
protected void setRootPaneCheckingEnabled(boolean enabled) { checking = enabled; } | protected void setRootPaneCheckingEnabled(boolean enabled) { checking = enabled; } | protected void setRootPaneCheckingEnabled(boolean enabled) { checking = enabled; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2703ae3b51c371a2a79d28271cd57b4046c647d0/JDialog.java/clean/core/src/classpath/javax/javax/swing/JDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
31706,
8485,
14294,
1526,
12,
6494,
3696,
13,
288,
202,
202,
24609,
273,
3696,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
31706,
8485,
14294,
1526,
12,
6494,
3696,
13,
288,
202,
202,
24609,
273,
3696,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
System.err.println("\t-input <in> [-]"); System.err.println("\t-output <out>"); | System.err.println("\t-input <in> <multiple allowed>"); System.err.println("\t-output <outputdir> [\".\"]"); System.err.println("\t-name <api-name> <obligatory>"); | private static void usage() { System.err.println("usage: apigen.gen.c.Main [options]"); System.err.println("options:"); System.err.println("\t-prefix <prefix> [\"\"]"); System.err.println("\t-input <in> [-]"); System.err.println("\t-output <out>"); System.err.println("\t-prologue <prologue>"); System.err.println("\t-jtom"); System.err.println("\t-jtype"); System.err.println("\t-verbose"); System.exit(1); } | 3664 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3664/6e5a825da358fc26260621bdb2b86102f8775a3c/Main.java/buggy/apigen/apigen/gen/c/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
4084,
1435,
288,
202,
202,
3163,
18,
370,
18,
8222,
2932,
9167,
30,
513,
30577,
18,
4507,
18,
71,
18,
6376,
306,
2116,
4279,
1769,
202,
202,
3163,
18,
370,
18,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
4084,
1435,
288,
202,
202,
3163,
18,
370,
18,
8222,
2932,
9167,
30,
513,
30577,
18,
4507,
18,
71,
18,
6376,
306,
2116,
4279,
1769,
202,
202,
3163,
18,
370,
18,
82... |
iCodeTop = addByte((byte) TokenStream.ZERO, iCodeTop); | iCodeTop = addByte(TokenStream.ZERO, iCodeTop); | private int generateICode(Node node, int iCodeTop) { int type = node.getType(); Node child = node.getFirstChild(); Node firstChild = child; switch (type) { case TokenStream.FUNCTION : { iCodeTop = addByte((byte) TokenStream.CLOSURE, iCodeTop); Node fn = (Node) node.getProp(Node.FUNCTION_PROP); Short index = (Short) fn.getProp(Node.FUNCTION_PROP); iCodeTop = addByte((byte)(index.shortValue() >> 8), iCodeTop); iCodeTop = addByte((byte)(index.shortValue() & 0xff), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.SCRIPT : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { if (child.getType() != TokenStream.FUNCTION) iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.CASE : iCodeTop = updateLineNumber(node, iCodeTop); child = child.getNextSibling(); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.LABEL : case TokenStream.WITH : case TokenStream.LOOP : case TokenStream.DEFAULT : case TokenStream.BLOCK : case TokenStream.VOID : case TokenStream.NOP : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.COMMA : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); break; case TokenStream.SWITCH : { iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); int theLocalSlot = itsData.itsMaxLocals++; iCodeTop = addByte((byte) TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte((byte)theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; /* reminder - below we construct new GOTO nodes that aren't linked into the tree just for the purpose of having a node to pass to the addGoto routine. (Parallels codegen here). Seems unnecessary. */ Vector cases = (Vector) node.getProp(Node.CASES_PROP); for (int i = 0; i < cases.size(); i++) { Node thisCase = (Node)cases.elementAt(i); Node first = thisCase.getFirstChild(); // the case expression is the firstmost child // the rest will be generated when the case // statements are encountered as siblings of // the switch statement. iCodeTop = generateICode(first, iCodeTop); iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte((byte) theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.SHEQ, iCodeTop); Node target = new Node(TokenStream.TARGET); thisCase.addChildAfter(target, first); Node branch = new Node(TokenStream.IFEQ); branch.putProp(Node.TARGET_PROP, target); iCodeTop = addGoto(branch, TokenStream.IFEQ, iCodeTop); itsStackDepth--; } Node defaultNode = (Node) node.getProp(Node.DEFAULT_PROP); if (defaultNode != null) { Node defaultTarget = new Node(TokenStream.TARGET); defaultNode.getFirstChild().addChildToFront(defaultTarget); Node branch = new Node(TokenStream.GOTO); branch.putProp(Node.TARGET_PROP, defaultTarget); iCodeTop = addGoto(branch, TokenStream.GOTO, iCodeTop); } Node breakTarget = (Node) node.getProp(Node.BREAK_PROP); Node branch = new Node(TokenStream.GOTO); branch.putProp(Node.TARGET_PROP, breakTarget); iCodeTop = addGoto(branch, TokenStream.GOTO, iCodeTop); } break; case TokenStream.TARGET : { Object lblObect = node.getProp(Node.LABEL_PROP); if (lblObect == null) { int label = markLabel(acquireLabel(), iCodeTop); node.putProp(Node.LABEL_PROP, new Integer(label)); } else { int label = ((Integer)lblObect).intValue(); markLabel(label, iCodeTop); } // if this target has a FINALLY_PROP, it is a JSR target // and so has a PC value on the top of the stack if (node.getProp(Node.FINALLY_PROP) != null) { itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.EQOP : case TokenStream.RELOP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); int op = node.getInt(); if (version == Context.VERSION_1_2) { if (op == TokenStream.EQ) op = TokenStream.SHEQ; else if (op == TokenStream.NE) op = TokenStream.SHNE; } iCodeTop = addByte((byte) op, iCodeTop); itsStackDepth--; } break; case TokenStream.NEW : case TokenStream.CALL : { if (itsSourceFile != null && (itsData.itsSourceFile == null || ! itsSourceFile.equals(itsData.itsSourceFile))) itsData.itsSourceFile = itsSourceFile; iCodeTop = addByte((byte)TokenStream.SOURCEFILE, iCodeTop); int childCount = 0; short nameIndex = -1; while (child != null) { iCodeTop = generateICode(child, iCodeTop); if (nameIndex == -1) { if (child.getType() == TokenStream.NAME) nameIndex = (short)(itsData.itsStringTableIndex - 1); else if (child.getType() == TokenStream.GETPROP) nameIndex = (short)(itsData.itsStringTableIndex - 1); } child = child.getNextSibling(); childCount++; } if (node.getProp(Node.SPECIALCALL_PROP) != null) { // embed line number and source filename iCodeTop = addByte((byte) TokenStream.CALLSPECIAL, iCodeTop); iCodeTop = addByte((byte)(itsLineNumber >> 8), iCodeTop); iCodeTop = addByte((byte)(itsLineNumber & 0xff), iCodeTop); iCodeTop = addString(itsSourceFile, iCodeTop); } else { iCodeTop = addByte((byte) type, iCodeTop); iCodeTop = addByte((byte)(nameIndex >> 8), iCodeTop); iCodeTop = addByte((byte)(nameIndex & 0xFF), iCodeTop); } itsStackDepth -= (childCount - 1); // always a result value // subtract from child count to account for [thisObj &] fun if (type == TokenStream.NEW) childCount -= 1; else childCount -= 2; iCodeTop = addByte((byte)(childCount >> 8), iCodeTop); iCodeTop = addByte((byte)(childCount & 0xff), iCodeTop); if (childCount > itsData.itsMaxArgs) itsData.itsMaxArgs = childCount; iCodeTop = addByte((byte)TokenStream.SOURCEFILE, iCodeTop); } break; case TokenStream.NEWLOCAL : case TokenStream.NEWTEMP : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.NEWTEMP, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); } break; case TokenStream.USELOCAL : { if (node.getProp(Node.TARGET_PROP) != null) iCodeTop = addByte((byte) TokenStream.RETSUB, iCodeTop); else { iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } Node temp = (Node) node.getProp(Node.LOCAL_PROP); iCodeTop = addLocalRef(temp, iCodeTop); } break; case TokenStream.USETEMP : { iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); Node temp = (Node) node.getProp(Node.TEMP_PROP); iCodeTop = addLocalRef(temp, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.IFEQ : case TokenStream.IFNE : iCodeTop = generateICode(child, iCodeTop); itsStackDepth--; // after the conditional GOTO, really // fall thru... case TokenStream.GOTO : iCodeTop = addGoto(node, (byte) type, iCodeTop); break; case TokenStream.JSR : { /* mark the target with a FINALLY_PROP to indicate that it will have an incoming PC value on the top of the stack. !!! This only works if the target follows the JSR in the tree. !!! */ Node target = (Node)(node.getProp(Node.TARGET_PROP)); target.putProp(Node.FINALLY_PROP, node); iCodeTop = addGoto(node, TokenStream.GOSUB, iCodeTop); } break; case TokenStream.AND : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int falseTarget = acquireLabel(); iCodeTop = addGoto(falseTarget, TokenStream.IFNE, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); markLabel(falseTarget, iCodeTop); } break; case TokenStream.OR : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int trueTarget = acquireLabel(); iCodeTop = addGoto(trueTarget, TokenStream.IFEQ, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); markLabel(trueTarget, iCodeTop); } break; case TokenStream.GETPROP : { iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) iCodeTop = addByte((byte) TokenStream.GETPROTO, iCodeTop); else if (s.equals("__parent__")) iCodeTop = addByte((byte) TokenStream.GETSCOPEPARENT, iCodeTop); else badTree(node); } else { child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.GETPROP, iCodeTop); itsStackDepth--; } } break; case TokenStream.DELPROP : case TokenStream.BITAND : case TokenStream.BITOR : case TokenStream.BITXOR : case TokenStream.LSH : case TokenStream.RSH : case TokenStream.URSH : case TokenStream.ADD : case TokenStream.SUB : case TokenStream.MOD : case TokenStream.DIV : case TokenStream.MUL : case TokenStream.GETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth--; break; case TokenStream.CONVERT : { iCodeTop = generateICode(child, iCodeTop); Object toType = node.getProp(Node.TYPE_PROP); if (toType == ScriptRuntime.NumberClass) iCodeTop = addByte((byte) TokenStream.POS, iCodeTop); else badTree(node); } break; case TokenStream.UNARYOP : iCodeTop = generateICode(child, iCodeTop); switch (node.getInt()) { case TokenStream.VOID : iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); iCodeTop = addByte((byte) TokenStream.UNDEFINED, iCodeTop); break; case TokenStream.NOT : { int trueTarget = acquireLabel(); int beyond = acquireLabel(); iCodeTop = addGoto(trueTarget, TokenStream.IFEQ, iCodeTop); iCodeTop = addByte((byte) TokenStream.TRUE, iCodeTop); iCodeTop = addGoto(beyond, TokenStream.GOTO, iCodeTop); markLabel(trueTarget, iCodeTop); iCodeTop = addByte((byte) TokenStream.FALSE, iCodeTop); markLabel(beyond, iCodeTop); } break; case TokenStream.BITNOT : iCodeTop = addByte((byte) TokenStream.BITNOT, iCodeTop); break; case TokenStream.TYPEOF : iCodeTop = addByte((byte) TokenStream.TYPEOF, iCodeTop); break; case TokenStream.SUB : iCodeTop = addByte((byte) TokenStream.NEG, iCodeTop); break; case TokenStream.ADD : iCodeTop = addByte((byte) TokenStream.POS, iCodeTop); break; default: badTree(node); break; } break; case TokenStream.SETPROP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) iCodeTop = addByte((byte) TokenStream.SETPROTO, iCodeTop); else if (s.equals("__parent__")) iCodeTop = addByte((byte) TokenStream.SETPARENT, iCodeTop); else badTree(node); } else { child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.SETPROP, iCodeTop); itsStackDepth -= 2; } } break; case TokenStream.SETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth -= 2; break; case TokenStream.SETNAME : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.SETNAME, iCodeTop); iCodeTop = addString(firstChild.getString(), iCodeTop); itsStackDepth--; break; case TokenStream.TYPEOF : { String name = node.getString(); int index = -1; // use typeofname if an activation frame exists // since the vars all exist there instead of in jregs if (itsInFunctionFlag && !itsData.itsNeedsActivation) index = itsVariableTable.getOrdinal(name); if (index == -1) { iCodeTop = addByte((byte) TokenStream.TYPEOFNAME, iCodeTop); iCodeTop = addString(name, iCodeTop); } else { iCodeTop = addByte((byte) TokenStream.GETVAR, iCodeTop); iCodeTop = addByte((byte) index, iCodeTop); iCodeTop = addByte((byte) TokenStream.TYPEOF, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.PARENT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.GETPARENT, iCodeTop); break; case TokenStream.GETBASE : case TokenStream.BINDNAME : case TokenStream.NAME : case TokenStream.STRING : iCodeTop = addByte((byte) type, iCodeTop); iCodeTop = addString(node.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.INC : case TokenStream.DEC : { int childType = child.getType(); switch (childType) { case TokenStream.GETVAR : { String name = child.getString(); if (itsData.itsNeedsActivation) { iCodeTop = addByte((byte) TokenStream.SCOPE, iCodeTop); iCodeTop = addByte((byte) TokenStream.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.PROPINC : TokenStream.PROPDEC), iCodeTop); itsStackDepth--; } else { iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.VARINC : TokenStream.VARDEC), iCodeTop); int i = itsVariableTable.getOrdinal(name); iCodeTop = addByte((byte)i, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.GETPROP : case TokenStream.GETELEM : { Node getPropChild = child.getFirstChild(); iCodeTop = generateICode(getPropChild, iCodeTop); getPropChild = getPropChild.getNextSibling(); iCodeTop = generateICode(getPropChild, iCodeTop); if (childType == TokenStream.GETPROP) iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.PROPINC : TokenStream.PROPDEC), iCodeTop); else iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.ELEMINC : TokenStream.ELEMDEC), iCodeTop); itsStackDepth--; } break; default : { iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.NAMEINC : TokenStream.NAMEDEC), iCodeTop); iCodeTop = addString(child.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } } break; case TokenStream.NUMBER : { double num = node.getDouble(); if (num == 0.0) { iCodeTop = addByte((byte) TokenStream.ZERO, iCodeTop); } else if (num == 1.0) { iCodeTop = addByte((byte) TokenStream.ONE, iCodeTop); } else { iCodeTop = addByte((byte) TokenStream.NUMBER, iCodeTop); iCodeTop = addNumber(num, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } case TokenStream.POP : case TokenStream.POPV : iCodeTop = updateLineNumber(node, iCodeTop); case TokenStream.ENTERWITH : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth--; break; case TokenStream.GETTHIS : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); break; case TokenStream.NEWSCOPE : iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.LEAVEWITH : iCodeTop = addByte((byte) type, iCodeTop); break; case TokenStream.TRY : { itsTryDepth++; if (itsTryDepth > itsData.itsMaxTryDepth) itsData.itsMaxTryDepth = itsTryDepth; Node catchTarget = (Node)node.getProp(Node.TARGET_PROP); Node finallyTarget = (Node)node.getProp(Node.FINALLY_PROP); if (catchTarget == null) { iCodeTop = addByte((byte) TokenStream.TRY, iCodeTop); iCodeTop = addByte((byte)0, iCodeTop); iCodeTop = addByte((byte)0, iCodeTop); } else iCodeTop = addGoto(node, TokenStream.TRY, iCodeTop); int finallyHandler = 0; if (finallyTarget != null) { finallyHandler = acquireLabel(); int theLabel = finallyHandler & 0x7FFFFFFF; itsLabelTable[theLabel].addFixup(iCodeTop); } iCodeTop = addByte((byte)0, iCodeTop); iCodeTop = addByte((byte)0, iCodeTop); Node lastChild = null; /* when we encounter the child of the catchTarget, we set the stackDepth to 1 to account for the incoming exception object. */ boolean insertedEndTry = false; while (child != null) { if (catchTarget != null && lastChild == catchTarget) { itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } /* When the following child is the catchTarget (or the finallyTarget if there are no catches), the current child is the goto at the end of the try statemets, we need to emit the endtry before that goto. */ Node nextSibling = child.getNextSibling(); if (!insertedEndTry && nextSibling != null && (nextSibling == catchTarget || nextSibling == finallyTarget)) { iCodeTop = addByte((byte) TokenStream.ENDTRY, iCodeTop); insertedEndTry = true; } iCodeTop = generateICode(child, iCodeTop); lastChild = child; child = child.getNextSibling(); } itsStackDepth = 0; if (finallyTarget != null) { // normal flow goes around the finally handler stublet int skippy = acquireLabel(); iCodeTop = addGoto(skippy, TokenStream.GOTO, iCodeTop); // on entry the stack will have the exception object markLabel(finallyHandler, iCodeTop); itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int theLocalSlot = itsData.itsMaxLocals++; iCodeTop = addByte((byte) TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte((byte)theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); Integer finallyLabel = (Integer)(finallyTarget.getProp(Node.LABEL_PROP)); iCodeTop = addGoto(finallyLabel.intValue(), TokenStream.GOSUB, iCodeTop); iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); iCodeTop = addByte((byte)theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.JTHROW, iCodeTop); itsStackDepth = 0; markLabel(skippy, iCodeTop); } itsTryDepth--; } break; case TokenStream.THROW : iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.THROW, iCodeTop); itsStackDepth--; break; case TokenStream.RETURN : iCodeTop = updateLineNumber(node, iCodeTop); if (child != null) iCodeTop = generateICode(child, iCodeTop); else { iCodeTop = addByte((byte) TokenStream.UNDEFINED, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } iCodeTop = addGoto(node, TokenStream.RETURN, iCodeTop); itsStackDepth--; break; case TokenStream.GETVAR : { String name = node.getString(); if (itsData.itsNeedsActivation) { // SETVAR handled this by turning into a SETPROP, but // we can't do that to a GETVAR without manufacturing // bogus children. Instead we use a special op to // push the current scope. iCodeTop = addByte((byte) TokenStream.SCOPE, iCodeTop); iCodeTop = addByte((byte) TokenStream.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte((byte) TokenStream.GETPROP, iCodeTop); itsStackDepth--; } else { int index = itsVariableTable.getOrdinal(name); iCodeTop = addByte((byte) TokenStream.GETVAR, iCodeTop); iCodeTop = addByte((byte)index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.SETVAR : { if (itsData.itsNeedsActivation) { child.setType(TokenStream.BINDNAME); node.setType(TokenStream.SETNAME); iCodeTop = generateICode(node, iCodeTop); } else { String name = child.getString(); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); int index = itsVariableTable.getOrdinal(name); iCodeTop = addByte((byte) TokenStream.SETVAR, iCodeTop); iCodeTop = addByte((byte)index, iCodeTop); } } break; case TokenStream.PRIMARY: iCodeTop = addByte((byte) node.getInt(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.ENUMINIT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.ENUMINIT, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); itsStackDepth--; break; case TokenStream.ENUMNEXT : { iCodeTop = addByte((byte) TokenStream.ENUMNEXT, iCodeTop); Node init = (Node)node.getProp(Node.ENUM_PROP); iCodeTop = addLocalRef(init, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.ENUMDONE : // could release the local here?? break; case TokenStream.OBJECT : { Node regexp = (Node) node.getProp(Node.REGEXP_PROP); int index = ((Integer)(regexp.getProp( Node.REGEXP_PROP))).intValue(); iCodeTop = addByte((byte) TokenStream.OBJECT, iCodeTop); iCodeTop = addByte((byte)(index >> 8), iCodeTop); iCodeTop = addByte((byte)(index & 0xff), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; default : badTree(node); break; } return iCodeTop; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/f6c346cc7699c007b0b9b27d9c3cdb5446052c64/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
... |
mAttrs = SoapProvisioning.getAttrs(prov.invoke(req).getElement(AdminService.E_CALENDAR_RESOURCE)); resetData(); | setAttrs(SoapProvisioning.getAttrs(prov.invoke(req).getElement(AdminService.E_CALENDAR_RESOURCE))); | public void modifyAttrs(SoapProvisioning prov, Map<String, ? extends Object> attrs, boolean checkImmutable) throws ServiceException { XMLElement req = new XMLElement(AdminService.MODIFY_CALENDAR_RESOURCE_REQUEST); req.addElement(AdminService.E_ID).setText(getId()); SoapProvisioning.addAttrElements(req, attrs); mAttrs = SoapProvisioning.getAttrs(prov.invoke(req).getElement(AdminService.E_CALENDAR_RESOURCE)); resetData(); } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/8339523efcee3704a3335df4c10f2df8865728d0/SoapCalendarResource.java/clean/ZimbraServer/src/java/com/zimbra/cs/account/soap/SoapCalendarResource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5612,
8262,
12,
20601,
17485,
17197,
16,
1635,
32,
780,
16,
692,
3231,
1033,
34,
3422,
16,
1250,
866,
16014,
13,
1216,
16489,
288,
3639,
1139,
11155,
1111,
273,
394,
1139,
1115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5612,
8262,
12,
20601,
17485,
17197,
16,
1635,
32,
780,
16,
692,
3231,
1033,
34,
3422,
16,
1250,
866,
16014,
13,
1216,
16489,
288,
3639,
1139,
11155,
1111,
273,
394,
1139,
1115... |
if (!Instances.inRanges(first,m_Ranges)) | if (!m_DontNormalize) { if (!Instances.inRanges(first,m_Ranges)) | protected double distance(Instance first, Instance second) { if (!Instances.inRanges(first,m_Ranges)) OOPS("Not in ranges"); if (!Instances.inRanges(second,m_Ranges)) OOPS("Not in ranges"); double distance = 0; int firstI, secondI; for (int p1 = 0, p2 = 0; p1 < first.numValues() || p2 < second.numValues();) { if (p1 >= first.numValues()) { firstI = m_Train.numAttributes(); } else { firstI = first.index(p1); } if (p2 >= second.numValues()) { secondI = m_Train.numAttributes(); } else { secondI = second.index(p2); } if (firstI == m_Train.classIndex()) { p1++; continue; } if (secondI == m_Train.classIndex()) { p2++; continue; } double diff; if (firstI == secondI) { diff = difference(firstI, first.valueSparse(p1), second.valueSparse(p2)); p1++; p2++; } else if (firstI > secondI) { diff = difference(secondI, 0, second.valueSparse(p2)); p2++; } else { diff = difference(firstI, first.valueSparse(p1), 0); p1++; } distance += diff * diff; } distance = Math.sqrt(distance / m_NumAttributesUsed); return distance; } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/0189394f3764e2f206f0264c9cd69d3c25091f8f/IBk.java/clean/weka/classifiers/lazy/IBk.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1645,
3888,
12,
1442,
1122,
16,
5180,
2205,
13,
288,
1377,
309,
16051,
5361,
18,
267,
9932,
12,
3645,
16,
81,
67,
9932,
3719,
202,
51,
3665,
55,
2932,
1248,
316,
7322,
8863,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1645,
3888,
12,
1442,
1122,
16,
5180,
2205,
13,
288,
1377,
309,
16051,
5361,
18,
267,
9932,
12,
3645,
16,
81,
67,
9932,
3719,
202,
51,
3665,
55,
2932,
1248,
316,
7322,
8863,
565,
... |
CallableStatement stmt = con.prepareCall("ExEcUtE sp_who"); | CallableStatement cstmt = con.prepareCall("ExEcUtE sp_who"); | public void testCallableStatementExec6() throws Exception { CallableStatement stmt = con.prepareCall("ExEcUtE sp_who"); makeTestTables(stmt); makeObjects(stmt, 8); ResultSet rs = stmt.executeQuery(); dump(rs); stmt.close(); rs.close(); } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/07e30cc55aee5234b3f1978ccc65826a861223a9/CallableStatementTest.java/clean/trunk/jtds/src/test/net/sourceforge/jtds/test/CallableStatementTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
11452,
3406,
1905,
26,
1435,
1216,
1185,
288,
3639,
10464,
3406,
276,
10589,
273,
356,
18,
9366,
1477,
2932,
424,
23057,
57,
88,
41,
1694,
67,
3350,
83,
8863,
3639,
1221,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11452,
3406,
1905,
26,
1435,
1216,
1185,
288,
3639,
10464,
3406,
276,
10589,
273,
356,
18,
9366,
1477,
2932,
424,
23057,
57,
88,
41,
1694,
67,
3350,
83,
8863,
3639,
1221,... |
public BArray(byte[] xs) { this.xs = xs; } | public BArray(byte[] value) { this.value = value; } | public BArray(byte[] xs) { this.xs = xs; } | 5590 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5590/27b51e096e467f35a33e37e0191031477ea9ba8b/RunTime.java/clean/sources/scala/runtime/RunTime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
605,
1076,
12,
7229,
8526,
9280,
13,
288,
333,
18,
13713,
273,
9280,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
605,
1076,
12,
7229,
8526,
9280,
13,
288,
333,
18,
13713,
273,
9280,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
.getResourceAsStream("edu/sc/seis/fissuresUtil/bag/IU.HRV.__.BHE.SAC.0")))); | .getResourceAsStream("edu/sc/seis/fissuresUtil/bag/IU.HRV.__.BHE.SAC")))); | public void testCombine() throws Exception { SacTimeSeries sac = new SacTimeSeries(); sac.read(new DataInputStream(new BufferedInputStream(this.getClass() .getClassLoader() .getResourceAsStream("edu/sc/seis/fissuresUtil/bag/IU.HRV.__.BHE.SAC.0")))); LocalSeismogramImpl seis = SacToFissures.getSeismogram(sac); double samprate = seis.getSampling() .getFrequency() .getValue(UnitImpl.HERTZ); SacPoleZero pz = SacPoleZero.read(new BufferedReader(new InputStreamReader(this.getClass() .getClassLoader() .getResourceAsStream("edu/sc/seis/fissuresUtil/bag/hrv.bhe.sacpz")))); float[] data = seis.get_as_floats(); for(int i = 0; i < data.length; i++) { data[i] /= samprate; } Cmplx[] out = Cmplx.fft(data); assertEquals("nfft", 32768, out.length); assertEquals("delfrq ", 0.000610352, samprate/out.length, 0.00001); out = Transfer.combine(out, samprate, pz, 0.005f, 0.01f, 1e5f, 1e6f); double[][] sacout = { {0, 0}, {0, -0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {-6.40312e-09, 1.35883e-08}, {-1.30956e-09, 1.31487e-08}, {-5.95957e-08, 1.88837e-07}, {-3.14161e-07, 2.18147e-08}, {-1.0857e-07, -2.75118e-07}, {3.90054e-07, 1.87374e-07}, {-7.00704e-07, 5.70641e-07}, {-4.03496e-07, -7.36036e-07}, {3.24801e-07, -8.71389e-08}, {8.35641e-08, 7.97482e-08}, {-1.5673e-07, 2.15609e-07}}; for(int i = 0; i < sacout.length; i++) { if(sacout[i][0] == 0 || out[i].real() == 0) { assertEquals("real " + i + " " + out[i].real()+" "+sacout[i][0], sacout[i][0], out[i].real() , 0.00001); } else { assertEquals("real " + i + " " + out[i].real()+" "+sacout[i][0], 1, sacout[i][0] / out[i].real(), 0.00001); } if(sacout[i][1] == 0 || out[i].imag() == 0) { assertEquals("imag " + i + " " + out[i].imag()+" "+sacout[i][1], sacout[i][1], out[i].imag() , 0.00001); } else { assertEquals("imag " + i + " " + out[i].imag()+" "+sacout[i][1], -1, sacout[i][1] / out[i].imag(), 0.00001); } } } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/c0ba5ea47fe1b47015a2f0b4602e7089133b7e3f/TransferTest.java/clean/tests/unit/edu/sc/seis/fissuresUtil/bag/TransferTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
21720,
1435,
1216,
1185,
288,
3639,
348,
1077,
28486,
20071,
273,
394,
348,
1077,
28486,
5621,
3639,
20071,
18,
896,
12,
2704,
29382,
12,
2704,
24742,
12,
2211,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21720,
1435,
1216,
1185,
288,
3639,
348,
1077,
28486,
20071,
273,
394,
348,
1077,
28486,
5621,
3639,
20071,
18,
896,
12,
2704,
29382,
12,
2704,
24742,
12,
2211,
18,
588,
... |
.setText(MarkerMessages.MarkerResolutionPage_Resolutions_List_Title); | .setText(MarkerMessages.MarkerResolutionDialog_Resolutions_List_Title); | protected Control createDialogArea(Composite parent) { Composite mainArea = (Composite) super.createDialogArea(parent); //Create a new composite as there is the title bar seperator //to deal with Composite control = new Composite(mainArea,SWT.NONE); control.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true)); FormLayout layout = new FormLayout(); layout.marginLeft = IDialogConstants.BUTTON_MARGIN; layout.marginTop = IDialogConstants.BUTTON_MARGIN ; layout.marginRight = IDialogConstants.BUTTON_MARGIN ; layout.marginBottom = IDialogConstants.BUTTON_MARGIN ; layout.spacing = IDialogConstants.BUTTON_MARGIN; control.setLayout(layout); initializeDialogUnits(control); Label title = new Label(control, SWT.NONE); title.setText(MarkerMessages.MarkerResolutionPage_Problems_List_Title); FormData labelData = new FormData(); labelData.top = new FormAttachment(0); labelData.left = new FormAttachment(0); title.setLayoutData(labelData); Composite buttons = createTableButtons(control); FormData buttonData = new FormData(); buttonData.top = new FormAttachment(title,0); buttonData.right = new FormAttachment(100); buttonData.height = convertHeightInCharsToPixels(10); buttons.setLayoutData(buttonData); createMarkerTable(control); FormData tableData = new FormData(); tableData.top = new FormAttachment(buttons,0,SWT.TOP); tableData.left = new FormAttachment(0); tableData.right = new FormAttachment(buttons,0); tableData.height = convertHeightInCharsToPixels(10); markersTable.getControl().setLayoutData(tableData); Label resolutionsLabel = new Label(control, SWT.NONE); resolutionsLabel .setText(MarkerMessages.MarkerResolutionPage_Resolutions_List_Title); FormData resolutionsLabelData = new FormData(); resolutionsLabelData.top = new FormAttachment(markersTable.getControl(),0); resolutionsLabelData.left = new FormAttachment(0); resolutionsLabel.setLayoutData(resolutionsLabelData); resolutionsList = new ListViewer(control, SWT.BORDER | SWT.SINGLE); resolutionsList.setContentProvider(new IStructuredContentProvider() { public Object[] getElements(Object inputElement) { return resolutions; } /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.IContentProvider#dispose() */ public void dispose() { } /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } }); resolutionsList.setLabelProvider(new LabelProvider() { public String getText(Object element) { return ((IMarkerResolution) element).getLabel(); } }); resolutionsList .addSelectionChangedListener(new ISelectionChangedListener() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) */ public void selectionChanged(SelectionChangedEvent event) { setComplete(!event.getSelection().isEmpty()); } }); resolutionsList.setInput(this); FormData listData = new FormData(); listData.top = new FormAttachment(resolutionsLabel,0); listData.left = new FormAttachment(0); listData.right = new FormAttachment(100,0); listData.height = convertHeightInCharsToPixels(10); resolutionsList.getControl().setLayoutData(listData); progressPart = new ProgressMonitorPart(control, new GridLayout()); FormData progressData = new FormData(); progressData.top = new FormAttachment(resolutionsList.getControl(),0); progressData.left = new FormAttachment(0); progressData.right = new FormAttachment(100,0); progressPart .setLayoutData(progressData); Dialog.applyDialogFont(control); markerViewer.getTree(); setMessage(MarkerMessages.MarkerResolutionPage_Description); return mainArea; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/f86bc2ee682a3e38d2d4d297c6164b6c718c4df3/MarkerResolutionDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerResolutionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
202,
202,
9400,
2774,
5484,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
2938,
1769,
9506,
202,
759,
1684,
279,
394,
963... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
202,
202,
9400,
2774,
5484,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
2938,
1769,
9506,
202,
759,
1684,
279,
394,
963... |
if (this.clipText) { | if (this.useSingleLine && this.clipText) { | public boolean animate() { boolean animated = super.animate(); //#if polish.css.text-effect if (this.textEffect != null) { animated |= this.textEffect.animate(); } //#endif //#if polish.css.text-wrap if (this.clipText) { if (this.isSkipHorizontalAnimation) { this.isSkipHorizontalAnimation = false; } else { if (this.isHorizontalAnimationDirectionRight) { this.xOffset++; if (this.xOffset >= 0) { this.isHorizontalAnimationDirectionRight = false; } } else { this.xOffset--; if (this.xOffset + this.textWidth < this.contentWidth) { this.isHorizontalAnimationDirectionRight = true; } } animated = true; this.isSkipHorizontalAnimation = true; } } //#endif return animated; } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/b06d19314f04d256a0c2e5c071ed8e407331f884/StringItem.java/clean/enough-polish-j2me/source/src/de/enough/polish/ui/StringItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
14671,
1435,
288,
202,
202,
6494,
29990,
273,
2240,
18,
304,
4988,
5621,
202,
202,
759,
7,
430,
2952,
1468,
18,
5212,
18,
955,
17,
13867,
1875,
202,
430,
261,
2211,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
14671,
1435,
288,
202,
202,
6494,
29990,
273,
2240,
18,
304,
4988,
5621,
202,
202,
759,
7,
430,
2952,
1468,
18,
5212,
18,
955,
17,
13867,
1875,
202,
430,
261,
2211,
18,
... |
Token xsp; xsp = jj_scanpos; if (jj_3R_170()) jj_scanpos = xsp; if (jj_3R_67()) return true; if (jj_3R_294()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_339()) { jj_scanpos = xsp; break; } } return false; | Token xsp; xsp = jj_scanpos; if (jj_3R_170()) jj_scanpos = xsp; if (jj_3R_67()) return true; if (jj_3R_285()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_332()) { jj_scanpos = xsp; break; } | final private boolean jj_3R_135() { Token xsp; xsp = jj_scanpos; if (jj_3R_170()) jj_scanpos = xsp; if (jj_3R_67()) return true; if (jj_3R_294()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_339()) { jj_scanpos = xsp; break; } } return false; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/94275a63a29bc394e85b2f505b6478b6f7c76d82/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
727,
3238,
1250,
10684,
67,
23,
54,
67,
26612,
1435,
288,
3639,
3155,
619,
1752,
31,
3639,
619,
1752,
273,
10684,
67,
9871,
917,
31,
3639,
309,
261,
78,
78,
67,
23,
54,
67,
31779,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
3238,
1250,
10684,
67,
23,
54,
67,
26612,
1435,
288,
3639,
3155,
619,
1752,
31,
3639,
619,
1752,
273,
10684,
67,
9871,
917,
31,
3639,
309,
261,
78,
78,
67,
23,
54,
67,
31779,
107... |
g2.setStroke(new BasicStroke((int)border.top(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); g2.drawLine(x, y + (int)(border.top() / 2), x + w - 1, y + (int)(border.top() / 2)); | g2.setStroke(new BasicStroke((int) border.top(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); g2.drawLine(x, y + (int) (border.top() / 2), x + w - 1, y + (int) (border.top() / 2)); | private static void paintPatternedRect(final Graphics2D g2, final Rectangle bounds, final BorderPropertySet border, final BorderPropertySet color, final float[] pattern, final int sides, final int currentSide, int xOffset) { Polygon clip = getBevelledPolygon(bounds, border, sides, currentSide, true); Shape old_clip = g2.getClip(); if (clip != null) g2.clip(clip); Stroke old_stroke = g2.getStroke(); int x = bounds.x; int y = bounds.y; int w = bounds.width; int h = bounds.height; if (currentSide == TOP) { g2.setColor(color.topColor()); g2.setStroke(new BasicStroke((int)border.top(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); g2.drawLine(x, y + (int)(border.top() / 2), x + w - 1, y + (int)(border.top() / 2)); } else if (currentSide == LEFT) { g2.setColor(color.leftColor()); g2.setStroke(new BasicStroke((int)border.left(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); g2.drawLine(x + (int)(border.left() / 2), y, x + (int)(border.left() / 2), y + h - 1); } else if (currentSide == RIGHT) { g2.setColor(color.rightColor()); g2.setStroke(new BasicStroke((int)border.right(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); g2.drawLine(x + w - (int)(border.right() / 2), y, x + w - (int)(border.right() / 2), y + h); } else if (currentSide == BOTTOM) { g2.setColor(color.bottomColor()); g2.setStroke(new BasicStroke((int)border.bottom(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); g2.drawLine(x, y + h - (int)(border.bottom() / 2), x + w, y + h - (int)(border.bottom() / 2)); } g2.setStroke(old_stroke); g2.setClip(old_clip); } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
12574,
3234,
329,
6120,
12,
6385,
16830,
22,
40,
314,
22,
16,
727,
13264,
4972,
16,
727,
13525,
1396,
694,
5795,
16,
727,
13525,
1396,
694,
2036,
16,
727,
1431,
8526,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
12574,
3234,
329,
6120,
12,
6385,
16830,
22,
40,
314,
22,
16,
727,
13264,
4972,
16,
727,
13525,
1396,
694,
5795,
16,
727,
13525,
1396,
694,
2036,
16,
727,
1431,
8526,
19... |
SchemaGrammar getSchemaGrammarFromAppl(short contextType , String namespace , QName enclosingElement, QName triggeringComponet, XMLAttributes attribute ){ //REVISIT: construct empty pool... we dont have to check for the null condition //give a chance to application to be able to retreive the grammar. if(fGrammarPool != null){ fXSDDescription.reset() ; fXSDDescription.fContextType = contextType ; fXSDDescription.fTargetNamespace = namespace ; fXSDDescription.fEnclosedElementName = enclosingElement ; fXSDDescription.fTriggeringComponent = triggeringComponet ; fXSDDescription.fAttributes = attribute ; Object locationArray = null ; if( namespace != null){ locationArray = fLocationPairs.get(namespace) ; if(locationArray != null){ String [] temp = ((LocationArray)locationArray).getLocationArray() ; fXSDDescription.fLocationHints = new String [temp.length] ; System.arraycopy(temp, 0 , fXSDDescription.fLocationHints, 0, temp.length ); } }else{ String [] temp = fNoNamespaceLocationArray.getLocationArray() ; fXSDDescription.fLocationHints = new String [temp.length] ; System.arraycopy(temp, 0 , fXSDDescription.fLocationHints, 0, temp.length ); } return (SchemaGrammar)fGrammarPool.retrieveGrammar(fXSDDescription); } else{ return (SchemaGrammar)null ; } }//getGrammarFromAppl | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/f8b05e04b15329b6392d97d9c2a70edc1ee5efba/XMLSchemaValidator.java/clean/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3078,
18576,
11088,
18576,
1265,
1294,
412,
12,
6620,
819,
559,
269,
514,
1981,
269,
16723,
16307,
1046,
16,
16723,
27411,
799,
500,
278,
16,
3167,
2498,
1566,
262,
95,
13491,
368,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3078,
18576,
11088,
18576,
1265,
1294,
412,
12,
6620,
819,
559,
269,
514,
1981,
269,
16723,
16307,
1046,
16,
16723,
27411,
799,
500,
278,
16,
3167,
2498,
1566,
262,
95,
13491,
368,
8... | ||
protected String getParamValueAsString( HttpServletRequest request, | protected Object getParamValueAsString( HttpServletRequest request, | protected String getParamValueAsString( HttpServletRequest request, ScalarParameterHandle parameter ) { String paramName = parameter.getName( ); String paramValue = null; if ( ParameterAccessor.isReportParameterExist( request, paramName ) ) { // Get value from http request paramValue = ParameterAccessor.getReportParameter( request, paramName, null ); return paramValue; } Object paramValueObj = null; if ( this.isDesigner && ( IBirtConstants.SERVLET_PATH_RUN.equalsIgnoreCase( request .getServletPath( ) ) || IBirtConstants.SERVLET_PATH_PARAMETER .equalsIgnoreCase( request.getServletPath( ) ) ) && this.configMap != null && this.configMap.containsKey( paramName ) ) { // Get value from config file paramValueObj = this.configMap.get( paramName ); } else if ( this.parameterMap != null && this.parameterMap.containsKey( paramName ) ) { // Get value from document paramValueObj = this.parameterMap.get( paramName ); // Convert to locale string format paramValueObj = ParameterValidationUtil.getDisplayValue( null, parameter.getPattern( ), paramValueObj, locale ); } if ( paramValueObj != null ) paramValue = paramValueObj.toString( ); return paramValue; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/893eaa582bcc46718ce801eb6d7a0fd5ed4a6b44/ViewerAttributeBean.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/context/ViewerAttributeBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
9027,
620,
8092,
12,
9984,
590,
16,
1082,
202,
13639,
1662,
3259,
1569,
262,
202,
95,
202,
202,
780,
11466,
273,
1569,
18,
17994,
12,
11272,
202,
202,
780,
20250,
273,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
9027,
620,
8092,
12,
9984,
590,
16,
1082,
202,
13639,
1662,
3259,
1569,
262,
202,
95,
202,
202,
780,
11466,
273,
1569,
18,
17994,
12,
11272,
202,
202,
780,
20250,
273,
4... |
pushFollow(FOLLOW_square_chunk_in_square_chunk2627); | pushFollow(FOLLOW_square_chunk_in_square_chunk2626); | public String square_chunk() throws RecognitionException { String text = null; Token loc=null; String chunk = null; StringBuffer buf = null; Integer channel = null; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1124:10: (loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE ) // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1124:10: loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE { if ( backtracking==0 ) { channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL ); buf = new StringBuffer(); } loc=(Token)input.LT(1); match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_square_chunk2587); if (failed) return text; if ( backtracking==0 ) { buf.append( loc.getText()); } // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1134:3: ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loop40: do { int alt40=3; int LA40_0 = input.LA(1); if ( ((LA40_0>=ID && LA40_0<=RIGHT_PAREN)||(LA40_0>=EOL && LA40_0<=73)) ) { alt40=1; } else if ( (LA40_0==LEFT_SQUARE) ) { alt40=2; } switch (alt40) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1135:4: (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) { if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_PAREN)||(input.LA(1)>=EOL && input.LA(1)<=73) ) { input.consume(); errorRecovery=false;failed=false; } else { if (backtracking>0) {failed=true; return text;} MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk2603); throw mse; } if ( backtracking==0 ) { buf.append( input.LT(-1).getText() ); } } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1140:4: ( square_chunk )=>chunk= square_chunk { pushFollow(FOLLOW_square_chunk_in_square_chunk2627); chunk=square_chunk(); _fsp--; if (failed) return text; if ( backtracking==0 ) { buf.append( chunk ); } } break; default : break loop40; } } while (true); if ( backtracking==0 ) { if( channel != null ) { ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue()); } else { ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL); } } loc=(Token)input.LT(1); match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_square_chunk2663); if (failed) return text; if ( backtracking==0 ) { buf.append( loc.getText() ); text = buf.toString(); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return text; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/63bc7036e62ae854cec463d59712c173f74e984c/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
8576,
67,
6551,
1435,
1216,
9539,
288,
6647,
514,
977,
273,
446,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
514,
2441,
273,
446,
31,
21821,
6674,
1681,
273,
446,
31,
10402,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
8576,
67,
6551,
1435,
1216,
9539,
288,
6647,
514,
977,
273,
446,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
514,
2441,
273,
446,
31,
21821,
6674,
1681,
273,
446,
31,
10402,
21... |
private void addAllSubTypes() { | public void addAllSubTypes(List types) { | private void addAllSubTypes() { for (int i = 0; i < rootTypes.size(); i++) { MarkerType rootType = (MarkerType) rootTypes.get(i); addAllSubTypes(rootType); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/26f5b8d27d68eee2ecb371feac02e5287804555e/MarkerFilter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5428,
1676,
2016,
12,
682,
1953,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1365,
2016,
18,
1467,
5621,
277,
27245,
288,
5411,
14742,
559,
1365,
559,
273,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5428,
1676,
2016,
12,
682,
1953,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1365,
2016,
18,
1467,
5621,
277,
27245,
288,
5411,
14742,
559,
1365,
559,
273,
261... |
equals(Object obj) | public final boolean equals(Object obj) | equals(Object obj){ if (obj == this) return(true); else return(false);} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/6c5fbf775e4817547cbb857d56e9826483c1b6ef/AttributedCharacterIterator.java/buggy/libraries/javalib/java/text/AttributedCharacterIterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1606,
12,
921,
1081,
15329,
225,
309,
261,
2603,
422,
333,
13,
565,
327,
12,
3767,
1769,
225,
469,
377,
327,
12,
5743,
1769,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1606,
12,
921,
1081,
15329,
225,
309,
261,
2603,
422,
333,
13,
565,
327,
12,
3767,
1769,
225,
469,
377,
327,
12,
5743,
1769,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
parameterLocal = lgen.generateLocal(IntType.v(), "symbolNumber"); | parameterLocal = lgen.generateLocal(IntType.v(), "symbolNumberFrom"); parameterLocals.add(parameterLocal); units.addLast(Jimple.v().newIdentityStmt(parameterLocal, Jimple.v().newParameterRef(IntType.v(), parameterIndex++))); parameterLocal = lgen.generateLocal(IntType.v(), "symbolNumberTo"); | protected SootMethod addAddBindingsDispatchMethod(SootClass constraint, SootClass disjunct, String methodName, List/*<String>*/ variables) { int varCount = variables.size(); List parameterTypes = new LinkedList(); parameterTypes.add(IntType.v()); for(int i = 0; i < varCount; i++) { parameterTypes.add(RefType.v("java.lang.Object")); } SootMethod symbolMethod = new SootMethod(methodName, parameterTypes, constraint.getType(), Modifier.PUBLIC); Body b = Jimple.v().newBody(symbolMethod); symbolMethod.setActiveBody(b); constraint.addMethod(symbolMethod); LocalGeneratorEx lgen = new LocalGeneratorEx(b); // generate 'standard' locals SootClass setClass = Scene.v().getSootClass("java.util.Set"); RefType setType = RefType.v("java.util.Set"); RefType iteratorType = RefType.v("java.util.Iterator"); SootClass hashSet = Scene.v().getSootClass("java.util.LinkedHashSet"); SootClass iteratorClass = Scene.v().getSootClass("java.util.Iterator"); Local resultSet = lgen.generateLocal(hashSet.getType(), "resultSet"); Local localSet = lgen.generateLocal(setType, "localSet"); Local result = lgen.generateLocal(constraint.getType(), "result"); Local thisLocal = lgen.generateLocal(constraint.getType(), "this"); Local disjunctThis = lgen.generateLocal(disjunct.getType(), "disjunctThis"); Local disjunctIt = lgen.generateLocal(iteratorType, "disjunctIt"); Local disjunctResult = lgen.generateLocal(disjunct.getType(), "disjunctResult"); Chain units = b.getUnits(); // Add identity statements for this local units.addLast(Jimple.v().newIdentityStmt(thisLocal, Jimple.v().newThisRef(constraint.getType()))); // add symbol-dependent parameters and identity statements List parameterLocals = new LinkedList(); Local parameterLocal; int parameterIndex = 0; parameterLocal = lgen.generateLocal(IntType.v(), "symbolNumber"); parameterLocals.add(parameterLocal); units.addLast(Jimple.v().newIdentityStmt(parameterLocal, Jimple.v().newParameterRef(IntType.v(), parameterIndex++))); for(Iterator it = variables.iterator(); it.hasNext(); ) { parameterLocal = lgen.generateLocal(RefType.v("java.lang.Object"), (String)it.next()); parameterLocals.add(parameterLocal); units.addLast(Jimple.v().newIdentityStmt(parameterLocal, Jimple.v().newParameterRef(RefType.v("java.lang.Object"), parameterIndex++))); } // Store this.disjuncts in a local units.addLast(Jimple.v().newAssignStmt(localSet, Jimple.v().newInstanceFieldRef( thisLocal, Scene.v().makeFieldRef(constraint, "disjuncts", setType, false)))); // Create a new HashSet for the result, as we're not changing things in-place units.addLast(Jimple.v().newAssignStmt(resultSet, Jimple.v().newNewExpr(hashSet.getType()))); // do specialinvoke of constructor units.addLast(Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(resultSet, Scene.v().makeConstructorRef(hashSet, new LinkedList())))); // Get an iterator for this constraint's disjuncts units.addLast(Jimple.v().newAssignStmt(disjunctIt, Jimple.v().newInterfaceInvokeExpr( localSet, Scene.v().makeMethodRef(setClass, "iterator", new LinkedList(), iteratorType, false)))); // Have to emulate loops with jumps: while(disjunctIt.hasNext()) { ... } Stmt labelLoopBegin = Jimple.v().newNopStmt(); Stmt labelLoopEnd = Jimple.v().newNopStmt(); units.addLast(labelLoopBegin); // if(!it1.hasNext()) goto labelLoopEnd; <code for loop>; <label>: Local booleanLocal = lgen.generateLocal(BooleanType.v(), "booleanLocal"); units.addLast(Jimple.v().newAssignStmt(booleanLocal, Jimple.v().newInterfaceInvokeExpr(disjunctIt, Scene.v().makeMethodRef(iteratorClass, "hasNext", new LinkedList(), BooleanType.v(), false)))); units.addLast(Jimple.v().newIfStmt(Jimple.v().newEqExpr(booleanLocal, IntConstant.v(0)), labelLoopEnd)); // disjunctThis = (Disjunct)disjunctIt.next(); Local tmpObject = lgen.generateLocal(RefType.v("java.lang.Object"), "tmpObject"); units.addLast(Jimple.v().newAssignStmt(tmpObject, Jimple.v().newInterfaceInvokeExpr(disjunctIt, Scene.v().makeMethodRef(iteratorClass, "next", new LinkedList(), RefType.v("java.lang.Object"), false)))); units.addLast(Jimple.v().newAssignStmt(disjunctThis, Jimple.v().newCastExpr(tmpObject, disjunct.getType()))); ////////// Cleanup of invalid disjuncts -- if the current disjunct isn't valid, // just remove it from the disjunct set and continue with the next. // if(!disjunctThis.validateDisjunct(state) { it.remove(); goto labelLoopBegin; } List singleIntParameter = new LinkedList(); singleIntParameter.add(IntType.v()); Local isValidDisjunct = lgen.generateLocal(BooleanType.v(), "isValidDisjunct"); Stmt labelDisjunctValid = Jimple.v().newNopStmt(); units.addLast(Jimple.v().newAssignStmt(isValidDisjunct, Jimple.v().newVirtualInvokeExpr(disjunctThis, Scene.v().makeMethodRef(disjunct, "validateDisjunct", singleIntParameter, BooleanType.v(), false), (Local)parameterLocals.get(0)))); units.addLast(Jimple.v().newIfStmt(Jimple.v().newEqExpr(isValidDisjunct, IntConstant.v(1)), labelDisjunctValid)); units.addLast(Jimple.v().newInvokeStmt(Jimple.v().newInterfaceInvokeExpr(disjunctIt, Scene.v().makeMethodRef(iteratorClass, "remove", new LinkedList(), VoidType.v(), false)))); units.addLast(Jimple.v().newGotoStmt(labelLoopBegin)); units.addLast(labelDisjunctValid); // disjunctResult = disjunct.addBindingsForSymbolX(...); units.addLast(Jimple.v().newAssignStmt(disjunctResult, Jimple.v().newVirtualInvokeExpr(disjunctThis, Scene.v().makeMethodRef(disjunct, methodName, parameterTypes, disjunct.getType(), false), parameterLocals))); // resultSet.add(disjunctResult); List parameters = new LinkedList(); parameters.add(RefType.v("java.lang.Object")); units.addLast(Jimple.v().newInvokeStmt(Jimple.v().newVirtualInvokeExpr(resultSet, Scene.v().makeMethodRef(hashSet, "add", parameters, BooleanType.v(), false), disjunctResult))); // goto beginning of inner loop units.addLast(Jimple.v().newGotoStmt(labelLoopBegin)); units.addLast(labelLoopEnd); // We remove the false disjunct, then, if the disjunct set is empty, we return the // false constraint falseC, otherwise we return a new constraint with the // appropriate disjunct set. parameters.clear(); parameters.add(RefType.v("java.lang.Object")); // resultSet.remove(falseD); StaticFieldRef falseD = Jimple.v().newStaticFieldRef( Scene.v().makeFieldRef(disjunct, "falseD", disjunct.getType(), true)); Local falseDisjunct = lgen.generateLocal(disjunct.getType(), "falseDisjunct"); units.addLast(Jimple.v().newAssignStmt(falseDisjunct, falseD)); units.addLast(Jimple.v().newInvokeStmt(Jimple.v().newVirtualInvokeExpr(resultSet, Scene.v().makeMethodRef(hashSet, "remove", parameters, BooleanType.v(), false), falseDisjunct))); Stmt labelReturnFalseC = Jimple.v().newNopStmt(); // if(resultSet.isEmpty) goto label; units.addLast(Jimple.v().newAssignStmt(booleanLocal, Jimple.v().newVirtualInvokeExpr(resultSet, Scene.v().makeMethodRef(hashSet, "isEmpty", new LinkedList(), BooleanType.v(), false)))); units.addLast(Jimple.v().newIfStmt(Jimple.v().newEqExpr(booleanLocal, IntConstant.v(1)), labelReturnFalseC)); // Set is nonempty -- construct a new constraint to return units.addLast(Jimple.v().newAssignStmt(result, Jimple.v().newNewExpr(constraint.getType()))); units.addLast(Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(result, Scene.v().makeConstructorRef(constraint, new LinkedList())))); // result.disjuncts = resultSet; units.addLast(Jimple.v().newAssignStmt(Jimple.v().newInstanceFieldRef(result, Scene.v().makeFieldRef(constraint, "disjuncts", setType, false)), resultSet)); // return result; units.addLast(Jimple.v().newReturnStmt(result)); // Label units.addLast(labelReturnFalseC); // return falseC; StaticFieldRef falseC = Jimple.v().newStaticFieldRef( Scene.v().makeFieldRef(constraint, "falseC", constraint.getType(), true)); Local falseConstraint = lgen.generateLocal(constraint.getType(), "falseConstraint"); units.addLast(Jimple.v().newAssignStmt(falseConstraint, falseC)); units.addLast(Jimple.v().newReturnStmt(falseConstraint)); return symbolMethod; } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/afa539172bd164c0d707aed6972fcb4aa1932478/TraceMatchCodeGen.java/clean/aop/abc/src/abc/tm/weaving/weaver/TraceMatchCodeGen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
348,
1632,
1305,
527,
986,
10497,
5325,
1305,
12,
55,
1632,
797,
4954,
16,
348,
1632,
797,
1015,
78,
6931,
16,
5411,
514,
4918,
16,
987,
20308,
32,
780,
34,
5549,
3152,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
348,
1632,
1305,
527,
986,
10497,
5325,
1305,
12,
55,
1632,
797,
4954,
16,
348,
1632,
797,
1015,
78,
6931,
16,
5411,
514,
4918,
16,
987,
20308,
32,
780,
34,
5549,
3152,
13,
288,
... |
new com.exedio.cope.AttributeValue(code,initialCode), | new com.exedio.cope.AttributeValue(PointerItem2.code,code), | */public PointerItem2( final java.lang.String initialCode) throws com.exedio.cope.NotNullViolationException { this(new com.exedio.cope.AttributeValue[]{ new com.exedio.cope.AttributeValue(code,initialCode), }); throwInitialNotNullViolationException(); }/** | 50290 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50290/479717ceb1a651d9cde63fbebf9c019ec12f4752/PointerItem2.java/clean/lib/testmodelsrc/com/exedio/cope/testmodel/PointerItem2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1195,
482,
7107,
1180,
22,
12,
9506,
202,
6385,
2252,
18,
4936,
18,
780,
2172,
1085,
13,
1082,
202,
15069,
9506,
202,
832,
18,
338,
329,
1594,
18,
71,
1306,
18,
5962,
27052,
202,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1195,
482,
7107,
1180,
22,
12,
9506,
202,
6385,
2252,
18,
4936,
18,
780,
2172,
1085,
13,
1082,
202,
15069,
9506,
202,
832,
18,
338,
329,
1594,
18,
71,
1306,
18,
5962,
27052,
202,
95,
... |
last = consume(IToken.tRBRACKET).getEndOffset(); | last = consume().getEndOffset(); | protected IASTExpression postfixExpression() throws EndOfFileException, BacktrackException { IASTExpression firstExpression = null; switch (LT(1)) { case IToken.tLPAREN: // ( type-name ) { initializer-list } // ( type-name ) { initializer-list , } IToken m = mark(); try { int offset = consume(IToken.tLPAREN).getOffset(); IASTTypeId t = typeId(false); if (t != null) { consume(IToken.tRPAREN).getEndOffset(); IASTInitializer i = cInitializerClause(Collections.EMPTY_LIST); firstExpression = buildTypeIdInitializerExpression(t, i, offset, calculateEndOffset(i)); break; } else {backup(m); } } catch (BacktrackException bt) { backup(m); } default: firstExpression = primaryExpression(); } IASTExpression secondExpression = null; for (;;) { switch (LT(1)) { case IToken.tLBRACKET: // array access consume(IToken.tLBRACKET); secondExpression = expression(); int last; switch (LT(1)) { case IToken.tRBRACKET: last = consume(IToken.tRBRACKET).getEndOffset(); break; case IToken.tEOC: last = Integer.MAX_VALUE; break; default: throw backtrack; } IASTArraySubscriptExpression s = createArraySubscriptExpression(); ((ASTNode) s).setOffsetAndLength(((ASTNode) firstExpression) .getOffset(), last - ((ASTNode) firstExpression).getOffset()); s.setArrayExpression(firstExpression); firstExpression.setParent(s); firstExpression .setPropertyInParent(IASTArraySubscriptExpression.ARRAY); s.setSubscriptExpression(secondExpression); secondExpression.setParent(s); secondExpression .setPropertyInParent(IASTArraySubscriptExpression.SUBSCRIPT); firstExpression = s; break; case IToken.tLPAREN: // function call consume(IToken.tLPAREN); if (LT(1) != IToken.tRPAREN) secondExpression = expression(); if (LT(1) == IToken.tRPAREN) last = consume(IToken.tRPAREN).getEndOffset(); else // must be EOC last = Integer.MAX_VALUE; IASTFunctionCallExpression f = createFunctionCallExpression(); ((ASTNode) f).setOffsetAndLength(((ASTNode) firstExpression) .getOffset(), last - ((ASTNode) firstExpression).getOffset()); f.setFunctionNameExpression(firstExpression); firstExpression.setParent(f); firstExpression .setPropertyInParent(IASTFunctionCallExpression.FUNCTION_NAME); if (secondExpression != null) { f.setParameterExpression(secondExpression); secondExpression.setParent(f); secondExpression .setPropertyInParent(IASTFunctionCallExpression.PARAMETERS); } firstExpression = f; break; case IToken.tINCR: int offset = consume(IToken.tINCR).getEndOffset(); firstExpression = buildUnaryExpression( IASTUnaryExpression.op_postFixIncr, firstExpression, ((CASTNode) firstExpression).getOffset(), offset); break; case IToken.tDECR: offset = consume().getEndOffset(); firstExpression = buildUnaryExpression( IASTUnaryExpression.op_postFixDecr, firstExpression, ((CASTNode) firstExpression).getOffset(), offset); break; case IToken.tDOT: // member access IToken dot = consume(IToken.tDOT); IASTName name = createName(identifier()); if (name == null) throwBacktrack(((ASTNode) firstExpression).getOffset(), ((ASTNode) firstExpression).getLength() + dot.getLength()); IASTFieldReference result = createFieldReference(); ((ASTNode) result).setOffsetAndLength( ((ASTNode) firstExpression).getOffset(), calculateEndOffset(name) - ((ASTNode) firstExpression).getOffset()); result.setFieldOwner(firstExpression); result.setIsPointerDereference(false); firstExpression.setParent(result); firstExpression .setPropertyInParent(IASTFieldReference.FIELD_OWNER); result.setFieldName(name); name.setParent(result); name.setPropertyInParent(IASTFieldReference.FIELD_NAME); firstExpression = result; break; case IToken.tARROW: // member access IToken arrow = consume(IToken.tARROW); name = createName(identifier()); if (name == null) throwBacktrack(((ASTNode) firstExpression).getOffset(), ((ASTNode) firstExpression).getLength() + arrow.getLength()); result = createFieldReference(); ((ASTNode) result).setOffsetAndLength( ((ASTNode) firstExpression).getOffset(), calculateEndOffset(name) - ((ASTNode) firstExpression).getOffset()); result.setFieldOwner(firstExpression); result.setIsPointerDereference(true); firstExpression.setParent(result); firstExpression .setPropertyInParent(IASTFieldReference.FIELD_OWNER); result.setFieldName(name); name.setParent(result); name.setPropertyInParent(IASTFieldReference.FIELD_NAME); firstExpression = result; break; default: return firstExpression; } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/c69e46df852e8daf1a898f5f2d8f0b9d9f957df1/GNUCSourceParser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
2300,
18923,
2300,
1435,
1216,
4403,
951,
812,
503,
16,
5411,
4297,
4101,
503,
288,
3639,
467,
9053,
2300,
1122,
2300,
273,
446,
31,
3639,
1620,
261,
12050,
12,
21,
3719,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
2300,
18923,
2300,
1435,
1216,
4403,
951,
812,
503,
16,
5411,
4297,
4101,
503,
288,
3639,
467,
9053,
2300,
1122,
2300,
273,
446,
31,
3639,
1620,
261,
12050,
12,
21,
3719,... |
return level; } | return level; } | public Level getLevel() throws OLAPException { return level; } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/b5b5168edc3af09cb74945a80b0c36e6630ed502/MondrianLevelFilter.java/clean/src/main/mondrian/jolap/MondrianLevelFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4557,
17236,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
2463,
1801,
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,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4557,
17236,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
2463,
1801,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
else | } else { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equalsIgnoreCase("nbrf")) format = SeqIOConstants.NBRF; else if (formatName.equalsIgnoreCase("ig")) format = SeqIOConstants.IG; else if (formatName.equalsIgnoreCase("embl")) format = SeqIOConstants.EMBL; else if (formatName.equalsIgnoreCase("swissprot") || formatName.equalsIgnoreCase("swiss")) return SeqIOConstants.SWISSPROT; else if (formatName.equalsIgnoreCase("genbank")) format = SeqIOConstants.GENBANK; else if (formatName.equalsIgnoreCase("genpept")) return SeqIOConstants.GENPEPT; else if (formatName.equalsIgnoreCase("refseq")) format = SeqIOConstants.REFSEQ; else if (formatName.equalsIgnoreCase("gcg")) format = SeqIOConstants.GCG; else if (formatName.equalsIgnoreCase("gff")) format = SeqIOConstants.GFF; else if (formatName.equalsIgnoreCase("pdb")) return SeqIOConstants.PDB; else if (formatName.equalsIgnoreCase("phred")) return SeqIOConstants.PHRED; else return SeqIOConstants.UNKNOWN; if (alphabetName.equalsIgnoreCase("dna")) alpha = SeqIOConstants.DNA; else if (alphabetName.equalsIgnoreCase("rna")) alpha = SeqIOConstants.RNA; else if (alphabetName.equalsIgnoreCase("aa") || alphabetName.equalsIgnoreCase("protein")) alpha = SeqIOConstants.AA; else return SeqIOConstants.UNKNOWN; return (format | alpha); } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/4dcd7e11461d6a20289132168a1199a7fba0a651/SeqIOTools.java/buggy/src/org/biojava/bio/seq/io/SeqIOTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
9786,
1630,
12,
780,
740,
461,
16,
514,
10877,
461,
13,
288,
3639,
509,
740,
16,
4190,
31,
3639,
309,
261,
2139,
461,
18,
14963,
5556,
2932,
1899,
6,
3719,
5411,
740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
9786,
1630,
12,
780,
740,
461,
16,
514,
10877,
461,
13,
288,
3639,
509,
740,
16,
4190,
31,
3639,
309,
261,
2139,
461,
18,
14963,
5556,
2932,
1899,
6,
3719,
5411,
740,
... |
} else if (platformAttribute != null && platformAttribute.getOptionValues().values().contains(OPTION_ALL)) { | } else if (platformAttribute != null && platformAttribute.getOptionParameter(OPTION_ALL) != null) { | public void setPlatformOptions(NewBugzillaReport newBugModel) { try { // Get OS Lookup Map // Check that the result is in Values, if it is not, set it to other RepositoryTaskAttribute opSysAttribute = newBugModel.getAttribute(BugzillaReportElement.OP_SYS .getKeyString()); RepositoryTaskAttribute platformAttribute = newBugModel.getAttribute(BugzillaReportElement.REP_PLATFORM .getKeyString()); String OS = Platform.getOS(); String platform = Platform.getOSArch(); String bugzillaOS = null; // Bugzilla String for OS String bugzillaPlatform = null; // Bugzilla String for Platform if (java2buzillaOSMap != null && java2buzillaOSMap.containsKey(OS) && opSysAttribute != null && opSysAttribute.getOptionValues() != null) { bugzillaOS = java2buzillaOSMap.get(OS); if (opSysAttribute != null && !opSysAttribute.getOptionValues().values().contains(bugzillaOS)) { // If the OS we found is not in the list of available // options, set bugzillaOS // to null, and just use "other" bugzillaOS = null; } } else { // If we have a strangeOS, then just set buzillaOS to null, and // use "other" bugzillaOS = null; } if (platform != null && java2buzillaPlatformMap.containsKey(platform)) { bugzillaPlatform = java2buzillaPlatformMap.get(platform); if (platformAttribute != null && !platformAttribute.getOptionValues().values().contains(bugzillaPlatform)) { // If the platform we found is not int the list of available // optinos, set the // Bugzilla Platform to null, and juse use "other" bugzillaPlatform = null; } } else { // If we have a strange platform, then just set bugzillaPatforrm // to null, and use "other" bugzillaPlatform = null; } // Set the OS and the Platform in the model if (bugzillaOS != null && opSysAttribute != null) { opSysAttribute.setValue(bugzillaOS); } else if (opSysAttribute != null && opSysAttribute.getOptionValues().values().contains(OPTION_ALL)) { opSysAttribute.setValue(OPTION_ALL); } if (bugzillaPlatform != null && platformAttribute != null) { platformAttribute.setValue(bugzillaPlatform); } else if (platformAttribute != null && platformAttribute.getOptionValues().values().contains(OPTION_ALL)) { opSysAttribute.setValue(OPTION_ALL); } } catch (Exception e) { MylarStatusHandler.fail(e, "could not set platform options", false); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/919a0674236c5a90832fd41cafb869aaf978be04/BugzillaProductPage.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
8201,
1320,
12,
1908,
19865,
15990,
4820,
394,
19865,
1488,
13,
288,
202,
202,
698,
288,
1082,
202,
759,
968,
5932,
8834,
1635,
1082,
202,
759,
2073,
716,
326,
563,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
8201,
1320,
12,
1908,
19865,
15990,
4820,
394,
19865,
1488,
13,
288,
202,
202,
698,
288,
1082,
202,
759,
968,
5932,
8834,
1635,
1082,
202,
759,
2073,
716,
326,
563,
... |
public static void assertEquals(String message, String expected, String actual) { if (expected == null && actual == null) return; if (expected != null && expected.equals(actual)) return; final String formatted; if (message != null) { formatted = message+"."; } else { formatted = ""; } final String expectedWithLineSeparators = expected == null ? null : showLineSeparators(expected); final String actualWithLineSeparators = actual == null ? null : showLineSeparators(actual); throw new ComparisonFailure( formatted + "\n----------- Expected ------------\n" + expectedWithLineSeparators + "\n------------ but was ------------\n" + actualWithLineSeparators + "\n--------- Difference is ----------\n", expectedWithLineSeparators, actualWithLineSeparators); | public static void assertEquals(String expected, String actual) { assertEquals(null, expected, actual); | public static void assertEquals(String message, String expected, String actual) { if (expected == null && actual == null) return; if (expected != null && expected.equals(actual)) return; final String formatted; if (message != null) { formatted = message+"."; //$NON-NLS-1$ } else { formatted = ""; //$NON-NLS-1$ } final String expectedWithLineSeparators = expected == null ? null : showLineSeparators(expected); final String actualWithLineSeparators = actual == null ? null : showLineSeparators(actual); throw new ComparisonFailure( formatted + "\n----------- Expected ------------\n" //$NON-NLS-1$ + expectedWithLineSeparators + "\n------------ but was ------------\n" //$NON-NLS-1$ + actualWithLineSeparators + "\n--------- Difference is ----------\n", //$NON-NLS-1$ expectedWithLineSeparators, actualWithLineSeparators);} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/2fcc7d0f6d73a0e1ec44b95addeba29a0b163a14/TestCase.java/buggy/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
918,
1815,
8867,
12,
780,
883,
16,
514,
2665,
16,
514,
3214,
13,
288,
202,
430,
261,
3825,
422,
446,
597,
3214,
422,
446,
13,
202,
202,
2463,
31,
202,
430,
261,
3825,
480,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
918,
1815,
8867,
12,
780,
883,
16,
514,
2665,
16,
514,
3214,
13,
288,
202,
430,
261,
3825,
422,
446,
597,
3214,
422,
446,
13,
202,
202,
2463,
31,
202,
430,
261,
3825,
480,
446,
... |
private void drawDialog() { super.dialogInit(); createTable(); setTitle(messages.getString("phonebook")); setModal(true); setLayout(new BorderLayout()); getContentPane().setLayout(new BorderLayout()); JPanel topPane = new JPanel(); JPanel centerPane = new JPanel(); JPanel bottomPane = new JPanel(); saveButton = new JButton("Speichern"); // TODO I18N saveButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { saveButton_actionPerformed(e); } }); cancelButton = new JButton("Abbruch");// TODO I18N cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { cancelButton_actionPerformed(e); } }); newButton = new JButton("Hinzufgen");// TODO I18N newButton.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage( getClass().getResource( "/de/moonflower/jfritz/resources/images/add.png")))); newButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { newButton_actionPerformed(e); } }); delButton = new JButton("Lschen");// TODO I18N delButton.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().getImage( getClass().getResource( "/de/moonflower/jfritz/resources/images/delete.png")))); delButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { deleteButton_actionPerformed(e); } }); topPane.add(newButton); topPane.add(delButton); bottomPane.add(saveButton); bottomPane.add(cancelButton); JPanel panelLabelsAndTextFields = new JPanel(); panelLabelsAndTextFields.setLayout(new GridLayout(11,2)); System.out.println("Gridlayout"); labelFirstName = new JLabel(messages.getString("firstName")+": "); textFieldFirstName = new JTextField(); labelMiddleName = new JLabel(messages.getString("middleName")+": "); textFieldMiddleName = new JTextField(); labelLastName = new JLabel(messages.getString("lastName")+": "); textFieldLastName = new JTextField(); labelStreet = new JLabel(messages.getString("street")+": "); textFieldStreet = new JTextField(); labelPostalCode = new JLabel(messages.getString("postalCode")+": "); textFieldPostalCode = new JTextField(); labelCity = new JLabel(messages.getString("city")+": "); textFieldCity = new JTextField(); labelHomeNumber = new JLabel(messages.getString("homeTelephoneNumber")+": "); textFieldHomeNumber = new JTextField(); setStandardHomeNumber = new JButton("Standard"); labelMobileNumber = new JLabel(messages.getString("mobileTelephoneNumber")+": "); textFieldMobileNumber = new JTextField(); setStandardMobileNumber = new JButton("Standard"); labelBusinessNumber = new JLabel(messages.getString("businessTelephoneNumber")+": "); textFieldBusinessNumber = new JTextField(); setStandardBusinessNumber = new JButton("Standard"); labelOtherNumber = new JLabel(messages.getString("otherTelephoneNumber")+": "); textFieldOtherNumber = new JTextField(); setStandardOtherNumber = new JButton("Standard"); labelEmail = new JLabel(messages.getString("emailAddress")+": "); textFieldEmail = new JTextField(); labelStandardNumber = new JLabel("Standard Nummer"+": "); textStandardNumber = new JLabel("Not Set"); JRadioButton radioButtonHome = new JRadioButton(""); radioButtonHome.setActionCommand("standardHome"); JRadioButton radioButtonMobile = new JRadioButton(""); radioButtonMobile.setActionCommand("standardMobile"); JRadioButton radioButtonBusiness = new JRadioButton(""); radioButtonBusiness.setActionCommand("standardBusiness"); JRadioButton radioButtonOther = new JRadioButton(""); radioButtonOther.setActionCommand("standardOther"); panelLabelsAndTextFields.add(labelFirstName); panelLabelsAndTextFields.add(textFieldFirstName); panelLabelsAndTextFields.add(labelMiddleName); panelLabelsAndTextFields.add(textFieldMiddleName); panelLabelsAndTextFields.add(labelLastName); panelLabelsAndTextFields.add(textFieldLastName); panelLabelsAndTextFields.add(labelStreet); panelLabelsAndTextFields.add(textFieldStreet); panelLabelsAndTextFields.add(labelPostalCode); panelLabelsAndTextFields.add(textFieldPostalCode); panelLabelsAndTextFields.add(labelCity); panelLabelsAndTextFields.add(textFieldCity); JPanel homeNumberPanel = new JPanel(); homeNumberPanel.setLayout(new BoxLayout(homeNumberPanel,BoxLayout.X_AXIS)); homeNumberPanel.add(radioButtonHome); homeNumberPanel.add(labelHomeNumber); panelLabelsAndTextFields.add(homeNumberPanel); panelLabelsAndTextFields.add(textFieldHomeNumber); JPanel mobileNumberPanel = new JPanel(); mobileNumberPanel.setLayout(new BoxLayout(mobileNumberPanel,BoxLayout.X_AXIS)); mobileNumberPanel.add(radioButtonMobile); mobileNumberPanel.add(labelMobileNumber); panelLabelsAndTextFields.add(mobileNumberPanel); panelLabelsAndTextFields.add(textFieldMobileNumber); JPanel businessNumberPanel = new JPanel(); businessNumberPanel.setLayout(new BoxLayout(businessNumberPanel,BoxLayout.X_AXIS)); businessNumberPanel.add(radioButtonBusiness); businessNumberPanel.add(labelBusinessNumber); panelLabelsAndTextFields.add(businessNumberPanel); panelLabelsAndTextFields.add(textFieldBusinessNumber); JPanel otherNumberPanel = new JPanel(); otherNumberPanel.setLayout(new BoxLayout(otherNumberPanel,BoxLayout.X_AXIS)); otherNumberPanel.add(radioButtonOther); otherNumberPanel.add(labelOtherNumber); panelLabelsAndTextFields.add(otherNumberPanel); panelLabelsAndTextFields.add(textFieldOtherNumber);/** panelLabelsAndTextFields.add(labelEmail); panelLabelsAndTextFields.add(textFieldEmail);*/ centerPane.setLayout(new BoxLayout(centerPane,BoxLayout.Y_AXIS)); centerPane.add(new JScrollPane(table),BorderLayout.NORTH); centerPane.add(panelLabelsAndTextFields,BorderLayout.CENTER); getContentPane().add(topPane, BorderLayout.NORTH); getContentPane().add(centerPane, BorderLayout.CENTER); getContentPane().add(bottomPane, BorderLayout.SOUTH); ButtonGroup group = new ButtonGroup(); group.add(radioButtonHome); group.add(radioButtonMobile); group.add(radioButtonBusiness); group.add(radioButtonOther); setSize(new Dimension(480, 500)); } | 7476 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7476/9868bac8706a9960bb1350acc968391ddce96098/PhoneBookDialog.java/clean/jfritz/src/de/moonflower/jfritz/dialogs/phonebook/PhoneBookDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3724,
6353,
1435,
288,
202,
202,
9565,
18,
12730,
2570,
5621,
202,
202,
2640,
1388,
5621,
202,
202,
542,
4247,
12,
6833,
18,
588,
780,
2932,
10540,
3618,
7923,
1769,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3724,
6353,
1435,
288,
202,
202,
9565,
18,
12730,
2570,
5621,
202,
202,
2640,
1388,
5621,
202,
202,
542,
4247,
12,
6833,
18,
588,
780,
2932,
10540,
3618,
7923,
1769,
202,
... | ||
"\t@Property constraints = {\n" + | "\tdef constraints = {\n" + | protected void onSetUp() throws Exception { Class groovyClass = cl.parseClass("public class PersistentMethodTests {\n" + "\n" + "\t@Property List optionals = [ \"age\" ];\n" + "\t\n" + "\t@Property Long id; \n" + "\t@Property Long version; \n" + "\t\n" + "\t@Property String firstName; \n" + "\t@Property String lastName; \n" + "\t@Property Integer age;\n" + "\t\n" + "\t@Property constraints = {\n" + "\t\tfirstName(length:4..15)\n" + "\t}\n" + "}"); grailsApplication = new DefaultGrailsApplication(new Class[]{groovyClass},cl); DefaultGrailsDomainConfiguration config = new DefaultGrailsDomainConfiguration(); config.setGrailsApplication(this.grailsApplication); Properties props = new Properties(); props.put("hibernate.connection.username","sa"); props.put("hibernate.connection.password",""); props.put("hibernate.connection.url","jdbc:hsqldb:mem:grailsDB"); props.put("hibernate.connection.driver_class","org.hsqldb.jdbcDriver"); props.put("hibernate.dialect","org.hibernate.dialect.HSQLDialect"); props.put("hibernate.hbm2ddl.auto","create-drop"); //props.put("hibernate.hbm2ddl.auto","update"); config.setProperties(props); //originalClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.cl); this.sessionFactory = config.buildSessionFactory(); if(!TransactionSynchronizationManager.hasResource(this.sessionFactory)) { this.hibSession = this.sessionFactory.openSession(); TransactionSynchronizationManager.bindResource(this.sessionFactory, new SessionHolder(hibSession)); } new DomainClassMethods(grailsApplication,groovyClass,sessionFactory,cl); GrailsDomainClassValidator validator = new GrailsDomainClassValidator(); GrailsDomainClass domainClass =this.grailsApplication.getGrailsDomainClass("PersistentMethodTests"); validator.setDomainClass(this.grailsApplication.getGrailsDomainClass("PersistentMethodTests")); domainClass.setValidator(validator); super.onSetUp(); } | 50465 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50465/dd7ca7d1686d48648d4eab36fa08f1bfb26eb0ea/PersistentMethodTests.java/clean/test/persistence/org/codehaus/groovy/grails/orm/hibernate/PersistentMethodTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
603,
694,
1211,
1435,
1216,
1185,
288,
5411,
1659,
24955,
797,
273,
927,
18,
2670,
797,
2932,
482,
667,
11049,
1305,
14650,
18890,
82,
6,
397,
7734,
1548,
82,
6,
397,
7734,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
603,
694,
1211,
1435,
1216,
1185,
288,
5411,
1659,
24955,
797,
273,
927,
18,
2670,
797,
2932,
482,
667,
11049,
1305,
14650,
18890,
82,
6,
397,
7734,
1548,
82,
6,
397,
7734,
1... |
progress.installing(MiscUtilities.getFileName(path)); | if(path == null) return; | public boolean runInAWTThread(PluginManagerProgress progress) { progress.installing(MiscUtilities.getFileName(path)); ZipFile zipFile = null; try { zipFile = new ZipFile(path); Enumeration enum = zipFile.entries(); while(enum.hasMoreElements()) { ZipEntry entry = (ZipEntry)enum.nextElement(); String name = entry.getName().replace('/',File.separatorChar); File file = new File(installDirectory,name); if(entry.isDirectory()) file.mkdirs(); else { new File(file.getParent()).mkdirs(); copy(progress,zipFile.getInputStream(entry), new FileOutputStream(file),false,false); if(file.getName().toLowerCase().endsWith(".jar")) toLoad.add(file.getPath()); } } } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/63b00a311b627581bd023ce6880baba2785ba30f/Roster.java/buggy/org/gjt/sp/jedit/pluginmgr/Roster.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
1086,
382,
37,
8588,
3830,
12,
3773,
1318,
5491,
4007,
13,
202,
202,
95,
1082,
202,
8298,
18,
5425,
310,
12,
11729,
71,
11864,
18,
588,
4771,
12,
803,
10019,
1082,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
1086,
382,
37,
8588,
3830,
12,
3773,
1318,
5491,
4007,
13,
202,
202,
95,
1082,
202,
8298,
18,
5425,
310,
12,
11729,
71,
11864,
18,
588,
4771,
12,
803,
10019,
1082,
202,... |
public org.quickfix.field.SecurityDesc getSecurityDesc() throws FieldNotFound { org.quickfix.field.SecurityDesc value = new org.quickfix.field.SecurityDesc(); | public quickfix.field.SecurityDesc getSecurityDesc() throws FieldNotFound { quickfix.field.SecurityDesc value = new quickfix.field.SecurityDesc(); | public org.quickfix.field.SecurityDesc getSecurityDesc() throws FieldNotFound { org.quickfix.field.SecurityDesc value = new org.quickfix.field.SecurityDesc(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/CrossOrderCancelRequest.java/buggy/src/java/src/quickfix/fix44/CrossOrderCancelRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
19288,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
460,
273,
394,
2358,
18,
19525,
904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
19288,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
4217,
460,
273,
394,
2358,
18,
19525,
904,
... |
dm.fireTableDataChanged(); | dm.fireTableDataChanged(); | public void actionPerformed(ActionEvent e) { String readableName = (String) mSearchSource.getSelectedItem(); int index = mSearchSource.getSelectedIndex(); DataSource ds = mDataSourceList.find (readableName); if (null != ds) { //get the text to search for. String textToSearchFor = mSearchField.getText(); if (!textToSearchFor.trim().equals ("")) { DataModel dm = (DataModel) mTable.getModel (); dm.reloadData (ds.getDomainName(), ds.getPort(), textToSearchFor); dm.fireTableDataChanged(); //repaint the table with results. mTable.repaint(); } } } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/b0fa2f56cd2dcc90452b768e6b38187cfb8c30eb/AddressBook.java/buggy/grendel/addressbook/AddressBook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
5411,
514,
7471,
461,
273,
261,
780,
13,
312,
2979,
1830,
18,
588,
7416,
1180,
5621,
5411,
509,
770,
273,
312,
2979,
1830,
18,
588,
7416,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
5411,
514,
7471,
461,
273,
261,
780,
13,
312,
2979,
1830,
18,
588,
7416,
1180,
5621,
5411,
509,
770,
273,
312,
2979,
1830,
18,
588,
7416,... |
workDequeue.push(object); | workDeque.push(object); | final void enumerateScan(VM_Address object) throws VM_PragmaInline { if (Plan.isRCObject(object) && !RCBaseHeader.isGreen(object)) workDequeue.push(object); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/a2d31fa1bc95145b8e2016e9bdeeb119aa707383/TrialDeletion.java/clean/MMTk/src/org/mmtk/utility/TrialDeletion.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
918,
4241,
7972,
12,
7397,
67,
1887,
733,
13,
377,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
309,
261,
5365,
18,
291,
11529,
921,
12,
1612,
13,
597,
401,
11529,
2171,
1864,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
918,
4241,
7972,
12,
7397,
67,
1887,
733,
13,
377,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
309,
261,
5365,
18,
291,
11529,
921,
12,
1612,
13,
597,
401,
11529,
2171,
1864,
18,
... |
IFigure borderItem);; | IFigure borderItem); | public Rectangle getValidLocation(Rectangle proposedLocation, IFigure borderItem);; | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/0fee3a790ef2851c36cc21b66e2f6cb04fe0b9c2/IBorderItemLocator.java/buggy/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/figures/IBorderItemLocator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13264,
22574,
2735,
12,
19463,
20084,
2735,
16,
1082,
202,
5501,
15906,
5795,
1180,
1769,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
13264,
22574,
2735,
12,
19463,
20084,
2735,
16,
1082,
202,
5501,
15906,
5795,
1180,
1769,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fDiscoveredContainerList.setFocus(); | private boolean moveDown() { boolean rc = false; List selElements = fDiscoveredContainerList.getSelectedElements(); List revSelElements = new ArrayList(selElements); Collections.reverse(revSelElements); for (Iterator i = revSelElements.iterator(); i.hasNext(); ) { DiscoveredElement elem = (DiscoveredElement) i.next(); DiscoveredElement parent = elem.getParent(); Object[] children = parent.getChildren(); for (int j = children.length - 1; j >= 0; --j) { DiscoveredElement child = (DiscoveredElement) children[j]; if (elem.equals(child)) { int prevIndex = j + 1; if (prevIndex < children.length) { // swap the two children[j] = children[prevIndex]; children[prevIndex] = elem; rc = true; break; } } } parent.setChildren(children); } fDiscoveredContainerList.refresh(); fDiscoveredContainerList.postSetSelection(new StructuredSelection(selElements)); fDiscoveredContainerList.setFocus(); return rc; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/95f7a24e4c745de195366e16eefe76f8f75ff392/DiscoveredPathContainerPage.java/buggy/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
3635,
4164,
1435,
288,
202,
202,
6494,
4519,
273,
629,
31,
202,
202,
682,
357,
3471,
273,
284,
28851,
2170,
682,
18,
588,
7416,
3471,
5621,
202,
202,
682,
5588,
1877,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
3635,
4164,
1435,
288,
202,
202,
6494,
4519,
273,
629,
31,
202,
202,
682,
357,
3471,
273,
284,
28851,
2170,
682,
18,
588,
7416,
3471,
5621,
202,
202,
682,
5588,
1877,
3... | |
InputStream is = BangUI.class.getClassLoader().getResourceAsStream( "rsrc/ui/style.bss"); | InputStream is = _ctx.getResourceManager().getResource("ui/style.bss"); | public static void reloadStylesheet () { BStyleSheet.ResourceProvider rp = new BStyleSheet.ResourceProvider() { public BTextFactory createTextFactory ( String family, String style, int size) { int nstyle = Font.PLAIN; if (style.equals(BStyleSheet.BOLD)) { nstyle = Font.BOLD; } else if (style.equals(BStyleSheet.ITALIC)) { nstyle = Font.ITALIC; } else if (style.equals(BStyleSheet.BOLD_ITALIC)) { nstyle = Font.ITALIC|Font.BOLD; } Font font = _fonts.get(family); if (font == null) { font = new Font(family, nstyle, size); } else { font = font.deriveFont(nstyle, size); } return new AWTTextFactory(font, true); } public BImage loadImage (String path) throws IOException { return _ctx.getImageCache().getBImage(path); } }; try {// TEMP: while testing load the stylesheet from the classpath// InputStream is =// _ctx.getResourceManager().getResource("ui/style.bss"); InputStream is = BangUI.class.getClassLoader().getResourceAsStream( "rsrc/ui/style.bss"); stylesheet = new BStyleSheet(new InputStreamReader(is, "UTF-8"), rp); } catch (IOException ioe) { log.log(Level.WARNING, "Failed to load stylesheet", ioe); } } | 8059 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8059/00e4216cccbacc72d9fd49900062a6351f90dc0f/BangUI.java/buggy/src/java/com/threerings/bang/client/BangUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
7749,
24656,
1832,
565,
288,
3639,
605,
2885,
8229,
18,
1420,
2249,
8715,
273,
394,
605,
2885,
8229,
18,
1420,
2249,
1435,
288,
5411,
1071,
605,
1528,
1733,
752,
1528,
173... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7749,
24656,
1832,
565,
288,
3639,
605,
2885,
8229,
18,
1420,
2249,
8715,
273,
394,
605,
2885,
8229,
18,
1420,
2249,
1435,
288,
5411,
1071,
605,
1528,
1733,
752,
1528,
173... |
public IOException getCause() { | public Exception getCause() { | public IOException getCause() { return cause; } | 47551 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47551/a11311a22ef561c606a731d392718eb2305b9423/LoginEvent.java/clean/src/java/org/jdesktop/swingx/auth/LoginEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1185,
12932,
1435,
288,
3639,
327,
4620,
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,
... | [
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1185,
12932,
1435,
288,
3639,
327,
4620,
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,... |
AST tmp2370_AST_in = (AST)_t; | AST tmp2372_AST_in = (AST)_t; | public final void sliderphrase(AST _t) throws RecognitionException { AST sliderphrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2281 = _t; AST tmp2363_AST_in = (AST)_t; match(_t,SLIDER); _t = _t.getFirstChild(); { _loop2289: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case HORIZONTAL: { AST tmp2364_AST_in = (AST)_t; match(_t,HORIZONTAL); _t = _t.getNextSibling(); break; } case MAXVALUE: { AST __t2283 = _t; AST tmp2365_AST_in = (AST)_t; match(_t,MAXVALUE); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2283; _t = _t.getNextSibling(); break; } case MINVALUE: { AST __t2284 = _t; AST tmp2366_AST_in = (AST)_t; match(_t,MINVALUE); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2284; _t = _t.getNextSibling(); break; } case VERTICAL: { AST tmp2367_AST_in = (AST)_t; match(_t,VERTICAL); _t = _t.getNextSibling(); break; } case NOCURRENTVALUE: { AST tmp2368_AST_in = (AST)_t; match(_t,NOCURRENTVALUE); _t = _t.getNextSibling(); break; } case LARGETOSMALL: { AST tmp2369_AST_in = (AST)_t; match(_t,LARGETOSMALL); _t = _t.getNextSibling(); break; } case TICMARKS: { AST __t2285 = _t; AST tmp2370_AST_in = (AST)_t; match(_t,TICMARKS); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NONE: { AST tmp2371_AST_in = (AST)_t; match(_t,NONE); _t = _t.getNextSibling(); break; } case TOP: { AST tmp2372_AST_in = (AST)_t; match(_t,TOP); _t = _t.getNextSibling(); break; } case BOTTOM: { AST tmp2373_AST_in = (AST)_t; match(_t,BOTTOM); _t = _t.getNextSibling(); break; } case LEFT: { AST tmp2374_AST_in = (AST)_t; match(_t,LEFT); _t = _t.getNextSibling(); break; } case RIGHT: { AST tmp2375_AST_in = (AST)_t; match(_t,RIGHT); _t = _t.getNextSibling(); break; } case BOTH: { AST tmp2376_AST_in = (AST)_t; match(_t,BOTH); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FREQUENCY: { AST __t2288 = _t; AST tmp2377_AST_in = (AST)_t; match(_t,FREQUENCY); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2288; _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t2285; _t = _t.getNextSibling(); break; } case TOOLTIP: { tooltip_expr(_t); _t = _retTree; break; } case SIZE: case SIZECHARS: case SIZEPIXELS: { sizephrase(_t); _t = _retTree; break; } default: { break _loop2289; } } } while (true); } _t = __t2281; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
18442,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
18442,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18442,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
18442,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
90... |
final IntItem cnt = vstack.popInt(); final LongItem val = vstack.popLong(); final X86RegisterPool pool = eContext.getPool(); | final IntItem cnt = vstack.popInt(); final LongItem val = vstack.popLong(); final X86RegisterPool pool = eContext.getPool(); | public final void visit_lshr() { final IntItem cnt = vstack.popInt(); final LongItem val = vstack.popLong(); final X86RegisterPool pool = eContext.getPool(); // Get cnt into ECX if (!cnt.uses(ECX)) { val.spillIfUsing(eContext, ECX); requestRegister(ECX, cnt); cnt.loadTo(eContext, ECX); } // Load val val.load(eContext); final Register lsb = val.getLsbRegister(); final Register msb = val.getMsbRegister(); // Calculate os.writeAND(ECX, 63); os.writeCMP_Const(ECX, 32); final Label gt32Label = new Label(curInstrLabel + "gt32"); final Label endLabel = new Label(curInstrLabel + "end"); os.writeJCC(gt32Label, X86Constants.JAE); // JAE /** ECX < 32 */ os.writeSHRD_CL(lsb, msb); os.writeSAR_CL(msb); os.writeJMP(endLabel); /** ECX >= 32 */ os.setObjectRef(gt32Label); os.writeMOV(INTSIZE, lsb, msb); os.writeSAR(msb, 31); os.writeSAR_CL(lsb); os.setObjectRef(endLabel); // Push final LongItem result = LongItem.createReg(lsb, msb); pool.transferOwnerTo(lsb, result); pool.transferOwnerTo(msb, result); vstack.push(result); // Release cnt.release(eContext); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/55b12818040bb69b51502c4cd0f42118d2046977/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
3757,
67,
80,
674,
86,
1435,
288,
3639,
727,
3094,
1180,
7599,
273,
19510,
18,
5120,
1702,
5621,
3639,
727,
3407,
1180,
1244,
273,
19510,
18,
5120,
3708,
5621,
3639,
727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
3757,
67,
80,
674,
86,
1435,
288,
3639,
727,
3094,
1180,
7599,
273,
19510,
18,
5120,
1702,
5621,
3639,
727,
3407,
1180,
1244,
273,
19510,
18,
5120,
3708,
5621,
3639,
727,
... |
Gridded2DSet line = new Gridded2DSet(fdomain, ss, nsamp); xref.setData(line); | Gridded2DSet lineSet = new Gridded2DSet(fdomain, ss, nsamp); xref.setData(lineSet); | public void doAction() throws VisADException, RemoteException { Set cellSet = (Set) lineRef.getData(); if (cellSet == null) return; float[][] samples = cellSet.getSamples(); if (samples == null) return; // System.out.println("box (" + samples[0][0] + ", " + samples[1][0] + // ") to (" + samples[0][1] + ", " + samples[1][1] + ")"); float x1 = samples[0][0]; float y1 = samples[1][0]; float x2 = samples[0][1]; float y2 = samples[1][1]; double dist = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); int nsamp = (int) (dist + 1.0); if (nsamp < 2) nsamp = 2; float[][] ss = new float[2][nsamp]; for (int i=0; i<nsamp; i++) { float a = ((float) i) / (nsamp - 1.0f); ss[0][i] = x1 + a * (x2 - x1); ss[1][i] = y1 + a * (y2 - y1); } Gridded2DSet line = new Gridded2DSet(fdomain, ss, nsamp); xref.setData(line); FlatField lineField = (FlatField) // bigData.resample(line, Data.WEIGHTED_AVERAGE, Data.NO_ERRORS); bigData.resample(line, Data.NEAREST_NEIGHBOR, Data.NO_ERRORS); float[][] lineSamples = lineField.getFloats(false); // [NFILES][nsamp] Linear1DSet pointSet = new Linear1DSet(point, 0.0, 1.0, nsamp); Integer1DSet channelSet = new Integer1DSet(channel, NFILES); FieldImpl spectra = new FieldImpl(spectraType, pointSet); for (int i=0; i<nsamp; i++) { FlatField spectrum = new FlatField(spectrumType, channelSet); float[][] temp = new float[1][NFILES]; for (int j=0; j<NFILES; j++) { temp[0][j] = lineSamples[j][i]; } spectrum.setSamples(temp, false); spectra.setSample(i, spectrum); } FieldImpl lines = new FieldImpl(linesType, channelSet); for (int j=0; j<NFILES; j++) { FlatField linex = new FlatField(lineType, pointSet); float[][] temp = new float[1][nsamp]; for (int i=0; i<nsamp; i++) { temp[0][i] = lineSamples[j][i]; } linex.setSamples(temp, false); lines.setSample(j, linex); } ref2.setData(new Tuple(new Data[] {spectra, lines})); } | 55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/70f56ee3fa101ec0d5c6f5c67bc3511fe51aa484/MultiLUT.java/clean/loci/MultiLUT.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
741,
1803,
1435,
1216,
8077,
1880,
503,
16,
18361,
288,
3639,
1000,
2484,
694,
273,
261,
694,
13,
980,
1957,
18,
588,
751,
5621,
3639,
309,
261,
3855,
694,
422,
446,
13,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
741,
1803,
1435,
1216,
8077,
1880,
503,
16,
18361,
288,
3639,
1000,
2484,
694,
273,
261,
694,
13,
980,
1957,
18,
588,
751,
5621,
3639,
309,
261,
3855,
694,
422,
446,
13,
327... |
public int readByte(final int index) { return b[index] & 0xFF; } | public int readByte (final int index) { return b[index] & 0xFF; } | public int readByte(final int index) { return b[index] & 0xFF; } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/2d49b952712be2040c67ebcec379769be0f9e29d/ClassReader.java/buggy/aspectwerkz3/src/main/org/objectweb/asm/ClassReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
22301,
12,
6385,
509,
770,
13,
288,
3639,
327,
324,
63,
1615,
65,
473,
374,
6356,
31,
565,
289,
2,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
509,
22301,
12,
6385,
509,
770,
13,
288,
3639,
327,
324,
63,
1615,
65,
473,
374,
6356,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if (field == null || !fieldData.containsKey(field.alias)) return defVal; return (boolean[][])fieldData.get(field.alias); | if (field == null || !fieldData.containsKey(field.alias)) return defVal; return (boolean[][]) fieldData.get(field.alias); | public boolean[][] readBooleanArray2D(String name, boolean[][] defVal) throws IOException { BinaryClassField field = cObj.nameFields.get(name); if (field == null || !fieldData.containsKey(field.alias)) return defVal; return (boolean[][])fieldData.get(field.alias); } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/7e219898e7365b660f3bf189ddfc9a1be269fb42/BinaryInputCapsule.java/clean/src/com/jme/util/export/binary/BinaryInputCapsule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
63,
6362,
65,
855,
5507,
1076,
22,
40,
12,
780,
508,
16,
1250,
63,
6362,
65,
1652,
3053,
13,
1216,
1860,
288,
3639,
7896,
797,
974,
652,
273,
276,
2675,
18,
529,
2314,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
63,
6362,
65,
855,
5507,
1076,
22,
40,
12,
780,
508,
16,
1250,
63,
6362,
65,
1652,
3053,
13,
1216,
1860,
288,
3639,
7896,
797,
974,
652,
273,
276,
2675,
18,
529,
2314,
18,... |
public static PrintStream getLog() { | public static PrintStream getLog() { | public static PrintStream getLog() { throw new Error("Not implemented");} | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/RemoteServer.java/buggy/core/src/classpath/java/java/rmi/server/RemoteServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
21677,
9189,
1435,
288,
202,
12849,
394,
1068,
2932,
1248,
8249,
8863,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
21677,
9189,
1435,
288,
202,
12849,
394,
1068,
2932,
1248,
8249,
8863,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing Files section", identifier); | throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing Files section", identifier, global); | public ClientPutComplexDirMessage(SimpleFieldSet fs, BucketFactory bfTemp, PersistentTempBucketFactory bfPersistent) throws MessageInvalidException { // Parse the standard ClientPutDir headers - URI, etc. super(fs); filesByName = new HashMap(); filesToRead = new LinkedList(); long totalBytes = 0; // Now parse the meat SimpleFieldSet files = fs.subset("Files"); if(files == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing Files section", identifier); boolean logMINOR = Logger.shouldLog(Logger.MINOR, this); for(int i=0;;i++) { SimpleFieldSet subset = files.subset(Integer.toString(i)); if(subset == null) break; DirPutFile f = DirPutFile.create(subset, identifier, (persistenceType == ClientRequest.PERSIST_FOREVER) ? bfPersistent : bfTemp); addFile(f); if(logMINOR) Logger.minor(this, "Adding "+f); if(f instanceof DirectDirPutFile) { totalBytes += ((DirectDirPutFile)f).bytesToRead(); filesToRead.addLast(f); if(logMINOR) Logger.minor(this, "totalBytes now "+totalBytes); } } attachedBytes = totalBytes; } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/bbb3c23ec38ea1c7abb48040a17f5fc7932248bc/ClientPutComplexDirMessage.java/buggy/src/freenet/node/fcp/ClientPutComplexDirMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
6426,
12795,
1621,
1079,
12,
5784,
974,
694,
2662,
16,
7408,
1733,
16222,
7185,
16,
11049,
7185,
4103,
1733,
16222,
11906,
13,
1216,
2350,
1941,
503,
288,
202,
202,
759,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
6426,
12795,
1621,
1079,
12,
5784,
974,
694,
2662,
16,
7408,
1733,
16222,
7185,
16,
11049,
7185,
4103,
1733,
16222,
11906,
13,
1216,
2350,
1941,
503,
288,
202,
202,
759,
2... |
SiteTreeNode node = tree.getNode(getSourceDocument().getId()); | SiteTreeNode node = tree.getNode(SiteUtil.getPath(this.manager, getSourceDocument())); | protected void doCheckPreconditions() throws Exception { super.doCheckPreconditions(); if (hasErrors()) { return; } Publication publication = getSourceDocument().getPublication(); ServiceSelector selector = null; SiteManager siteManager = null; try { selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector"); siteManager = (SiteManager) selector.select(publication.getSiteManagerHint()); SiteStructure structure = siteManager.getSiteStructure(getSourceDocument() .getFactory(), publication, getSourceDocument().getArea()); if (structure instanceof SiteTree) { SiteTree tree = (SiteTree) structure; SiteTreeNode node = tree.getNode(getSourceDocument().getId()); SiteTreeNode[] siblings = null; String direction = getParameterAsString(DIRECTION); if (direction.equals(UP)) { siblings = node.getPrecedingSiblings(); } else if (direction.equals(DOWN)) { siblings = node.getNextSiblings(); } else { addErrorMessage("nudge-error-direction-unknown", new String[] { direction }); } if (siblings != null && siblings.length == 0) { addErrorMessage("nudge-error-direction"); } } else { addErrorMessage("nudge-error-area"); } } catch (Exception e) { throw new RuntimeException(e); } finally { if (selector != null) { if (siteManager != null) { selector.release(siteManager); } this.manager.release(selector); } } } | 45951 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45951/e41395775f7fab54bf6881ec129a973226e8b7d1/Nudge.java/buggy/src/modules/sitetree/java/src/org/apache/lenya/cms/site/usecases/Nudge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
1564,
1386,
6381,
1435,
1216,
1185,
288,
3639,
2240,
18,
2896,
1564,
1386,
6381,
5621,
3639,
309,
261,
5332,
4229,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
7224,
367,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
1564,
1386,
6381,
1435,
1216,
1185,
288,
3639,
2240,
18,
2896,
1564,
1386,
6381,
5621,
3639,
309,
261,
5332,
4229,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
7224,
367,
2... |
return isMatch(string, activityIds); | return match(string, activityIds); | public boolean isMatch(String string, Set activityIds) { return isMatch(string, activityIds); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/d6a0ceb7d8eaffbc55421a81c1dd44d21444e41a/MutableActivityManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
29895,
12,
780,
533,
16,
1000,
5728,
2673,
13,
288,
202,
202,
2463,
29895,
12,
1080,
16,
5728,
2673,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
29895,
12,
780,
533,
16,
1000,
5728,
2673,
13,
288,
202,
202,
2463,
29895,
12,
1080,
16,
5728,
2673,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if (focusResource == null) return true; | if (focusResource == null) return true; | private boolean selectBySelection(ConcreteMarker marker) { if (onResource == ON_ANY_RESOURCE || marker == null) return true; if (focusResource == null) return true; IResource resource = marker.getResource(); if (onResource == ON_WORKING_SET) { if (workingSet == null) return true; if (resource != null) return isEnclosed(resource); } else if (onResource == ON_ANY_RESOURCE_OF_SAME_PROJECT) { IProject project = resource.getProject(); if (project == null) { return false; } for (int i = 0; i < focusResource.length; i++) { IProject selectedProject = focusResource[i].getProject(); if (selectedProject == null) { continue; } if (project.equals(selectedProject)) return true; } } else if (onResource == ON_SELECTED_RESOURCE_ONLY) { for (int i = 0; i < focusResource.length; i++) { if (resource.equals(focusResource[i])) return true; } } else if (onResource == ON_SELECTED_RESOURCE_AND_CHILDREN) { for (int i = 0; i < focusResource.length; i++) { IResource parentResource = resource; while (parentResource != null) { if (parentResource.equals(focusResource[i])) return true; parentResource = parentResource.getParent(); } } } return false; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1ceb585b9b16047c6c580984b0c9962c41a22ba6/MarkerFilter.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
2027,
858,
6233,
12,
25845,
7078,
5373,
13,
288,
3639,
309,
261,
265,
1420,
422,
6229,
67,
15409,
67,
11395,
747,
5373,
422,
446,
13,
5411,
327,
638,
31,
3639,
309,
261,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
2027,
858,
6233,
12,
25845,
7078,
5373,
13,
288,
3639,
309,
261,
265,
1420,
422,
6229,
67,
15409,
67,
11395,
747,
5373,
422,
446,
13,
5411,
327,
638,
31,
3639,
309,
261,
139... |
return getStringProperty( Style.PAGE_BREAK_INSIDE_PROP ); | return getStringProperty( IStyleModel.PAGE_BREAK_INSIDE_PROP ); | public String getPageBreakInside( ) { return getStringProperty( Style.PAGE_BREAK_INSIDE_PROP ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/d802c33711e0d111551ae23575895cd060f085b6/GroupHandle.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/GroupHandle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
8957,
7634,
18619,
12,
262,
202,
95,
202,
202,
2463,
4997,
1396,
12,
9767,
18,
11219,
67,
27960,
67,
706,
26498,
67,
15811,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
8957,
7634,
18619,
12,
262,
202,
95,
202,
202,
2463,
4997,
1396,
12,
9767,
18,
11219,
67,
27960,
67,
706,
26498,
67,
15811,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-10... |
return newFilter; | return fused; | public static SIRStream fuse(SIRSplitJoin sj) { if (!isFusable(sj)) { return sj; } else { System.err.println("Fusing " + (sj.size()) + " SplitJoin filters!"); } // get copy of child streams List children = sj.getParallelStreams(); // rename components doRenaming(children); // calculate the repetitions for the split-join SRepInfo rep = SRepInfo.calcReps(sj); // So at this point we have an eligible split/join; flatten it. JMethodDeclaration newWork = makeWorkFunction(sj, children, rep); JFieldDeclaration[] newFields = makeFields(sj, children); JMethodDeclaration[] newMethods = makeMethods(sj, children); JMethodDeclaration newInit = makeInitFunction(sj, children); SRate rate = calcSRate(sj, rep); // Build the new filter. SIRFilter newFilter = new SIRFilter(sj.getParent(), "Fused_" + sj.getIdent(), newFields, newMethods, new JIntLiteral(rate.peek), new JIntLiteral(rate.pop), new JIntLiteral(rate.push), newWork, sj.getInputType(), sj.getOutputType()); // Use the new init function newFilter.setInit(newInit); // make new pipeline representing fused sj SIRPipeline fused = makeFusedPipe(sj, rep, rate, newFilter); // replace in parent replaceInParent(sj, fused); return newFilter; } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/0849e04b1f473f366af1fd17e9369cfd96e2f037/FuseSimpleSplit.java/buggy/streams/src/at/dms/kjc/sir/lowering/fusion/FuseSimpleSplit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
5705,
54,
1228,
19552,
12,
2320,
54,
5521,
4572,
30252,
13,
565,
288,
202,
430,
16051,
291,
42,
16665,
12,
87,
78,
3719,
288,
202,
565,
327,
30252,
31,
202,
97,
469,
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,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
5705,
54,
1228,
19552,
12,
2320,
54,
5521,
4572,
30252,
13,
565,
288,
202,
430,
16051,
291,
42,
16665,
12,
87,
78,
3719,
288,
202,
565,
327,
30252,
31,
202,
97,
469,
288,
2... |
log().info("Persiting data for resource "+resource); | log().info("Persisting data for resource "+resource); | public void visitResource(CollectionResource resource) { log().info("Persiting data for resource "+resource); pushShouldPersist(resource); } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/f5ef55e2fe09f2882c095a745c4c8514f2750533/BasePersister.java/buggy/opennms-services/src/main/java/org/opennms/netmgt/collectd/BasePersister.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
1420,
12,
2532,
1420,
1058,
13,
288,
3639,
613,
7675,
1376,
2932,
12771,
310,
501,
364,
1058,
13773,
3146,
1769,
3639,
1817,
14309,
12771,
12,
3146,
1769,
565,
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,
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,
3757,
1420,
12,
2532,
1420,
1058,
13,
288,
3639,
613,
7675,
1376,
2932,
12771,
310,
501,
364,
1058,
13773,
3146,
1769,
3639,
1817,
14309,
12771,
12,
3146,
1769,
565,
289,
2,
-1... |
public String stopFunction(int savedTop) | String stopFunction(int savedTop) | public String stopFunction(int savedTop) { if (!(0 <= savedTop && savedTop <= sourceTop)) throw new IllegalArgumentException(); String encoded = sourceToString(savedTop); sourceTop = savedTop; return encoded; } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/26830fb45b7c82a7760eb0041f4a6ad5b88bfc73/Parser.java/clean/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
514,
2132,
2083,
12,
474,
5198,
3401,
13,
565,
288,
3639,
309,
16051,
12,
20,
1648,
5198,
3401,
597,
5198,
3401,
1648,
1084,
3401,
3719,
5411,
604,
394,
2754,
5621,
3639,
514,
3749,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
514,
2132,
2083,
12,
474,
5198,
3401,
13,
565,
288,
3639,
309,
16051,
12,
20,
1648,
5198,
3401,
597,
5198,
3401,
1648,
1084,
3401,
3719,
5411,
604,
394,
2754,
5621,
3639,
514,
3749,
273,
... |
storeParametersForLinux(asm, frameSize, method, klass); | public static synchronized VM_CompiledMethod compile (VM_NativeMethod method) { VM_JNICompiledMethod cm = (VM_JNICompiledMethod)VM_CompiledMethods.createCompiledMethod(method, VM_CompiledMethod.JNI); int compiledMethodId = cm.getId(); VM_Assembler asm = new VM_Assembler(0); int frameSize = VM_Compiler.getFrameSize(method); VM_Class klass = method.getDeclaringClass(); /* initialization */ if (VM.VerifyAssertions) VM._assert(T3 <= LAST_VOLATILE_GPR); // need 4 gp temps if (VM.VerifyAssertions) VM._assert(F3 <= LAST_VOLATILE_FPR); // need 4 fp temps if (VM.VerifyAssertions) VM._assert(S0 < SP && SP <= LAST_SCRATCH_GPR); // need 2 scratch VM_Address bootRecordAddress = VM_Magic.objectAsAddress(VM_BootRecord.the_boot_record); int lockoutLockOffset = VM_Entrypoints.lockoutProcessorField.getOffset(); VM_Address lockoutLockAddress = bootRecordAddress.add(lockoutLockOffset); int sysTOCOffset = VM_Entrypoints.sysTOCField.getOffset(); int sysYieldIPOffset = VM_Entrypoints.sysVirtualProcessorYieldIPField.getOffset(); VM_Address gCFlagAddress = VM_Magic.objectAsAddress(VM_BootRecord.the_boot_record).add(VM_Entrypoints.globalGCInProgressFlagField.getOffset()); int nativeIP = method.getNativeIP(); int nativeTOC = method.getNativeTOC(); // NOTE: this must be done before the condition VM_Thread.hasNativeStackFrame() become true // so that the first Java to C transition will be allowed to resize the stack // (currently, this is true when the JNIRefsTop index has been incremented from 0) asm.emitNativeStackOverflowCheck(frameSize + 14); // add at least 14 for C frame (header + spill) int numValues = method.getParameterWords(); // number of arguments for this method int parameterAreaSize = (numValues) * 4; asm.emitMFLR(0); // save return address in caller frame asm.emitST(0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); // this was set up the first time by DynamicBridgeTo() asm.emitSTU (FP, -frameSize, FP); // get transition frame on stack asm.emitST (JTOC, frameSize - JNI_JTOC_OFFSET, FP); // save RVM JTOC in frame asm.emitST (PROCESSOR_REGISTER, frameSize - JNI_PR_OFFSET, FP); // save PR in frame // store method ID for JNI frame, occupies AIX saved CR slot, which we don't use // hardcoded in the glue routine asm.emitLVAL (S0, compiledMethodId); asm.emitST (S0, STACKFRAME_METHOD_ID_OFFSET, FP); // establish SP -> VM_Thread, S0 -> threads JNIEnv structure asm.emitL(SP, VM_Entrypoints.activeThreadField.getOffset(), PROCESSOR_REGISTER); asm.emitL(S0, VM_Entrypoints.jniEnvField.getOffset(), SP); // save the TI & PR registers in the JNIEnvironment object for possible calls back into Java asm.emitST(TI, VM_Entrypoints.JNIEnvSavedTIField.getOffset(), S0); asm.emitST(PROCESSOR_REGISTER, VM_Entrypoints.JNIEnvSavedPRField.getOffset(), S0); // save current frame pointer in JNIEnv, JNITopJavaFP, which will be the frame // to start scanning this stack during GC, if top of stack is still executing in C asm.emitST(FP, VM_Entrypoints.JNITopJavaFPField.getOffset(), S0); // save the RVM nonvolatile registers, to be scanned by GC stack mapper // remember to skip past the saved JTOC and SP by starting with offset=-12 // for (int i = LAST_NONVOLATILE_GPR, offset = JNI_RVM_NONVOLATILE_OFFSET; i >= FIRST_NONVOLATILE_GPR; --i, offset+=4) { asm.emitST (i, frameSize - offset, FP); } // clear the GC flag on entry to native code asm.emitCAL(PROCESSOR_REGISTER,0,0); // use PR as scratch asm.emitST(PROCESSOR_REGISTER, frameSize-JNI_GC_FLAG_OFFSET, FP); // generate the code to map the parameters to AIX convention and add the // second parameter 2 (either the "this" ptr or class if a static method). // The JNI Function ptr first parameter is set before making the call. // Opens a new frame in the JNIRefs table to register the references // Assumes S0 set to JNIEnv, kills TI, SP & PROCESSOR_REGISTER // On return, S0 is still valid. // storeParametersForAIX(asm, frameSize, method, klass); // Get address of out_of_line prolog into SP, before setting TOC reg. asm.emitL (SP, VM_Entrypoints.invokeNativeFunctionInstructionsField.getOffset(), JTOC); asm.emitMTLR(SP); // set the TOC and IP for branch to out_of_line code asm.emitLVAL (JTOC, nativeTOC); // load TOC for native function into TOC reg asm.emitLVAL (TI, nativeIP); // load TI with address of native code // go to part of prologue that is in the boot image. It will change the Processor // status to "in_native" and transfer to the native code. On return it will // change the state back to "in_java" (waiting if blocked). // // The native address entrypoint is in register TI // The native TOC has been loaded into the TOC register // S0 still points to threads JNIEnvironment // asm.emitBLRL (); // restore PR, saved in this glue frame before the call. If GC occurred, this saved // VM_Processor reference was relocated while scanning this stack. If while in native, // the thread became "stuck" and was moved to a Native Processor, then this saved // PR was reset to point to that native processor // asm.emitL (PROCESSOR_REGISTER, frameSize - JNI_PR_OFFSET, FP); // at this point, test if in blue processor: if yes, return to // Java caller; by picking up at "check if GC..." below // if not, must transfer to blue processor by using // become RVM thread. asm.emitL (S0, VM_Entrypoints.processorModeField.getOffset(), PROCESSOR_REGISTER); // get processorMode asm.emitCMPI (S0, VM_Processor.RVM) ; // are we still on blue processor VM_ForwardReference frBlue = asm.emitForwardBC(EQ); asm.emitL(T0, VM_Entrypoints.activeThreadField.getOffset(), PROCESSOR_REGISTER); // get activeThread from Processor asm.emitL(S0, VM_Entrypoints.jniEnvField.getOffset(), T0); // get JNIEnvironment from activeThread asm.emitL (TI, VM_Entrypoints.JNIEnvSavedTIField.getOffset(), S0); // and restore TI from JNIEnvironment // restore RVM JTOC asm.emitL (JTOC, frameSize - 4, FP); // Branch to becomeRVMThread: we will yield and get rescheduled to execute // on a regular VM_Processor for Java code asm.emitL (S0, VM_Entrypoints.becomeRVMThreadMethod.getOffset(), JTOC); asm.emitMTLR(S0); asm.emitBLRL (); // At this point, we have resumed execution in the regular Java VM_Processor // so the PR contains the correct values for this VM_Processor. TI is also correct // branch to here if on blue processor // // check if GC has occurred, If GC did not occur, then // VM NON_VOLATILE regs were restored by AIX and are valid. If GC did occur // objects referenced by these restored regs may have moved, in this case we // restore the nonvolatile registers from our savearea, // where any object references would have been relocated during GC. // use T2 as scratch (not needed any more on return from call) // frBlue.resolve(asm); asm.emitL(T2, frameSize - JNI_GC_FLAG_OFFSET, FP); asm.emitCMPI(T2,0); VM_ForwardReference fr1 = asm.emitForwardBC(EQ); for (int i = LAST_NONVOLATILE_GPR, offset = JNI_RVM_NONVOLATILE_OFFSET; i >= FIRST_NONVOLATILE_GPR; --i, offset+=4) { asm.emitL (i, frameSize - offset, FP); } fr1.resolve(asm); asm.emitL(S0, VM_Entrypoints.activeThreadField.getOffset(), PROCESSOR_REGISTER); // S0 holds thread pointer // reset threads processor affinity if it was previously zero, before the call. // ...again, rethink if the setting & resetting of processor affinity is still necessary // asm.emitL(T2, frameSize - JNI_AFFINITY_OFFSET, FP); // saved affinity in glue frame asm.emitCMPI(T2,0); VM_ForwardReference fr2 = asm.emitForwardBC(NE); asm.emitST(T2, VM_Entrypoints.processorAffinityField.getOffset(), S0); // store 0 into affinity field fr2.resolve(asm); // reestablish S0 to hold jniEnv pointer asm.emitL(S0, VM_Entrypoints.jniEnvField.getOffset(), S0); // pop jrefs frame off the JNIRefs stack, "reopen" the previous top jref frame // use SP as scratch before it's restored, also use T2, T3 for scratch which are no longer needed asm.emitL (SP, VM_Entrypoints.JNIRefsField.getOffset(), S0); // load base of JNIRefs array asm.emitL (T2, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // get saved offset for JNIRefs frame ptr previously pushed onto JNIRefs array asm.emitCAL(T3, -4, T2); // compute offset for new TOP asm.emitST (T3, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); // store new offset for TOP into JNIEnv asm.emitLX (T2, SP, T2); // retrieve the previous frame ptr asm.emitST (T2, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // store new offset for JNIRefs frame ptr into JNIEnv // Restore the return value R3-R4 saved in the glue frame spill area before the migration asm.emitL (T0, AIX_FRAME_HEADER_SIZE, FP); asm.emitL (T1, AIX_FRAME_HEADER_SIZE+4, FP); // if the the return type is a reference, the native C is returning a jref // which is a byte offset from the beginning of the threads JNIRefs stack/array // of the corresponding ref. In this case, emit code to replace the returned // offset (in R3) with the ref from the JNIRefs array VM_TypeReference returnType = method.getReturnType(); if (returnType.isReferenceType()) { // use returned offset to load ref from JNIRefs into R3 asm.emitLX (3, SP, 3); // SP is still the base of the JNIRefs array } // reload TI ref saved in JNIEnv asm.emitL (TI, VM_Entrypoints.JNIEnvSavedTIField.getOffset(), S0); // pop the glue stack frame, restore the Java caller frame asm.emitCAL (FP, +frameSize, FP); // remove linkage area // C return value is already where caller expected it (R3, R4 or F0) // and SP is a scratch register, so we actually don't have to // restore it and/or pop arguments off it. // So, just restore the return address to the link register. asm.emitL(0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); asm.emitMTLR(0); // restore return address // CHECK EXCEPTION AND BRANCH TO ATHROW CODE OR RETURN NORMALLY asm.emitL (T2, VM_Entrypoints.JNIPendingExceptionField.getOffset(), S0); // get pending exception from JNIEnv asm.emitCAL (T3, 0, 0); // get a null value to compare asm.emitST (T3, VM_Entrypoints.JNIPendingExceptionField.getOffset(), S0); // clear the current pending exception asm.emitCMP (T2, T3); // check for pending exception on return from native VM_ForwardReference fr3 = asm.emitForwardBC(NE); asm.emitBLR(); // if no pending exception, proceed to return to caller fr3.resolve(asm); // An exception is pending, deliver the exception to the caller as if executing an athrow in the caller // at the location of the call to the native method asm.emitLtoc(T3, VM_Entrypoints.athrowMethod.getOffset()); asm.emitMTCTR(T3); // point LR to the exception delivery code asm.emitCAL (T0, 0, T2); // copy the saved exception to T0 asm.emitBCTR(); // then branch to the exception delivery code, does not return VM_MachineCode machineCode = asm.makeMachineCode(); cm.compileComplete(machineCode.getInstructions()); return cm; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/84e99898036221f1c0ed5e72e060bc3e0803769c/VM_JNICompiler.java/clean/rvm/src/vm/arch/powerPC/jni/VM_JNICompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1707,
2402,
1290,
19475,
12,
23522,
16,
2623,
1225,
16,
707,
16,
7352,
1769,
565,
1707,
2402,
1290,
19475,
12,
23522,
16,
2623,
1225,
16,
707,
16,
7352,
1769,
282,
1071,
1707,
2402,
1290,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1707,
2402,
1290,
19475,
12,
23522,
16,
2623,
1225,
16,
707,
16,
7352,
1769,
565,
1707,
2402,
1290,
19475,
12,
23522,
16,
2623,
1225,
16,
707,
16,
7352,
1769,
282,
1071,
1707,
2402,
1290,... | |
long maxTimeStamp = 0; | long maxTimeStamp = Long.MIN_VALUE; | void loadFSImage( Configuration conf ) throws IOException { FSNamesystem fsNamesys = FSNamesystem.getFSNamesystem(); FSDirectory fsDir = fsNamesys.dir; for (int idx = 0; idx < imageDirs.length; idx++) { // // Atomic move sequence, to recover from interrupted save // File curFile = new File(imageDirs[idx], FS_IMAGE); File newFile = new File(imageDirs[idx], NEW_FS_IMAGE); File oldFile = new File(imageDirs[idx], OLD_FS_IMAGE); // Maybe we were interrupted between 2 and 4 if (oldFile.exists() && curFile.exists()) { oldFile.delete(); if (editLog.exists()) { editLog.deleteAll(); } } else if (oldFile.exists() && newFile.exists()) { // Or maybe between 1 and 2 newFile.renameTo(curFile); oldFile.delete(); } else if (curFile.exists() && newFile.exists()) { // Or else before stage 1, in which case we lose the edits newFile.delete(); } } // Now check all curFiles and see which is the newest File curFile = null; long maxTimeStamp = 0; for (int idx = 0; idx < imageDirs.length; idx++) { File file = new File(imageDirs[idx], FS_IMAGE); if (file.exists()) { long timeStamp = 0; File timeFile = new File(imageDirs[idx], FS_TIME); if (timeFile.exists() && timeFile.canRead()) { DataInputStream in = new DataInputStream( new FileInputStream(timeFile)); try { timeStamp = in.readLong(); } finally { in.close(); } } if (maxTimeStamp < timeStamp) { maxTimeStamp = timeStamp; curFile = file; } } } // // Load in bits // boolean needToSave = true; int imgVersion = FSConstants.DFS_CURRENT_VERSION; if (curFile != null) { DataInputStream in = new DataInputStream( new BufferedInputStream( new FileInputStream(curFile))); try { // read image version: first appeared in version -1 imgVersion = in.readInt(); // read namespaceID: first appeared in version -2 if( imgVersion <= -2 ) fsDir.namespaceID = in.readInt(); // read number of files int numFiles = 0; // version 0 does not store version # // starts directly with the number of files if( imgVersion >= 0 ) { numFiles = imgVersion; imgVersion = 0; } else numFiles = in.readInt(); needToSave = ( imgVersion != FSConstants.DFS_CURRENT_VERSION ); if( imgVersion < FSConstants.DFS_CURRENT_VERSION ) // future version throw new IncorrectVersionException(imgVersion, "file system image"); // read file info short replication = (short)conf.getInt("dfs.replication", 3); for (int i = 0; i < numFiles; i++) { UTF8 name = new UTF8(); name.readFields(in); // version 0 does not support per file replication if( !(imgVersion >= 0) ) { replication = in.readShort(); // other versions do replication = FSEditLog.adjustReplication( replication, conf ); } int numBlocks = in.readInt(); Block blocks[] = null; if (numBlocks > 0) { blocks = new Block[numBlocks]; for (int j = 0; j < numBlocks; j++) { blocks[j] = new Block(); blocks[j].readFields(in); } } fsDir.unprotectedAddFile(name, blocks, replication ); } // load datanode info this.loadDatanodes( imgVersion, in ); } finally { in.close(); } } if( fsDir.namespaceID == 0 ) fsDir.namespaceID = newNamespaceID(); needToSave |= ( editLog.exists() && editLog.loadFSEdits(conf) > 0 ); if( needToSave ) saveFSImage(); } | 49935 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49935/3d053c0d9f93618c2d3bb22b3709a50c2a93c064/FSImage.java/clean/src/java/org/apache/hadoop/dfs/FSImage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
1262,
4931,
2040,
12,
4659,
2195,
262,
1216,
1860,
288,
565,
9247,
1557,
1108,
2662,
1557,
1900,
273,
9247,
1557,
1108,
18,
588,
4931,
1557,
1108,
5621,
565,
9247,
2853,
2662,
1621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1262,
4931,
2040,
12,
4659,
2195,
262,
1216,
1860,
288,
565,
9247,
1557,
1108,
2662,
1557,
1900,
273,
9247,
1557,
1108,
18,
588,
4931,
1557,
1108,
5621,
565,
9247,
2853,
2662,
1621,
... |
logger.info(msg); | logger.log(FQCN, Level.INFO, msg, null); | public void info(String msg) { logger.info(msg); } | 55012 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55012/fb136472b4ff37cfad94ca3ad6fa7781ad7dd989/Log4jLoggerAdapter.java/buggy/src/java/org/slf4j/impl/Log4jLoggerAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1123,
12,
780,
1234,
13,
288,
565,
1194,
18,
1330,
12,
23032,
12821,
16,
4557,
18,
5923,
16,
1234,
16,
446,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1123,
12,
780,
1234,
13,
288,
565,
1194,
18,
1330,
12,
23032,
12821,
16,
4557,
18,
5923,
16,
1234,
16,
446,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public static String searchGetSortOrderString(boolean detailed, HttpSession session) { ResultSortOrder resultSortOrder = ProductSearchOptions.getResultSortOrder(session); | public static String searchGetSortOrderString(boolean detailed, HttpServletRequest request) { Locale locale = UtilHttp.getLocale(request); ResultSortOrder resultSortOrder = ProductSearchOptions.getResultSortOrder(request); | public static String searchGetSortOrderString(boolean detailed, HttpSession session) { ResultSortOrder resultSortOrder = ProductSearchOptions.getResultSortOrder(session); if (resultSortOrder == null) return ""; return resultSortOrder.prettyPrintSortOrder(detailed); } | 45953 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45953/a0a99db38a608b5af3fc0585fced6229e794b469/ProductSearchSession.java/clean/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1623,
967,
31460,
780,
12,
6494,
6864,
16,
26166,
1339,
13,
288,
3639,
3438,
31460,
563,
31460,
273,
8094,
2979,
1320,
18,
588,
1253,
31460,
12,
3184,
1769,
3639,
309,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1623,
967,
31460,
780,
12,
6494,
6864,
16,
26166,
1339,
13,
288,
3639,
3438,
31460,
563,
31460,
273,
8094,
2979,
1320,
18,
588,
1253,
31460,
12,
3184,
1769,
3639,
309,
261... |
public void execute() throws BuildException { if (!destinationDirectory.isDirectory()) { throw new BuildException("destination directory " + destinationDirectory.getPath() + " is not valid"); } if (!sourceDirectory.isDirectory()) { throw new BuildException("src directory " + sourceDirectory.getPath() + " is not valid"); } if (destinationPackage == null) { throw new BuildException("package attribute must be present.", getLocation()); } pathToPackage = this.destinationPackage.replace('.', File.separatorChar); // get all the files in the sourceDirectory DirectoryScanner ds = super.getDirectoryScanner(sourceDirectory); //use the systemclasspath as well, to include the ant jar if (compileClasspath == null) { compileClasspath = new Path(getProject()); } compileClasspath = compileClasspath.concatSystemClasspath(); String[] files = ds.getIncludedFiles(); //Weblogic.jspc calls System.exit() ... have to fork // Therefore, takes loads of time // Can pass directories at a time (*.jsp) but easily runs out of memory on hefty dirs // (even on a Sun) Java helperTask = (Java) getProject().createTask("java"); helperTask.setFork(true); helperTask.setClassname("weblogic.jspc"); helperTask.setTaskName(getTaskName()); String[] args = new String[12]; File jspFile = null; String parents = ""; int j = 0; //XXX this array stuff is a remnant of prev trials.. gotta remove. args[j++] = "-d"; args[j++] = destinationDirectory.getAbsolutePath().trim(); args[j++] = "-docroot"; args[j++] = sourceDirectory.getAbsolutePath().trim(); args[j++] = "-keepgenerated"; //TODO: Parameterise ?? //Call compiler as class... dont want to fork again //Use classic compiler -- can be parameterised? args[j++] = "-compilerclass"; args[j++] = "sun.tools.javac.Main"; //Weblogic jspc does not seem to work unless u explicitly set this... // Does not take the classpath from the env.... // Am i missing something about the Java task?? args[j++] = "-classpath"; args[j++] = compileClasspath.toString(); this.scanDir(files); log("Compiling " + filesToDo.size() + " JSP files"); for (int i = 0; i < filesToDo.size(); i++) { //XXX // All this to get package according to weblogic standards // Can be written better... this is too hacky! // Careful.. similar code in scanDir , but slightly different!! String filename = (String) filesToDo.elementAt(i); jspFile = new File(filename); args[j] = "-package"; parents = jspFile.getParent(); if ((parents != null) && (!("").equals(parents))) { parents = this.replaceString(parents, File.separator, "_."); args[j + 1] = destinationPackage + "." + "_" + parents; } else { args[j + 1] = destinationPackage; } args[j + 2] = sourceDirectory + File.separator + filename; helperTask.clearArgs(); for (int x = 0; x < j + 3; x++) { helperTask.createArg().setValue(args[x]); } helperTask.setClasspath(compileClasspath); if (helperTask.executeJava() != 0) { log(filename + " failed to compile", Project.MSG_WARN); } } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/60f48875263c0b85f9eab0d94454e3ce3efce5c2/WLJspc.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
1216,
18463,
288,
3639,
309,
16051,
10590,
2853,
18,
291,
2853,
10756,
288,
5411,
604,
394,
18463,
2932,
10590,
1867,
315,
397,
2929,
2853,
18,
588,
743,
1435,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
1216,
18463,
288,
3639,
309,
16051,
10590,
2853,
18,
291,
2853,
10756,
288,
5411,
604,
394,
18463,
2932,
10590,
1867,
315,
397,
2929,
2853,
18,
588,
743,
1435,
397,
... | ||
return new org.quickfix.fix41.NewOrderSingle(); | return new quickfix.fix41.NewOrderSingle(); | public Message create( String beginString, String msgType ) { if("0".equals(msgType)) { return new org.quickfix.fix41.Heartbeat(); } if("A".equals(msgType)) { return new org.quickfix.fix41.Logon(); } if("1".equals(msgType)) { return new org.quickfix.fix41.TestRequest(); } if("2".equals(msgType)) { return new org.quickfix.fix41.ResendRequest(); } if("3".equals(msgType)) { return new org.quickfix.fix41.Reject(); } if("4".equals(msgType)) { return new org.quickfix.fix41.SequenceReset(); } if("5".equals(msgType)) { return new org.quickfix.fix41.Logout(); } if("7".equals(msgType)) { return new org.quickfix.fix41.Advertisement(); } if("6".equals(msgType)) { return new org.quickfix.fix41.IndicationofInterest(); } if("B".equals(msgType)) { return new org.quickfix.fix41.News(); } if("C".equals(msgType)) { return new org.quickfix.fix41.Email(); } if("R".equals(msgType)) { return new org.quickfix.fix41.QuoteRequest(); } if("S".equals(msgType)) { return new org.quickfix.fix41.Quote(); } if("D".equals(msgType)) { return new org.quickfix.fix41.NewOrderSingle(); } if("8".equals(msgType)) { return new org.quickfix.fix41.ExecutionReport(); } if("Q".equals(msgType)) { return new org.quickfix.fix41.DontKnowTrade(); } if("G".equals(msgType)) { return new org.quickfix.fix41.OrderCancelReplaceRequest(); } if("F".equals(msgType)) { return new org.quickfix.fix41.OrderCancelRequest(); } if("9".equals(msgType)) { return new org.quickfix.fix41.OrderCancelReject(); } if("H".equals(msgType)) { return new org.quickfix.fix41.OrderStatusRequest(); } if("J".equals(msgType)) { return new org.quickfix.fix41.Allocation(); } if("P".equals(msgType)) { return new org.quickfix.fix41.AllocationACK(); } if("T".equals(msgType)) { return new org.quickfix.fix41.SettlementInstructions(); } if("E".equals(msgType)) { return new org.quickfix.fix41.NewOrderList(); } if("N".equals(msgType)) { return new org.quickfix.fix41.ListStatus(); } if("L".equals(msgType)) { return new org.quickfix.fix41.ListExecute(); } if("K".equals(msgType)) { return new org.quickfix.fix41.ListCancelRequest(); } if("M".equals(msgType)) { return new org.quickfix.fix41.ListStatusRequest(); } return new org.quickfix.fix41.Message(); } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/MessageFactory.java/clean/src/java/src/quickfix/fix41/MessageFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2350,
752,
12,
514,
2376,
780,
16,
514,
1234,
559,
262,
288,
377,
309,
2932,
20,
9654,
14963,
12,
3576,
559,
3719,
288,
377,
327,
394,
2358,
18,
19525,
904,
18,
904,
9803,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2350,
752,
12,
514,
2376,
780,
16,
514,
1234,
559,
262,
288,
377,
309,
2932,
20,
9654,
14963,
12,
3576,
559,
3719,
288,
377,
327,
394,
2358,
18,
19525,
904,
18,
904,
9803,
18,
1... |
public synchronized void addUndoableEditListener(UndoableEditListener value0) { } | public synchronized void addUndoableEditListener(UndoableEditListener val) { listeners.add(val); } | public synchronized void addUndoableEditListener(UndoableEditListener value0) { // TODO } // addUndoableEditListener() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoableEditSupport.java/buggy/core/src/classpath/javax/javax/swing/undo/UndoableEditSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
31224,
429,
4666,
2223,
12,
31224,
429,
4666,
2223,
460,
20,
13,
288,
202,
202,
759,
2660,
202,
97,
368,
527,
31224,
429,
4666,
2223,
1435,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
31224,
429,
4666,
2223,
12,
31224,
429,
4666,
2223,
460,
20,
13,
288,
202,
202,
759,
2660,
202,
97,
368,
527,
31224,
429,
4666,
2223,
1435,
2,
-100,
-100,
-100... |
int colNumber = columnNumber - columnWithWidth; int aw = (maxWidth - colSum)/colNumber; distributeWidth( columns, colNumber, aw); | distributeLeftWidth( columns, (maxWidth - colSum)/( columnNumber - columnWithWidth)); | public int[] resolve(int specifiedWidth, int maxWidth) { assert(specifiedWidth<=maxWidth); int columnNumber = table.getColumnCount( ); int[] columns = new int[columnNumber]; int columnWithWidth = 0; int colSum = 0; for ( int j = 0; j < table.getColumnCount( ); j++ ) { IColumn column = (IColumn) table.getColumn( j ); int columnWidth = getDimensionValue( column.getWidth( ), tableWidth ); if ( columnWidth > 0 ) { columns[j] = columnWidth; colSum += columnWidth; columnWithWidth++; } else { columns[j] = -1; } } if(columnWithWidth==columnNumber) { if(colSum<=maxWidth) { return columns; } else { int delta = (colSum - maxWidth)/columnNumber; assert(delta>=0); for ( int i = 0; i < columnNumber; i++ ) { columns[i] -= delta; } return columns; } } else { if(specifiedWidth==0) { if(colSum<maxWidth) { int colNumber = columnNumber - columnWithWidth; int aw = (maxWidth - colSum)/colNumber; distributeWidth( columns, colNumber, aw); } else { distributeWidth(columns, columnNumber, maxWidth/columnNumber); } } else { if(colSum<specifiedWidth) { int colNumber = columnNumber - columnWithWidth; int aw = (specifiedWidth - colSum)/colNumber; distributeWidth( columns, colNumber, aw); } else { if(colSum<maxWidth) { int colNumber = columnNumber - columnWithWidth; int aw = (maxWidth - colSum)/colNumber; distributeWidth( columns, colNumber, aw); } else { distributeWidth(columns, columnNumber, specifiedWidth/columnNumber); } } } } return columns; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/492c34611de8891f6d7b978bd46fd50220a88943/PDFTableLM.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFTableLM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
8526,
2245,
12,
474,
1269,
2384,
16,
509,
17681,
13,
202,
202,
95,
1082,
202,
11231,
12,
13827,
2384,
32,
33,
1896,
2384,
1769,
1082,
202,
474,
1057,
1854,
273,
1014,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
8526,
2245,
12,
474,
1269,
2384,
16,
509,
17681,
13,
202,
202,
95,
1082,
202,
11231,
12,
13827,
2384,
32,
33,
1896,
2384,
1769,
1082,
202,
474,
1057,
1854,
273,
1014,
18... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.