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
VM_JavaHeader.writeAvailableBitsWord(bootImage, ref, status);
VM_JavaHeader.writeAvailableBitsWord(bootImage, ref.toInt(), status);
public static void initializeHeader(BootImageInterface bootImage, int ref, Object[] tib, int size, boolean isScalar) throws InterruptiblePragma { // int status = VM_JavaHeader.readAvailableBitsWord(bootImage, ref); Word status = Plan.getBootTimeAvailableBits(ref, ObjectReference.fromObject(tib), size, Word.zero()); VM_JavaHeader.writeAvailableBitsWord(bootImage, ref, status); }
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/512b7ae853c6979c3f6acf302871ef9527123d44/VM_AllocatorHeader.java/buggy/rvm/src/vm/memoryManagers/JMTk/vmInterface/VM_AllocatorHeader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 918, 4046, 1864, 12, 15817, 2040, 1358, 4835, 2040, 16, 509, 1278, 16, 4766, 1377, 1033, 8526, 268, 495, 16, 509, 963, 16, 1250, 11604, 3473, 13, 565, 1216, 3094, 4483, 1523, 2050, 9454, 288, 565, 368, 565, 509, 1267, 273, 8251, 67, 5852, 1864, 18, 896, 5268, 6495, 3944, 12, 7137, 2040, 16, 1278, 1769, 565, 9926, 1267, 273, 12540, 18, 588, 15817, 950, 5268, 6495, 12, 1734, 16, 4202, 31321, 18, 2080, 921, 12, 88, 495, 3631, 963, 16, 9926, 18, 7124, 10663, 565, 8251, 67, 5852, 1864, 18, 2626, 5268, 6495, 3944, 12, 7137, 2040, 16, 1278, 18, 869, 1702, 9334, 1267, 1769, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 918, 4046, 1864, 12, 15817, 2040, 1358, 4835, 2040, 16, 509, 1278, 16, 4766, 1377, 1033, 8526, 268, 495, 16, 509, 963, 16, 1250, 11604, 3473, 13, 565, 1216, 3094, 4483, 1523, 2050, 9454, 288, 565, 368, 565, 509, 1267, 273, 8251, 67, 5852, 1864, 18, 896, 5268, 6495, 3944, 12, 7137, 2040, 16, 1278, 1769, 565, 9926, 1267, 273, 12540, 18, 588, 15817, 950, 5268, 6495, 12, 1734, 16, 4202, 31321, 18, 2080, 921, 12, 88, 495, 3631, 963, 16, 9926, 18, 7124, 10663, 565, 8251, 67, 5852, 1864, 18, 2626, 5268, 6495, 3944, 12, 7137, 2040, 16, 1278, 18, 869, 1702, 9334, 1267, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100 ]
public DF(String path) throws IOException { Process process = Runtime.getRuntime().exec(new String[] {"df","-k",path}); try { if (process.waitFor() == 0) { BufferedReader lines = new BufferedReader(new InputStreamReader(process.getInputStream())); lines.readLine(); StringTokenizer tokens = new StringTokenizer(lines.readLine(), " \t\n\r\f%"); this.filesystem = tokens.nextToken(); if (!tokens.hasMoreTokens()) { tokens = new StringTokenizer(lines.readLine(), " \t\n\r\f%"); } this.capacity = Long.parseLong(tokens.nextToken()) * 1024; this.used = Long.parseLong(tokens.nextToken()) * 1024; this.available = Long.parseLong(tokens.nextToken()) * 1024; this.percentUsed = Integer.parseInt(tokens.nextToken()); this.mount = tokens.nextToken(); } else { throw new IOException (new BufferedReader(new InputStreamReader(process.getErrorStream())) .readLine()); } } catch (InterruptedException e) { throw new IOException(e.toString()); } finally { process.destroy(); }
public DF(String path, Configuration conf ) throws IOException { this( path, conf.getLong( "dfs.df.interval", DF.DF_INTERVAL_DEFAULT ));
public DF(String path) throws IOException { Process process = Runtime.getRuntime().exec(new String[] {"df","-k",path}); try { if (process.waitFor() == 0) { BufferedReader lines = new BufferedReader(new InputStreamReader(process.getInputStream())); lines.readLine(); // skip headings StringTokenizer tokens = new StringTokenizer(lines.readLine(), " \t\n\r\f%"); this.filesystem = tokens.nextToken(); if (!tokens.hasMoreTokens()) { // for long filesystem name tokens = new StringTokenizer(lines.readLine(), " \t\n\r\f%"); } this.capacity = Long.parseLong(tokens.nextToken()) * 1024; this.used = Long.parseLong(tokens.nextToken()) * 1024; this.available = Long.parseLong(tokens.nextToken()) * 1024; this.percentUsed = Integer.parseInt(tokens.nextToken()); this.mount = tokens.nextToken(); } else { throw new IOException (new BufferedReader(new InputStreamReader(process.getErrorStream())) .readLine()); } } catch (InterruptedException e) { throw new IOException(e.toString()); } finally { process.destroy(); } }
55137 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55137/fa8ed1c0ee625b2f259787749309594d6792971c/DF.java/clean/src/java/org/apache/hadoop/fs/DF.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 463, 42, 12, 780, 589, 13, 1216, 1860, 288, 565, 4389, 1207, 273, 2509, 18, 588, 5576, 7675, 4177, 12, 2704, 514, 8526, 12528, 2180, 15937, 17, 79, 3113, 803, 22938, 565, 775, 288, 1377, 309, 261, 2567, 18, 7048, 1290, 1435, 422, 374, 13, 288, 3639, 10633, 2362, 273, 1850, 394, 10633, 12, 2704, 15322, 12, 2567, 18, 588, 4348, 1435, 10019, 3639, 2362, 18, 896, 1670, 5621, 7682, 368, 2488, 910, 899, 3639, 16370, 2430, 273, 1850, 394, 16370, 12, 3548, 18, 896, 1670, 9334, 315, 521, 88, 64, 82, 64, 86, 64, 74, 9, 8863, 7734, 333, 18, 17846, 273, 2430, 18, 4285, 1345, 5621, 3639, 309, 16051, 7860, 18, 5332, 7417, 5157, 10756, 288, 5411, 368, 364, 1525, 6496, 508, 1850, 2430, 273, 394, 16370, 12, 3548, 18, 896, 1670, 9334, 315, 521, 88, 64, 82, 64, 86, 64, 74, 9, 8863, 3639, 289, 3639, 333, 18, 16017, 273, 3407, 18, 2670, 3708, 12, 7860, 18, 4285, 1345, 10756, 380, 6250, 31, 3639, 333, 18, 3668, 273, 3407, 18, 2670, 3708, 12, 7860, 18, 4285, 1345, 10756, 380, 6250, 31, 3639, 333, 18, 5699, 273, 3407, 18, 2670, 3708, 12, 7860, 18, 4285, 1345, 10756, 380, 6250, 31, 3639, 333, 18, 8849, 6668, 273, 2144, 18, 2670, 1702, 12, 7860, 18, 4285, 1345, 10663, 3639, 333, 18, 4778, 273, 2430, 18, 4285, 1345, 5621, 1377, 289, 469, 288, 3639, 604, 394, 1860, 1850, 261, 2704, 10633, 12, 2704, 15322, 12, 2567, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 463, 42, 12, 780, 589, 13, 1216, 1860, 288, 565, 4389, 1207, 273, 2509, 18, 588, 5576, 7675, 4177, 12, 2704, 514, 8526, 12528, 2180, 15937, 17, 79, 3113, 803, 22938, 565, 775, 288, 1377, 309, 261, 2567, 18, 7048, 1290, 1435, 422, 374, 13, 288, 3639, 10633, 2362, 273, 1850, 394, 10633, 12, 2704, 15322, 12, 2567, 18, 588, 4348, 1435, 10019, 3639, 2362, 18, 896, 1670, 5621, 7682, 368, 2488, 910, 899, 3639, 16370, 2430, 273, 1850, 394, 16370, 12, 3548, 18, 896, 1670, 9334, 315, 521, 88, 64, 82, 64, 86, 64, 74, 9, 8863, 7734, 333, 18, 17846, 273, 2430, 18, 4285, 1345, 5621, 3639, 309, 16051, 7860, 18, 5332, 7417, 5157, 10756, 2 ]
true, op );
true, op );
private void saveFile( final ModuleHandle moduleHandle, final File file, IProgressMonitor monitor ) { IRunnableWithProgress op = new IRunnableWithProgress( ) { public synchronized final void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException { try { IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable( ) { public void run( IProgressMonitor pm ) throws CoreException { try { execute( pm ); } catch ( CoreException e ) { throw e; } catch ( IOException e ) { ExceptionHandler.handle( e ); } } }; ResourcesPlugin.getWorkspace( ).run( workspaceRunnable, ResourcesPlugin.getWorkspace( ).getRoot( ), IResource.NONE, monitor ); } catch ( CoreException e ) { throw new InvocationTargetException( e ); } catch ( OperationCanceledException e ) { throw new InterruptedException( e.getMessage( ) ); } } public void execute( final IProgressMonitor monitor ) throws CoreException, IOException { if ( file.exists( ) || file.createNewFile( ) ) { FileOutputStream out = new FileOutputStream( file ); moduleHandle.serialize( out ); out.close( ); } } }; try { new ProgressMonitorDialog( UIUtil.getDefaultShell( ) ).run( false, true, op ); } catch ( Exception e ) { ExceptionHandler.handle( e ); } }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/604ce5391dbc451664ffe72c0eb2da50e51bc4ed/FileReportProvider.java/clean/UI/org.eclipse.birt.report.designer.ui.editors/src/org/eclipse/birt/report/designer/internal/ui/editors/FileReportProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1923, 812, 12, 727, 5924, 3259, 1605, 3259, 16, 727, 1387, 585, 16, 1082, 202, 45, 5491, 7187, 6438, 262, 202, 95, 202, 202, 45, 20013, 1190, 5491, 1061, 273, 394, 467, 20013, 1190, 5491, 12, 262, 288, 1082, 202, 482, 3852, 727, 918, 1086, 12, 467, 5491, 7187, 6438, 262, 6862, 202, 15069, 15342, 16, 7558, 1082, 202, 95, 9506, 202, 698, 9506, 202, 95, 6862, 202, 45, 8241, 20013, 6003, 20013, 273, 394, 467, 8241, 20013, 12, 262, 288, 25083, 202, 482, 918, 1086, 12, 467, 5491, 7187, 7430, 262, 6862, 9506, 202, 15069, 30015, 25083, 202, 95, 6862, 1082, 202, 698, 6862, 1082, 202, 95, 6862, 9506, 202, 8837, 12, 7430, 11272, 6862, 1082, 202, 97, 6862, 1082, 202, 14683, 261, 30015, 425, 262, 6862, 1082, 202, 95, 6862, 9506, 202, 12849, 425, 31, 6862, 1082, 202, 97, 6862, 1082, 202, 14683, 261, 1860, 425, 262, 6862, 1082, 202, 95, 6862, 9506, 202, 18894, 18, 4110, 12, 425, 11272, 6862, 1082, 202, 97, 25083, 202, 97, 6862, 202, 20451, 6862, 202, 3805, 3773, 18, 588, 8241, 12, 262, 18, 2681, 12, 6003, 20013, 16, 6862, 1082, 202, 3805, 3773, 18, 588, 8241, 12, 262, 18, 588, 2375, 12, 262, 16, 6862, 1082, 202, 45, 1420, 18, 9826, 16, 6862, 1082, 202, 10259, 11272, 9506, 202, 97, 9506, 202, 14683, 261, 30015, 425, 262, 9506, 202, 95, 6862, 202, 12849, 394, 15342, 12, 425, 11272, 9506, 202, 97, 9506, 202, 14683, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1923, 812, 12, 727, 5924, 3259, 1605, 3259, 16, 727, 1387, 585, 16, 1082, 202, 45, 5491, 7187, 6438, 262, 202, 95, 202, 202, 45, 20013, 1190, 5491, 1061, 273, 394, 467, 20013, 1190, 5491, 12, 262, 288, 1082, 202, 482, 3852, 727, 918, 1086, 12, 467, 5491, 7187, 6438, 262, 6862, 202, 15069, 15342, 16, 7558, 1082, 202, 95, 9506, 202, 698, 9506, 202, 95, 6862, 202, 45, 8241, 20013, 6003, 20013, 273, 394, 467, 8241, 20013, 12, 262, 288, 25083, 202, 482, 918, 1086, 12, 467, 5491, 7187, 7430, 262, 6862, 9506, 202, 15069, 30015, 25083, 202, 95, 6862, 1082, 202, 698, 6862, 1082, 202, 95, 6862, 9506, 202, 8837, 12, 7430, 11272, 2 ]
final int paramType = getColumnMetaDataX().getColumnType(parameterIndex);
final int paramType = getColumnMetaDataX().getColumnType( checkForEscapedCallWithResult( parameterIndex ) );
public void setDate(int parameterIndex, java.sql.Date x) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setDate", parameterIndex, x); } final int paramType = getColumnMetaDataX().getColumnType(parameterIndex); if( ! PossibleTypes.POSSIBLE_TYPES_IN_SET_DATE.checkType(paramType) ){ PossibleTypes.throw22005Exception(agent_.logWriter_ , java.sql.Types.DATE, paramType); } checkForClosedStatement(); parameterIndex = checkSetterPreconditions(parameterIndex); parameterMetaData_.clientParamtertype_[parameterIndex - 1] = java.sql.Types.DATE; if (x == null) { setNull(parameterIndex, java.sql.Types.DATE); return; } setInput(parameterIndex, x); } } catch ( SqlException se ) { throw se.getSQLException(); } }
56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/bc52552f4e62dd1ab68d634f318901f4de825661/PreparedStatement.java/clean/java/client/org/apache/derby/client/am/PreparedStatement.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 17604, 12, 474, 25412, 16, 2252, 18, 4669, 18, 1626, 619, 13, 1216, 6483, 288, 3639, 775, 3639, 288, 5411, 3852, 261, 4071, 67, 13, 288, 7734, 309, 261, 5629, 27799, 11167, 1526, 10756, 288, 10792, 4040, 27799, 1330, 2289, 27799, 5129, 1622, 12, 2211, 16, 315, 542, 1626, 3113, 25412, 16, 619, 1769, 7734, 289, 27573, 727, 509, 20781, 273, 6716, 6998, 60, 7675, 588, 28149, 12, 13855, 17208, 26356, 1253, 12, 25412, 262, 11272, 27573, 309, 12, 401, 25433, 2016, 18, 2419, 1260, 13450, 900, 67, 10564, 67, 706, 67, 4043, 67, 4594, 18, 1893, 559, 12, 891, 559, 13, 262, 95, 4766, 3639, 25433, 2016, 18, 12849, 3787, 28564, 503, 12, 5629, 27799, 1330, 2289, 67, 269, 4766, 8227, 2252, 18, 4669, 18, 2016, 18, 4594, 16, 4766, 8227, 20781, 1769, 4766, 565, 289, 27573, 13855, 7395, 3406, 5621, 7734, 25412, 273, 866, 8465, 1386, 6381, 12, 6775, 1016, 1769, 7734, 1569, 6998, 27799, 2625, 786, 387, 723, 67, 63, 6775, 1016, 300, 404, 65, 273, 2252, 18, 4669, 18, 2016, 18, 4594, 31, 7734, 309, 261, 92, 422, 446, 13, 288, 10792, 444, 2041, 12, 6775, 1016, 16, 2252, 18, 4669, 18, 2016, 18, 4594, 1769, 10792, 327, 31, 7734, 289, 7734, 21687, 12, 6775, 1016, 16, 619, 1769, 5411, 289, 3639, 289, 3639, 1044, 261, 8855, 503, 695, 262, 3639, 288, 5411, 604, 695, 18, 588, 23116, 5621, 3639, 289, 565, 289, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 17604, 12, 474, 25412, 16, 2252, 18, 4669, 18, 1626, 619, 13, 1216, 6483, 288, 3639, 775, 3639, 288, 5411, 3852, 261, 4071, 67, 13, 288, 7734, 309, 261, 5629, 27799, 11167, 1526, 10756, 288, 10792, 4040, 27799, 1330, 2289, 27799, 5129, 1622, 12, 2211, 16, 315, 542, 1626, 3113, 25412, 16, 619, 1769, 7734, 289, 27573, 727, 509, 20781, 273, 6716, 6998, 60, 7675, 588, 28149, 12, 13855, 17208, 26356, 1253, 12, 25412, 262, 11272, 27573, 309, 12, 401, 25433, 2016, 18, 2419, 1260, 13450, 900, 67, 10564, 67, 706, 67, 4043, 67, 4594, 18, 1893, 559, 12, 891, 559, 13, 262, 95, 4766, 3639, 25433, 2016, 18, 12849, 3787, 28564, 503, 12, 5629, 27799, 2 ]
int alt47=2; int LA47_0 = input.LA(1); if ( (LA47_0==LEFT_PAREN) ) { alt47=1;
int alt46=2; int LA46_0 = input.LA(1); if ( (LA46_0==LEFT_PAREN) ) { alt46=1;
public NotDescr lhs_not() throws RecognitionException { NotDescr d = null; Token loc=null; BaseDescr column = null; d = null; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:4: (loc= 'not' ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column ) ) // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:4: loc= 'not' ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column ) { loc=(Token)input.LT(1); match(input,71,FOLLOW_71_in_lhs_not3065); if (failed) return d; // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:14: ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column ) int alt47=2; int LA47_0 = input.LA(1); if ( (LA47_0==LEFT_PAREN) ) { alt47=1; } else if ( (LA47_0==ID) ) { alt47=2; } else { if (backtracking>0) {failed=true; return d;} NoViableAltException nvae = new NoViableAltException("1246:14: ( ( '(' lhs_column ')' )=> '(' column= lhs_column ')' | column= lhs_column )", 47, 0, input); throw nvae; } switch (alt47) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:15: ( '(' lhs_column ')' )=> '(' column= lhs_column ')' { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_not3068); if (failed) return d; pushFollow(FOLLOW_lhs_column_in_lhs_not3072); column=lhs_column(); _fsp--; if (failed) return d; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_not3075); if (failed) return d; } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:44: column= lhs_column { pushFollow(FOLLOW_lhs_column_in_lhs_not3081); column=lhs_column(); _fsp--; if (failed) return d; } break; } if ( backtracking==0 ) { d = new NotDescr( (ColumnDescr) column ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/afea9f80e7c11e7b76df18f232d3b5ca5ad21e72/DRLParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2288, 16198, 8499, 67, 902, 1435, 1216, 9539, 288, 6647, 2288, 16198, 302, 273, 446, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 3360, 16198, 1057, 273, 446, 31, 1171, 202, 202, 72, 273, 446, 31, 540, 202, 3639, 775, 288, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 30, 2138, 8749, 30, 24, 30, 261, 1829, 33, 296, 902, 11, 261, 261, 7321, 8499, 67, 2827, 5777, 13216, 7321, 1057, 33, 8499, 67, 2827, 5777, 571, 1057, 33, 8499, 67, 2827, 262, 262, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 30, 2138, 8749, 30, 24, 30, 1515, 33, 296, 902, 11, 261, 261, 7321, 8499, 67, 2827, 5777, 13216, 7321, 1057, 33, 8499, 67, 2827, 5777, 571, 1057, 33, 8499, 67, 2827, 262, 5411, 288, 5411, 1515, 28657, 1345, 13, 2630, 18, 12050, 12, 21, 1769, 5411, 845, 12, 2630, 16, 11212, 16, 29890, 67, 11212, 67, 267, 67, 80, 4487, 67, 902, 5082, 9222, 1769, 309, 261, 7307, 13, 327, 302, 31, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2288, 16198, 8499, 67, 902, 1435, 1216, 9539, 288, 6647, 2288, 16198, 302, 273, 446, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 3360, 16198, 1057, 273, 446, 31, 1171, 202, 202, 72, 273, 446, 31, 540, 202, 3639, 775, 288, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 30, 2138, 8749, 30, 24, 30, 261, 1829, 33, 296, 902, 11, 261, 261, 7321, 8499, 67, 2827, 5777, 13216, 7321, 1057, 33, 8499, 67, 2827, 5777, 571, 1057, 33, 8499, 67, 2827, 262, 262, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 2 ]
DiffieHellmanContext ctx = processDHTwoOrThree(2, payload, pn, replyTo, true);
processDHTwoOrThree(2, payload, pn, replyTo, true);
private void processDecryptedAuth(byte[] payload, PeerNode pn, Peer replyTo) { Logger.minor(this, "Processing decrypted auth packet from "+replyTo+" for "+pn); /* Format: * 1 byte - version number (0) * 1 byte - negotiation type (0 = simple DH, will not be supported when implement JFKi) * 1 byte - packet type (0-3) */ int version = payload[0]; if(version != 1) { Logger.error(this, "Decrypted auth packet but invalid version: "+version); return; } int negType = payload[1]; if(negType != 0) { Logger.error(this, "Decrypted auth packet but unknown negotiation type "+negType+" from "+replyTo+" possibly from "+pn); return; } int packetType = payload[2]; if(packetType < 0 || packetType > 3) { Logger.error(this, "Decrypted auth packet but unknown packet type "+packetType+" from "+replyTo+" possibly from "+pn); return; } // We keep one DiffieHellmanContext per node ONLY /* * Now, to the real meat * Alice, Bob share a base, g, and a modulus, p * Alice generates a random number r, and: 1: Alice -> Bob: a=g^r * Bob receives this and generates his own random number, s, and: 2: Bob -> Alice: b=g^s * Alice receives this, calculates K = b^r, and: 3: Alice -> Bob: E_K ( H(data) data ) * where data = [ Alice's startup number ] * Bob does exactly the same as Alice for packet 4. * * At this point we are done. */ if(packetType == 0) { // We are Bob // We need to: // - Record Alice's a // - Generate our own s and b // - Send a type 1 packet back to Alice containing this DiffieHellmanContext ctx = processDHZeroOrOne(0, payload, pn); if(ctx == null) return; // Send reply sendFirstHalfDHPacket(1, ctx.getOurExponential(), pn, replyTo); // Send a type 1, they will reply with a type 2 } else if(packetType == 1) { // We are Alice DiffieHellmanContext ctx = processDHZeroOrOne(1, payload, pn); if(ctx == null) return; sendDHCompletion(2, ctx.getCipher(), pn, replyTo); // Send a type 2 } else if(packetType == 2) { // We are Bob // Receiving a completion packet // Verify the packet, then complete // Format: IV E_K ( H(data) data ) // Where data = [ long: bob's startup number ] DiffieHellmanContext ctx = processDHTwoOrThree(2, payload, pn, replyTo, true); } else if(packetType == 3) { // We are Alice processDHTwoOrThree(3, payload, pn, replyTo, false); } }
50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/f0c58763eb678e0ff60284024d7b22cf826fb063/FNPPacketMangler.java/clean/src/freenet/node/FNPPacketMangler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1207, 1799, 4567, 1730, 12, 7229, 8526, 2385, 16, 10669, 907, 11059, 16, 10669, 30934, 13, 288, 3639, 4242, 18, 17364, 12, 2211, 16, 315, 7798, 13794, 1357, 4414, 628, 13773, 10629, 774, 9078, 364, 13773, 7449, 1769, 3639, 1748, 4077, 30, 540, 380, 404, 1160, 300, 1177, 1300, 261, 20, 13, 540, 380, 404, 1160, 300, 17257, 7072, 618, 261, 20, 273, 4143, 24141, 16, 903, 486, 506, 3260, 1347, 2348, 804, 13121, 77, 13, 540, 380, 404, 1160, 300, 4414, 618, 261, 20, 17, 23, 13, 540, 1195, 3639, 509, 1177, 273, 2385, 63, 20, 15533, 3639, 309, 12, 1589, 480, 404, 13, 288, 5411, 4242, 18, 1636, 12, 2211, 16, 315, 1799, 4567, 1357, 4414, 1496, 2057, 1177, 30, 13773, 1589, 1769, 5411, 327, 31, 3639, 289, 3639, 509, 4251, 559, 273, 2385, 63, 21, 15533, 3639, 309, 12, 14518, 559, 480, 374, 13, 288, 5411, 4242, 18, 1636, 12, 2211, 16, 315, 1799, 4567, 1357, 4414, 1496, 5917, 17257, 7072, 618, 13773, 14518, 559, 9078, 628, 13773, 10629, 774, 9078, 10016, 628, 13773, 7449, 1769, 5411, 327, 31, 3639, 289, 3639, 509, 4414, 559, 273, 2385, 63, 22, 15533, 3639, 309, 12, 11482, 559, 411, 374, 747, 4414, 559, 405, 890, 13, 288, 5411, 4242, 18, 1636, 12, 2211, 16, 315, 1799, 4567, 1357, 4414, 1496, 5917, 4414, 618, 13773, 11482, 559, 9078, 628, 13773, 10629, 774, 9078, 10016, 628, 13773, 7449, 1769, 5411, 327, 31, 3639, 289, 3639, 368, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1207, 1799, 4567, 1730, 12, 7229, 8526, 2385, 16, 10669, 907, 11059, 16, 10669, 30934, 13, 288, 3639, 4242, 18, 17364, 12, 2211, 16, 315, 7798, 13794, 1357, 4414, 628, 13773, 10629, 774, 9078, 364, 13773, 7449, 1769, 3639, 1748, 4077, 30, 540, 380, 404, 1160, 300, 1177, 1300, 261, 20, 13, 540, 380, 404, 1160, 300, 17257, 7072, 618, 261, 20, 273, 4143, 24141, 16, 903, 486, 506, 3260, 1347, 2348, 804, 13121, 77, 13, 540, 380, 404, 1160, 300, 4414, 618, 261, 20, 17, 23, 13, 540, 1195, 3639, 509, 1177, 273, 2385, 63, 20, 15533, 3639, 309, 12, 1589, 480, 404, 13, 288, 5411, 4242, 18, 1636, 12, 2211, 16, 315, 1799, 4567, 2 ]
delegate.addAll(0, Collections.nCopies(-index, autoResizeObject)); position += -index; } else if (index >= delegate.size()) {
throw new UnsupportedOperationException("Cannot access an element left of the list"); } else if (index > delegate.size()) {
protected void autoResize(int index) { if (!autoResize) { return; } else if (index < 0) { delegate.addAll(0, Collections.nCopies(-index, autoResizeObject)); position += -index; } else if (index >= delegate.size()) { delegate.ensureCapacity(index); for (int i = delegate.size(); i <= index; i++) { delegate.add(autoResizeObject); } } }
1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/662c05593e6f402ddd6badcfa923a544ab949833/DefaultPointer.java/clean/org/jruby/util/DefaultPointer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 3656, 12182, 12, 474, 770, 13, 288, 3639, 309, 16051, 6079, 12182, 13, 288, 5411, 327, 31, 3639, 289, 469, 309, 261, 1615, 411, 374, 13, 288, 5411, 7152, 18, 1289, 1595, 12, 20, 16, 5737, 18, 82, 15670, 19236, 1615, 16, 3656, 12182, 921, 10019, 13491, 1754, 1011, 300, 1615, 31, 3639, 289, 469, 309, 261, 1615, 1545, 7152, 18, 1467, 10756, 288, 5411, 7152, 18, 15735, 7437, 12, 1615, 1769, 5411, 364, 261, 474, 277, 273, 7152, 18, 1467, 5621, 277, 1648, 770, 31, 277, 27245, 288, 7734, 7152, 18, 1289, 12, 6079, 12182, 921, 1769, 5411, 289, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 3656, 12182, 12, 474, 770, 13, 288, 3639, 309, 16051, 6079, 12182, 13, 288, 5411, 327, 31, 3639, 289, 469, 309, 261, 1615, 411, 374, 13, 288, 5411, 7152, 18, 1289, 1595, 12, 20, 16, 5737, 18, 82, 15670, 19236, 1615, 16, 3656, 12182, 921, 10019, 13491, 1754, 1011, 300, 1615, 31, 3639, 289, 469, 309, 261, 1615, 1545, 7152, 18, 1467, 10756, 288, 5411, 7152, 18, 15735, 7437, 12, 1615, 1769, 5411, 364, 261, 474, 277, 273, 7152, 18, 1467, 5621, 277, 1648, 770, 31, 277, 27245, 288, 7734, 7152, 18, 1289, 12, 6079, 12182, 921, 1769, 5411, 289, 3639, 289, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
redoClearDirty = toMerge;
redoClearDirty = last;
public void contentRemoved(int offset, int length, String text, boolean clearDirty) { Edit toMerge = getLastEdit(); if(!clearDirty && toMerge instanceof Remove && redosFirst == null) { Remove rem = (Remove)toMerge; if(rem.offset == offset) { rem.str = rem.str.concat(text); rem.hashcode = rem.str.hashCode(); rem.length += length; KillRing.changed(rem); return; } else if(offset + length == rem.offset) { rem.str = text.concat(rem.str); rem.hashcode = rem.str.hashCode(); rem.length += length; rem.offset = offset; KillRing.changed(rem); return; } } Remove rem = new Remove(this,offset,length,text); if(clearDirty) { redoClearDirty = toMerge; undoClearDirty = rem; } if(compoundEdit != null) compoundEdit.add(rem); else addEdit(rem); KillRing.add(rem); } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/656e2549d034f3be40edd953ea8abcb99d54dc06/UndoManager.java/buggy/org/gjt/sp/jedit/buffer/UndoManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 913, 10026, 12, 474, 1384, 16, 509, 769, 16, 514, 977, 16, 1250, 2424, 10785, 13, 202, 95, 202, 202, 4666, 358, 6786, 273, 7595, 4666, 5621, 202, 202, 430, 12, 5, 8507, 10785, 597, 358, 6786, 1276, 3581, 1082, 202, 10, 10, 1755, 538, 3759, 422, 446, 13, 202, 202, 95, 1082, 202, 3288, 849, 273, 261, 3288, 13, 869, 6786, 31, 1082, 202, 430, 12, 2764, 18, 3348, 422, 1384, 13, 1082, 202, 95, 9506, 202, 2764, 18, 701, 273, 849, 18, 701, 18, 16426, 12, 955, 1769, 9506, 202, 2764, 18, 2816, 710, 273, 849, 18, 701, 18, 2816, 1085, 5621, 9506, 202, 2764, 18, 2469, 1011, 769, 31, 9506, 202, 19045, 10369, 18, 6703, 12, 2764, 1769, 9506, 202, 2463, 31, 1082, 202, 97, 1082, 202, 12107, 309, 12, 3348, 397, 769, 422, 849, 18, 3348, 13, 1082, 202, 95, 9506, 202, 2764, 18, 701, 273, 977, 18, 16426, 12, 2764, 18, 701, 1769, 9506, 202, 2764, 18, 2816, 710, 273, 849, 18, 701, 18, 2816, 1085, 5621, 9506, 202, 2764, 18, 2469, 1011, 769, 31, 9506, 202, 2764, 18, 3348, 273, 1384, 31, 9506, 202, 19045, 10369, 18, 6703, 12, 2764, 1769, 9506, 202, 2463, 31, 1082, 202, 97, 202, 202, 97, 202, 202, 3288, 849, 273, 394, 3581, 12, 2211, 16, 3348, 16, 2469, 16, 955, 1769, 202, 202, 430, 12, 8507, 10785, 13, 202, 202, 95, 1082, 202, 1118, 83, 9094, 10785, 273, 358, 6786, 31, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 913, 10026, 12, 474, 1384, 16, 509, 769, 16, 514, 977, 16, 1250, 2424, 10785, 13, 202, 95, 202, 202, 4666, 358, 6786, 273, 7595, 4666, 5621, 202, 202, 430, 12, 5, 8507, 10785, 597, 358, 6786, 1276, 3581, 1082, 202, 10, 10, 1755, 538, 3759, 422, 446, 13, 202, 202, 95, 1082, 202, 3288, 849, 273, 261, 3288, 13, 869, 6786, 31, 1082, 202, 430, 12, 2764, 18, 3348, 422, 1384, 13, 1082, 202, 95, 9506, 202, 2764, 18, 701, 273, 849, 18, 701, 18, 16426, 12, 955, 1769, 9506, 202, 2764, 18, 2816, 710, 273, 849, 18, 701, 18, 2816, 1085, 5621, 9506, 202, 2764, 18, 2469, 1011, 769, 31, 9506, 202, 19045, 2 ]
UMOEndpoint endpoint = (UMOEndpoint) endpointCache.get(endpointUri);
UMOEndpoint endpoint = (UMOEndpoint)endpointCache.get(endpointUri);
protected UMOEndpoint getEndpoint(UMOEvent event, String endpointUri) throws UMOException { UMOEndpoint endpoint = (UMOEndpoint) endpointCache.get(endpointUri); if (endpoint == null) { UMOEndpointURI ep = new MuleEndpointURI(endpointUri); endpoint = MuleEndpoint.getOrCreateEndpointForUri(ep, UMOEndpoint.ENDPOINT_TYPE_SENDER); endpointCache.put(endpointUri, endpoint); } return endpoint; }
28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/f659778f07cc26d6d970061c635faba08bd4672b/DefaultReplyToHandler.java/buggy/src/java/org/mule/providers/DefaultReplyToHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 587, 5980, 3293, 18563, 12, 2799, 51, 1133, 871, 16, 514, 2494, 3006, 13, 1216, 587, 5980, 503, 565, 288, 3639, 587, 5980, 3293, 2494, 273, 261, 2799, 51, 3293, 13, 8003, 1649, 18, 588, 12, 8003, 3006, 1769, 3639, 309, 261, 8003, 422, 446, 13, 288, 5411, 587, 5980, 3293, 3098, 5529, 273, 394, 490, 725, 3293, 3098, 12, 8003, 3006, 1769, 5411, 2494, 273, 490, 725, 3293, 18, 588, 17717, 3293, 1290, 3006, 12, 881, 16, 587, 5980, 3293, 18, 18506, 67, 2399, 67, 1090, 18556, 1769, 5411, 2494, 1649, 18, 458, 12, 8003, 3006, 16, 2494, 1769, 3639, 289, 3639, 327, 2494, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 587, 5980, 3293, 18563, 12, 2799, 51, 1133, 871, 16, 514, 2494, 3006, 13, 1216, 587, 5980, 503, 565, 288, 3639, 587, 5980, 3293, 2494, 273, 261, 2799, 51, 3293, 13, 8003, 1649, 18, 588, 12, 8003, 3006, 1769, 3639, 309, 261, 8003, 422, 446, 13, 288, 5411, 587, 5980, 3293, 3098, 5529, 273, 394, 490, 725, 3293, 3098, 12, 8003, 3006, 1769, 5411, 2494, 273, 490, 725, 3293, 18, 588, 17717, 3293, 1290, 3006, 12, 881, 16, 587, 5980, 3293, 18, 18506, 67, 2399, 67, 1090, 18556, 1769, 5411, 2494, 1649, 18, 458, 12, 8003, 3006, 16, 2494, 1769, 3639, 289, 3639, 327, 2494, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
public Object getObject()
public List<String> getObject()
public Object getObject() { if (resources.isEmpty()) { get(page); // PackageName name = PackageName.forClass(page); // ClassLoader loader = page.getClassLoader(); // String path = Strings.replaceAll(name.getName(), ".", // "/").toString(); // try // { // // gives the urls for each place where the package // // path could be found. There could be multiple // // jar files containing the same package, so each // // jar file has its own url. // // Enumeration urls = loader.getResources(path); // while (urls.hasMoreElements()) // { // URL url = (URL)urls.nextElement(); // // // the url points to the directory structure // // embedded in the classpath. // // getPackageContents(url); // } // } // catch (IOException e) // { // log.error("Unable to read resource for: " + path, e); // } } return resources; }
46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/2859872ee0d83bc7854220e8ee4a9a28a45514ab/SourcesPage.java/clean/wicket-examples/src/java/wicket/examples/source/SourcesPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 1033, 6455, 1435, 202, 202, 95, 1082, 202, 430, 261, 4683, 18, 291, 1921, 10756, 1082, 202, 95, 9506, 202, 588, 12, 2433, 1769, 9506, 202, 759, 7508, 461, 508, 273, 7508, 461, 18, 1884, 797, 12, 2433, 1769, 9506, 202, 759, 9403, 4088, 273, 1363, 18, 588, 7805, 5621, 9506, 202, 759, 514, 589, 273, 8139, 18, 2079, 1595, 12, 529, 18, 17994, 9334, 4585, 16, 9506, 202, 759, 4016, 2934, 10492, 5621, 9506, 202, 759, 775, 9506, 202, 759, 288, 9506, 202, 759, 368, 14758, 326, 6903, 364, 1517, 3166, 1625, 326, 2181, 9506, 202, 759, 368, 589, 3377, 506, 1392, 18, 6149, 3377, 506, 3229, 9506, 202, 759, 368, 7334, 1390, 4191, 326, 1967, 2181, 16, 1427, 1517, 9506, 202, 759, 368, 7334, 585, 711, 2097, 4953, 880, 18, 9506, 202, 759, 9506, 202, 759, 13864, 6903, 273, 4088, 18, 588, 3805, 12, 803, 1769, 9506, 202, 759, 1323, 261, 10518, 18, 5332, 7417, 3471, 10756, 9506, 202, 759, 288, 9506, 202, 759, 1976, 880, 273, 261, 1785, 13, 10518, 18, 4285, 1046, 5621, 9506, 202, 759, 9506, 202, 759, 368, 326, 880, 3143, 358, 326, 1867, 3695, 9506, 202, 759, 368, 7488, 316, 326, 10006, 18, 9506, 202, 759, 9506, 202, 759, 11506, 6323, 12, 718, 1769, 9506, 202, 759, 289, 9506, 202, 759, 289, 9506, 202, 759, 1044, 261, 14106, 425, 13, 9506, 202, 759, 288, 9506, 202, 759, 613, 18, 1636, 2932, 3370, 358, 855, 1058, 364, 30, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 1033, 6455, 1435, 202, 202, 95, 1082, 202, 430, 261, 4683, 18, 291, 1921, 10756, 1082, 202, 95, 9506, 202, 588, 12, 2433, 1769, 9506, 202, 759, 7508, 461, 508, 273, 7508, 461, 18, 1884, 797, 12, 2433, 1769, 9506, 202, 759, 9403, 4088, 273, 1363, 18, 588, 7805, 5621, 9506, 202, 759, 514, 589, 273, 8139, 18, 2079, 1595, 12, 529, 18, 17994, 9334, 4585, 16, 9506, 202, 759, 4016, 2934, 10492, 5621, 9506, 202, 759, 775, 9506, 202, 759, 288, 9506, 202, 759, 368, 14758, 326, 6903, 364, 1517, 3166, 1625, 326, 2181, 9506, 202, 759, 368, 589, 3377, 506, 1392, 18, 6149, 3377, 506, 3229, 9506, 202, 759, 368, 7334, 1390, 4191, 326, 2 ]
final Comparator<PluginDescriptor> pluginsComparator = new Comparator<PluginDescriptor>() { public int compare(final PluginDescriptor o1, final PluginDescriptor o2) { return o1.getName().compareTo(o2.getName()); } }; Arrays.sort(myInstalledPlugins, pluginsComparator);
height = (docsGroup.getIdx() + 1)/2 * buttonHeight + captionHeight; } myMainPanel.setPreferredSize(new Dimension(width, height));
private WelcomeScreen() { // Create Plugins Panel myPluginsPanel = new PluginsPanel(new GridBagLayout()); myPluginsPanel.setBackground(PLUGINS_PANEL_COLOR); JLabel pluginsCaption = new JLabel("Plugins"); pluginsCaption.setFont(CAPTION_FONT); pluginsCaption.setForeground(CAPTION_COLOR); JLabel installedPluginsCaption = new JLabel("User-Installed Plugins:"); installedPluginsCaption.setFont(LINK_FONT); installedPluginsCaption.setForeground(CAPTION_COLOR); JPanel installedPluginsPanel = new JPanel(new GridBagLayout()); installedPluginsPanel.setBackground(PLUGINS_PANEL_COLOR); JLabel embeddedPluginsCaption = new JLabel("Bundled Plugins:"); embeddedPluginsCaption.setFont(LINK_FONT); embeddedPluginsCaption.setForeground(CAPTION_COLOR); JPanel embeddedPluginsPanel = new JPanel(new GridBagLayout()); embeddedPluginsPanel.setBackground(PLUGINS_PANEL_COLOR); JPanel topPluginsPanel = new JPanel(new GridBagLayout()); topPluginsPanel.setBackground(PLUGINS_PANEL_COLOR); //Create the list of installed plugins PluginDescriptor[] myInstalledPlugins = PluginManager.getPlugins(); if (myInstalledPlugins == null || myInstalledPlugins.length == 0) { addListItemToPlugins(installedPluginsPanel, "<i>No plugins currently installed.</i>", null, null, null, null); addListItemToPlugins(embeddedPluginsPanel, "<i>All bundled plugins were uninstalled.</i>", null, null, null, null); } else { final Comparator<PluginDescriptor> pluginsComparator = new Comparator<PluginDescriptor>() { public int compare(final PluginDescriptor o1, final PluginDescriptor o2) { return o1.getName().compareTo(o2.getName()); } }; Arrays.sort(myInstalledPlugins, pluginsComparator); int embeddedPlugins = 0; int installedPlugins = 0; String preinstalledPrefix = PathManager.getPreinstalledPluginsPath(); for (int i = 0; i < myInstalledPlugins.length; i++) { PluginDescriptor plugin = myInstalledPlugins[i]; if (plugin.getPath().getAbsolutePath().startsWith(preinstalledPrefix)) { embeddedPlugins++; addListItemToPlugins(embeddedPluginsPanel, plugin.getName(), plugin.getDescription(), plugin.getVendorLogoPath(), plugin.getPluginClassLoader(), plugin.getUrl()); } else { installedPlugins++; addListItemToPlugins(installedPluginsPanel, plugin.getName(), plugin.getDescription(), plugin.getVendorLogoPath(), plugin.getPluginClassLoader(), plugin.getUrl()); } } if (embeddedPlugins == 0) { addListItemToPlugins(embeddedPluginsPanel, "<i>All bundled plugins were uninstalled.</i>", null, null, null, null); } if (installedPlugins == 0) { addListItemToPlugins(installedPluginsPanel, "<i>No plugins currently installed.</i>", null, null, null, null); } } GridBagConstraints gBC = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(17, 25, 0, 0), 0, 0); topPluginsPanel.add(pluginsCaption, gBC); JLabel emptyLabel_1 = new JLabel(); emptyLabel_1.setBackground(PLUGINS_PANEL_COLOR); gBC = new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); topPluginsPanel.add(emptyLabel_1, gBC); gBC = new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(13, 0, 0, 10), 0, 0); MyActionButton openPluginManager = new PluginsActionButton(OPEN_PLUGINS_ICON, null) { protected void onPress(InputEvent e) { ShowSettingsUtil.getInstance().editConfigurable(myPluginsPanel, PluginManagerConfigurable.getInstance()); } public Dimension getMaximumSize() { return OPEN_PLUGIN_MANAGER_SIZE; } public Dimension getMinimumSize() { return OPEN_PLUGIN_MANAGER_SIZE; } public Dimension getPreferredSize() { return OPEN_PLUGIN_MANAGER_SIZE; } }; openPluginManager.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); topPluginsPanel.add(openPluginManager, gBC); openPluginManager.setupWithinPanel(myPluginsPanel, PLUGINS_GROUP, myPluginsButtonsCount, 0); myPluginsButtonsCount++; gBC = new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(15, 25, 0, 0), 0, 0); topPluginsPanel.add(installedPluginsCaption, gBC); JLabel emptyLabel_2 = new JLabel(); emptyLabel_2.setBackground(PLUGINS_PANEL_COLOR); gBC = new GridBagConstraints(1, 1, 2, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); topPluginsPanel.add(emptyLabel_2, gBC); gBC = new GridBagConstraints(0, 0, 1, 1, 0.5, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0); myPluginsPanel.add(topPluginsPanel, gBC); gBC = new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 0, 0), 0, 0); myPluginsPanel.add(installedPluginsPanel, gBC); JPanel emptyPanel_1 = new JPanel(); emptyPanel_1.setBackground(PLUGINS_PANEL_COLOR); gBC = new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(25, 25, 0, 0), 0, 0); myPluginsPanel.add(embeddedPluginsCaption, gBC); gBC = new GridBagConstraints(0, 3, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 5, 0, 0), 0, 0); myPluginsPanel.add(embeddedPluginsPanel, gBC); gBC = new GridBagConstraints(0, 4, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0); myPluginsPanel.add(emptyPanel_1, gBC); JScrollPane myPluginsScrollPane = ScrollPaneFactory.createScrollPane(myPluginsPanel); myPluginsScrollPane.setBorder(BorderFactory.createLineBorder(GRAY_BORDER_COLOR)); myPluginsScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); myPluginsScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); // Create Main Panel for Quick Start and Documentation myMainPanel = new JPanel(new GridBagLayout()); myMainPanel.setBackground(MAIN_PANEL_COLOR); ActionGroupDescriptor quickStarts = new ActionGroupDescriptor("Quick Start", 0); MyActionButton newProject = new MyActionButton(NEW_PROJECT_ICON, null) { protected void onPress(InputEvent e) { ProjectUtil.createNewProject(null); } }; quickStarts.addButton(newProject, "Create New Project", "Start the \"New Project\" Wizard that will guide you through " + "the steps necessary for creating a new project."); final ActionManager actionManager = ActionManager.getInstance(); MyActionButton openProject = new ButtonWithExtension(OPEN_PROJECT_ICON, null) { protected void onPress(InputEvent e, final MyActionButton button) { final AnAction action = new OpenProjectAction(); action.actionPerformed(new AnActionEvent(e, new DataContext() { public Object getData(String dataId) { if (DataConstants.PROJECT.equals(dataId)) { return null; } return button; } }, ActionPlaces.UNKNOWN, new PresentationFactory().getPresentation(action), actionManager, 0)); } }; quickStarts.addButton(openProject, "Open Project...", "You can open any arbitrary IntelliJ IDEA project. " + "Click the icon or link to select the .IPR file from the File Chooser."); MyActionButton openRecentProject = new ButtonWithExtension(REOPEN_RECENT_ICON, null) { protected void onPress(InputEvent e, final MyActionButton button) { final AnAction action = new RecentProjectsAction(); action.actionPerformed(new AnActionEvent(e, new DataContext() { public Object getData(String dataId) { if (DataConstants.PROJECT.equals(dataId)) { return null; } return button; } }, ActionPlaces.UNKNOWN, new PresentationFactory().getPresentation(action), actionManager, 0)); } }; quickStarts.addButton(openRecentProject, "Reopen Recent Project...", "You can open one of the most recent " + "projects you were working with. Click the icon " + "or link to select a project from the list."); MyActionButton getFromVCS = new ButtonWithExtension(FROM_VCS_ICON, null) { protected void onPress(InputEvent e, final MyActionButton button) { final GetFromVcsAction action = new GetFromVcsAction(); action.actionPerformed(button, e); } }; quickStarts.addButton(getFromVCS, "Get Project From Version Control...", "You can check out an entire project from " + "a Version Control System. Click the icon or link to " + "select your VCS."); MyActionButton checkForUpdate = new MyActionButton (CHECK_FOR_UPDATE_ICON, null) { protected void onPress(InputEvent e) { CheckForUpdateAction.actionPerformed(true); } }; quickStarts.addButton(checkForUpdate, "Check for Update", "IntelliJ IDEA will check for a new available update of itself, " + "using your internet connection."); // Append plug-in actions to the end of the QuickStart list quickStarts.appendActionsFromGroup((DefaultActionGroup)actionManager.getAction(IdeActions.GROUP_WELCOME_SCREEN_QUICKSTART)); ActionGroupDescriptor docsGroup = new ActionGroupDescriptor("Documentation", 1); MyActionButton readHelp = new MyActionButton(READ_HELP_ICON, null) { protected void onPress(InputEvent e) { HelpManagerImpl.getInstance().invokeHelp(""); } }; docsGroup.addButton(readHelp, "Read Help", "Open IntelliJ IDEA \"Help Topics\" in a new window."); MyActionButton defaultKeymap = new MyActionButton(KEYMAP_ICON, null) { protected void onPress(InputEvent e) { try { BrowserUtil.launchBrowser(KEYMAP_URL); } catch (IllegalThreadStateException ex) { // it's not a problem } } }; docsGroup.addButton(defaultKeymap, "Default Keymap", "Open PDF file with the default keymap reference card."); // Append plug-in actions to the end of the QuickStart list docsGroup.appendActionsFromGroup((DefaultActionGroup)actionManager.getAction(IdeActions.GROUP_WELCOME_SCREEN_DOC)); JPanel emptyPanel_2 = new JPanel(); emptyPanel_2.setBackground(MAIN_PANEL_COLOR); final JPanel quickStartPanel = quickStarts.getPanel(); quickStartPanel.add(emptyPanel_2, new GridBagConstraints(0, quickStarts.getIdx() + 2, 2, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); JPanel emptyPanel_3 = new JPanel(); emptyPanel_3.setBackground(MAIN_PANEL_COLOR); final JPanel docsPanel = docsGroup.getPanel(); docsPanel.add(emptyPanel_3, new GridBagConstraints(0, docsGroup.getIdx() + 2, 2, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); // Fill Main Panel with Quick Start and Documentation lists gBC = new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 30, 0, 0), 0, 0); myMainPanel.add(quickStartPanel, gBC); gBC = new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 15, 0, 0), 0, 0); myMainPanel.add(docsPanel, gBC); myMainPanel.setPreferredSize(new Dimension(650, 450)); JScrollPane myMainScrollPane = ScrollPaneFactory.createScrollPane(myMainPanel); myMainScrollPane.setBorder(null); myMainScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); myMainScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); // Create caption pane JPanel topPanel = new JPanel(new GridBagLayout()) { public void paint(Graphics g) { Icon welcome = CAPTION_IMAGE; welcome.paintIcon(null, g, 0, 0); g.setColor(CAPTION_BACKGROUND); g.fillRect(welcome.getIconWidth(), 0, this.getWidth() - welcome.getIconWidth(), welcome.getIconHeight()); super.paint(g); } }; topPanel.setOpaque(false); JPanel transparentTopPanel = new JPanel(); transparentTopPanel.setOpaque(false); topPanel.add(transparentTopPanel, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); topPanel.add(new JLabel(DEVELOP_SLOGAN), new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 10), 0, 0)); // Create the base welcome panel myWelcomePanel = new JPanel(new GridBagLayout()); myWelcomePanel.setBackground(MAIN_PANEL_BACKGROUND); gBC = new GridBagConstraints(0, 0, 3, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(10, 5, 0, 5), 0, 0); myWelcomePanel.add(topPanel, gBC); gBC = new GridBagConstraints(0, 1, 2, 1, 1.4, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(15, 15, 15, 0), 0, 0); myWelcomePanel.add(myMainScrollPane, gBC); gBC = new GridBagConstraints(2, 1, 1, 1, 0.6, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(15, 15, 15, 15), 0, 0); myWelcomePanel.add(myPluginsScrollPane, gBC); }
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/057c1fc4eca73d8d659037771b3e5b73e8b81dd3/WelcomeScreen.java/clean/source/com/intellij/openapi/wm/impl/welcomeScreen/WelcomeScreen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 678, 16312, 7956, 1435, 288, 565, 368, 1788, 26849, 23641, 565, 3399, 9461, 5537, 273, 394, 26849, 5537, 12, 2704, 7145, 5013, 3744, 10663, 565, 3399, 9461, 5537, 18, 542, 8199, 12, 19415, 55, 67, 30819, 2247, 67, 10989, 1769, 565, 21403, 4799, 21158, 273, 394, 21403, 2932, 9461, 8863, 565, 4799, 21158, 18, 542, 5711, 12, 3587, 3725, 67, 25221, 1769, 565, 4799, 21158, 18, 542, 23206, 12, 3587, 3725, 67, 10989, 1769, 565, 21403, 5876, 9461, 21158, 273, 394, 21403, 2932, 1299, 17, 16747, 26849, 2773, 1769, 565, 5876, 9461, 21158, 18, 542, 5711, 12, 10554, 67, 25221, 1769, 565, 5876, 9461, 21158, 18, 542, 23206, 12, 3587, 3725, 67, 10989, 1769, 565, 24048, 5876, 9461, 5537, 273, 394, 24048, 12, 2704, 7145, 5013, 3744, 10663, 565, 5876, 9461, 5537, 18, 542, 8199, 12, 19415, 55, 67, 30819, 2247, 67, 10989, 1769, 565, 21403, 7488, 9461, 21158, 273, 394, 21403, 2932, 38, 24467, 26849, 2773, 1769, 565, 7488, 9461, 21158, 18, 542, 5711, 12, 10554, 67, 25221, 1769, 565, 7488, 9461, 21158, 18, 542, 23206, 12, 3587, 3725, 67, 10989, 1769, 565, 24048, 7488, 9461, 5537, 273, 394, 24048, 12, 2704, 7145, 5013, 3744, 10663, 565, 7488, 9461, 5537, 18, 542, 8199, 12, 19415, 55, 67, 30819, 2247, 67, 10989, 1769, 565, 24048, 1760, 9461, 5537, 273, 394, 24048, 12, 2704, 7145, 5013, 3744, 10663, 565, 1760, 9461, 5537, 18, 542, 8199, 12, 19415, 55, 67, 30819, 2247, 67, 10989, 1769, 565, 368, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 678, 16312, 7956, 1435, 288, 565, 368, 1788, 26849, 23641, 565, 3399, 9461, 5537, 273, 394, 26849, 5537, 12, 2704, 7145, 5013, 3744, 10663, 565, 3399, 9461, 5537, 18, 542, 8199, 12, 19415, 55, 67, 30819, 2247, 67, 10989, 1769, 565, 21403, 4799, 21158, 273, 394, 21403, 2932, 9461, 8863, 565, 4799, 21158, 18, 542, 5711, 12, 3587, 3725, 67, 25221, 1769, 565, 4799, 21158, 18, 542, 23206, 12, 3587, 3725, 67, 10989, 1769, 565, 21403, 5876, 9461, 21158, 273, 394, 21403, 2932, 1299, 17, 16747, 26849, 2773, 1769, 565, 5876, 9461, 21158, 18, 542, 5711, 12, 10554, 67, 25221, 1769, 565, 5876, 9461, 21158, 18, 542, 23206, 12, 3587, 3725, 67, 10989, 1769, 565, 24048, 5876, 2 ]
if (dialog.getRemoteSequenceNumberLong() > sipRequest.getCSeq() .getSequenceNumberLong()) {
if (dialog.getRemoteSeqNumber() > sipRequest.getCSeq() .getSeqNumber()) {
public void processRequest(SIPRequest sipRequest, MessageChannel incomingMessageChannel) { // Generate the wrapper JAIN-SIP object. if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "PROCESSING INCOMING REQUEST " + sipRequest + " transactionChannel = " + transactionChannel + " listening point = " + listeningPoint.getIPAddress() + ":" + listeningPoint.getPort()); if (listeningPoint == null) { if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Dropping message: No listening point registered!"); return; } SipStackImpl sipStack = (SipStackImpl) transactionChannel.getSIPStack(); SipProviderImpl sipProvider = listeningPoint.getProvider(); if (sipProvider == null) { if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug("No provider - dropping !!"); return; } if (sipStack == null) InternalErrorHandler.handleException("Egads! no sip stack!"); // Look for the registered SIPListener for the message channel. SIPServerTransaction transaction = (SIPServerTransaction) this.transactionChannel; String dialogId = sipRequest.getDialogId(true); SIPDialog dialog = sipStack.getDialog(dialogId); // Check if we got this request on the contact address of the dialog // If not the dialog does not belong to this request. We check this // condition if a contact address has been assigned to the dialog. // Forgive the sins of B2BUA's that like to record route ACK's if (dialog != null && sipProvider != dialog.getSipProvider()) { Contact contact = dialog.getMyContactHeader(); if (contact != null) { SipUri contactUri = (SipUri) (contact.getAddress().getURI()); String ipAddress = contactUri.getHost(); int contactPort = contactUri.getPort(); String contactTransport = contactUri.getTransportParam(); if (contactTransport == null) contactTransport = "udp"; if (contactPort == -1) { if (contactTransport.equals("udp") || contactTransport.equals("tcp")) contactPort = 5060; else contactPort = 5061; } // Check if the dialog contact is the same as the provider on // which we got the request. Otherwise, dont assign this // dialog to the request. if (ipAddress != null && (!ipAddress.equals(listeningPoint.getIPAddress()) || contactPort != listeningPoint .getPort())) { if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "nulling dialog -- listening point mismatch! " + contactPort + " lp port = " + listeningPoint.getPort()); } dialog = null; } } } if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug("dialogId = " + dialogId); sipStack.getLogWriter().logDebug("dialog = " + dialog); } /* * RFC 3261 Section 16.4 If the first value in the Route header field * indicates this proxy,the proxy MUST remove that value from the * request . */ // If the message is being processed // by a Proxy, then the proxy will take care of stripping the // Route header. If the request is being processed by an // endpoint, then the stack strips off the route header. if (sipRequest.getHeader(Route.NAME) != null && transaction.getDialog() != null) { RouteList routes = sipRequest.getRouteHeaders(); Route route = (Route) routes.getFirst(); SipUri uri = (SipUri) route.getAddress().getURI(); int port; if (uri.getHostPort().hasPort()) { port = uri.getHostPort().getPort(); } else { if (listeningPoint.getTransport().equalsIgnoreCase("TLS")) port = 5061; else port = 5060; } String host = uri.getHost(); if ((host.equals(listeningPoint.getIPAddress()) || host .equalsIgnoreCase(listeningPoint.getSentBy())) && port == listeningPoint.getPort()) { if (routes.size() == 1) sipRequest.removeHeader(Route.NAME); else routes.removeFirst(); } } if (sipRequest.getMethod().equals(Request.UPDATE)) { // Got an UPDATE method and the user dialog does not exist and the // user // wants to be a User agent. if (sipProvider.isAutomaticDialogSupportEnabled() && dialog == null) { Response notExist = sipRequest .createResponse(Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST); Server server = sipStack.createServerHeaderForStack(); notExist.addHeader(server); try { sipProvider.sendResponse(notExist); } catch (SipException e) { sipStack.getLogWriter().logError("error sending response", e); } if (transaction != null) { sipStack.removeTransaction(transaction); transaction.releaseSem(); } return; } } else if (sipRequest.getMethod().equals(Request.ACK)) { if (transaction != null && transaction.isInviteTransaction()) { // This is an ack for a 3xx-6xx response. Just let the tx laer // take care of it. if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Processing ACK for INVITE Tx "); } else { if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Processing ACK for dialog " + dialog); if (dialog == null) { if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "Dialog does not exist " + sipRequest.getFirstLine() + " isServerTransaction = " + true); } SIPServerTransaction st = sipStack .getRetransmissionAlertTransaction(dialogId); if (st != null && st.isRetransmissionAlertEnabled()) { st.disableRetransmissionAlerts(); } /* * JvB: must never drop ACKs that dont match a transaction! * One cannot be sure if it isn't an ACK for a 2xx response * */ } else { if (!dialog.handleAck(transaction)) { return; } else { transaction.passToListener(); dialog.addTransaction(transaction); dialog.addRoute(sipRequest); transaction.setDialog(dialog, dialogId); /* * Note that ACK is a pseudo transaction. It is never * added to the stack and you do not get transaction * terminated events on ACK. */ if (sipStack.deliverTerminatedEventForAck) { try { sipStack.addTransaction(transaction); } catch (IOException ex) { } } else { transaction.setMapped(true); } /* * try { sipStack.addTransaction(transaction); } catch * (IOException ex) { // should never happen. } */ } } } } else if (sipRequest.getMethod().equals(Request.PRACK)) { /* * RFC 3262: A matching PRACK is defined as one within the same * dialog as the response, and whose method, CSeq-num, and * response-num in the RAck header field match, respectively, the * method from the CSeq, the sequence number from the CSeq, and the * sequence number from the RSeq of the reliable provisional * response. */ if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Processing PRACK for dialog " + dialog); if (dialog == null && sipProvider.isAutomaticDialogSupportEnabled()) { if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "Dialog does not exist " + sipRequest.getFirstLine() + " isServerTransaction = " + true); } if (sipStack.isLoggingEnabled()) { sipStack .getLogWriter() .logDebug( "Sending 481 for PRACK - automatic dialog support is enabled -- cant find dialog!"); } SIPResponse notExist = sipRequest .createResponse(Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST); Server server = sipStack.createServerHeaderForStack(); notExist.addHeader(server); try { sipProvider.sendResponse(notExist); } catch (SipException e) { sipStack.getLogWriter().logError("error sending response", e); } if (transaction != null) { sipStack.removeTransaction(transaction); transaction.releaseSem(); } return; } else { if (!dialog.handlePrack(sipRequest)) { sipStack.getLogWriter().logDebug( "Dropping out of sequence PRACK "); if (transaction != null) { sipStack.removeTransaction(transaction); transaction.releaseSem(); } return; } else { try { sipStack.addTransaction(transaction); dialog.addTransaction(transaction); dialog.addRoute(sipRequest); } catch (Exception ex) { InternalErrorHandler.handleException(ex); } } } } else if (sipRequest.getMethod().equals(Request.BYE)) { // Check for correct sequence numbering of the BYE if (dialog != null && !dialog.isRequestConsumable(sipRequest)) { if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Dropping out of sequence BYE"); // If the stack knows about the tx, then remove it. if (transaction != null) sipStack.removeTransaction(transaction); return; } else if (dialog == null && sipProvider.isAutomaticDialogSupportEnabled()) { // Drop bye's with 481 if dialog does not exist. // If dialog support is enabled then // there must be a dialog associated with the bye // No dialog could be found and requests on this // provider. Must act like a user agent -- so drop the request. // NOTE: if Automatic dialog support is not enabled, // then it is the application's responsibility to // take care of this error condition possibly. SIPResponse response = sipRequest .createResponse(Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST); Server server = sipStack.createServerHeaderForStack(); response.addHeader(server); sipStack.getLogWriter().logDebug( "dropping request -- automatic dialog " + "support enabled and dialog does not exist!"); try { transaction.sendResponse(response); } catch (SipException ex) { sipStack.getLogWriter().logError( "Error in sending response", ex); } // If the stack knows about the tx, then remove it. if (transaction != null) { sipStack.removeTransaction(transaction); transaction.releaseSem(); transaction = null; } return; } // note that the transaction may be null (which // happens when no dialog for the bye was found. // and automatic dialog support is disabled (i.e. the app wants // to manage its own dialog layer. if (transaction != null && dialog != null) { try { if (sipProvider == dialog.getSipProvider()) { sipStack.addTransaction(transaction); dialog.addTransaction(transaction); transaction.setDialog(dialog, dialogId); } } catch (IOException ex) { InternalErrorHandler.handleException(ex); } } if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "BYE Tx = " + transaction + " isMapped =" + transaction.isTransactionMapped()); } } else if (sipRequest.getMethod().equals(Request.CANCEL)) { SIPServerTransaction st = (SIPServerTransaction) sipStack .findCancelTransaction(sipRequest, true); if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "Got a CANCEL, InviteServerTx = " + st + " cancel Server Tx ID = " + transaction + " isMapped = " + transaction.isTransactionMapped()); } // Processing incoming CANCEL. // Check if we can process the CANCEL request. if (sipRequest.getMethod().equals(Request.CANCEL)) { // If the CANCEL comes in too late, there's not // much that the Listener can do so just do the // default action and avoid bothering the listener. if (st != null && st.getState() == SIPTransaction.TERMINATED_STATE) { // If transaction already exists but it is // too late to cancel the transaction then // just respond OK to the CANCEL and bail. if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Too late to cancel Transaction"); // send OK and just ignore the CANCEL. try { transaction.sendResponse(sipRequest .createResponse(Response.OK)); } catch (Exception ex) { if (ex.getCause() != null && ex.getCause() instanceof IOException) { st.raiseIOExceptionEvent(); } } return; } if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Cancel transaction = " + st); } if (transaction != null && st != null && st.getDialog() != null) { // Found an invite tx corresponding to the CANCEL. // Set up the client tx and pass up to listener. transaction.setDialog((SIPDialog) st.getDialog(), dialogId); // transaction = st; } else if (st == null && sipProvider.isAutomaticDialogSupportEnabled() && transaction != null) { // Could not find a invite tx corresponding to the CANCEL. // Automatic dialog support is enabled so I must behave like // an endpoint on this provider. // Send the error response for the cancel. SIPResponse response = sipRequest .createResponse(Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST); Server server = sipStack.createServerHeaderForStack(); response.addHeader(server); if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "dropping request -- automatic dialog support " + "enabled and INVITE ST does not exist!"); try { sipProvider.sendResponse(response); } catch (SipException ex) { InternalErrorHandler.handleException(ex); } if (transaction != null) { sipStack.removeTransaction(transaction); transaction.releaseSem(); } return; } // INVITE was handled statefully so the CANCEL must also be // statefully handled. if (st != null) { try { if (transaction != null) { sipStack.addTransaction(transaction); transaction.setPassToListener(); transaction.setInviteTransaction(st); // Dont let the INVITE and CANCEL be concurrently // processed. st.acquireSem(); } } catch (Exception ex) { InternalErrorHandler.handleException(ex); } } } else if (sipRequest.getMethod().equals(Request.INVITE)) { SIPTransaction lastTransaction = dialog == null ? null : dialog .getInviteTransaction(); /* * RFC 3261 Chapter 14. A UAS that receives a second INVITE before * it sends the final response to a first INVITE with a lower CSeq * sequence number on the same dialog MUST return a 500 (Server * Internal Error) response to the second INVITE and MUST include a * Retry-After header field with a randomly chosen value of between * 0 and 10 seconds. */ if (dialog != null && transaction != null && lastTransaction != null && sipRequest.getCSeq().getSequenceNumberLong() > dialog .getRemoteSequenceNumberLong() && lastTransaction instanceof SIPServerTransaction && lastTransaction.isInviteTransaction() && lastTransaction.getState() != TransactionState.COMPLETED && lastTransaction.getState() != TransactionState.TERMINATED && lastTransaction.getState() != TransactionState.CONFIRMED) { if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug( "Sending 500 response for out of sequence message"); SIPResponse sipResponse = sipRequest .createResponse(Response.SERVER_INTERNAL_ERROR); Server server = sipStack.createServerHeaderForStack(); sipResponse.addHeader(server); RetryAfter retryAfter = new RetryAfter(); try { retryAfter.setRetryAfter((int) (10 * Math.random())); } catch (InvalidArgumentException ex) { ex.printStackTrace(); } sipResponse.addHeader(retryAfter); try { transaction.sendMessage(sipResponse); } catch (IOException ex) { transaction.raiseIOExceptionEvent(); } return; } /* * RFC 3261 Chapter 14. A UAS that receives an INVITE on a dialog * while an INVITE it had sent on that dialog is in progress MUST * return a 491 (Request Pending) response to the received INVITE. */ lastTransaction = (dialog == null ? null : dialog .getLastTransaction()); if (dialog != null && lastTransaction != null && lastTransaction.isInviteTransaction() && lastTransaction instanceof SIPClientTransaction && lastTransaction.getState() != TransactionState.COMPLETED && lastTransaction.getState() != TransactionState.TERMINATED) { if (dialog.getRemoteSequenceNumberLong() + 1 == sipRequest .getCSeq().getSequenceNumberLong()) { dialog.setRemoteSequenceNumber(sipRequest.getCSeq() .getSequenceNumberLong()); if (sipStack.isLoggingEnabled()) sipStack .getLogWriter() .logDebug( "Sending 491 response for out of sequence message"); SIPResponse sipResponse = sipRequest .createResponse(Response.REQUEST_PENDING); Server server = sipStack.createServerHeaderForStack(); sipResponse.addHeader(server); try { transaction.sendMessage(sipResponse); } catch (IOException ex) { transaction.raiseIOExceptionEvent(); } dialog.requestConsumed(); } else { if (sipStack.isLoggingEnabled()) sipStack .getLogWriter() .logDebug( "Dropping message -- sequence number is too high!"); } return; } } // Sequence numbers are supposed to be incremented // sequentially within a dialog for RFC 3261 // Note BYE, CANCEL and ACK is handled above - so no check here. if (dialog != null && transaction != null && !sipRequest.getMethod().equals(Request.BYE) && !sipRequest.getMethod().equals(Request.CANCEL) && !sipRequest.getMethod().equals(Request.ACK) && !sipRequest.getMethod().equals(Request.PRACK)) { if (!dialog.isRequestConsumable(sipRequest)) { /* * RFC 3261: "UAS Behavior" section (12.2.2): If the remote * sequence number was not empty, but the sequence number of the * request is lower than the remote sequence number, the request * is out of order and MUST be rejected with a 500 (Server * Internal Error) response. */ // Drop the request if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "Dropping out of sequence message " + dialog.getRemoteSequenceNumberLong() + " " + sipRequest.getCSeq()); } // send error when stricly higher, ignore when == // (likely still processing, error would interrupt that) if (dialog.getRemoteSequenceNumberLong() > sipRequest.getCSeq() .getSequenceNumberLong()) { if (sipStack.isLoggingEnabled()) sipStack .getLogWriter() .logDebug( "Sending 500 response for out of sequence message"); SIPResponse sipResponse = sipRequest .createResponse(Response.SERVER_INTERNAL_ERROR); sipResponse.setReasonPhrase("Request out of order"); Server server = sipStack.createServerHeaderForStack(); sipResponse.addHeader(server); try { transaction.sendMessage(sipResponse); sipStack.removeTransaction(transaction); transaction.releaseSem(); } catch (IOException ex) { transaction.raiseIOExceptionEvent(); sipStack.removeTransaction(transaction); } } return; } try { if (sipProvider == dialog.getSipProvider()) { sipStack.addTransaction(transaction); // This will set the remote sequence number. dialog.addTransaction(transaction); dialog.addRoute(sipRequest); transaction.setDialog(dialog, dialogId); } } catch (IOException ex) { transaction.raiseIOExceptionEvent(); sipStack.removeTransaction(transaction); return; } } RequestEvent sipEvent; if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug( sipRequest.getMethod() + " transaction.isMapped = " + transaction.isTransactionMapped()); } /* * RFC 3265: Each event package MUST specify whether forked SUBSCRIBE * requests are allowed to install multiple subscriptions. If such * behavior is not allowed, the first potential dialog- establishing * message will create a dialog. All subsequent NOTIFY messages which * correspond to the SUBSCRIBE message (i.e., match "To", "From", "From" * header "tag" parameter, "Call-ID", "CSeq", "Event", and "Event" * header "id" parameter) but which do not match the dialog would be * rejected with a 481 response. Note that the 200-class response to the * SUBSCRIBE can arrive after a matching NOTIFY has been received; such * responses might not correlate to the same dialog established by the * NOTIFY. Except as required to complete the SUBSCRIBE transaction, * such non-matching 200-class responses are ignored. */ if (dialog == null && sipRequest.getMethod().equals(Request.NOTIFY)) { SIPClientTransaction pendingSubscribeClientTx = sipStack .findSubscribeTransaction(sipRequest, listeningPoint); if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "PROCESSING NOTIFY DIALOG == null " + pendingSubscribeClientTx); } /* * RFC 3265: Upon receiving a NOTIFY request, the subscriber should * check that it matches at least one of its outstanding * subscriptions; if not, it MUST return a "481 Subscription does * not exist" response unless another 400- or 500-class response is * more appropriate. */ if (sipProvider.isAutomaticDialogSupportEnabled() && pendingSubscribeClientTx == null && !sipStack.deliverUnsolicitedNotify ) { /* * This is the case of the UAC receiving a Stray NOTIFY for * which it has not previously sent out a SUBSCRIBE and for * which it does not have an established dialog. */ try { if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "Could not find Subscription for Notify Tx."); } Response errorResponse = sipRequest .createResponse(Response.CALL_OR_TRANSACTION_DOES_NOT_EXIST); errorResponse .setReasonPhrase("Subscription does not exist"); Server server = sipStack.createServerHeaderForStack(); errorResponse.addHeader(server); sipProvider.sendResponse(errorResponse); return; } catch (Exception ex) { if (ex.getCause() != null && ex.getCause() instanceof IOException) { sipStack .getLogWriter() .logDebug( "Exception while sending error response statelessly"); } else { InternalErrorHandler.handleException(ex); } } } // If the server transaction cannot be found or if it // aleady has a dialog attached to it then just assign the // notify to this dialog and pass it up. if (pendingSubscribeClientTx != null) { // The response to the pending subscribe tx can try to create // a dialog at the same time that the notify is trying to // create a dialog. Thus we cannot process both at the // same time. transaction.setPendingSubscribe(pendingSubscribeClientTx); // The transaction gets assigned to the dialog from the // outgoing subscribe. First see if anybody claimed the // default Dialog for the outgoing Subscribe request. SIPDialog subscriptionDialog = (SIPDialog) pendingSubscribeClientTx .getDefaultDialog(); // TODO -- refactor this. Can probably be written far cleaner. if (subscriptionDialog == null || subscriptionDialog.getDialogId() == null || !subscriptionDialog.getDialogId().equals(dialogId)) { // Notify came in before you could assign a response to // the subscribe. // grab the default dialog and assign it to the tags in // the notify. if (subscriptionDialog != null && subscriptionDialog.getDialogId() == null) { subscriptionDialog.setDialogId(dialogId); } else { subscriptionDialog = pendingSubscribeClientTx .getDialog(dialogId); } if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "PROCESSING NOTIFY Subscribe DIALOG " + subscriptionDialog); } // The user could have createed a dialog before sending out // the SUBSCRIBE on the subscribe tx. if (subscriptionDialog == null && (sipProvider.isAutomaticDialogSupportEnabled() || pendingSubscribeClientTx .getDefaultDialog() != null)) { Event event = (Event) sipRequest .getHeader(EventHeader.NAME); if (sipStack.isEventForked(event.getEventType())) { subscriptionDialog = SIPDialog.createFromNOTIFY( pendingSubscribeClientTx, transaction); } } if (subscriptionDialog != null) { transaction.setDialog(subscriptionDialog, dialogId); subscriptionDialog.setState(DialogState.CONFIRMED .getValue()); sipStack.putDialog(subscriptionDialog); pendingSubscribeClientTx.setDialog(subscriptionDialog, dialogId); if (!transaction.isTransactionMapped()) { this.sipStack.mapTransaction(transaction); // Let the listener see it if it just got // created. // otherwise, we have already processed the tx // so // we dont want the listener to see it. transaction.setPassToListener(); try { this.sipStack.addTransaction(transaction); } catch (Exception ex) { } } } } else { // The subscription default dialog is our dialog. // Found a subscrbe dialog for the NOTIFY // So map the tx. transaction.setDialog(subscriptionDialog, dialogId); dialog = subscriptionDialog; if (!transaction.isTransactionMapped()) { this.sipStack.mapTransaction(transaction); // Let the listener see it if it just got created. // otherwise, we have already processed the tx so // we dont want the listener to see it. transaction.setPassToListener(); try { this.sipStack.addTransaction(transaction); } catch (Exception ex) { } } sipStack.putDialog(subscriptionDialog); if (pendingSubscribeClientTx != null) { subscriptionDialog .addTransaction(pendingSubscribeClientTx); pendingSubscribeClientTx.setDialog(subscriptionDialog, dialogId); } } if (transaction != null && ((SIPServerTransaction) transaction) .isTransactionMapped()) { // Shadow transaction has been created and the stack // knows // about it. sipEvent = new RequestEvent((SipProvider) sipProvider, (ServerTransaction) transaction, subscriptionDialog, (Request) sipRequest); } else { // Shadow transaction has been created but the stack // does // not know // about it. sipEvent = new RequestEvent((SipProvider) sipProvider, null, subscriptionDialog, (Request) sipRequest); } } else { if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "could not find subscribe tx"); } // Got a notify out of the blue - just pass it up // for stateless handling by the application. sipEvent = new RequestEvent(sipProvider, null, null, (Request) sipRequest); } } else { // For a dialog creating event - set the transaction to null. // The listener can create the dialog if needed. if (transaction != null && (((SIPServerTransaction) transaction) .isTransactionMapped())) { sipEvent = new RequestEvent(sipProvider, (ServerTransaction) transaction, dialog, (Request) sipRequest); } else { sipEvent = new RequestEvent(sipProvider, null, dialog, (Request) sipRequest); } } sipProvider.handleEvent(sipEvent, transaction); }
7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/ae73fb4580278cf49a75d1b92d3994df557485e7/DialogFilter.java/buggy/trunk/src/gov/nist/javax/sip/DialogFilter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1207, 691, 12, 17739, 691, 10341, 691, 16, 1082, 202, 1079, 2909, 6935, 1079, 2909, 13, 288, 202, 202, 759, 6654, 326, 4053, 804, 6964, 17, 17739, 733, 18, 202, 202, 430, 261, 28477, 2624, 18, 291, 7735, 1526, 10756, 1082, 202, 28477, 2624, 18, 588, 1343, 2289, 7675, 1330, 2829, 12, 6862, 202, 6, 16560, 1360, 2120, 4208, 1360, 12492, 315, 397, 10341, 691, 6862, 1082, 202, 15, 315, 2492, 2909, 273, 315, 397, 2492, 2909, 6862, 1082, 202, 15, 315, 13895, 1634, 273, 315, 6862, 1082, 202, 15, 13895, 2148, 18, 588, 22507, 1435, 397, 6153, 6862, 1082, 202, 15, 13895, 2148, 18, 588, 2617, 10663, 202, 202, 430, 261, 18085, 310, 2148, 422, 446, 13, 288, 1082, 202, 430, 261, 28477, 2624, 18, 291, 7735, 1526, 10756, 9506, 202, 28477, 2624, 18, 588, 1343, 2289, 7675, 1330, 2829, 12, 25083, 202, 6, 7544, 1382, 883, 30, 2631, 13895, 1634, 4104, 4442, 1769, 1082, 202, 2463, 31, 202, 202, 97, 202, 202, 17550, 2624, 2828, 10341, 2624, 273, 261, 17550, 2624, 2828, 13, 2492, 2909, 18, 588, 17739, 2624, 5621, 202, 202, 17550, 2249, 2828, 10341, 2249, 273, 13895, 2148, 18, 588, 2249, 5621, 202, 202, 430, 261, 28477, 2249, 422, 446, 13, 288, 1082, 202, 430, 261, 28477, 2624, 18, 291, 7735, 1526, 10756, 9506, 202, 28477, 2624, 18, 588, 1343, 2289, 7675, 1330, 2829, 2932, 2279, 2893, 300, 3640, 1382, 401, 4442, 1769, 1082, 202, 2463, 31, 202, 202, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1207, 691, 12, 17739, 691, 10341, 691, 16, 1082, 202, 1079, 2909, 6935, 1079, 2909, 13, 288, 202, 202, 759, 6654, 326, 4053, 804, 6964, 17, 17739, 733, 18, 202, 202, 430, 261, 28477, 2624, 18, 291, 7735, 1526, 10756, 1082, 202, 28477, 2624, 18, 588, 1343, 2289, 7675, 1330, 2829, 12, 6862, 202, 6, 16560, 1360, 2120, 4208, 1360, 12492, 315, 397, 10341, 691, 6862, 1082, 202, 15, 315, 2492, 2909, 273, 315, 397, 2492, 2909, 6862, 1082, 202, 15, 315, 13895, 1634, 273, 315, 6862, 1082, 202, 15, 13895, 2148, 18, 588, 22507, 1435, 397, 6153, 6862, 1082, 202, 15, 13895, 2148, 18, 588, 2617, 10663, 202, 202, 430, 261, 18085, 310, 2148, 2 ]
return new EJBMethodPermissionCollection();
return new EJBMethodPermissionCollection();
public PermissionCollection newPermissionCollection() { return new EJBMethodPermissionCollection(); }
8608 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8608/361c2269af464cdf79550bc0b73c91519ca0d621/EJBMethodPermission.java/buggy/j2ee-jacc/src/java/javax/security/jacc/EJBMethodPermission.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1377, 1071, 8509, 2532, 394, 5041, 2532, 1435, 288, 377, 202, 2463, 394, 12157, 1305, 5041, 2532, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1377, 1071, 8509, 2532, 394, 5041, 2532, 1435, 288, 377, 202, 2463, 394, 12157, 1305, 5041, 2532, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
fn.setIsTargetOfDirectCall();
if (!fn.isTargetOfDirectCall()) { int index = directCallTargets.size(); directCallTargets.add(fn); fn.setDirectTargetIndex(index); }
private void detectDirectCall(Node node, ScriptOrFnNode tree) { if (tree.getType() == TokenStream.FUNCTION) { Node left = node.getFirstChild(); // count the arguments int argCount = 0; Node arg = left.getNext(); while (arg != null) { arg = arg.getNext(); argCount++; } if (argCount == 0) { ((OptFunctionNode)tree).itsContainsCalls0 = true; } /* * Optimize a call site by converting call("a", b, c) into : * * FunctionObjectFor"a" <-- instance variable init'd by constructor * * // this is a DIRECTCALL node * fn = GetProp(tmp = GetBase("a"), "a"); * if (fn == FunctionObjectFor"a") * fn.call(tmp, b, c) * else * ScriptRuntime.Call(fn, tmp, b, c) */ if (possibleDirectCalls != null) { String targetName = null; if (left.getType() == TokenStream.NAME) { targetName = left.getString(); } else if (left.getType() == TokenStream.GETPROP) { targetName = left.getFirstChild().getNext().getString(); } if (targetName != null) { OptFunctionNode fn; fn = (OptFunctionNode)possibleDirectCalls.get(targetName); if (fn != null && argCount == fn.getParamCount()) { // Refuse to directCall any function with more // than 32 parameters - prevent code explosion // for wacky test cases if (argCount <= 32) { node.putProp(Node.DIRECTCALL_PROP, fn); fn.setIsTargetOfDirectCall(); } } } } } }
47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/254d313fa4af2fecbee1dfc1461584e0bc2ecad6/OptTransformer.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/OptTransformer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5966, 5368, 1477, 12, 907, 756, 16, 7739, 1162, 5372, 907, 2151, 13, 565, 288, 3639, 309, 261, 3413, 18, 588, 559, 1435, 422, 3155, 1228, 18, 7788, 13, 288, 5411, 2029, 2002, 273, 756, 18, 588, 3759, 1763, 5621, 5411, 368, 1056, 326, 1775, 5411, 509, 1501, 1380, 273, 374, 31, 5411, 2029, 1501, 273, 2002, 18, 588, 2134, 5621, 5411, 1323, 261, 3175, 480, 446, 13, 288, 7734, 1501, 273, 1501, 18, 588, 2134, 5621, 7734, 1501, 1380, 9904, 31, 5411, 289, 5411, 309, 261, 3175, 1380, 422, 374, 13, 288, 7734, 14015, 6179, 2083, 907, 13, 3413, 2934, 1282, 10846, 10125, 20, 273, 638, 31, 5411, 289, 5411, 1748, 2398, 380, 12056, 10153, 279, 745, 2834, 635, 14540, 745, 2932, 69, 3113, 324, 16, 276, 13, 1368, 294, 2398, 380, 2398, 380, 225, 4284, 921, 1290, 6, 69, 6, 411, 413, 791, 2190, 1208, 14271, 635, 3885, 2398, 380, 2398, 380, 225, 368, 333, 353, 279, 29100, 13730, 756, 2398, 380, 225, 2295, 273, 968, 4658, 12, 5645, 273, 968, 2171, 2932, 69, 6, 3631, 315, 69, 8863, 2398, 380, 225, 309, 261, 4293, 422, 4284, 921, 1290, 6, 69, 7923, 2398, 380, 1377, 2295, 18, 1991, 12, 5645, 16, 324, 16, 276, 13, 2398, 380, 225, 469, 2398, 380, 1377, 7739, 5576, 18, 1477, 12, 4293, 16, 1853, 16, 324, 16, 276, 13, 2398, 1195, 5411, 309, 261, 12708, 5368, 10125, 480, 446, 13, 288, 7734, 514, 23395, 273, 446, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5966, 5368, 1477, 12, 907, 756, 16, 7739, 1162, 5372, 907, 2151, 13, 565, 288, 3639, 309, 261, 3413, 18, 588, 559, 1435, 422, 3155, 1228, 18, 7788, 13, 288, 5411, 2029, 2002, 273, 756, 18, 588, 3759, 1763, 5621, 5411, 368, 1056, 326, 1775, 5411, 509, 1501, 1380, 273, 374, 31, 5411, 2029, 1501, 273, 2002, 18, 588, 2134, 5621, 5411, 1323, 261, 3175, 480, 446, 13, 288, 7734, 1501, 273, 1501, 18, 588, 2134, 5621, 7734, 1501, 1380, 9904, 31, 5411, 289, 5411, 309, 261, 3175, 1380, 422, 374, 13, 288, 7734, 14015, 6179, 2083, 907, 13, 3413, 2934, 1282, 10846, 10125, 20, 273, 638, 31, 5411, 289, 5411, 1748, 2398, 380, 12056, 10153, 2 ]
byte[] bitmap = getBlock( gdesc.getInodeBitmap() ); synchronized(bitmap) { INodeReservation result = INodeBitmap.findFreeINode(bitmap);
synchronized(blockCache) { byte[] bitmap= getBlock( gdesc.getInodeBitmap() );
protected INodeReservation findFreeINode(int blockGroup) throws IOException{ GroupDescriptor gdesc = groupDescriptors[blockGroup]; if(gdesc.getFreeInodesCount()> 0) { byte[] bitmap = getBlock( gdesc.getInodeBitmap() ); synchronized(bitmap) { INodeReservation result = INodeBitmap.findFreeINode(bitmap); if(result.isSuccessful()){ //update the inode bitmap writeBlock( gdesc.getInodeBitmap(), bitmap, true); modifyFreeInodesCount(blockGroup, -1); result.setGroup(blockGroup); return result; } } } return new INodeReservation(false, -1); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/bca7c2e0848f3672930b39223f626f4996c1b295/Ext2FileSystem.java/clean/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 21176, 18074, 1104, 9194, 23184, 12, 474, 1203, 1114, 13, 1216, 1860, 95, 202, 202, 1114, 3187, 314, 5569, 273, 1041, 12705, 63, 2629, 1114, 15533, 202, 202, 430, 12, 75, 5569, 18, 588, 9194, 382, 1145, 1380, 1435, 34, 374, 13, 288, 1082, 202, 7229, 8526, 9389, 273, 11902, 12, 314, 5569, 18, 588, 29897, 12224, 1435, 11272, 1082, 202, 22043, 12, 3682, 1458, 13, 288, 9506, 202, 23184, 18074, 563, 273, 21176, 12224, 18, 4720, 9194, 23184, 12, 3682, 1458, 1769, 6862, 9506, 202, 430, 12, 2088, 18, 291, 14277, 10756, 95, 6862, 202, 759, 2725, 326, 17870, 9389, 6862, 202, 2626, 1768, 12, 314, 5569, 18, 588, 29897, 12224, 9334, 9389, 16, 638, 1769, 6862, 202, 17042, 9194, 382, 1145, 1380, 12, 2629, 1114, 16, 300, 21, 1769, 6862, 25083, 202, 2088, 18, 542, 1114, 12, 2629, 1114, 1769, 6862, 6862, 6862, 6862, 9506, 202, 2463, 563, 31, 9506, 202, 97, 1082, 202, 97, 202, 202, 97, 202, 202, 2463, 394, 21176, 18074, 12, 5743, 16, 300, 21, 1769, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 21176, 18074, 1104, 9194, 23184, 12, 474, 1203, 1114, 13, 1216, 1860, 95, 202, 202, 1114, 3187, 314, 5569, 273, 1041, 12705, 63, 2629, 1114, 15533, 202, 202, 430, 12, 75, 5569, 18, 588, 9194, 382, 1145, 1380, 1435, 34, 374, 13, 288, 1082, 202, 7229, 8526, 9389, 273, 11902, 12, 314, 5569, 18, 588, 29897, 12224, 1435, 11272, 1082, 202, 22043, 12, 3682, 1458, 13, 288, 9506, 202, 23184, 18074, 563, 273, 21176, 12224, 18, 4720, 9194, 23184, 12, 3682, 1458, 1769, 6862, 9506, 202, 430, 12, 2088, 18, 291, 14277, 10756, 95, 6862, 202, 759, 2725, 326, 17870, 9389, 6862, 202, 2626, 1768, 12, 314, 5569, 18, 588, 29897, 12224, 9334, 9389, 16, 638, 2 ]
IEnrolment enrollment = (IEnrolment) enrollments.get(i);
IEnrollment enrollment = (IEnrollment) enrollments.get(i);
protected List cloneEnrolmentsToInfoEnrolments(List enrollments) { List infoEnrolments = new ArrayList(); for (int i = 0; i < enrollments.size(); i++) { IEnrolment enrollment = (IEnrolment) enrollments.get(i); InfoEnrolment infoEnrolment = Cloner.copyIEnrolment2InfoEnrolment(enrollment); infoEnrolments.add(infoEnrolment); } return infoEnrolments; }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/b725edc1d4fb8b6b021f161e06df030d1bd829e8/EnrollmentEquivalenceServiceUtils.java/buggy/src/ServidorAplicacao/Servico/equivalence/EnrollmentEquivalenceServiceUtils.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 987, 3236, 664, 922, 1346, 774, 966, 664, 922, 1346, 12, 682, 570, 2693, 1346, 13, 202, 95, 202, 202, 682, 1123, 664, 922, 1346, 273, 394, 2407, 5621, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 570, 2693, 1346, 18, 1467, 5621, 277, 27245, 202, 202, 95, 1082, 202, 45, 664, 922, 475, 25821, 273, 261, 45, 664, 922, 475, 13, 570, 2693, 1346, 18, 588, 12, 77, 1769, 1082, 202, 966, 664, 922, 475, 1123, 664, 922, 475, 273, 3905, 31430, 18, 3530, 45, 664, 922, 475, 22, 966, 664, 922, 475, 12, 275, 17118, 1769, 1082, 202, 1376, 664, 922, 1346, 18, 1289, 12, 1376, 664, 922, 475, 1769, 202, 202, 97, 202, 202, 2463, 1123, 664, 922, 1346, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 987, 3236, 664, 922, 1346, 774, 966, 664, 922, 1346, 12, 682, 570, 2693, 1346, 13, 202, 95, 202, 202, 682, 1123, 664, 922, 1346, 273, 394, 2407, 5621, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 570, 2693, 1346, 18, 1467, 5621, 277, 27245, 202, 202, 95, 1082, 202, 45, 664, 922, 475, 25821, 273, 261, 45, 664, 922, 475, 13, 570, 2693, 1346, 18, 588, 12, 77, 1769, 1082, 202, 966, 664, 922, 475, 1123, 664, 922, 475, 273, 3905, 31430, 18, 3530, 45, 664, 922, 475, 22, 966, 664, 922, 475, 12, 275, 17118, 1769, 1082, 202, 1376, 664, 922, 1346, 18, 1289, 12, 1376, 664, 922, 475, 1769, 202, 2 ]
ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 1, image);
ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 5, image);
public static void addMethodWithConstrNameProposals(IAssistContext context, IProblemLocation problem, Collection proposals) throws CoreException { ICompilationUnit cu= context.getCompilationUnit(); ASTNode selectedNode= problem.getCoveringNode(context); if (selectedNode instanceof MethodDeclaration) { MethodDeclaration declaration= (MethodDeclaration) selectedNode; ASTRewrite rewrite= new ASTRewrite(declaration); rewrite.markAsRemoved(declaration.getReturnType()); String label= CorrectionMessages.getString("ReturnTypeSubProcessor.constrnamemethod.description"); //$NON-NLS-1$ Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 1, image); proposal.ensureNoModifications(); proposals.add(proposal); } }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/028724f56b5d662679496ef7e5232a0390ab1d7b/ReturnTypeSubProcessor.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReturnTypeSubProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 18223, 1190, 442, 701, 461, 626, 22536, 12, 45, 2610, 376, 1042, 819, 16, 467, 13719, 2735, 6199, 16, 2200, 450, 22536, 13, 1216, 30015, 288, 202, 202, 45, 19184, 2802, 15985, 33, 819, 18, 588, 19184, 2802, 5621, 1082, 202, 9053, 907, 3170, 907, 33, 6199, 18, 588, 8084, 310, 907, 12, 2472, 1769, 202, 202, 430, 261, 8109, 907, 1276, 2985, 6094, 13, 288, 1082, 202, 1305, 6094, 8266, 33, 261, 1305, 6094, 13, 3170, 907, 31, 25083, 202, 37, 3902, 12341, 10738, 33, 394, 432, 3902, 12341, 12, 22448, 1769, 1082, 202, 21489, 18, 3355, 1463, 10026, 12, 22448, 18, 588, 9102, 10663, 25083, 202, 780, 1433, 33, 9557, 9329, 5058, 18, 588, 780, 2932, 9102, 1676, 5164, 18, 591, 701, 529, 2039, 18, 3384, 8863, 4329, 3993, 17, 5106, 17, 21, 8, 1082, 202, 2040, 1316, 33, 5110, 3773, 8946, 18, 588, 12, 5852, 3773, 8946, 18, 3445, 43, 67, 9428, 18934, 67, 14473, 1769, 1082, 202, 37, 3902, 12341, 20884, 14592, 14708, 33, 394, 432, 3902, 12341, 20884, 14592, 12, 1925, 16, 15985, 16, 10738, 16, 404, 16, 1316, 1769, 1082, 202, 685, 8016, 18, 15735, 2279, 28340, 5621, 1082, 202, 685, 22536, 18, 1289, 12, 685, 8016, 1769, 202, 202, 97, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 18223, 1190, 442, 701, 461, 626, 22536, 12, 45, 2610, 376, 1042, 819, 16, 467, 13719, 2735, 6199, 16, 2200, 450, 22536, 13, 1216, 30015, 288, 202, 202, 45, 19184, 2802, 15985, 33, 819, 18, 588, 19184, 2802, 5621, 1082, 202, 9053, 907, 3170, 907, 33, 6199, 18, 588, 8084, 310, 907, 12, 2472, 1769, 202, 202, 430, 261, 8109, 907, 1276, 2985, 6094, 13, 288, 1082, 202, 1305, 6094, 8266, 33, 261, 1305, 6094, 13, 3170, 907, 31, 25083, 202, 37, 3902, 12341, 10738, 33, 394, 432, 3902, 12341, 12, 22448, 1769, 1082, 202, 21489, 18, 3355, 1463, 10026, 12, 22448, 18, 588, 9102, 10663, 25083, 202, 780, 1433, 33, 9557, 9329, 5058, 2 ]
numImages = (int) ((file.length() - offset) / (2 * 64 * width * height));
numImages = (int) ((in.length() - offset) / (2 * 64 * width * height));
protected void initFile(String id) throws FormatException, IOException { super.initFile(id); File file = new File(id); in = new RandomAccessStream(id); // skip 14 byte header in.seek(14); // read offset offset = DataTools.read2UnsignedBytes(in, true) + 22; // skip to data in.seek(offset); // compute number of image planes numImages = (int) ((file.length() - offset) / (2 * 64 * width * height)); }
49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/2df09d33bfdc966378aae0cc09cb503afb983bc2/SDTReader.java/clean/loci/formats/in/SDTReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1208, 812, 12, 780, 612, 13, 1216, 4077, 503, 16, 1860, 288, 565, 2240, 18, 2738, 812, 12, 350, 1769, 565, 1387, 585, 273, 394, 1387, 12, 350, 1769, 565, 316, 273, 394, 8072, 1862, 1228, 12, 350, 1769, 565, 368, 2488, 5045, 1160, 1446, 565, 316, 18, 16508, 12, 3461, 1769, 565, 368, 855, 1384, 565, 1384, 273, 1910, 10348, 18, 896, 22, 13290, 2160, 12, 267, 16, 638, 13, 397, 11201, 31, 565, 368, 2488, 358, 501, 565, 316, 18, 16508, 12, 3348, 1769, 565, 368, 3671, 1300, 434, 1316, 31634, 565, 818, 8946, 273, 261, 474, 13, 14015, 267, 18, 2469, 1435, 300, 1384, 13, 342, 261, 22, 380, 5178, 380, 1835, 380, 2072, 10019, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1208, 812, 12, 780, 612, 13, 1216, 4077, 503, 16, 1860, 288, 565, 2240, 18, 2738, 812, 12, 350, 1769, 565, 1387, 585, 273, 394, 1387, 12, 350, 1769, 565, 316, 273, 394, 8072, 1862, 1228, 12, 350, 1769, 565, 368, 2488, 5045, 1160, 1446, 565, 316, 18, 16508, 12, 3461, 1769, 565, 368, 855, 1384, 565, 1384, 273, 1910, 10348, 18, 896, 22, 13290, 2160, 12, 267, 16, 638, 13, 397, 11201, 31, 565, 368, 2488, 358, 501, 565, 316, 18, 16508, 12, 3348, 1769, 565, 368, 3671, 1300, 434, 1316, 31634, 565, 818, 8946, 273, 261, 474, 13, 14015, 267, 18, 2469, 1435, 300, 1384, 13, 342, 261, 22, 380, 5178, 380, 1835, 380, 2 ]
releaseLock(conn, LOCK_TRIGGER_ACCESS, transOwner); closeConnection(conn);
try { releaseLock(conn, LOCK_TRIGGER_ACCESS, transOwner); } finally { closeConnection(conn); }
public void resumeTriggerGroup(SchedulingContext ctxt, String groupName) throws JobPersistenceException { Connection conn = getConnection(); boolean transOwner = false; try { getLockHandler().obtainLock(conn, LOCK_TRIGGER_ACCESS); transOwner = true; //getLockHandler().obtainLock(conn, LOCK_JOB_ACCESS); resumeTriggerGroup(conn, ctxt, groupName); commitConnection(conn); } catch (JobPersistenceException e) { rollbackConnection(conn); throw e; } finally { releaseLock(conn, LOCK_TRIGGER_ACCESS, transOwner); closeConnection(conn); } }
3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/a1e34efab77120ec8bb75b6dd44ed5d8a9b59918/JobStoreTX.java/buggy/src/java/org/quartz/impl/jdbcjobstore/JobStoreTX.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 10774, 6518, 1114, 12, 25401, 1042, 14286, 16, 514, 11619, 13, 5411, 1216, 3956, 13182, 503, 288, 3639, 4050, 1487, 273, 6742, 5621, 3639, 1250, 906, 5541, 273, 629, 31, 3639, 775, 288, 5411, 22206, 1503, 7675, 947, 5977, 2531, 12, 4646, 16, 14631, 67, 6566, 27399, 67, 13204, 1769, 5411, 906, 5541, 273, 638, 31, 5411, 368, 588, 2531, 1503, 7675, 947, 5977, 2531, 12, 4646, 16, 14631, 67, 18321, 67, 13204, 1769, 5411, 10774, 6518, 1114, 12, 4646, 16, 14286, 16, 11619, 1769, 5411, 3294, 1952, 12, 4646, 1769, 3639, 289, 1044, 261, 2278, 13182, 503, 425, 13, 288, 5411, 8006, 1952, 12, 4646, 1769, 5411, 604, 425, 31, 3639, 289, 3095, 288, 5411, 3992, 2531, 12, 4646, 16, 14631, 67, 6566, 27399, 67, 13204, 16, 906, 5541, 1769, 8227, 1746, 1952, 12, 4646, 1769, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 10774, 6518, 1114, 12, 25401, 1042, 14286, 16, 514, 11619, 13, 5411, 1216, 3956, 13182, 503, 288, 3639, 4050, 1487, 273, 6742, 5621, 3639, 1250, 906, 5541, 273, 629, 31, 3639, 775, 288, 5411, 22206, 1503, 7675, 947, 5977, 2531, 12, 4646, 16, 14631, 67, 6566, 27399, 67, 13204, 1769, 5411, 906, 5541, 273, 638, 31, 5411, 368, 588, 2531, 1503, 7675, 947, 5977, 2531, 12, 4646, 16, 14631, 67, 18321, 67, 13204, 1769, 5411, 10774, 6518, 1114, 12, 4646, 16, 14286, 16, 11619, 1769, 5411, 3294, 1952, 12, 4646, 1769, 3639, 289, 1044, 261, 2278, 13182, 503, 425, 13, 288, 5411, 8006, 1952, 12, 4646, 1769, 5411, 604, 425, 31, 3639, 289, 3095, 288, 5411, 2 ]
c = in.read();
c = getChar();
public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) break; } } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; if (c != '-' && c != '\n') flags |= TSF_DIRTYLINE; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; c = '\\'; in.unread(); } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = in.read(); if (c == '\\') { c = in.read(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (!Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } in.unread(); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); } } } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { base = 16; c = in.read(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = in.read(); } } else { while ('0' <= c && c <= '9') { /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } addToString(c); c = in.read(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = in.read(); if (c == '+' || c == '-') { addToString(c); c = in.read(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = getStringFromBuffer(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. int quoteChar = c; int val = 0; stringBufferTop = 0; c = in.read(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character c = in.read(); switch (c) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. */ int escapeStart = stringBufferTop; addToString('u'); int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; } break; case 'x': { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ c = in.read(); int escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } } break; default: if ('0' <= c && c < '8') { val = c - '0'; c = in.read(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = in.read(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only if // the resulting val <= 0377 val = 8 * val + c - '0'; c = in.read(); } } in.unread(); c = val; } } } addToString(c); c = in.read(); } this.string = getStringFromBuffer(); return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { skipLine(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { skipLine(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = in.read(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (in.match('g')) addToString('g'); else if (in.match('i')) addToString('i'); else if (in.match('m')) addToString('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } if (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (in.match('=')) { this.op = ADD; return ASSIGN; } else if (in.match('+')) { return INC; } else { return ADD; } case '-': if (in.match('=')) { this.op = SUB; c = ASSIGN; } else if (in.match('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (in.match('>')) { skipLine(); return getToken(); } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/8d78476dde863807579dcd20202decfcfcc9f7f1/TokenStream.java/buggy/js/rhino/src/org/mozilla/javascript/TokenStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, 13, 288, 5411, 509, 563, 273, 333, 18, 6206, 823, 1345, 31, 5411, 333, 18, 6206, 823, 1345, 273, 6431, 31, 5411, 327, 563, 31, 3639, 289, 3639, 368, 512, 270, 7983, 16, 10016, 16692, 358, 19181, 18, 3639, 741, 288, 5411, 276, 273, 23577, 5621, 5411, 309, 261, 71, 422, 2337, 82, 6134, 288, 7734, 2943, 12058, 4871, 8047, 42, 67, 4537, 5538, 5997, 31, 7734, 309, 14015, 7133, 473, 15508, 42, 67, 12917, 5997, 55, 13, 480, 374, 13, 10792, 898, 31, 5411, 289, 3639, 289, 1323, 261, 291, 46, 1260, 909, 12, 71, 13, 747, 276, 422, 2337, 82, 8284, 3639, 309, 261, 71, 422, 6431, 67, 7305, 13, 5411, 327, 6431, 31, 3639, 309, 261, 71, 480, 4014, 597, 276, 480, 2337, 82, 6134, 5411, 2943, 5626, 15508, 42, 67, 4537, 5538, 5997, 31, 3639, 368, 2756, 19, 11041, 19, 1336, 792, 35, 3639, 368, 4267, 596, 364, 5023, 598, 279, 411, 823, 12877, 34, 3639, 1250, 2756, 1685, 31, 3639, 1250, 353, 16532, 8448, 1685, 273, 629, 31, 3639, 309, 261, 71, 422, 5282, 13, 288, 5411, 276, 273, 23577, 5621, 5411, 309, 261, 71, 422, 296, 89, 6134, 288, 7734, 2756, 1685, 273, 638, 31, 7734, 353, 16532, 8448, 1685, 273, 638, 31, 7734, 533, 1892, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, 13, 288, 5411, 509, 563, 273, 333, 18, 6206, 823, 1345, 31, 5411, 333, 18, 6206, 823, 1345, 273, 6431, 31, 5411, 327, 563, 31, 3639, 289, 3639, 368, 512, 270, 7983, 16, 10016, 16692, 358, 19181, 18, 3639, 741, 288, 5411, 276, 273, 23577, 5621, 5411, 309, 261, 71, 422, 2337, 82, 6134, 288, 7734, 2943, 12058, 4871, 8047, 42, 67, 4537, 5538, 5997, 31, 7734, 309, 14015, 7133, 473, 15508, 42, 67, 12917, 5997, 55, 13, 480, 374, 13, 10792, 898, 31, 2 ]
protected void placeImage(int x, int y, int w, int h, int xobj) {
protected void placeImage(float x, float y, float w, float h, int xobj) {
protected void placeImage(int x, int y, int w, int h, int xobj) { saveGraphicsState(); currentStream.add(((float) w) + " 0 0 " + ((float) -h) + " " + (((float) currentIPPosition) / 1000f + x) + " " + (((float)(currentBPPosition + 1000 * h)) / 1000f + y) + " cm\n" + "/Im" + xobj + " Do\n"); restoreGraphicsState(); }
5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/639073c8e56acdc1ba6b7f06774016a580456afc/PDFRenderer.java/clean/src/java/org/apache/fop/render/pdf/PDFRenderer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 3166, 2040, 12, 5659, 619, 16, 1431, 677, 16, 1431, 341, 16, 1431, 366, 16, 509, 619, 2603, 13, 288, 3639, 1923, 17558, 1119, 5621, 3639, 783, 1228, 18, 1289, 12443, 12, 5659, 13, 341, 13, 397, 315, 374, 374, 315, 12900, 397, 14015, 5659, 13, 300, 76, 13, 397, 315, 315, 12900, 397, 261, 12443, 5659, 13, 783, 2579, 2555, 13, 342, 4336, 74, 397, 619, 13, 397, 315, 315, 12900, 397, 261, 12443, 5659, 21433, 2972, 30573, 2555, 397, 4336, 380, 366, 3719, 342, 4336, 74, 12900, 397, 677, 13, 397, 315, 5003, 64, 82, 6, 397, 2206, 1170, 6, 397, 619, 2603, 397, 315, 2256, 64, 82, 8863, 3639, 5217, 17558, 1119, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 3166, 2040, 12, 5659, 619, 16, 1431, 677, 16, 1431, 341, 16, 1431, 366, 16, 509, 619, 2603, 13, 288, 3639, 1923, 17558, 1119, 5621, 3639, 783, 1228, 18, 1289, 12443, 12, 5659, 13, 341, 13, 397, 315, 374, 374, 315, 12900, 397, 14015, 5659, 13, 300, 76, 13, 397, 315, 315, 12900, 397, 261, 12443, 5659, 13, 783, 2579, 2555, 13, 342, 4336, 74, 397, 619, 13, 397, 315, 315, 12900, 397, 261, 12443, 5659, 21433, 2972, 30573, 2555, 397, 4336, 380, 366, 3719, 342, 4336, 74, 12900, 397, 677, 13, 397, 315, 5003, 64, 82, 6, 397, 2206, 1170, 6, 397, 619, 2603, 397, 315, 2256, 64, 82, 8863, 3639, 5217, 17558, 1119, 5621, 2 ]
params.add(buildParameter(sql.length()-1, columns[i], currentRow[i]));
params.add(buildParameter(sql.length() - 1, columns[i], currentRow[i], connection.isUseUnicode()));
ParamInfo[] buildWhereClause(StringBuffer sql, ArrayList params, boolean select) throws SQLException { // // Now construct where clause // sql.append(" WHERE "); if (cursorName != null) { // // Use a positioned update // sql.append(" CURRENT OF ").append(cursorName); } else { int count = 0; for (int i = 0; i < columns.length; i++) { if (currentRow[i] == null) { if (!columns[i].sqlType.equals("text") && !columns[i].sqlType.equals("ntext") && !columns[i].sqlType.equals("image") && columns[i].tableName != null) { if (count > 0) { sql.append(" AND "); } sql.append(columns[i].realName); sql.append(" IS NULL"); } } else { if (isKeyed && select) { // For refresh select only include key columns if (columns[i].isKey) { if (count > 0) { sql.append(" AND "); } sql.append(columns[i].realName); sql.append("=?"); count++; params.add(buildParameter(sql.length()-1, columns[i], currentRow[i])); } } else { // Include all available 'searchable' columns in updates/deletes to protect // against lost updates. if (!columns[i].sqlType.equals("text") && !columns[i].sqlType.equals("ntext") && !columns[i].sqlType.equals("image") && columns[i].tableName != null) { if (count > 0) { sql.append(" AND "); } sql.append(columns[i].realName); sql.append("=?"); count++; params.add(buildParameter(sql.length()-1, columns[i], currentRow[i])); } } } } } return (ParamInfo[]) params.toArray(new ParamInfo[params.size()]); }
2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/6ebdc74a0dbe4206c2ef3ac527d5314ab4a56433/CachedResultSet.java/buggy/src/main/net/sourceforge/jtds/jdbc/CachedResultSet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3014, 966, 8526, 1361, 5262, 7044, 12, 780, 1892, 1847, 16, 2407, 859, 16, 1250, 2027, 13, 5411, 1216, 6483, 288, 3639, 368, 3639, 368, 4494, 4872, 1625, 6591, 3639, 368, 3639, 1847, 18, 6923, 2932, 4852, 315, 1769, 3639, 309, 261, 9216, 461, 480, 446, 13, 288, 5411, 368, 5411, 368, 2672, 279, 1754, 329, 1089, 5411, 368, 5411, 1847, 18, 6923, 2932, 18484, 15932, 315, 2934, 6923, 12, 9216, 461, 1769, 3639, 289, 469, 288, 5411, 509, 1056, 273, 374, 31, 5411, 364, 261, 474, 277, 273, 374, 31, 277, 411, 2168, 18, 2469, 31, 277, 27245, 288, 7734, 309, 261, 2972, 1999, 63, 77, 65, 422, 446, 13, 288, 10792, 309, 16051, 5112, 63, 77, 8009, 4669, 559, 18, 14963, 2932, 955, 7923, 18701, 597, 401, 5112, 63, 77, 8009, 4669, 559, 18, 14963, 2932, 496, 408, 7923, 18701, 597, 401, 5112, 63, 77, 8009, 4669, 559, 18, 14963, 2932, 2730, 7923, 18701, 597, 2168, 63, 77, 8009, 18033, 480, 446, 13, 288, 13491, 309, 261, 1883, 405, 374, 13, 288, 18701, 1847, 18, 6923, 2932, 4116, 315, 1769, 13491, 289, 13491, 1847, 18, 6923, 12, 5112, 63, 77, 8009, 7688, 461, 1769, 13491, 1847, 18, 6923, 2932, 4437, 3206, 8863, 10792, 289, 7734, 289, 469, 288, 10792, 309, 261, 291, 653, 329, 597, 2027, 13, 288, 13491, 368, 2457, 4460, 2027, 1338, 2341, 498, 2168, 13491, 309, 261, 5112, 63, 77, 8009, 291, 653, 13, 288, 18701, 309, 261, 1883, 405, 374, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3014, 966, 8526, 1361, 5262, 7044, 12, 780, 1892, 1847, 16, 2407, 859, 16, 1250, 2027, 13, 5411, 1216, 6483, 288, 3639, 368, 3639, 368, 4494, 4872, 1625, 6591, 3639, 368, 3639, 1847, 18, 6923, 2932, 4852, 315, 1769, 3639, 309, 261, 9216, 461, 480, 446, 13, 288, 5411, 368, 5411, 368, 2672, 279, 1754, 329, 1089, 5411, 368, 5411, 1847, 18, 6923, 2932, 18484, 15932, 315, 2934, 6923, 12, 9216, 461, 1769, 3639, 289, 469, 288, 5411, 509, 1056, 273, 374, 31, 5411, 364, 261, 474, 277, 273, 374, 31, 277, 411, 2168, 18, 2469, 31, 277, 27245, 288, 7734, 309, 261, 2972, 1999, 63, 77, 65, 422, 446, 13, 288, 10792, 309, 16051, 5112, 63, 77, 2 ]
return entry.m_vertex;
return node.getData().m_vertex;
protected V provideNextVertex() { QueueEntry<V, E> entry = (QueueEntry<V,E>) m_heap.removeMin(); entry.m_frozen = true; return entry.m_vertex; }
4188 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4188/3358959abc414f2281c71486c6c1a90935b1e909/ClosestFirstIterator.java/clean/src/org/jgrapht/traverse/ClosestFirstIterator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 776, 5615, 2134, 6475, 1435, 565, 288, 3639, 7530, 1622, 32, 58, 16, 512, 34, 1241, 273, 261, 26486, 32, 58, 16, 41, 23429, 312, 67, 25506, 18, 4479, 2930, 5621, 3639, 1241, 18, 81, 67, 28138, 273, 638, 31, 3639, 327, 756, 18, 588, 751, 7675, 81, 67, 15281, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 776, 5615, 2134, 6475, 1435, 565, 288, 3639, 7530, 1622, 32, 58, 16, 512, 34, 1241, 273, 261, 26486, 32, 58, 16, 41, 23429, 312, 67, 25506, 18, 4479, 2930, 5621, 3639, 1241, 18, 81, 67, 28138, 273, 638, 31, 3639, 327, 756, 18, 588, 751, 7675, 81, 67, 15281, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
EclipseSourceDir[] sourceDirs, ArtifactRepository localRepository )
EclipseSourceDir[] sourceDirs, ArtifactRepository localRepository )
protected void write( File basedir, MavenProject project, List referencedReactorArtifacts, EclipseSourceDir[] sourceDirs, ArtifactRepository localRepository ) throws MojoExecutionException { FileWriter w; try { w = new FileWriter( new File( basedir, ".wtpmodules" ) ); //$NON-NLS-1$ } catch ( IOException ex ) { throw new MojoExecutionException( Messages.getString( "EclipsePlugin.erroropeningfile" ), ex ); //$NON-NLS-1$ } XMLWriter writer = new PrettyPrintXMLWriter( w ); writer.startElement( "project-modules" ); //$NON-NLS-1$ writer.addAttribute( "id", "moduleCoreId" ); //$NON-NLS-1$ //$NON-NLS-2$ writer.startElement( "wb-module" ); //$NON-NLS-1$ writer.addAttribute( "deploy-name", project.getArtifactId() ); //$NON-NLS-1$ writer.startElement( "module-type" ); //$NON-NLS-1$ if ( "war".equals( project.getPackaging() ) ) //$NON-NLS-1$ { // <module-type module-type-id="jst.web"> // <version>2.4</version> // <property name="context-root" value="magnolia"> // </property> // </module-type> writer.addAttribute( "module-type-id", "jst.web" ); //$NON-NLS-1$ //$NON-NLS-2$ writer.startElement( "version" ); //$NON-NLS-1$ // defaults to 2.4, try to detect real version from dependencies String servletVersion = "2.4"; //$NON-NLS-1$ for ( Iterator it = project.getArtifacts().iterator(); it.hasNext(); ) { Artifact artifact = (Artifact) it.next(); if ( "servletapi".equals( artifact.getArtifactId() ) //$NON-NLS-1$ || "geronimo-spec-servlet".equals( artifact.getArtifactId() ) ) //$NON-NLS-1$ { servletVersion = StringUtils.substring( artifact.getVersion(), 0, 3 ); } } writer.writeText( servletVersion ); writer.endElement(); writer.startElement( "property" ); //$NON-NLS-1$ writer.addAttribute( "name", "context-root" ); //$NON-NLS-1$ //$NON-NLS-2$ writer.addAttribute( "value", project.getArtifactId() ); //$NON-NLS-1$ writer.endElement(); } else if ( "ejb".equals( project.getPackaging() ) ) //$NON-NLS-1$ { // <module-type module-type-id="jst.ejb"> // <version>2.1</version> // <property name="java-output-path" value="/bin/"/> // </module-type> writer.addAttribute( "module-type-id", "jst.ejb" ); //$NON-NLS-1$ //$NON-NLS-2$ writer.startElement( "version" ); //$NON-NLS-1$ writer.writeText( "2.1" ); //$NON-NLS-1$ // @todo this is the default, find real ejb version from dependencies writer.endElement(); writer.startElement( "property" ); //$NON-NLS-1$ writer.addAttribute( "name", "java-output-path" ); //$NON-NLS-1$ //$NON-NLS-2$ writer.addAttribute( "value", "/" + //$NON-NLS-1$ //$NON-NLS-2$ EclipseUtils.toRelativeAndFixSeparator( project.getBasedir(), project.getBuild().getOutputDirectory(), false ) ); writer.endElement(); } else { // <module-type module-type-id="jst.utility"> // <property name="java-output-path" value="/bin/"/> // </module-type> writer.addAttribute( "module-type-id", "jst.utility" ); //$NON-NLS-1$ //$NON-NLS-2$ writer.startElement( "property" ); //$NON-NLS-1$ writer.addAttribute( "name", "java-output-path" ); //$NON-NLS-1$ //$NON-NLS-2$ writer.addAttribute( "value", "/" + //$NON-NLS-1$ //$NON-NLS-2$ EclipseUtils.toRelativeAndFixSeparator( project.getBasedir(), project.getBuild().getOutputDirectory(), false ) ); writer.endElement(); } writer.endElement(); // module-type // source and resource paths. // deploy-path is "/" for utility and ejb projects, "/WEB-INF/classes" for webapps String target = "/"; //$NON-NLS-1$ if ( "war".equals( project.getPackaging() ) ) //$NON-NLS-1$ { writeWarSpecificResources( writer, basedir, project, referencedReactorArtifacts, localRepository ); target = "/WEB-INF/classes"; //$NON-NLS-1$ } for ( int j = 0; j < sourceDirs.length; j++ ) { EclipseSourceDir dir = sourceDirs[j]; // test src/resources are not added to wtpmodules if ( !dir.isTest() ) { // <wb-resource deploy-path="/" source-path="/src/java" /> writer.startElement( "wb-resource" ); //$NON-NLS-1$ writer.addAttribute( "deploy-path", target ); //$NON-NLS-1$ writer.addAttribute( "source-path", dir.getPath() ); //$NON-NLS-1$ writer.endElement(); } } writer.endElement(); // wb-module writer.endElement(); // project-modules IOUtil.close( w ); }
1315 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1315/ea3a153a9579791fa4842c8da385a020ae3a9b30/EclipseWtpmodulesWriter.java/clean/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseWtpmodulesWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1045, 12, 1387, 15573, 16, 17176, 4109, 1984, 16, 987, 8042, 426, 3362, 16981, 16, 12900, 20840, 10472, 1830, 1621, 8526, 1084, 9872, 16, 14022, 3305, 1191, 3305, 262, 3639, 1216, 18780, 565, 288, 3639, 24639, 341, 31, 3639, 775, 3639, 288, 5411, 341, 273, 394, 24639, 12, 394, 1387, 12, 15573, 16, 3552, 6046, 84, 6400, 6, 262, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 289, 3639, 1044, 261, 1860, 431, 262, 3639, 288, 5411, 604, 394, 18780, 12, 4838, 18, 588, 780, 12, 315, 23057, 10472, 3773, 18, 1636, 3190, 310, 768, 6, 262, 16, 4766, 2868, 431, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 289, 3639, 3167, 2289, 2633, 273, 394, 22328, 5108, 4201, 2289, 12, 341, 11272, 3639, 2633, 18, 1937, 1046, 12, 315, 4406, 17, 6400, 6, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 2633, 18, 1289, 1499, 12, 315, 350, 3113, 315, 2978, 4670, 548, 6, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 4329, 3993, 17, 5106, 17, 22, 8, 3639, 2633, 18, 1937, 1046, 12, 315, 9464, 17, 2978, 6, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 2633, 18, 1289, 1499, 12, 315, 12411, 17, 529, 3113, 1984, 18, 588, 7581, 548, 1435, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 2633, 18, 1937, 1046, 12, 315, 2978, 17, 723, 6, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 309, 261, 315, 905, 9654, 14963, 12, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 12, 1387, 15573, 16, 17176, 4109, 1984, 16, 987, 8042, 426, 3362, 16981, 16, 12900, 20840, 10472, 1830, 1621, 8526, 1084, 9872, 16, 14022, 3305, 1191, 3305, 262, 3639, 1216, 18780, 565, 288, 3639, 24639, 341, 31, 3639, 775, 3639, 288, 5411, 341, 273, 394, 24639, 12, 394, 1387, 12, 15573, 16, 3552, 6046, 84, 6400, 6, 262, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 289, 3639, 1044, 261, 1860, 431, 262, 3639, 288, 5411, 604, 394, 18780, 12, 4838, 18, 588, 780, 12, 315, 23057, 10472, 3773, 18, 1636, 3190, 310, 768, 6, 262, 16, 4766, 2868, 431, 11272, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 289, 3639, 3167, 2289, 2633, 2 ]
setReuseItems(false);
setReuseItems(true);
public RowListView(MarkupContainer parent, String id, MenuRowModel model) { super(parent, id, model); setReuseItems(false); }
51612 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51612/c764d9e8a1d50b79fbacc5f3ab6d7668f3b048bd/MenuRow.java/buggy/wicket-contrib-navmenu/src/java/wicket/contrib/markup/html/navmenu/MenuRow.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 6556, 682, 1767, 12, 13111, 2170, 982, 16, 514, 612, 16, 9809, 1999, 1488, 938, 13, 202, 202, 95, 1082, 202, 9565, 12, 2938, 16, 612, 16, 938, 1769, 1082, 202, 542, 31704, 3126, 12, 5743, 1769, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 6556, 682, 1767, 12, 13111, 2170, 982, 16, 514, 612, 16, 9809, 1999, 1488, 938, 13, 202, 202, 95, 1082, 202, 9565, 12, 2938, 16, 612, 16, 938, 1769, 1082, 202, 542, 31704, 3126, 12, 5743, 1769, 202, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
field.setFloat(obj, val);
field.setFloat(obj, val);
final void setFloatField(Object obj, float val) { try { field.setFloat(obj, val); } catch(IllegalAccessException x) { throw new InternalError(x.getMessage()); } }
13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/126d7770c7bb5b9c74598afb0864a336d457fd92/ObjectStreamField.java/clean/libjava/java/io/ObjectStreamField.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 918, 444, 4723, 974, 12, 921, 1081, 16, 1431, 1244, 13, 225, 288, 1377, 775, 1377, 288, 202, 225, 652, 18, 542, 4723, 12, 2603, 16, 1244, 1769, 1377, 289, 1377, 1044, 12, 12195, 9773, 619, 13, 1377, 288, 202, 225, 604, 394, 3186, 668, 12, 92, 18, 24906, 10663, 1377, 289, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 918, 444, 4723, 974, 12, 921, 1081, 16, 1431, 1244, 13, 225, 288, 1377, 775, 1377, 288, 202, 225, 652, 18, 542, 4723, 12, 2603, 16, 1244, 1769, 1377, 289, 1377, 1044, 12, 12195, 9773, 619, 13, 1377, 288, 202, 225, 604, 394, 3186, 668, 12, 92, 18, 24906, 10663, 1377, 289, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex)
try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex )
final void computeAxisStartEndShifts(IDisplayServer xs, Label la, int iOrientation, int iLocation, AllAxes aax) throws GenerationException { final double dMaxSS = (aax != null && iOrientation == aax.getOrientation()) ? aax.getMaxStartShift() : 0; final double dMaxES = (aax != null && iOrientation == aax.getOrientation()) ? aax.getMaxEndShift() : 0; if (!la.isVisible()) { dStartShift = dMaxSS; dEndShift = dMaxES; return; } if (getType() == TEXT || bCategoryScale) { // COMPUTE THE BOUNDING BOXES FOR FIRST AND LAST LABEL TO ADJUST // START/END OF X-AXIS final double dUnitSize = getUnitSize(); final DataSetIterator dsi = getData(); final int iDateTimeUnit = (getType() == IConstants.DATE_TIME) ? CDateTime.computeUnit(dsi) : IConstants.UNDEFINED; // ADJUST THE START POSITION la.getCaption().setValue(formatCategoryValue(getType(), dsi.first(), iDateTimeUnit)); BoundingBox bb = null; try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dStartShift = Math.max(dMaxSS, (dUnitSize > bb.getHeight()) ? 0 : (bb.getHeight() - dUnitSize) / 2); } else if (iOrientation == HORIZONTAL) // HORIZONTAL AXIS { dStartShift = Math.max(dMaxSS, (dUnitSize > bb.getWidth()) ? 0 : (bb.getWidth() - dUnitSize) / 2); } // ADJUST THE END POSITION la.getCaption().setValue(formatCategoryValue(getType(), dsi.last(), iDateTimeUnit)); try { bb = computeBox(xs, iLocation, la, 0, dEnd); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dEndShift = Math.max(dMaxES, (dUnitSize > bb.getHeight()) ? 0 : (bb.getHeight() - dUnitSize) / 2); } else if (iOrientation == HORIZONTAL) // HORIZONTAL AXIS { dEndShift = Math.max(dMaxES, (dUnitSize > bb.getWidth()) ? 0 : (bb.getWidth() - dUnitSize) / 2); } } else if ((iType & NUMERICAL) == NUMERICAL) { if ((iType & LINEAR) == LINEAR) { // ADJUST THE START POSITION DecimalFormat df = null; if (fs == null) // ONLY COMPUTE INTERNALLY IF FORMAT SPECIFIER ISN'T DEFINED { df = new DecimalFormat(getNumericPattern()); } String sValue = null; try { sValue = ValueFormatter.format(getMinimum(), fs, lcl, df); } catch (DataFormatException dfex ) { DefaultLoggerImpl.instance().log(dfex); sValue = IConstants.NULL_STRING; } la.getCaption().setValue(sValue); BoundingBox bb = null; try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dStartShift = Math.max(dMaxSS, (bb.getHeight() - bb.getHotPoint())); } else if (iOrientation == HORIZONTAL) { dStartShift = Math.max(dMaxSS, bb.getHotPoint()); } // ADJUST THE END POSITION try { sValue = ValueFormatter.format(getMaximum(), fs, lcl, df); } catch (DataFormatException dfex ) { DefaultLoggerImpl.instance().log(dfex); sValue = IConstants.NULL_STRING; } la.getCaption().setValue(sValue); try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dEndShift = Math.max(dMaxES, bb.getHotPoint()); } else if (iOrientation == HORIZONTAL) { dEndShift = Math.max(dMaxES, (bb.getWidth() - bb.getHotPoint())); } } else if ((iType & LOGARITHMIC) == LOGARITHMIC) { // ADJUST THE START POSITION final double dMinimum = asDouble(getMinimum()).doubleValue(); DecimalFormat df = null; if (fs == null) // ONLY COMPUTE INTERNALLY IF FORMAT SPECIFIER ISN'T DEFINED { df = new DecimalFormat(getNumericPattern(dMinimum)); } String sValue = null; try { sValue = ValueFormatter.format(getMinimum(), fs, lcl, df); } catch (DataFormatException dfex ) { DefaultLoggerImpl.instance().log(dfex); sValue = IConstants.NULL_STRING; } la.getCaption().setValue(sValue); BoundingBox bb = null; try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dStartShift = Math.max(dMaxSS, (bb.getHeight() - bb.getHotPoint())); } else if (iOrientation == HORIZONTAL) { dStartShift = Math.max(dMaxSS, bb.getHotPoint()); } // ADJUST THE END POSITION final double dMaximum = asDouble(getMaximum()).doubleValue(); if (fs == null) // ONLY COMPUTE INTERNALLY (DIFFERENT FROM MINIMUM) IF FORMAT SPECIFIER ISN'T DEFINED { df = new DecimalFormat(getNumericPattern(dMaximum)); } try { sValue = ValueFormatter.format(getMaximum(), fs, lcl, df); } catch (DataFormatException dfex ) { DefaultLoggerImpl.instance().log(dfex); sValue = IConstants.NULL_STRING; } la.getCaption().setValue(sValue); try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dEndShift = Math.max(dMaxES, bb.getHotPoint()); } else if (iOrientation == HORIZONTAL) { dEndShift = Math.max(dMaxES, (bb.getWidth() - bb.getHotPoint())); } } } else if (getType() == DATE_TIME) { // COMPUTE THE BOUNDING BOXES FOR FIRST AND LAST LABEL TO ADJUST // START/END OF X-AXIS double dUnitSize = getUnitSize(); CDateTime cdt = asDateTime(getMinimum()); final int iUnit = asInteger(oUnit); SimpleDateFormat sdf = null; String sText = null; if (fs != null) // ONLY COMPUTE INTERNALLY IF FORMAT SPECIFIER ISN'T DEFINED { sdf = new SimpleDateFormat(CDateTime.getPreferredFormat(iUnit)); } // ADJUST THE START POSITION try { sText = ValueFormatter.format(cdt, fs, lcl, sdf); } catch (DataFormatException dfex ) { DefaultLoggerImpl.instance().log(dfex); sText = IConstants.NULL_STRING; } la.getCaption().setValue(sText); BoundingBox bb = null; try { bb = computeBox(xs, iLocation, la, 0, 0); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dStartShift = Math.max(dMaxSS, (bb.getHeight() - bb.getHotPoint())); } else if (iOrientation == HORIZONTAL) { dStartShift = Math.max(dMaxSS, bb.getHotPoint()); } // ADJUST THE END POSITION cdt = asDateTime(getMaximum()); try { sText = ValueFormatter.format(cdt, fs, lcl, sdf); } catch (DataFormatException dfex ) { DefaultLoggerImpl.instance().log(dfex); sText = IConstants.NULL_STRING; } la.getCaption().setValue(sText); try { bb = computeBox(xs, iLocation, la, 0, dEnd); } catch (UnexpectedInputException uiex) { throw new GenerationException(uiex); } if (iOrientation == VERTICAL) // VERTICAL AXIS { dEndShift = Math.max(dMaxES, bb.getHotPoint()); } else if (iOrientation == HORIZONTAL) { dEndShift = Math.max(dMaxES, (bb.getWidth() - bb.getHotPoint())); } } }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/AutoScale.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 727, 918, 3671, 6558, 1685, 1638, 10544, 87, 12, 734, 291, 1601, 2081, 9280, 16, 5287, 7125, 16, 509, 277, 14097, 16, 509, 277, 2735, 16, 4826, 26494, 279, 651, 13, 1216, 23234, 503, 565, 288, 3639, 727, 1645, 302, 2747, 1260, 273, 261, 69, 651, 480, 446, 597, 277, 14097, 422, 279, 651, 18, 588, 14097, 10756, 692, 279, 651, 18, 588, 2747, 1685, 10544, 1435, 294, 374, 31, 3639, 727, 1645, 302, 2747, 3991, 273, 261, 69, 651, 480, 446, 597, 277, 14097, 422, 279, 651, 18, 588, 14097, 10756, 692, 279, 651, 18, 588, 2747, 1638, 10544, 1435, 294, 374, 31, 3639, 309, 16051, 11821, 18, 291, 6207, 10756, 3639, 288, 5411, 302, 1685, 10544, 273, 302, 2747, 1260, 31, 5411, 302, 1638, 10544, 273, 302, 2747, 3991, 31, 5411, 327, 31, 3639, 289, 3639, 309, 261, 588, 559, 1435, 422, 9204, 747, 324, 4457, 5587, 13, 3639, 288, 5411, 368, 13846, 9099, 12786, 9784, 5240, 1360, 9784, 60, 3991, 12108, 21786, 4116, 15612, 18210, 8493, 11738, 46, 5996, 5411, 368, 10485, 19, 4415, 15932, 1139, 17, 25614, 5411, 727, 1645, 302, 2802, 1225, 273, 19194, 1225, 5621, 5411, 727, 14065, 3198, 3780, 77, 273, 4303, 5621, 5411, 727, 509, 277, 5096, 2802, 273, 261, 588, 559, 1435, 422, 467, 2918, 18, 4594, 67, 4684, 13, 692, 385, 5096, 18, 9200, 2802, 12, 2377, 77, 13, 7734, 294, 467, 2918, 18, 2124, 15544, 31, 5411, 368, 11738, 46, 5996, 12786, 10485, 26808, 5411, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 727, 918, 3671, 6558, 1685, 1638, 10544, 87, 12, 734, 291, 1601, 2081, 9280, 16, 5287, 7125, 16, 509, 277, 14097, 16, 509, 277, 2735, 16, 4826, 26494, 279, 651, 13, 1216, 23234, 503, 565, 288, 3639, 727, 1645, 302, 2747, 1260, 273, 261, 69, 651, 480, 446, 597, 277, 14097, 422, 279, 651, 18, 588, 14097, 10756, 692, 279, 651, 18, 588, 2747, 1685, 10544, 1435, 294, 374, 31, 3639, 727, 1645, 302, 2747, 3991, 273, 261, 69, 651, 480, 446, 597, 277, 14097, 422, 279, 651, 18, 588, 14097, 10756, 692, 279, 651, 18, 588, 2747, 1638, 10544, 1435, 294, 374, 31, 3639, 309, 16051, 11821, 18, 291, 6207, 10756, 3639, 288, 5411, 302, 1685, 10544, 2 ]
} if (domain_id == 0) { throw new ParseFailedException("Expected -n<domain_id>");
public void parse(Defaults d, LinkedList args) throws ParseFailedException, CommandFailedException { String vd_key = getStringParameter(args, 'k', ""); String partition_name = getStringParameter(args, 'p', ""); int domain_id = getIntParameter(args, 'n', d.domainNumber); int vbd_num = getIntParameter(args, 'v', -1); boolean write = getFlagParameter(args, 'w'); int subst = getIntParameter(args, 'x', -1); if (vd_key.equals("") && partition_name.equals("")) { throw new ParseFailedException("Expected -k<key> or -p<partition>"); } if (domain_id == 0) { throw new ParseFailedException("Expected -n<domain_id>"); } if (vbd_num == -1) { throw new ParseFailedException("Expected -v<vbd_num>"); } Mode mode; if (write) { mode = Mode.READ_WRITE; } else { mode = Mode.READ_ONLY; } loadState(); String output; if (vd_key.equals("")) { output = new CommandVbdCreatePhysical(d, partition_name, domain_id, vbd_num, mode, subst ).execute(); } else { output = new CommandVbdCreate(vd_key, domain_id, vbd_num, mode).execute(); } if (output != null) { System.out.println(output); } saveState(); }
6086 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6086/16c1819d6de9f52ef2b9de24318cc5cdb37cbf9d/ParseVbdCreate.java/buggy/tools/control/src/org/xenoserver/cmdline/ParseVbdCreate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 12, 7019, 302, 16, 10688, 833, 13, 3639, 1216, 2884, 12417, 16, 3498, 12417, 288, 3639, 514, 21161, 67, 856, 273, 4997, 1662, 12, 1968, 16, 296, 79, 2187, 1408, 1769, 3639, 514, 3590, 67, 529, 273, 4997, 1662, 12, 1968, 16, 296, 84, 2187, 1408, 1769, 3639, 509, 2461, 67, 350, 273, 8145, 1662, 12, 1968, 16, 296, 82, 2187, 302, 18, 4308, 1854, 1769, 3639, 509, 331, 16410, 67, 2107, 273, 8145, 1662, 12, 1968, 16, 296, 90, 2187, 300, 21, 1769, 3639, 1250, 1045, 273, 336, 4678, 1662, 12, 1968, 16, 296, 91, 8284, 202, 474, 27750, 273, 8145, 1662, 12, 1968, 16, 296, 92, 2187, 300, 21, 1769, 3639, 309, 261, 16115, 67, 856, 18, 14963, 2932, 7923, 597, 3590, 67, 529, 18, 14963, 2932, 6, 3719, 288, 5411, 604, 394, 2884, 12417, 2932, 6861, 300, 79, 32, 856, 34, 578, 300, 84, 32, 10534, 2984, 1769, 3639, 289, 3639, 309, 261, 4308, 67, 350, 422, 374, 13, 288, 5411, 604, 394, 2884, 12417, 2932, 6861, 300, 82, 32, 4308, 67, 350, 2984, 1769, 3639, 289, 3639, 309, 261, 90, 16410, 67, 2107, 422, 300, 21, 13, 288, 5411, 604, 394, 2884, 12417, 2932, 6861, 300, 90, 32, 90, 16410, 67, 2107, 2984, 1769, 3639, 289, 3639, 8126, 1965, 31, 3639, 309, 261, 2626, 13, 288, 5411, 1965, 273, 8126, 18, 6949, 67, 11677, 31, 3639, 289, 469, 288, 5411, 1965, 273, 8126, 18, 6949, 67, 10857, 31, 3639, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 12, 7019, 302, 16, 10688, 833, 13, 3639, 1216, 2884, 12417, 16, 3498, 12417, 288, 3639, 514, 21161, 67, 856, 273, 4997, 1662, 12, 1968, 16, 296, 79, 2187, 1408, 1769, 3639, 514, 3590, 67, 529, 273, 4997, 1662, 12, 1968, 16, 296, 84, 2187, 1408, 1769, 3639, 509, 2461, 67, 350, 273, 8145, 1662, 12, 1968, 16, 296, 82, 2187, 302, 18, 4308, 1854, 1769, 3639, 509, 331, 16410, 67, 2107, 273, 8145, 1662, 12, 1968, 16, 296, 90, 2187, 300, 21, 1769, 3639, 1250, 1045, 273, 336, 4678, 1662, 12, 1968, 16, 296, 91, 8284, 202, 474, 27750, 273, 8145, 1662, 12, 1968, 16, 296, 92, 2187, 300, 21, 1769, 3639, 309, 261, 2 ]
private void loadGETParameters( HttpServletRequest request, CoexpressionSearchCommand csc ) { if ( request == null || (request.getParameter( "searchString" ) == null) ) return; Map params = request.getParameterMap(); if ( params.get( "eeSearchString" ) != null ) { csc.setEeSearchString( ((String[]) params.get( "eeSearchString" ))[0] ); } if (params.get( "searchString" ) != null) { csc.setSearchString( ((String[]) params.get( "searchString" ))[0] ); } if (params.get( "stringency" ) != null) { String[] stringency = (String[]) params.get( "stringency" ); Integer num = Integer.parseInt(stringency[0]); csc.setStringency(num ); } if (params.get( "taxon" ) != null) { Taxon taxon = taxonService.findByScientificName( ((String[]) params.get( "taxon" ))[0]); csc.setTaxon( taxon ); } }
4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/1e58c1ef6f6633e7775aba53b757c43be85383f0/CoexpressionSearchController.java/clean/gemma-web/src/main/java/ubic/gemma/web/controller/coexpressionSearch/CoexpressionSearchController.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1262, 3264, 2402, 12, 9984, 590, 16, 7695, 8692, 2979, 2189, 276, 1017, 262, 288, 3639, 309, 261, 590, 422, 446, 747, 261, 2293, 18, 588, 1662, 12, 315, 3072, 780, 6, 262, 422, 446, 13, 262, 327, 31, 3639, 1635, 859, 273, 590, 18, 588, 1662, 863, 5621, 7734, 309, 261, 859, 18, 588, 12, 315, 1340, 2979, 780, 6, 262, 480, 446, 262, 288, 5411, 276, 1017, 18, 542, 41, 73, 2979, 780, 12, 14015, 780, 63, 5717, 859, 18, 588, 12, 315, 1340, 2979, 780, 6, 8623, 63, 20, 65, 11272, 3639, 289, 3639, 309, 261, 2010, 18, 588, 12, 315, 3072, 780, 6, 262, 480, 446, 13, 288, 5411, 276, 1017, 18, 542, 2979, 780, 12, 14015, 780, 63, 5717, 859, 18, 588, 12, 315, 3072, 780, 6, 8623, 63, 20, 65, 11272, 3639, 289, 3639, 309, 261, 2010, 18, 588, 12, 315, 1080, 2075, 6, 262, 480, 446, 13, 288, 5411, 514, 8526, 533, 2075, 273, 225, 261, 780, 63, 5717, 859, 18, 588, 12, 315, 1080, 2075, 6, 11272, 5411, 2144, 818, 273, 2144, 18, 2670, 1702, 12, 1080, 2075, 63, 20, 19226, 5411, 276, 1017, 18, 542, 780, 2075, 12, 2107, 225, 11272, 3639, 289, 3639, 309, 261, 2010, 18, 588, 12, 315, 8066, 265, 6, 262, 480, 446, 13, 288, 5411, 18240, 265, 25458, 273, 25458, 1179, 18, 4720, 858, 1541, 1979, 1507, 461, 12, 14015, 780, 63, 5717, 859, 18, 588, 12, 315, 8066, 265, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1262, 3264, 2402, 12, 9984, 590, 16, 7695, 8692, 2979, 2189, 276, 1017, 262, 288, 3639, 309, 261, 590, 422, 446, 747, 261, 2293, 18, 588, 1662, 12, 315, 3072, 780, 6, 262, 422, 446, 13, 262, 327, 31, 3639, 1635, 859, 273, 590, 18, 588, 1662, 863, 5621, 7734, 309, 261, 859, 18, 588, 12, 315, 1340, 2979, 780, 6, 262, 480, 446, 262, 288, 5411, 276, 1017, 18, 542, 41, 73, 2979, 780, 12, 14015, 780, 63, 5717, 859, 18, 588, 12, 315, 1340, 2979, 780, 6, 8623, 63, 20, 65, 11272, 3639, 289, 3639, 309, 261, 2010, 18, 588, 12, 315, 3072, 780, 6, 262, 480, 446, 13, 288, 5411, 276, 1017, 18, 2 ]
State newFinalNode = newState();
SMNode newFinalNode = (SMNode)newState();
protected void removeSkipToFinal() { SMNode cur; State newFinalNode = newState(); SMEdge edge; Iterator it = nodes.iterator(); while(it.hasNext()) { cur = (SMNode)it.next(); if(cur.isFinalNode()) { cur.setFinal(false); Iterator edgeIt = cur.getInEdgeIterator(); while(edgeIt.hasNext()) { edge = (SMEdge)edgeIt.next(); if(!edge.getLabel().equals("")) { // i.e. if not a skip-edge newTransition(edge.getSource(), newFinalNode, edge.getLabel()); } } } } newFinalNode.setFinal(true); }
236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/0ef70d4b28b9ba57e6f494358b00e7ba15f1239d/TMStateMachine.java/buggy/aop/abc/src/abc/tm/weaving/matching/TMStateMachine.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1206, 6368, 774, 7951, 1435, 288, 3639, 12014, 907, 662, 31, 3639, 12014, 907, 394, 7951, 907, 273, 261, 7303, 907, 13, 2704, 1119, 5621, 3639, 348, 958, 72, 908, 3591, 31, 3639, 4498, 518, 273, 2199, 18, 9838, 5621, 3639, 1323, 12, 305, 18, 5332, 2134, 10756, 288, 5411, 662, 273, 261, 7303, 907, 13, 305, 18, 4285, 5621, 5411, 309, 12, 1397, 18, 291, 7951, 907, 10756, 288, 7734, 662, 18, 542, 7951, 12, 5743, 1769, 7734, 4498, 3591, 7193, 273, 662, 18, 588, 382, 6098, 3198, 5621, 7734, 1323, 12, 7126, 7193, 18, 5332, 2134, 10756, 288, 10792, 3591, 273, 261, 55, 958, 72, 908, 13, 7126, 7193, 18, 4285, 5621, 10792, 309, 12, 5, 7126, 18, 588, 2224, 7675, 14963, 2932, 6, 3719, 288, 368, 277, 18, 73, 18, 309, 486, 279, 2488, 17, 7126, 13491, 394, 8850, 12, 7126, 18, 588, 1830, 9334, 394, 7951, 907, 16, 3591, 18, 588, 2224, 10663, 10792, 289, 7734, 289, 5411, 289, 3639, 289, 3639, 394, 7951, 907, 18, 542, 7951, 12, 3767, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1206, 6368, 774, 7951, 1435, 288, 3639, 12014, 907, 662, 31, 3639, 12014, 907, 394, 7951, 907, 273, 261, 7303, 907, 13, 2704, 1119, 5621, 3639, 348, 958, 72, 908, 3591, 31, 3639, 4498, 518, 273, 2199, 18, 9838, 5621, 3639, 1323, 12, 305, 18, 5332, 2134, 10756, 288, 5411, 662, 273, 261, 7303, 907, 13, 305, 18, 4285, 5621, 5411, 309, 12, 1397, 18, 291, 7951, 907, 10756, 288, 7734, 662, 18, 542, 7951, 12, 5743, 1769, 7734, 4498, 3591, 7193, 273, 662, 18, 588, 382, 6098, 3198, 5621, 7734, 1323, 12, 7126, 7193, 18, 5332, 2134, 10756, 288, 10792, 3591, 273, 261, 55, 958, 72, 908, 13, 7126, 7193, 18, 4285, 5621, 10792, 309, 2 ]
return lineSource;
return lineSource();
public String getLineSource() { return lineSource; }
12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/d0771b878dc28db19b34996d546b15ce93d669c9/EvaluatorException.java/clean/src/org/mozilla/javascript/EvaluatorException.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 9851, 1830, 1435, 565, 288, 3639, 327, 980, 1830, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 9851, 1830, 1435, 565, 288, 3639, 327, 980, 1830, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
public Rename(String datasetSchemaName, Schema renameTableSchema, String renameTableOldName, String renameTableNewName) { super(datasetSchemaName);
public Rename(String datasetSchemaName, String datasetTableName, Schema renameTableSchema, String renameTableOldName, String renameTableNewName) { super(datasetSchemaName, datasetTableName);
public Rename(String datasetSchemaName, Schema renameTableSchema, String renameTableOldName, String renameTableNewName) { super(datasetSchemaName); this.renameTableSchema = renameTableSchema; this.renameTableOldName = renameTableOldName; this.renameTableNewName = renameTableNewName; }
2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/1a85b633207a8b1c4ea4af394422818beab7bbf9/MartConstructorAction.java/buggy/src/java/org/biomart/builder/model/MartConstructorAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 19996, 12, 780, 3709, 3078, 461, 16, 4611, 6472, 1388, 3078, 16, 9506, 202, 780, 6472, 1388, 7617, 461, 16, 514, 6472, 1388, 1908, 461, 13, 288, 1082, 202, 9565, 12, 8682, 3078, 461, 1769, 1082, 202, 2211, 18, 18539, 1388, 3078, 273, 6472, 1388, 3078, 31, 1082, 202, 2211, 18, 18539, 1388, 7617, 461, 273, 6472, 1388, 7617, 461, 31, 1082, 202, 2211, 18, 18539, 1388, 1908, 461, 273, 6472, 1388, 1908, 461, 31, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 19996, 12, 780, 3709, 3078, 461, 16, 4611, 6472, 1388, 3078, 16, 9506, 202, 780, 6472, 1388, 7617, 461, 16, 514, 6472, 1388, 1908, 461, 13, 288, 1082, 202, 9565, 12, 8682, 3078, 461, 1769, 1082, 202, 2211, 18, 18539, 1388, 3078, 273, 6472, 1388, 3078, 31, 1082, 202, 2211, 18, 18539, 1388, 7617, 461, 273, 6472, 1388, 7617, 461, 31, 1082, 202, 2211, 18, 18539, 1388, 1908, 461, 273, 6472, 1388, 1908, 461, 31, 202, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
.getRelationRestriction();
.getConcatRelationRestriction();
public void doConcat(final Concat action, final List statements) { final String srcSchemaName = action.getSourceTableSchema() == null ? action .getDataSetSchemaName() : ((JDBCSchema) action.getSourceTableSchema()) .getDatabaseSchema(); final String srcTableName = action.getSourceTableName(); final List srcTableKeyCols = action.getSourceTableKeyColumns(); final String trgtSchemaName = action.getTargetTableSchema() == null ? action .getDataSetSchemaName() : ((JDBCSchema) action.getTargetTableSchema()) .getDatabaseSchema(); final String trgtTableName = action.getTargetTableName(); final String trgtColName = action.getConcatColumnName(); final String concatSchemaName = action.getConcatTableSchema() == null ? action .getDataSetSchemaName() : ((JDBCSchema) action.getConcatTableSchema()) .getDatabaseSchema(); final String concatTableName = action.getConcatTableName(); final String columnSep = action.getColumnSeparator(); final String recordSep = action.getRecordSeparator(); final DataSetRelationRestriction relRestriction = action .getRelationRestriction(); final DataSetTableRestriction tblRestriction = action .getTargetTableRestriction(); final boolean firstIsSource = action.isFirstTableSourceTable(); final StringBuffer sb = new StringBuffer(); // If we haven't defined the group_concat size yet, define it. // Note limitation of total 18446744073709551616 characters for // group_concat result. if (!MySQLDialect.GROUP_CONCAT_SIZED) { sb.append("set group_concat_max_len=18446744073709551616"); sb.append(System.getProperty("line.separator")); MySQLDialect.GROUP_CONCAT_SIZED = true; } sb.append("create table " + concatSchemaName + "." + concatTableName + " as select a.*, group_concat(distinct concat_ws('"); sb.append(columnSep); sb.append("'"); for (final Iterator i = action.getTargetTableConcatColumns().iterator(); i .hasNext();) { sb.append(','); final Column col = (Column) i.next(); sb.append(col.getName()); } sb.append(") separator '"); sb.append(recordSep); sb.append("')) as "); sb.append(trgtColName); sb.append(" from " + srcSchemaName + "." + srcTableName + " as a inner join " + trgtSchemaName + "." + trgtTableName + " as b on "); for (int i = 0; i < action.getTargetTableKeyColumns().size(); i++) { if (i > 0) sb.append(" and "); final String pkColName = ((Column) action .getSourceTableKeyColumns().get(i)).getName(); final String fkColName = ((Column) action .getTargetTableKeyColumns().get(i)).getName(); sb.append("a." + pkColName + "=b." + fkColName); } // Do restriction. if (relRestriction != null || tblRestriction != null) sb.append(" where "); if (relRestriction != null) sb.append(relRestriction.getSubstitutedExpression( firstIsSource ? "a" : "b", firstIsSource ? "b" : "a")); if (relRestriction != null && tblRestriction != null) sb.append(" and "); if (tblRestriction != null) sb.append(tblRestriction.getSubstitutedExpression("b")); // Do group-by. sb.append(" group by "); for (final Iterator i = srcTableKeyCols.iterator(); i.hasNext();) { final Column srcKeyCol = (Column) i.next(); sb.append("a."); sb.append(srcKeyCol.getName()); if (i.hasNext()) sb.append(','); } statements.add(sb.toString()); }
2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/697fc52b912bb5a1524113edc0e15bf091f78336/MySQLDialect.java/buggy/src/java/org/biomart/builder/controller/dialects/MySQLDialect.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 741, 15113, 12, 6385, 23873, 1301, 16, 727, 987, 6317, 13, 288, 202, 202, 6385, 514, 1705, 3078, 461, 273, 1301, 18, 588, 1830, 1388, 3078, 1435, 422, 446, 692, 1301, 9506, 202, 18, 588, 13676, 3078, 461, 1435, 9506, 202, 30, 14015, 30499, 3078, 13, 1301, 18, 588, 1830, 1388, 3078, 10756, 25083, 202, 18, 588, 4254, 3078, 5621, 202, 202, 6385, 514, 1705, 7147, 273, 1301, 18, 588, 1830, 7147, 5621, 202, 202, 6385, 987, 1705, 1388, 653, 8011, 273, 1301, 18, 588, 1830, 1388, 653, 3380, 5621, 202, 202, 6385, 514, 433, 4521, 3078, 461, 273, 1301, 18, 588, 2326, 1388, 3078, 1435, 422, 446, 692, 1301, 9506, 202, 18, 588, 13676, 3078, 461, 1435, 9506, 202, 30, 14015, 30499, 3078, 13, 1301, 18, 588, 2326, 1388, 3078, 10756, 25083, 202, 18, 588, 4254, 3078, 5621, 202, 202, 6385, 514, 433, 4521, 7147, 273, 1301, 18, 588, 2326, 7147, 5621, 202, 202, 6385, 514, 433, 4521, 31187, 273, 1301, 18, 588, 15113, 8516, 5621, 202, 202, 6385, 514, 3835, 3078, 461, 273, 1301, 18, 588, 15113, 1388, 3078, 1435, 422, 446, 692, 1301, 9506, 202, 18, 588, 13676, 3078, 461, 1435, 9506, 202, 30, 14015, 30499, 3078, 13, 1301, 18, 588, 15113, 1388, 3078, 10756, 25083, 202, 18, 588, 4254, 3078, 5621, 202, 202, 6385, 514, 3835, 7147, 273, 1301, 18, 588, 15113, 7147, 5621, 202, 202, 6385, 514, 1057, 5097, 273, 1301, 18, 588, 1494, 6581, 5621, 202, 202, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 741, 15113, 12, 6385, 23873, 1301, 16, 727, 987, 6317, 13, 288, 202, 202, 6385, 514, 1705, 3078, 461, 273, 1301, 18, 588, 1830, 1388, 3078, 1435, 422, 446, 692, 1301, 9506, 202, 18, 588, 13676, 3078, 461, 1435, 9506, 202, 30, 14015, 30499, 3078, 13, 1301, 18, 588, 1830, 1388, 3078, 10756, 25083, 202, 18, 588, 4254, 3078, 5621, 202, 202, 6385, 514, 1705, 7147, 273, 1301, 18, 588, 1830, 7147, 5621, 202, 202, 6385, 987, 1705, 1388, 653, 8011, 273, 1301, 18, 588, 1830, 1388, 653, 3380, 5621, 202, 202, 6385, 514, 433, 4521, 3078, 461, 273, 1301, 18, 588, 2326, 1388, 3078, 1435, 422, 446, 692, 1301, 9506, 202, 18, 588, 13676, 2 ]
double[][] proj_req_values = calculateShortfallValues(projectedDueOutScheduleSeries,
double[][] proj_req_out_values = calculateShortfallValues(projectedDueOutScheduleSeries,
private void setValues() { if (valuesSet) return; valuesSet = true; // there's no actual or requested data if (maxSeries == 0) return; // compare actual due-in to requested due-in and // actual due-out to requested due-out int actualDueInScheduleSeries = -1; int unconfirmedDueInScheduleSeries = -1; int actualDueOutScheduleSeries = -1; int requestedDueInScheduleSeries = -1; int requestedDueOutScheduleSeries = -1; int projectedDueOutScheduleSeries = -1; int requestedProjectedDueOutScheduleSeries = -1; String[] actualLabels = ((LabelledChartDataModel)actual).getSeriesLabels(); String[] requestedLabels = ((LabelledChartDataModel)requested).getSeriesLabels(); for (int i = 0; i < actualLabels.length; i++) { if (actualLabels[i].equals(InventoryChartDataModel.ACTUAL_DUE_IN_LABEL)) actualDueInScheduleSeries = i; else if (actualLabels[i].equals(InventoryChartDataModel.ACTUAL_DUE_OUT_SHIPPED_LABEL) || actualLabels[i].equals(InventoryChartDataModel.ACTUAL_DUE_OUT_CONSUMED_LABEL)) actualDueOutScheduleSeries = i; else if (actualLabels[i].equals(InventoryChartDataModel.ACTUAL_PROJECTED_DUE_OUT_SHIPPED_LABEL) || actualLabels[i].equals(InventoryChartDataModel.ACTUAL_PROJECTED_DUE_OUT_CONSUMED_LABEL)) projectedDueOutScheduleSeries = i; else System.out.println("InventoryShortfallChartDataModel ERROR actualLabel not recognized <"+ actualLabels[i]+">"); } for (int i = 0; i < requestedLabels.length; i++) { if (requestedLabels[i].equals(InventoryChartDataModel.REQUESTED_DUE_IN_LABEL)) requestedDueInScheduleSeries = i; else if (requestedLabels[i].equals(InventoryChartDataModel.REQUESTED_DUE_OUT_LABEL)) requestedDueOutScheduleSeries = i; else if (requestedLabels[i].equals(InventoryChartDataModel.REQUESTED_PROJECTED_DUE_OUT_LABEL)) requestedProjectedDueOutScheduleSeries = i; else System.out.println("InventoryShortfallChartDataModel ERROR requestedLabel not recognized <"+ requestedLabels[i]+">"); } if (unconfirmed != null) { String[] unconfirmedLabels = ((LabelledChartDataModel)unconfirmed).getSeriesLabels(); for (int i = 0; i < unconfirmedLabels.length; i++) { if (unconfirmedLabels[i].equals(InventoryChartDataModel.UNCONFIRMED_DUE_IN_LABEL)) { unconfirmedDueInScheduleSeries = i; nSeries = 3; } else System.out.println("InventoryShortfallChartDataModel ERROR unconfirmedlLabel not recognized <"+ unconfirmedLabels[i]+">"); } } xvalues = new double[maxSeries][]; yvalues = new double[maxSeries][]; seriesLabels = new String[maxSeries]; nSeries = 0; double[][] restock_values = calculateShortfallValues(actualDueInScheduleSeries, requestedDueInScheduleSeries); if ((restock_values[0] != null) && (restock_values[0].length > 0)) { if (unconfirmedDueInScheduleSeries == -1) { // no unconfirmed - all shortfall due to known failure seriesLabels[nSeries] = CONFIRMED_DUE_IN_SHORTFALL_LABEL; } else { // some shortfall due to no allocation result seriesLabels[nSeries] = UNCONFIRMED_DUE_IN_SHORTFALL_LABEL; } xvalues[nSeries] = restock_values[0]; yvalues[nSeries] = restock_values[1]; nSeries++; } double[][] failed_restock_values = calculateFailedRestockValues(unconfirmedDueInScheduleSeries, actualDueInScheduleSeries, requestedDueInScheduleSeries); if ((failed_restock_values[0] != null) && (failed_restock_values[0].length > 0)) { seriesLabels[nSeries] = CONFIRMED_DUE_IN_SHORTFALL_LABEL; xvalues[nSeries] = failed_restock_values[0]; yvalues[nSeries] = failed_restock_values[1]; nSeries++; } double[][] req_values = calculateShortfallValues(actualDueOutScheduleSeries, requestedDueOutScheduleSeries); if ((req_values[0] != null) && (req_values[0].length > 0)) { seriesLabels[nSeries] = DUE_OUT_SHORTFALL_LABEL; xvalues[nSeries] = req_values[0]; yvalues[nSeries] = req_values[1]; nSeries++; } double[][] proj_req_values = calculateShortfallValues(projectedDueOutScheduleSeries, requestedProjectedDueOutScheduleSeries); if ((proj_req_values[0] != null) && (proj_req_values[0].length > 0)) { seriesLabels[nSeries] = PROJECTED_DUE_OUT_SHORTFALL_LABEL; xvalues[nSeries] = proj_req_values[0]; yvalues[nSeries] = proj_req_values[1]; nSeries++; } }
7171 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7171/27f87866d884d64a42161b74762957c873d17f93/InventoryShortfallChartDataModel.java/buggy/glm/src/org/cougaar/domain/mlm/ui/planviewer/inventory/InventoryShortfallChartDataModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 27466, 1435, 288, 565, 309, 261, 2372, 694, 13, 1377, 327, 31, 565, 924, 694, 273, 638, 31, 565, 368, 1915, 1807, 1158, 3214, 578, 3764, 501, 565, 309, 261, 1896, 6485, 422, 374, 13, 4202, 327, 31, 565, 368, 3400, 3214, 6541, 17, 267, 358, 3764, 6541, 17, 267, 471, 565, 368, 3214, 6541, 17, 659, 358, 3764, 6541, 17, 659, 565, 509, 3214, 30023, 382, 6061, 6485, 273, 300, 21, 31, 565, 509, 23980, 74, 11222, 30023, 382, 6061, 6485, 273, 300, 21, 31, 565, 509, 3214, 30023, 1182, 6061, 6485, 273, 300, 21, 31, 565, 509, 3764, 30023, 382, 6061, 6485, 273, 300, 21, 31, 565, 509, 3764, 30023, 1182, 6061, 6485, 273, 300, 21, 31, 565, 509, 20939, 30023, 1182, 6061, 6485, 273, 300, 21, 31, 565, 509, 3764, 626, 6059, 30023, 1182, 6061, 6485, 273, 300, 21, 31, 565, 514, 8526, 3214, 5888, 273, 4202, 14015, 2224, 1259, 7984, 26349, 13, 18672, 2934, 588, 6485, 5888, 5621, 565, 514, 8526, 3764, 5888, 273, 4202, 14015, 2224, 1259, 7984, 26349, 13, 19065, 2934, 588, 6485, 5888, 5621, 565, 364, 261, 474, 277, 273, 374, 31, 277, 411, 3214, 5888, 18, 2469, 31, 277, 27245, 288, 1377, 309, 261, 18672, 5888, 63, 77, 8009, 14963, 12, 15059, 7984, 26349, 18, 6526, 14235, 67, 40, 1821, 67, 706, 67, 13545, 3719, 540, 3214, 30023, 382, 6061, 6485, 273, 277, 31, 1377, 469, 309, 261, 18672, 5888, 63, 77, 8009, 14963, 12, 15059, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 27466, 1435, 288, 565, 309, 261, 2372, 694, 13, 1377, 327, 31, 565, 924, 694, 273, 638, 31, 565, 368, 1915, 1807, 1158, 3214, 578, 3764, 501, 565, 309, 261, 1896, 6485, 422, 374, 13, 4202, 327, 31, 565, 368, 3400, 3214, 6541, 17, 267, 358, 3764, 6541, 17, 267, 471, 565, 368, 3214, 6541, 17, 659, 358, 3764, 6541, 17, 659, 565, 509, 3214, 30023, 382, 6061, 6485, 273, 300, 21, 31, 565, 509, 23980, 74, 11222, 30023, 382, 6061, 6485, 273, 300, 21, 31, 565, 509, 3214, 30023, 1182, 6061, 6485, 273, 300, 21, 31, 565, 509, 3764, 30023, 382, 6061, 6485, 273, 300, 21, 31, 565, 509, 3764, 30023, 1182, 6061, 6485, 273, 2 ]
((LogicalExpr)_right).backPatchTrueList(after);
_right.backPatchTrueList(after); } else if (_right instanceof NotCall) { _right.backPatchTrueList(after);
public void translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen) { final InstructionList il = methodGen.getInstructionList(); final SyntaxTreeNode parent = getParent(); // Compile AND-expression if (_op == AND) { // Translate left hand side - must be true _left.translateDesynthesized(classGen, methodGen); // Need this for chaining any OR-expression children InstructionHandle middle = il.append(NOP); // Translate left right side - must be true _right.translateDesynthesized(classGen, methodGen); // Need this for chaining any OR-expression children InstructionHandle after = il.append(NOP); // Append child expression false-lists to our false-list _falseList.append(_right._falseList.append(_left._falseList)); // Special case for OR-expression as a left child of AND. // The true-list of OR must point to second clause of AND. if ((_left instanceof LogicalExpr) && (((LogicalExpr)_left).getOp() == OR)) { ((LogicalExpr)_left).backPatchTrueList(middle); } else { _trueList.append(_left._trueList); } // Special case for OR-expression as a right child of AND // The true-list of OR must point to true-list of AND. if ((_right instanceof LogicalExpr) && (((LogicalExpr)_right).getOp() == OR)) { ((LogicalExpr)_right).backPatchTrueList(after); } else { _trueList.append(_right._trueList); } } // Compile OR-expression else { // Translate left-hand side expression and produce true/false list _left.translateDesynthesized(classGen, methodGen); // This GOTO is used to skip over the code for the last test // in the case where the the first test succeeds InstructionHandle ih = il.append(new GOTO(null)); // Translate right-hand side expression and produce true/false list _right.translateDesynthesized(classGen, methodGen); _left._trueList.backPatch(ih); _left._falseList.backPatch(ih.getNext()); _falseList.append(_right._falseList); _trueList.add(ih).append(_right._trueList); } }
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/a9e9a0f4288bb8ca6abd07224753d170af913ba9/LogicalExpr.java/clean/src/org/apache/xalan/xsltc/compiler/LogicalExpr.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4204, 6305, 878, 7915, 1235, 12, 797, 3908, 667, 7642, 16, 6862, 4202, 2985, 3908, 707, 7642, 13, 288, 202, 6385, 24605, 682, 14254, 273, 707, 7642, 18, 588, 11983, 682, 5621, 202, 6385, 11517, 12513, 982, 273, 5089, 5621, 202, 759, 16143, 4116, 17, 8692, 202, 430, 261, 67, 556, 422, 4116, 13, 288, 202, 565, 368, 16820, 2002, 948, 4889, 300, 1297, 506, 638, 202, 565, 389, 4482, 18, 13929, 6305, 878, 7915, 1235, 12, 1106, 7642, 16, 707, 7642, 1769, 202, 565, 368, 12324, 333, 364, 23381, 1281, 4869, 17, 8692, 2325, 202, 565, 24605, 3259, 7689, 273, 14254, 18, 6923, 12, 3417, 52, 1769, 202, 565, 368, 16820, 2002, 2145, 4889, 300, 1297, 506, 638, 202, 565, 389, 4083, 18, 13929, 6305, 878, 7915, 1235, 12, 1106, 7642, 16, 707, 7642, 1769, 202, 565, 368, 12324, 333, 364, 23381, 1281, 4869, 17, 8692, 2325, 202, 565, 24605, 3259, 1839, 273, 14254, 18, 6923, 12, 3417, 52, 1769, 202, 565, 368, 6181, 1151, 2652, 629, 17, 9772, 358, 3134, 629, 17, 1098, 202, 565, 389, 5743, 682, 18, 6923, 24899, 4083, 6315, 5743, 682, 18, 6923, 24899, 4482, 6315, 5743, 682, 10019, 202, 565, 368, 13409, 648, 364, 4869, 17, 8692, 487, 279, 2002, 1151, 434, 4116, 18, 202, 565, 368, 1021, 638, 17, 1098, 434, 4869, 1297, 1634, 358, 2205, 6591, 434, 4116, 18, 202, 565, 309, 14015, 67, 4482, 1276, 17085, 4742, 13, 597, 202, 202, 12443, 12, 17955, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4204, 6305, 878, 7915, 1235, 12, 797, 3908, 667, 7642, 16, 6862, 4202, 2985, 3908, 707, 7642, 13, 288, 202, 6385, 24605, 682, 14254, 273, 707, 7642, 18, 588, 11983, 682, 5621, 202, 6385, 11517, 12513, 982, 273, 5089, 5621, 202, 759, 16143, 4116, 17, 8692, 202, 430, 261, 67, 556, 422, 4116, 13, 288, 202, 565, 368, 16820, 2002, 948, 4889, 300, 1297, 506, 638, 202, 565, 389, 4482, 18, 13929, 6305, 878, 7915, 1235, 12, 1106, 7642, 16, 707, 7642, 1769, 202, 565, 368, 12324, 333, 364, 23381, 1281, 4869, 17, 8692, 2325, 202, 565, 24605, 3259, 7689, 273, 14254, 18, 6923, 12, 3417, 52, 1769, 202, 565, 368, 16820, 2002, 2145, 4889, 300, 2 ]
return iBonus; } for (Iterator b = aList.iterator(); b.hasNext();) { final BonusObj aBonus = (BonusObj) b.next(); final PObject anObj = (PObject) aBonus.getCreatorObject();
final PObject anObj = (PObject) bonus.getCreatorObject();
public double calcBonusFromList(final List aList) { double iBonus = 0; if (aList.isEmpty()) { return iBonus; } for (Iterator b = aList.iterator(); b.hasNext();) { final BonusObj aBonus = (BonusObj) b.next(); final PObject anObj = (PObject) aBonus.getCreatorObject(); if (anObj == null) { continue; } iBonus += anObj.calcBonusFrom(aBonus, this, this); } return iBonus; }
48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/eb5f93299afbba8e2b27cdc67dfddc016c5d86a9/PlayerCharacter.java/buggy/code/src/java/pcgen/core/PlayerCharacter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1645, 7029, 38, 22889, 1265, 682, 12, 6385, 987, 279, 682, 13, 202, 95, 202, 202, 9056, 277, 38, 22889, 273, 374, 31, 202, 202, 430, 261, 69, 682, 18, 291, 1921, 10756, 202, 202, 95, 1082, 202, 2463, 277, 38, 22889, 31, 202, 202, 97, 202, 202, 1884, 261, 3198, 324, 273, 279, 682, 18, 9838, 5621, 324, 18, 5332, 2134, 5621, 13, 202, 202, 95, 1082, 202, 6385, 605, 22889, 2675, 279, 38, 22889, 273, 261, 38, 22889, 2675, 13, 324, 18, 4285, 5621, 1082, 202, 6385, 453, 921, 392, 2675, 273, 261, 52, 921, 13, 279, 38, 22889, 18, 588, 10636, 921, 5621, 1082, 202, 430, 261, 304, 2675, 422, 446, 13, 1082, 202, 95, 9506, 202, 17143, 31, 1082, 202, 97, 1082, 202, 17632, 22889, 1011, 392, 2675, 18, 12448, 38, 22889, 1265, 12, 69, 38, 22889, 16, 333, 16, 333, 1769, 202, 202, 97, 202, 202, 2463, 277, 38, 22889, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1645, 7029, 38, 22889, 1265, 682, 12, 6385, 987, 279, 682, 13, 202, 95, 202, 202, 9056, 277, 38, 22889, 273, 374, 31, 202, 202, 430, 261, 69, 682, 18, 291, 1921, 10756, 202, 202, 95, 1082, 202, 2463, 277, 38, 22889, 31, 202, 202, 97, 202, 202, 1884, 261, 3198, 324, 273, 279, 682, 18, 9838, 5621, 324, 18, 5332, 2134, 5621, 13, 202, 202, 95, 1082, 202, 6385, 605, 22889, 2675, 279, 38, 22889, 273, 261, 38, 22889, 2675, 13, 324, 18, 4285, 5621, 1082, 202, 6385, 453, 921, 392, 2675, 273, 261, 52, 921, 13, 279, 38, 22889, 18, 588, 10636, 921, 5621, 1082, 202, 430, 261, 304, 2675, 422, 446, 13, 1082, 2 ]
String items[] = new String[count];
public GtkChoicePeer (Choice c) { super (c); int count = c.getItemCount (); if (count > 0) { String items[] = new String[count]; for (int i = 0; i < count; i++) items[i] = c.getItem (i); append (items); } int selected = c.getSelectedIndex(); if (selected >= 0) select(selected); }
45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/de1def922d61f2c8775ff796242c973408a67856/GtkChoicePeer.java/buggy/libjava/classpath/gnu/java/awt/peer/gtk/GtkChoicePeer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 22132, 10538, 6813, 261, 10538, 276, 13, 225, 288, 565, 2240, 261, 71, 1769, 565, 509, 1056, 273, 276, 18, 588, 30687, 261, 1769, 565, 309, 261, 1883, 405, 374, 13, 1377, 288, 202, 780, 1516, 8526, 273, 394, 514, 63, 1883, 15533, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 1056, 31, 277, 27245, 202, 225, 1516, 63, 77, 65, 273, 276, 18, 588, 1180, 261, 77, 1769, 202, 282, 202, 6923, 261, 3319, 1769, 1377, 289, 565, 509, 3170, 273, 276, 18, 588, 7416, 1016, 5621, 565, 309, 261, 8109, 1545, 374, 13, 1377, 2027, 12, 8109, 1769, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 22132, 10538, 6813, 261, 10538, 276, 13, 225, 288, 565, 2240, 261, 71, 1769, 565, 509, 1056, 273, 276, 18, 588, 30687, 261, 1769, 565, 309, 261, 1883, 405, 374, 13, 1377, 288, 202, 780, 1516, 8526, 273, 394, 514, 63, 1883, 15533, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 1056, 31, 277, 27245, 202, 225, 1516, 63, 77, 65, 273, 276, 18, 588, 1180, 261, 77, 1769, 202, 282, 202, 6923, 261, 3319, 1769, 1377, 289, 565, 509, 3170, 273, 276, 18, 588, 7416, 1016, 5621, 565, 309, 261, 8109, 1545, 374, 13, 1377, 2027, 12, 8109, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
AbstractTreeNode topPathElement = null;
AbstractTreeNode topPathElement;
private DefaultMutableTreeNode expandPathToElement(Object element) { ArrayList<AbstractTreeNode> pathToElement = getPathToElement(element); if (pathToElement.isEmpty()) { return null; } JTree tree = myAbstractTreeBuilder.getTree(); DefaultMutableTreeNode currentTreeNode = ((DefaultMutableTreeNode)tree.getModel().getRoot()); pathToElement.remove(0); DefaultMutableTreeNode result = null; while (currentTreeNode != null) { AbstractTreeNode topPathElement = null; if (!pathToElement.isEmpty()) { topPathElement = pathToElement.get(0); pathToElement.remove(0); } else { topPathElement = null; } TreePath treePath = new TreePath(currentTreeNode.getPath()); if (!tree.isExpanded(treePath)) { tree.expandPath(treePath); } if (topPathElement != null) { currentTreeNode = findInChildren(currentTreeNode, topPathElement); result = currentTreeNode; } else { currentTreeNode = null; } } return result; }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/3115f0e936209b12a5469a693e03aabc1b0512bb/StructureViewComponent.java/buggy/source/com/intellij/ide/structureView/newStructureView/StructureViewComponent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 2989, 19536, 12513, 4542, 743, 774, 1046, 12, 921, 930, 13, 288, 565, 2407, 32, 7469, 12513, 34, 12221, 1046, 273, 4339, 774, 1046, 12, 2956, 1769, 565, 309, 261, 803, 774, 1046, 18, 291, 1921, 10756, 565, 288, 1377, 327, 446, 31, 565, 289, 565, 804, 2471, 2151, 273, 3399, 7469, 25060, 18, 588, 2471, 5621, 565, 2989, 19536, 12513, 783, 12513, 273, 14015, 1868, 19536, 12513, 13, 3413, 18, 588, 1488, 7675, 588, 2375, 10663, 565, 12221, 1046, 18, 4479, 12, 20, 1769, 565, 2989, 19536, 12513, 563, 273, 446, 31, 565, 1323, 261, 2972, 12513, 480, 446, 13, 288, 1377, 4115, 12513, 1760, 743, 1046, 31, 1377, 309, 16051, 803, 774, 1046, 18, 291, 1921, 10756, 288, 3639, 1760, 743, 1046, 273, 12221, 1046, 18, 588, 12, 20, 1769, 3639, 12221, 1046, 18, 4479, 12, 20, 1769, 1377, 289, 469, 288, 3639, 1760, 743, 1046, 273, 446, 31, 1377, 289, 1377, 4902, 743, 2151, 743, 273, 394, 4902, 743, 12, 2972, 12513, 18, 588, 743, 10663, 1377, 309, 16051, 3413, 18, 291, 17957, 12, 3413, 743, 3719, 1377, 288, 3639, 2151, 18, 12320, 743, 12, 3413, 743, 1769, 1377, 289, 1377, 309, 261, 3669, 743, 1046, 480, 446, 13, 288, 3639, 783, 12513, 273, 1104, 382, 4212, 12, 2972, 12513, 16, 1760, 743, 1046, 1769, 3639, 563, 273, 783, 12513, 31, 1377, 289, 469, 288, 3639, 783, 12513, 273, 446, 31, 1377, 289, 565, 289, 565, 327, 563, 31, 225, 289, 2, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 2989, 19536, 12513, 4542, 743, 774, 1046, 12, 921, 930, 13, 288, 565, 2407, 32, 7469, 12513, 34, 12221, 1046, 273, 4339, 774, 1046, 12, 2956, 1769, 565, 309, 261, 803, 774, 1046, 18, 291, 1921, 10756, 565, 288, 1377, 327, 446, 31, 565, 289, 565, 804, 2471, 2151, 273, 3399, 7469, 25060, 18, 588, 2471, 5621, 565, 2989, 19536, 12513, 783, 12513, 273, 14015, 1868, 19536, 12513, 13, 3413, 18, 588, 1488, 7675, 588, 2375, 10663, 565, 12221, 1046, 18, 4479, 12, 20, 1769, 565, 2989, 19536, 12513, 563, 273, 446, 31, 565, 1323, 261, 2972, 12513, 480, 446, 13, 288, 1377, 4115, 12513, 1760, 743, 1046, 31, 1377, 309, 16051, 803, 774, 1046, 18, 291, 2 ]
requestResponse(null, null, g.getLoginUrl(scriptName), false, su);
requestResponse(null, null, g.getLoginUrl(scriptName), false, su, this);
private boolean login() { Object[] params = {g.toString()}; status(su, StatusUpdate.LEVEL_GENERIC, GRI18n.getString(MODULE, "logIn", params)); if (g.getType() != Gallery.TYPE_STANDALONE && g.getType() != Gallery.TYPE_APPLET) { try { requestResponse(null, null, g.getLoginUrl(scriptName), false, su); } catch (IOException ioe) { Log.logException(Log.LEVEL_ERROR, MODULE, ioe); Object[] params2 = {ioe.toString()}; error(su, GRI18n.getString(MODULE, "error", params2)); } catch (ModuleException me) { Log.logException(Log.LEVEL_ERROR, MODULE, me); Object[] params2 = {me.getMessage()}; error(su, GRI18n.getString(MODULE, "errReq", params2)); } } // setup protocol parameters String username = g.getUsername(); String password = g.getPassword(); if ((username == null || username.length() == 0) && ! g.cookieLogin) { username = (String) JOptionPane.showInputDialog( GalleryRemote._().getMainFrame(), GRI18n.getString(MODULE, "usernameLbl"), GRI18n.getString(MODULE, "username"), JOptionPane.PLAIN_MESSAGE, null, null, null); if (username != null) { g.setUsername(username); } } if (username != null && (password == null || password.length() == 0)) { password = (String) JOptionPane.showInputDialog( GalleryRemote._().getMainFrame(), GRI18n.getString(MODULE, "passwdLbl"), GRI18n.getString(MODULE, "passwd"), JOptionPane.PLAIN_MESSAGE, null, null, null); g.setPassword(password); } NVPair form_data[] = { new NVPair("cmd", "login"), new NVPair("protocol_version", PROTOCOL_VERSION), null, null }; if (username != null) { form_data[2] = new NVPair("uname", username); Log.log(Log.LEVEL_TRACE, MODULE, "login parameters: " + Arrays.asList(form_data)); form_data[3] = new NVPair("password", password); } else { Log.log(Log.LEVEL_TRACE, MODULE, "login parameters: " + Arrays.asList(form_data)); } form_data = fudgeFormParameters(form_data); // make the request try { triedLogin = true; // load and validate the response Properties p = requestResponse(form_data, g.getGalleryUrl(scriptName), su); if (GR_STAT_SUCCESS.equals(p.getProperty("status")) || GR_STAT_LOGIN_MISSING.equals(p.getProperty("status"))) { status(su, StatusUpdate.LEVEL_GENERIC, GRI18n.getString(MODULE, "loggedIn")); try { String serverVersion = p.getProperty("server_version"); int i = serverVersion.indexOf("."); serverMinorVersion = Integer.parseInt(serverVersion.substring(i + 1)); Log.log(Log.LEVEL_TRACE, MODULE, "Server minor version: " + serverMinorVersion); handleCapabilities(); } catch (Exception e) { Log.log(Log.LEVEL_ERROR, MODULE, "Malformed server_version: " + p.getProperty("server_version")); Log.logException(Log.LEVEL_ERROR, MODULE, e); } return true; } else if (GR_STAT_PASSWD_WRONG.equals(p.getProperty("status"))) { error(su, GRI18n.getString(MODULE, "usrpwdErr")); return false; } else { Object[] params2 = {p.getProperty("status_text")}; error(su, GRI18n.getString(MODULE, "loginErr", params2)); return false; } } catch (GR2Exception gr2e) { Log.logException(Log.LEVEL_ERROR, MODULE, gr2e); Object[] params2 = {gr2e.getMessage()}; error(su, GRI18n.getString(MODULE, "error", params2)); } catch (IOException ioe) { Log.logException(Log.LEVEL_ERROR, MODULE, ioe); Object[] params2 = {ioe.toString()}; error(su, GRI18n.getString(MODULE, "error", params2)); } catch (ModuleException me) { Log.logException(Log.LEVEL_ERROR, MODULE, me); Object[] params2 = {me.getMessage()}; error(su, GRI18n.getString(MODULE, "errReq", params2)); } return false; }
9402 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9402/2a7407a093c5f325294c34bcce89c490432c4bae/GalleryComm2.java/clean/com/gallery/GalleryRemote/GalleryComm2.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 1250, 3925, 1435, 288, 1082, 202, 921, 8526, 859, 273, 288, 75, 18, 10492, 17767, 31, 1082, 202, 2327, 12, 26560, 16, 2685, 1891, 18, 10398, 67, 13990, 2871, 16, 611, 2259, 2643, 82, 18, 588, 780, 12, 12194, 16, 315, 1330, 382, 3113, 859, 10019, 1082, 202, 430, 261, 75, 18, 588, 559, 1435, 480, 31398, 18, 2399, 67, 882, 4307, 1013, 5998, 597, 314, 18, 588, 559, 1435, 480, 31398, 18, 2399, 67, 7215, 15146, 13, 288, 9506, 202, 698, 288, 6862, 202, 2293, 1064, 12, 2011, 16, 446, 16, 314, 18, 588, 5358, 1489, 12, 4263, 461, 3631, 629, 16, 1597, 1769, 9506, 202, 97, 1044, 261, 14106, 10847, 13, 288, 6862, 202, 1343, 18, 1330, 503, 12, 1343, 18, 10398, 67, 3589, 16, 14057, 16, 10847, 1769, 6862, 202, 921, 8526, 859, 22, 273, 288, 1594, 73, 18, 10492, 17767, 31, 6862, 202, 1636, 12, 26560, 16, 611, 2259, 2643, 82, 18, 588, 780, 12, 12194, 16, 315, 1636, 3113, 859, 22, 10019, 9506, 202, 97, 1044, 261, 3120, 503, 1791, 13, 288, 6862, 202, 1343, 18, 1330, 503, 12, 1343, 18, 10398, 67, 3589, 16, 14057, 16, 1791, 1769, 6862, 202, 921, 8526, 859, 22, 273, 288, 3501, 18, 24906, 17767, 31, 6862, 202, 1636, 12, 26560, 16, 611, 2259, 2643, 82, 18, 588, 780, 12, 12194, 16, 315, 370, 6113, 3113, 859, 22, 10019, 9506, 202, 97, 1082, 202, 97, 1082, 202, 759, 3875, 1771, 1472, 1082, 202, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 1250, 3925, 1435, 288, 1082, 202, 921, 8526, 859, 273, 288, 75, 18, 10492, 17767, 31, 1082, 202, 2327, 12, 26560, 16, 2685, 1891, 18, 10398, 67, 13990, 2871, 16, 611, 2259, 2643, 82, 18, 588, 780, 12, 12194, 16, 315, 1330, 382, 3113, 859, 10019, 1082, 202, 430, 261, 75, 18, 588, 559, 1435, 480, 31398, 18, 2399, 67, 882, 4307, 1013, 5998, 597, 314, 18, 588, 559, 1435, 480, 31398, 18, 2399, 67, 7215, 15146, 13, 288, 9506, 202, 698, 288, 6862, 202, 2293, 1064, 12, 2011, 16, 446, 16, 314, 18, 588, 5358, 1489, 12, 4263, 461, 3631, 629, 16, 1597, 1769, 9506, 202, 97, 1044, 261, 14106, 10847, 13, 288, 6862, 202, 2 ]
private void copyArtifact( File artifactSource, File artifactTarget, Reporter reporter )
private void copyArtifact( Artifact artifact, File artifactTarget, Reporter reporter )
private void copyArtifact( File artifactSource, File artifactTarget, Reporter reporter ) throws IOException { InputStream inStream = null; OutputStream outStream = null; try { File targetParent = artifactTarget.getParentFile(); if ( !targetParent.exists() ) { reporter.info( "Creating directory \'" + targetParent + "\'." ); targetParent.mkdirs(); } inStream = new BufferedInputStream( new FileInputStream( artifactSource ) ); outStream = new BufferedOutputStream( new FileOutputStream( artifactTarget ) ); byte[] buffer = new byte[16]; int read = -1; while ( ( read = inStream.read( buffer ) ) > -1 ) { outStream.write( buffer, 0, read ); } outStream.flush(); } finally { IOUtil.close( inStream ); IOUtil.close( outStream ); } }
47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/dc92832ad28e92b0369b5061d9844010f2524302/RepositoryCleaner.java/clean/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1610, 7581, 12, 14022, 6462, 16, 1387, 6462, 2326, 16, 25585, 11528, 262, 3639, 1216, 1860, 565, 288, 3639, 5037, 28987, 273, 446, 31, 3639, 8962, 28997, 273, 446, 31, 3639, 775, 3639, 288, 5411, 1387, 1018, 3054, 273, 6462, 2326, 18, 588, 3054, 812, 5621, 5411, 309, 261, 401, 3299, 3054, 18, 1808, 1435, 262, 5411, 288, 7734, 11528, 18, 1376, 12, 315, 11092, 1867, 521, 4970, 397, 1018, 3054, 397, 1548, 14550, 11272, 7734, 1018, 3054, 18, 24816, 8291, 5621, 5411, 289, 5411, 28987, 273, 394, 24742, 12, 394, 11907, 12, 6462, 1830, 262, 11272, 5411, 28997, 273, 394, 28649, 12, 394, 12942, 12, 6462, 2326, 262, 11272, 5411, 1160, 8526, 1613, 273, 394, 1160, 63, 2313, 15533, 5411, 509, 855, 273, 300, 21, 31, 5411, 1323, 261, 261, 855, 273, 28987, 18, 896, 12, 1613, 262, 262, 405, 300, 21, 262, 5411, 288, 7734, 28997, 18, 2626, 12, 1613, 16, 374, 16, 855, 11272, 5411, 289, 5411, 28997, 18, 11330, 5621, 3639, 289, 3639, 3095, 3639, 288, 5411, 1665, 1304, 18, 4412, 12, 28987, 11272, 5411, 1665, 1304, 18, 4412, 12, 28997, 11272, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1610, 7581, 12, 14022, 6462, 16, 1387, 6462, 2326, 16, 25585, 11528, 262, 3639, 1216, 1860, 565, 288, 3639, 5037, 28987, 273, 446, 31, 3639, 8962, 28997, 273, 446, 31, 3639, 775, 3639, 288, 5411, 1387, 1018, 3054, 273, 6462, 2326, 18, 588, 3054, 812, 5621, 5411, 309, 261, 401, 3299, 3054, 18, 1808, 1435, 262, 5411, 288, 7734, 11528, 18, 1376, 12, 315, 11092, 1867, 521, 4970, 397, 1018, 3054, 397, 1548, 14550, 11272, 7734, 1018, 3054, 18, 24816, 8291, 5621, 5411, 289, 5411, 28987, 273, 394, 24742, 12, 394, 11907, 12, 6462, 1830, 262, 11272, 5411, 28997, 273, 394, 28649, 12, 394, 12942, 12, 6462, 2326, 262, 11272, 5411, 1160, 8526, 1613, 273, 394, 2 ]
System.err.println(e.getMessage());
private int checkAnswers(QuizQuestion question) { int correctAnswers=0; Vector answers = this.servant.getAnswers(); Console.println("Current question: " + question.getId(), Console.MSG_DEBUG); Console.println("Correct answer: #"+question.getCorrectAnswer(), Console.MSG_DEBUG); Console.println("There are "+answers.size()+" answers to be checked", Console.MSG_DEBUG); // Iterating over the available answers for(int i=0; i<answers.size(); i++) { QuizAnswer answer = (QuizAnswer) answers.elementAt(i); String nick=null; try { if(answer.getSender()!=null) nick = answer.getSender().getNickname(); } catch (RemoteException e) { System.err.println(e.getMessage()); e.printStackTrace(); } // Just to be sure that the current answer is related to the current question (SimpleClient) if(answer.getQuestionId()!=question.getId()) { Console.println("Answer from client "+ nick +" is not related to the current question", Console.MSG_NORMAL); continue; } Console.println(nick+" answered: #"+answer.getAnswer(), Console.MSG_DEBUG); // Check if the answer is correct if(answer.getAnswer() == question.getCorrectAnswer()) { QuizClientServices client = answer.getSender(); try { // Updating client's score client.updateScore(question.getPoints()); SystemMessage sysMsg = new SystemMessage(); sysMsg.setOpCode(SystemMessage.RIGHT_ANSWER); sysMsg.setBody("Your answer was right. " + question.getPoints() + " points!"); client.display(sysMsg); } catch(RemoteException e) { System.err.println(e.getMessage()); e.printStackTrace(); } Console.println("Correct answer from " +nick+". "+question.getPoints()+" points added.", Console.MSG_DEBUG); correctAnswers+=1; } } if(correctAnswers == 0) { Console.println("No correct answer", Console.MSG_DEBUG); } // Reset the servant's answer vector this.servant.clearAnswers(); return correctAnswers; }
12246 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12246/217bca0b012d3e68156c1411f94c5df12108bfbe/Quiz.java/buggy/quizmaster/server/Quiz.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 509, 866, 19543, 12, 928, 452, 11665, 5073, 13, 202, 95, 202, 202, 474, 3434, 19543, 33, 20, 31, 202, 202, 5018, 12415, 273, 333, 18, 550, 7445, 18, 588, 19543, 5621, 9506, 202, 10215, 18, 8222, 2932, 3935, 5073, 30, 315, 397, 5073, 18, 26321, 9334, 9657, 18, 11210, 67, 9394, 1769, 202, 202, 10215, 18, 8222, 2932, 16147, 5803, 30, 31526, 15, 4173, 18, 588, 16147, 13203, 9334, 9657, 18, 11210, 67, 9394, 1769, 202, 202, 10215, 18, 8222, 2932, 9828, 854, 13773, 22340, 18, 1467, 1435, 9078, 12415, 358, 506, 5950, 3113, 9657, 18, 11210, 67, 9394, 1769, 9506, 202, 759, 3016, 1776, 1879, 326, 2319, 12415, 202, 202, 1884, 12, 474, 277, 33, 20, 31, 277, 32, 22340, 18, 1467, 5621, 277, 27245, 202, 202, 95, 1082, 202, 928, 452, 13203, 5803, 273, 261, 928, 452, 13203, 13, 12415, 18, 2956, 861, 12, 77, 1769, 25083, 202, 780, 10909, 33, 2011, 31, 25083, 202, 698, 288, 9506, 202, 430, 12, 13490, 18, 588, 12021, 1435, 5, 33, 2011, 13, 10909, 273, 5803, 18, 588, 12021, 7675, 588, 29756, 529, 5621, 1082, 202, 97, 1044, 261, 5169, 503, 425, 13, 1082, 202, 95, 9506, 202, 3163, 18, 370, 18, 8222, 12, 73, 18, 24906, 10663, 9506, 202, 73, 18, 1188, 6332, 5621, 1082, 202, 97, 25083, 202, 759, 12526, 358, 506, 3071, 716, 326, 783, 5803, 353, 3746, 358, 326, 783, 5073, 261, 5784, 1227, 13, 1082, 202, 430, 12, 13490, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 509, 866, 19543, 12, 928, 452, 11665, 5073, 13, 202, 95, 202, 202, 474, 3434, 19543, 33, 20, 31, 202, 202, 5018, 12415, 273, 333, 18, 550, 7445, 18, 588, 19543, 5621, 9506, 202, 10215, 18, 8222, 2932, 3935, 5073, 30, 315, 397, 5073, 18, 26321, 9334, 9657, 18, 11210, 67, 9394, 1769, 202, 202, 10215, 18, 8222, 2932, 16147, 5803, 30, 31526, 15, 4173, 18, 588, 16147, 13203, 9334, 9657, 18, 11210, 67, 9394, 1769, 202, 202, 10215, 18, 8222, 2932, 9828, 854, 13773, 22340, 18, 1467, 1435, 9078, 12415, 358, 506, 5950, 3113, 9657, 18, 11210, 67, 9394, 1769, 9506, 202, 759, 3016, 1776, 1879, 326, 2319, 12415, 202, 202, 1884, 12, 474, 277, 2 ]
logger = new org.openscience.cdk.tools.LoggingTool(this.getClass().getName());
logger = new LoggingTool(this);
public Mol2Reader(Reader in) { logger = new org.openscience.cdk.tools.LoggingTool(this.getClass().getName()); input = new BufferedReader(in); }
1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/2459f3e9e5d16120a10cb9a08055c3c6b60b755c/Mol2Reader.java/clean/src/org/openscience/cdk/io/Mol2Reader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 490, 355, 22, 2514, 12, 2514, 316, 13, 288, 3639, 1194, 273, 394, 10253, 6364, 12, 2211, 1769, 3639, 810, 273, 394, 10633, 12, 267, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 490, 355, 22, 2514, 12, 2514, 316, 13, 288, 3639, 1194, 273, 394, 10253, 6364, 12, 2211, 1769, 3639, 810, 273, 394, 10633, 12, 267, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
swapPostition(trim, 1, 3); trimManager.updateAreaTrim(ITrimManager.BOTTOM, trim, false); window.getShell().layout(true, true); trim = trimManager.getAreaTrim(ITrimManager.BOTTOM); validatePositions(SWAPPED_STATUS_LINE, trim); }
swapPostition(trim, 1, 3); trimManager.updateAreaTrim(ITrimManager.BOTTOM, trim, false); window.getShell().layout(true, true); trim = trimManager.getAreaTrim(ITrimManager.BOTTOM); validatePositions(SWAPPED_STATUS_LINE, trim);
public void testMoveStatusLine() throws Throwable { IWorkbenchWindow window = openTestWindow(); if (window instanceof WorkbenchWindow) { ITrimManager trimManager = ((WorkbenchWindow)window).getTrimManager(); List trim = trimManager.getAreaTrim(ITrimManager.BOTTOM); validatePositions(DEFAULT_BOTTOM, trim); swapPostition(trim, 1, 3); trimManager.updateAreaTrim(ITrimManager.BOTTOM, trim, false); window.getShell().layout(true, true); trim = trimManager.getAreaTrim(ITrimManager.BOTTOM); validatePositions(SWAPPED_STATUS_LINE, trim); } }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/c5d4795a2a1d7efa2849147877a3ca86f24d6221/TrimLayoutTest.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/TrimLayoutTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 7607, 1482, 1670, 1435, 1216, 4206, 288, 202, 202, 45, 2421, 22144, 3829, 2742, 273, 1696, 4709, 3829, 5621, 202, 202, 430, 261, 5668, 1276, 4147, 22144, 3829, 13, 288, 1082, 202, 45, 14795, 1318, 2209, 1318, 273, 14015, 2421, 22144, 3829, 13, 5668, 2934, 588, 14795, 1318, 5621, 1082, 202, 682, 2209, 273, 2209, 1318, 18, 588, 5484, 14795, 12, 45, 14795, 1318, 18, 28891, 1769, 1082, 202, 5662, 11024, 12, 5280, 67, 28891, 16, 2209, 1769, 1082, 202, 22270, 3349, 608, 12, 5290, 16, 404, 16, 890, 1769, 1082, 202, 5290, 1318, 18, 2725, 5484, 14795, 12, 45, 14795, 1318, 18, 28891, 16, 2209, 16, 629, 1769, 9506, 202, 5668, 18, 588, 13220, 7675, 6741, 12, 3767, 16, 638, 1769, 9506, 202, 5290, 273, 2209, 1318, 18, 588, 5484, 14795, 12, 45, 14795, 1318, 18, 28891, 1769, 1082, 202, 5662, 11024, 12, 18746, 2203, 12120, 67, 8608, 67, 5997, 16, 2209, 1769, 202, 202, 97, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 7607, 1482, 1670, 1435, 1216, 4206, 288, 202, 202, 45, 2421, 22144, 3829, 2742, 273, 1696, 4709, 3829, 5621, 202, 202, 430, 261, 5668, 1276, 4147, 22144, 3829, 13, 288, 1082, 202, 45, 14795, 1318, 2209, 1318, 273, 14015, 2421, 22144, 3829, 13, 5668, 2934, 588, 14795, 1318, 5621, 1082, 202, 682, 2209, 273, 2209, 1318, 18, 588, 5484, 14795, 12, 45, 14795, 1318, 18, 28891, 1769, 1082, 202, 5662, 11024, 12, 5280, 67, 28891, 16, 2209, 1769, 1082, 202, 22270, 3349, 608, 12, 5290, 16, 404, 16, 890, 1769, 1082, 202, 5290, 1318, 18, 2725, 5484, 14795, 12, 45, 14795, 1318, 18, 28891, 16, 2209, 16, 629, 1769, 9506, 202, 5668, 18, 588, 2 ]
"-value3:", "-9223372036854775807",
"-value3", "-9223372036854775807", "-value4", "-1",
public void testBasic() throws ErrorMessage { String specs[] = { "flag1", "value1:", "value2:", "flag2", "value3:" }; String args[] = { "arg1", "-value1:", "42", "-flag2", "-value3:", "-9223372036854775807", "arg2" }; Options opt = new Options(args, specs); assertFalse(opt.isSet("flag1")); assertTrue(opt.isSet("flag2")); assertTrue(opt.isSet("value1")); assertFalse(opt.isSet("value2")); assertEquals(opt.getString("value1"), "42"); assertEquals(opt.getInteger("value1"), 42); assertEquals(opt.getInteger("value2", -98), -98); assertEquals(opt.getLong("value3"), -9223372036854775807L); Vector arguments = opt.getArguments(); assertEquals(arguments.size(), 2); assertEquals(arguments.get(0), "arg1"); assertEquals(arguments.get(1), "arg2"); }
2255 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2255/c5b817ed12993a69a76062842c6aade21b600817/OptionsTest.java/clean/test/junit/src/net/sf/gogui/utils/OptionsTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8252, 1435, 1216, 30298, 565, 288, 3639, 514, 10607, 8526, 273, 288, 5411, 315, 6420, 21, 3113, 5411, 315, 1132, 21, 2773, 16, 5411, 315, 1132, 22, 2773, 16, 5411, 315, 6420, 22, 3113, 5411, 315, 1132, 23, 2773, 3639, 289, 31, 3639, 514, 833, 8526, 273, 288, 5411, 315, 3175, 21, 3113, 5411, 3701, 1132, 21, 2773, 16, 315, 9452, 3113, 5411, 3701, 6420, 22, 3113, 5411, 3701, 1132, 23, 3113, 3701, 29, 3787, 3707, 27, 3462, 5718, 28, 6564, 27714, 3672, 27, 3113, 3701, 1132, 24, 3113, 3701, 21, 3113, 5411, 315, 3175, 22, 6, 3639, 289, 31, 3639, 5087, 2153, 273, 394, 5087, 12, 1968, 16, 10607, 1769, 3639, 1815, 8381, 12, 3838, 18, 291, 694, 2932, 6420, 21, 7923, 1769, 3639, 1815, 5510, 12, 3838, 18, 291, 694, 2932, 6420, 22, 7923, 1769, 3639, 1815, 5510, 12, 3838, 18, 291, 694, 2932, 1132, 21, 7923, 1769, 3639, 1815, 8381, 12, 3838, 18, 291, 694, 2932, 1132, 22, 7923, 1769, 3639, 1815, 8867, 12, 3838, 18, 588, 780, 2932, 1132, 21, 6, 3631, 315, 9452, 8863, 3639, 1815, 8867, 12, 3838, 18, 588, 4522, 2932, 1132, 21, 6, 3631, 14856, 1769, 3639, 1815, 8867, 12, 3838, 18, 588, 4522, 2932, 1132, 22, 3113, 300, 10689, 3631, 300, 10689, 1769, 3639, 1815, 8867, 12, 3838, 18, 588, 3708, 2932, 1132, 23, 6, 3631, 300, 29, 3787, 3707, 27, 3462, 5718, 28, 6564, 27714, 3672, 27, 48, 1769, 3639, 5589, 1775, 273, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8252, 1435, 1216, 30298, 565, 288, 3639, 514, 10607, 8526, 273, 288, 5411, 315, 6420, 21, 3113, 5411, 315, 1132, 21, 2773, 16, 5411, 315, 1132, 22, 2773, 16, 5411, 315, 6420, 22, 3113, 5411, 315, 1132, 23, 2773, 3639, 289, 31, 3639, 514, 833, 8526, 273, 288, 5411, 315, 3175, 21, 3113, 5411, 3701, 1132, 21, 2773, 16, 315, 9452, 3113, 5411, 3701, 6420, 22, 3113, 5411, 3701, 1132, 23, 3113, 3701, 29, 3787, 3707, 27, 3462, 5718, 28, 6564, 27714, 3672, 27, 3113, 3701, 1132, 24, 3113, 3701, 21, 3113, 5411, 315, 3175, 22, 6, 3639, 289, 31, 3639, 5087, 2153, 273, 394, 5087, 12, 1968, 16, 10607, 1769, 3639, 1815, 8381, 12, 2 ]
Asserts.notReached();
assert false;
private static void addVisibility() { final Field[] fields = Visibility.class.getFields(); delegates.put(loadClass("org.jruby.runtime.Visibility"), new PersistenceDelegate() { /** * @see java.beans.PersistenceDelegate#instantiate(Object, Encoder) */ protected Expression instantiate(Object oldInstance, Encoder out) { for (int i = 0; i < 4; i++) { try { if (fields[i].get(null) == oldInstance) { return new Expression(fields[i], "get", new Object[] {null}); } } catch (IllegalAccessException e) { Asserts.notReached("IllegalAccessException: " + e.getMessage()); } } Asserts.notReached(); return null; } }); }
45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/b72a2862ae5b2f01f9a767ef2ce248fd785857c4/AstPersistenceDelegates.java/clean/src/org/jruby/ast/util/AstPersistenceDelegates.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 527, 10135, 1435, 288, 3639, 727, 2286, 8526, 1466, 273, 27791, 18, 1106, 18, 588, 2314, 5621, 3639, 22310, 18, 458, 12, 945, 797, 2932, 3341, 18, 78, 27768, 18, 9448, 18, 10135, 6, 3631, 394, 13381, 9586, 1435, 288, 5411, 1783, 2398, 380, 632, 5946, 2252, 18, 2196, 634, 18, 13182, 9586, 7, 24628, 3840, 12, 921, 16, 13554, 13, 2398, 1195, 5411, 4750, 5371, 10275, 12, 921, 1592, 1442, 16, 13554, 596, 13, 288, 7734, 364, 261, 474, 277, 273, 374, 31, 277, 411, 1059, 31, 277, 27245, 288, 10792, 775, 288, 13491, 309, 261, 2821, 63, 77, 8009, 588, 12, 2011, 13, 422, 1592, 1442, 13, 288, 18701, 327, 394, 5371, 12, 2821, 63, 77, 6487, 315, 588, 3113, 394, 1033, 8526, 288, 2011, 22938, 13491, 289, 10792, 289, 1044, 261, 12195, 9773, 425, 13, 288, 13491, 5452, 87, 18, 902, 23646, 2932, 12195, 9773, 30, 315, 397, 425, 18, 24906, 10663, 10792, 289, 7734, 289, 7734, 1815, 629, 31, 7734, 327, 446, 31, 5411, 289, 3639, 15549, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 527, 10135, 1435, 288, 3639, 727, 2286, 8526, 1466, 273, 27791, 18, 1106, 18, 588, 2314, 5621, 3639, 22310, 18, 458, 12, 945, 797, 2932, 3341, 18, 78, 27768, 18, 9448, 18, 10135, 6, 3631, 394, 13381, 9586, 1435, 288, 5411, 1783, 2398, 380, 632, 5946, 2252, 18, 2196, 634, 18, 13182, 9586, 7, 24628, 3840, 12, 921, 16, 13554, 13, 2398, 1195, 5411, 4750, 5371, 10275, 12, 921, 1592, 1442, 16, 13554, 596, 13, 288, 7734, 364, 261, 474, 277, 273, 374, 31, 277, 411, 1059, 31, 277, 27245, 288, 10792, 775, 288, 13491, 309, 261, 2821, 63, 77, 8009, 588, 12, 2011, 13, 422, 1592, 1442, 13, 288, 18701, 327, 394, 5371, 12, 2 ]
static Object readData(ResponseStream in, ColInfo ci, boolean readTextMode) throws IOException, ProtocolException { int len; switch (ci.tdsType) { case SYBINTN: switch (in.read()) { case 1: return new Byte((byte) in.read()); case 2: return new Short((short) in.readShort()); case 4: return new Integer(in.readInt()); case 8: return new Long(in.readLong()); } break; case SYBINT1: return new Byte((byte) in.read()); case SYBINT2: return new Short((short) in.readShort()); case SYBINT4: return new Integer(in.readInt()); case SYBINT8: return new Long(in.readLong()); case SYBIMAGE: len = in.read(); if (len > 0) { return new BlobImpl(in); } break; case SYBTEXT: len = in.read(); if (len > 0) { if (in.getTdsVersion() < TdsCore.TDS70) { ClobImpl value = new ClobImpl(in, false, readTextMode); // In TDS 4/5 zero length strings are stored as a single space // to distinguish them from nulls. try { if (value.length() == 1 && value.getSubString(1,1).equals(" ")) { return EMPTY_CLOB; } } catch (SQLException e) { // Should not occur in practice } return value; } return new ClobImpl(in, false, readTextMode); } break; case SYBNTEXT: len = in.read(); if (len > 0) { return new ClobImpl(in, true, readTextMode); } break; case SYBCHAR: case SYBVARCHAR: len = in.read(); if (len == 1 && in.getTdsVersion() < TdsCore.TDS70) { // In TDS 4/5 zero length strings are stored as a single space // to distinguish them from nulls. String value = in.readAsciiString(len); return (value.equals(" ")) ? "" : value; } if (len > 0) { return in.readAsciiString(len); } break; case SYBNVARCHAR: len = in.read(); if (len > 0) { return in.readString(len / 2); } break; case XSYBCHAR: case XSYBVARCHAR: len = in.readShort(); if (len != -1) { return in.readAsciiString(len); } break; case XSYBNCHAR: case XSYBNVARCHAR: len = in.readShort(); if (len != -1) { return in.readString(len / 2); } break; case SYBVARBINARY: case SYBBINARY: len = in.read(); if (len > 0) { byte[] bytes = new byte[len]; in.read(bytes); return bytes; } break; case XSYBVARBINARY: case XSYBBINARY: len = in.readShort(); if (len != -1) { byte[] bytes = new byte[len]; in.read(bytes); return bytes; } break; case SYBMONEY4: case SYBMONEY: case SYBMONEYN: return getMoneyValue(in, ci.tdsType); case SYBDATETIME4: case SYBDATETIMN: case SYBDATETIME: return getDatetimeValue(in, ci.tdsType); case SYBBIT: return (in.read() != 0) ? Boolean.TRUE : Boolean.FALSE; case SYBBITN: len = in.read(); if (len > 0) { return (in.read() != 0) ? Boolean.TRUE : Boolean.FALSE; } break; case SYBREAL: return new Float(Float.intBitsToFloat(in.readInt())); case SYBFLT8: return new Double(Double.longBitsToDouble(in.readLong())); case SYBFLTN: len = in.read(); if (len == 4) { return new Float(Float.intBitsToFloat(in.readInt())); } else if (len == 8) { return new Double(Double.longBitsToDouble(in.readLong())); } break; case SYBUNIQUE: len = in.read(); if (len > 0) { byte[] bytes = new byte[len]; in.read(bytes); return new UniqueIdentifier(bytes); } break; case SYBNUMERIC: case SYBDECIMAL: len = in.read(); if (len > 0) { int sign = in.read(); len--; byte[] bytes = new byte[len]; BigInteger bi; if (in.getServerType() == TdsCore.SYBASE) { // Sybase order is MSB first! for (int i = 0; i < len; i++) { bytes[i] = (byte) in.read(); } bi = new BigInteger((sign == 0) ? 1 : -1, bytes); } else { while (len-- > 0) { bytes[len] = (byte)in.read(); } bi = new BigInteger((sign == 0) ? -1 : 1, bytes); } return new BigDecimal(bi, ci.scale); } break; case SYBVARIANT: return getVariant(in); default: throw new ProtocolException("Unsupported TDS data type 0x" + Integer.toHexString(ci.tdsType)); } return null; }
2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/b6c2b55c4a8a51cf38c59497cb712a38582b7fba/TdsData.java/buggy/src/main/net/sourceforge/jtds/jdbc/TdsData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 1033, 20913, 12, 1064, 1228, 316, 16, 1558, 966, 9039, 16, 1250, 855, 1528, 2309, 13, 565, 1216, 1860, 16, 4547, 503, 288, 3639, 509, 562, 31, 7734, 1620, 261, 8450, 18, 88, 2377, 559, 13, 288, 5411, 648, 7068, 38, 3217, 50, 30, 7734, 1620, 261, 267, 18, 896, 10756, 288, 10792, 648, 404, 30, 13491, 327, 394, 3506, 12443, 7229, 13, 316, 18, 896, 10663, 10792, 648, 576, 30, 13491, 327, 394, 7925, 12443, 6620, 13, 316, 18, 896, 4897, 10663, 10792, 648, 1059, 30, 13491, 327, 394, 2144, 12, 267, 18, 896, 1702, 10663, 10792, 648, 1725, 30, 13491, 327, 394, 3407, 12, 267, 18, 896, 3708, 10663, 7734, 289, 27573, 898, 31, 5411, 648, 7068, 38, 3217, 21, 30, 7734, 327, 394, 3506, 12443, 7229, 13, 316, 18, 896, 10663, 5411, 648, 7068, 38, 3217, 22, 30, 7734, 327, 394, 7925, 12443, 6620, 13, 316, 18, 896, 4897, 10663, 5411, 648, 7068, 38, 3217, 24, 30, 7734, 327, 394, 2144, 12, 267, 18, 896, 1702, 10663, 5411, 648, 7068, 38, 3217, 28, 30, 7734, 327, 394, 3407, 12, 267, 18, 896, 3708, 10663, 5411, 648, 7068, 38, 13603, 30, 7734, 562, 273, 316, 18, 896, 5621, 27573, 309, 261, 1897, 405, 374, 13, 288, 1171, 202, 2463, 394, 12741, 2828, 12, 267, 1769, 7734, 289, 27573, 898, 31, 5411, 648, 7068, 38, 5151, 30, 7734, 562, 273, 316, 18, 896, 5621, 7734, 309, 261, 1897, 405, 374, 13, 288, 10792, 309, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 1033, 20913, 12, 1064, 1228, 316, 16, 1558, 966, 9039, 16, 1250, 855, 1528, 2309, 13, 565, 1216, 1860, 16, 4547, 503, 288, 3639, 509, 562, 31, 7734, 1620, 261, 8450, 18, 88, 2377, 559, 13, 288, 5411, 648, 7068, 38, 3217, 50, 30, 7734, 1620, 261, 267, 18, 896, 10756, 288, 10792, 648, 404, 30, 13491, 327, 394, 3506, 12443, 7229, 13, 316, 18, 896, 10663, 10792, 648, 576, 30, 13491, 327, 394, 7925, 12443, 6620, 13, 316, 18, 896, 4897, 10663, 10792, 648, 1059, 30, 13491, 327, 394, 2144, 12, 267, 18, 896, 1702, 10663, 10792, 648, 1725, 30, 13491, 327, 394, 3407, 12, 267, 18, 896, 3708, 10663, 7734, 289, 27573, 898, 31, 5411, 2 ]
ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall);
ExpBase exp = (ExpBase) getArgNoEval(args, 1, valueFunCall);
protected void defineFunctions() { defineReserved("NULL"); // first char: p=Property, m=Method, i=Infix, P=Prefix // 2nd: // ARRAY FUNCTIONS if (false) define(new FunDefBase("SetToArray", "SetToArray(<Set>[, <Set>]...[, <Numeric Expression>])", "Converts one or more sets to an array for use in a user-if (false) defined function.", "fa*")); // // DIMENSION FUNCTIONS define(new FunDefBase("Dimension", "<Hierarchy>.Dimension", "Returns the dimension that contains a specified hierarchy.", "pdh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getDimension(); } }); //??Had to add this to get <Hierarchy>.Dimension to work? define(new FunDefBase("Dimension", "<Dimension>.Dimension", "Returns the dimension that contains a specified hierarchy.", "pdd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension; } public void testDimensionHierarchy(FoodMartTestCase test) { String s = test.executeExpr("[Time].Dimension.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Dimension", "<Level>.Dimension", "Returns the dimension that contains a specified level.", "pdl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getDimension(); } public void testLevelDimension(FoodMartTestCase test) { String s = test.executeExpr("[Time].[Year].Dimension"); Assert.assertEquals("[Time]", s); } }); define(new FunDefBase("Dimension", "<Member>.Dimension", "Returns the dimension that contains a specified member.", "pdm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getDimension(); } public void testMemberDimension(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q2].Dimension"); Assert.assertEquals("[Time]", s); } }); define(new FunDefBase("Dimensions", "Dimensions(<Numeric Expression>)", "Returns the dimension whose zero-based position within the cube is specified by a numeric expression.", "fdn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension[] dimensions = cube.getDimensions(); int n = getIntArg(evaluator, args, 0); if ((n > dimensions.length) || (n < 1)) { throw newEvalException( this, "Index '" + n + "' out of bounds"); } return dimensions[n - 1]; } public void testDimensionsNumeric(FoodMartTestCase test) { String s = test.executeExpr("Dimensions(2).Name"); Assert.assertEquals("Store", s); } }); define(new FunDefBase("Dimensions", "Dimensions(<String Expression>)", "Returns the dimension whose name is specified by a string.", "fdS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String defValue = "Default Value"; String s = getStringArg(evaluator, args, 0, defValue); if (s.indexOf("[") == -1) { s = Util.quoteMdxIdentifier(s); } OlapElement o = lookupCompound(evaluator.getSchemaReader(), evaluator.getCube(), explode(s), false, Category.Dimension); if (o instanceof Dimension) { return (Dimension) o; } else if (o == null) { throw newEvalException(this, "Dimension '" + s + "' not found"); } else { throw newEvalException(this, "Dimensions(" + s + ") found " + o); } } public void testDimensionsString(FoodMartTestCase test) { String s = test.executeExpr( "Dimensions(\"Store\").UniqueName"); Assert.assertEquals("[Store]", s); } }); // // HIERARCHY FUNCTIONS define(new FunDefBase("Hierarchy", "<Level>.Hierarchy", "Returns a level's hierarchy.", "phl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getHierarchy(); } }); define(new FunDefBase("Hierarchy", "<Member>.Hierarchy", "Returns a member's hierarchy.", "phm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getHierarchy(); } public void testTime(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q1].[1].Hierarchy"); Assert.assertEquals("[Time]", s); } public void testBasic9(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].[F].Hierarchy"); Assert.assertEquals("[Gender]", s); } public void testFirstInLevel9(FoodMartTestCase test) { String s = test.executeExpr( "[Education Level].[All Education Levels].[Bachelors Degree].Hierarchy"); Assert.assertEquals("[Education Level]", s); } public void testHierarchyAll(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Hierarchy"); Assert.assertEquals("[Gender]", s); } public void testHierarchyNull(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Parent.Hierarchy"); Assert.assertEquals("[Gender]", s); // MSOLAP gives "#ERR" } }); // // LEVEL FUNCTIONS define(new FunDefBase("Level", "<Member>.Level", "Returns a member's level.", "plm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getLevel(); } public void testMemberLevel(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].[Q1].[1].Level.UniqueName"); Assert.assertEquals("[Time].[Month]", s); } }); define(new FunDefBase("Levels", "<Hierarchy>.Levels(<Numeric Expression>)", "Returns the level whose position in a hierarchy is specified by a numeric expression.", "mlhn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); Level[] levels = hierarchy.getLevels(); int n = getIntArg(evaluator, args, 1); if ((n > levels.length) || (n < 1)) { throw newEvalException( this, "Index '" + n + "' out of bounds"); } return levels[n - 1]; } public void testLevelsNumeric(FoodMartTestCase test) { String s = test.executeExpr("[Time].Levels(2).Name"); Assert.assertEquals("Quarter", s); } public void testLevelsTooSmall(FoodMartTestCase test) { test.assertExprThrows( "[Time].Levels(0).Name", "Index '0' out of bounds"); } public void testLevelsTooLarge(FoodMartTestCase test) { test.assertExprThrows( "[Time].Levels(8).Name", "Index '8' out of bounds"); } }); define(new FunDefBase("Levels", "Levels(<String Expression>)", "Returns the level whose name is specified by a string expression.", "flS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String s = getStringArg(evaluator, args, 0, null); Cube cube = evaluator.getCube(); OlapElement o = null; if (s.startsWith("[")) { o = lookupCompound(evaluator.getSchemaReader(), cube, explode(s), false, Category.Level); } else { // lookupCompound barfs if "s" doesn't have matching // brackets, so don't even try o = null; } if (o instanceof Level) { return (Level) o; } else if (o == null) { throw newEvalException(this, "Level '" + s + "' not found"); } else { throw newEvalException(this, "Levels('" + s + "') found " + o); } } public void testLevelsString(FoodMartTestCase test) { String s = test.executeExpr( "Levels(\"[Time].[Year]\").UniqueName"); Assert.assertEquals("[Time].[Year]", s); } public void testLevelsStringFail(FoodMartTestCase test) { test.assertExprThrows( "Levels(\"nonexistent\").UniqueName", "Level 'nonexistent' not found"); } }); // // LOGICAL FUNCTIONS define(new FunkResolver("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", new String[] {"fbS", "fbn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Object o = getScalarArg(evaluator, args, 0); if (o == Util.nullValue) { return Boolean.TRUE; } else { return Boolean.FALSE; } } public void testIsEmpty(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Measures].[Foo] AS 'Iif(IsEmpty([Measures].[Unit Sales]), 5, [Measures].[Unit Sales])'" + nl + "SELECT {[Store].[USA].[WA].children} on columns" + nl + "FROM Sales" + nl + "WHERE ( [Time].[1997].[Q4].[12]," + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer]," + nl + " [Measures].[Foo])", "Axis #0:" + nl + "{[Time].[1997].[Q4].[12], [Product].[All Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Portsmouth].[Portsmouth Imported Beer], [Measures].[Foo]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima]}" + nl + "Row #0: 5" + nl + "Row #0: 5" + nl + "Row #0: 2" + nl + "Row #0: 5" + nl + "Row #0: 11" + nl + "Row #0: 5" + nl + "Row #0: 4" + nl); } })); define(new FunDefBase("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", "fbn")); // // MEMBER FUNCTIONS define(new FunDefBase("Ancestor", "Ancestor(<Member>, <Level>)", "Returns the ancestor of a member at a specified level.", "fmml") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, false); Level level = getLevelArg(evaluator, args, 1, false); if (member.getHierarchy() != level.getHierarchy()) { throw newEvalException( this, "member '" + member + "' is not in the same hierarchy as level '" + level + "'"); } if (member.getLevel().equals(level)) { return member; } Member[] members = member.getAncestorMembers(); for (int i = 0; i < members.length; i++) { if (members[i].getLevel().equals(level)) return members[i]; } return member.getHierarchy().getNullMember(); // not found } public void testAncestor(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA].[CA].[Los Angeles],[Store Country])"); Assert.assertEquals("USA", member.getName()); } public void testAncestorHigher(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA],[Store].[Store City])"); Assert.assertNull(member); // MSOLAP returns null } public void testAncestorSameLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[Canada],[Store].[Store Country])"); Assert.assertEquals("Canada", member.getName()); } public void testAncestorWrongHierarchy(FoodMartTestCase test) { // MSOLAP gives error "Formula error - dimensions are not // valid (they do not match) - in the Ancestor function" test.assertAxisThrows( "Ancestor([Gender].[M],[Store].[Store Country])", "member '[Gender].[All Gender].[M]' is not in the same hierarchy as level '[Store].[Store Country]'"); } public void testAncestorAllLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA].[CA],[Store].Levels(1))"); Assert.assertTrue(member.isAll()); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension timeDimension = cube.getYearLevel().getDimension(); Member member = evaluator.getContext(timeDimension); Level level = member.getLevel().getChildLevel(); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodNoArgs(FoodMartTestCase test) { // MSOLAP returns [1997].[Q4], because [Time].CurrentMember = // [1997]. Member member = test.executeAxis("ClosingPeriod()"); Assert.assertEquals("[Time].[1997].[Q4]", member.getUniqueName()); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fml") { public Object evaluate(Evaluator evaluator, Exp[] args) { Cube cube = evaluator.getCube(); Dimension timeDimension = cube.getYearLevel().getDimension(); Member member = evaluator.getContext(timeDimension); Level level = getLevelArg(evaluator, args, 0, true); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodLevel(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month])"); Assert.assertEquals("[Time].[1997].[Q4].[12]", member.getUniqueName()); } public void testClosingPeriodLevelNotInTimeFails(FoodMartTestCase test) { test.assertAxisThrows( "ClosingPeriod([Store].[Store City])", "member '[Time].[1997]' must be in same hierarchy as level '[Store].[Store City]'"); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Level level = member.getLevel().getChildLevel(); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriodMember(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([USA])"); Assert.assertEquals("WA", member.getName()); } public void testClosingPeriodMemberLeaf(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Time].[1997].[Q3].[8])"); Assert.assertNull(member); } }); define(new FunDefBase("ClosingPeriod", "ClosingPeriod([<Level>[, <Member>]])", "Returns the last sibling among the descendants of a member at a level.", "fmlm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); Member member = getMemberArg(evaluator, args, 1, true); return openClosingPeriod(evaluator, this, member, level); } public void testClosingPeriod(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month],[1997])"); Assert.assertEquals("[Time].[1997].[Q4].[12]", member.getUniqueName()); } public void testClosingPeriodBelow(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Quarter],[1997].[Q3].[8])"); Assert.assertNull(member); } }); define(new FunDefBase("Cousin", "Cousin(<Member1>, <Member2>)", "Returns the member with the same relative position under a member as the member specified.", "fmmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member1 = getMemberArg(evaluator, args, 0, true); Member member2 = getMemberArg(evaluator, args, 1, true); Member cousin = cousin(evaluator.getSchemaReader(), member1, member2); if (cousin == null) { cousin = member1.getHierarchy().getNullMember(); } return cousin; } private Member cousin(SchemaReader schemaReader, Member member1, Member member2) { if (member1.getHierarchy() != member2.getHierarchy()) { throw newEvalException( this, "Members '" + member1 + "' and '" + member2 + "' are not compatible as cousins"); } if (member1.getLevel().getDepth() < member2.getLevel().getDepth()) { return null; } return cousin2(schemaReader, member1, member2); } private Member cousin2(SchemaReader schemaReader, Member member1, Member member2) { if (member1.getLevel() == member2.getLevel()) { return member2; } Member uncle = cousin2(schemaReader, member1.getParentMember(), member2); if (uncle == null) { return null; } int ordinal = Util.getMemberOrdinalInParent(schemaReader, member1); Member[] cousins = schemaReader.getMemberChildren(uncle); if (cousins.length <= ordinal) { return null; } return cousins[ordinal]; } public void testCousin1(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4],[1998])"); Assert.assertEquals("[Time].[1998].[Q4]", member.getUniqueName()); } public void testCousin2(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4].[12],[1998].[Q1])"); Assert.assertEquals("[Time].[1998].[Q1].[3]", member.getUniqueName()); } public void testCousinOverrun(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Customers].[USA].[CA].[San Jose], [Customers].[USA].[OR])"); // CA has more cities than OR Assert.assertNull(member); } public void testCousinThreeDown(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Customers].[USA].[CA].[Berkeley].[Alma Shelton], [Customers].[Mexico])"); // Alma Shelton is the 3rd child // of the 4th child (Berkeley) // of the 1st child (CA) // of USA Assert.assertEquals("[Customers].[All Customers].[Mexico].[DF].[Tixapan].[Albert Clouse]", member.getUniqueName()); } public void testCousinSameLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Gender].[M], [Gender].[F])"); Assert.assertEquals("F", member.getName()); } public void testCousinHigherLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Time].[1997], [Time].[1998].[Q1])"); Assert.assertNull(member); } public void testCousinWrongHierarchy(FoodMartTestCase test) { test.assertAxisThrows( "Cousin([Time].[1997], [Gender].[M])", "Members '[Time].[1997]' and '[Gender].[All Gender].[M]' are not compatible as cousins"); } }); define(new FunDefBase("CurrentMember", "<Dimension>.CurrentMember", "Returns the current member along a dimension during an iteration.", "pmd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return evaluator.getContext(dimension); } public void testCurrentMemberFromSlicer(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Gender].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales where ([Gender].[F])"); Assert.assertEquals("F", result.getCell(new int[] {0}).getValue()); } public void testCurrentMemberFromDefaultMember(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Time].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales"); Assert.assertEquals("1997", result.getCell(new int[] {0}).getValue()); } public void testCurrentMemberFromAxis(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Gender].CurrentMember.Name || [Marital Status].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns," + nl + " CrossJoin({[Gender].children}, {[Marital Status].children}) on rows" + nl + "from Sales"); Assert.assertEquals("FM", result.getCell(new int[] {0,0}).getValue()); } /** * When evaluating a calculated member, MSOLAP regards that * calculated member as the current member of that dimension, so it * cycles in this case. But I disagree; it is the previous current * member, before the calculated member was expanded. */ public void testCurrentMemberInCalcMember(FoodMartTestCase test) { Result result = test.runQuery( "with member [Measures].[Foo] as '[Measures].CurrentMember.Name'" + nl + "select {[Measures].[Foo]} on columns" + nl + "from Sales"); Assert.assertEquals("Unit Sales", result.getCell(new int[] {0}).getValue()); } }); define(new FunDefBase("DefaultMember", "<Dimension>.DefaultMember", "Returns the default member of a dimension.", "pmd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getHierarchyDefaultMember( dimension.getHierarchy()); } public void testDimensionDefaultMember(FoodMartTestCase test) { Member member = test.executeAxis("[Measures].DefaultMember"); Assert.assertEquals("Unit Sales", member.getName()); } }); define(new FunDefBase("FirstChild", "<Member>.FirstChild", "Returns the first child of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); if (children.length == 0) { return member.getHierarchy().getNullMember(); } else { return children[0]; } } public void testFirstChildFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].FirstChild"); Assert.assertEquals("10", member.getName()); } public void testFirstChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstChild"); Assert.assertEquals("F", member.getName()); } public void testFirstChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].[F].FirstChild"); Assert.assertNull(member); } }); define(new FunDefBase("FirstSibling", "<Member>.FirstSibling", "Returns the first child of the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); Member[] children; if (parent == null) { if (member.isNull()) { return member; } children = evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy()); } else { children = evaluator.getSchemaReader().getMemberChildren(parent); } return children[0]; } public void testFirstSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstSibling"); Assert.assertEquals("F", member.getName()); } public void testFirstSiblingLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].FirstSibling"); Assert.assertEquals("Q1", member.getName()); } public void testFirstSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstSibling"); Assert.assertTrue(member.isAll()); } public void testFirstSiblingRoot(FoodMartTestCase test) { // The [Measures] hierarchy does not have an 'all' member, so // [Unit Sales] does not have a parent. Member member = test.executeAxis( "[Measures].[Store Sales].FirstSibling"); Assert.assertEquals("Unit Sales", member.getName()); } public void testFirstSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.FirstSibling"); Assert.assertNull(member); } }); if (false) define(new FunDefBase("Item", "<Tuple>.Item(<Numeric Expression>)", "Returns a member from a tuple.", "mm*")); define(new FunkResolver( "Lag", "<Member>.Lag(<Numeric Expression>)", "Returns a member further along the specified member's dimension.", new String[]{"mmmn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); int n = getIntArg(evaluator, args, 1); return evaluator.getSchemaReader().getLeadMember(member, -n); } public void testLag(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].[12].Lag(4)"); Assert.assertEquals("8", member.getName()); } public void testLagFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].Lag(1)"); Assert.assertNull(member); } public void testLagAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].DefaultMember.Lag(2)"); Assert.assertNull(member); } public void testLagRoot(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1998].Lag(1)"); Assert.assertEquals("1997", member.getName()); } public void testLagRootTooFar(FoodMartTestCase test) { Member member = test.executeAxis("[Time].[1998].Lag(2)"); Assert.assertNull(member); } })); define(new FunDefBase("LastChild", "<Member>.LastChild", "Returns the last child of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); if (children.length == 0) { return member.getHierarchy().getNullMember(); } else { return children[children.length - 1]; } } public void testLastChild(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].LastChild"); Assert.assertEquals("M", member.getName()); } public void testLastChildLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].LastChild"); Assert.assertEquals("12", member.getName()); } public void testLastChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastChild"); Assert.assertEquals("M", member.getName()); } public void testLastChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].LastChild"); Assert.assertNull(member); } }); define(new FunDefBase("LastSibling", "<Member>.LastSibling", "Returns the last child of the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); Member[] children; if (parent == null) { if (member.isNull()) { return member; } children = evaluator.getSchemaReader().getHierarchyRootMembers(member.getHierarchy()); } else { children = evaluator.getSchemaReader().getMemberChildren(parent); } return children[children.length - 1]; } public void testLastSibling(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].LastSibling"); Assert.assertEquals("M", member.getName()); } public void testLastSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q1].LastSibling"); Assert.assertEquals("Q4", member.getName()); } public void testLastSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastSibling"); Assert.assertTrue(member.isAll()); } public void testLastSiblingRoot(FoodMartTestCase test) { // The [Time] hierarchy does not have an 'all' member, so // [1997], [1998] do not have parents. Member member = test.executeAxis( "[Time].[1998].LastSibling"); Assert.assertEquals("1998", member.getName()); } public void testLastSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.LastSibling"); Assert.assertNull(member); } }); define(new FunkResolver( "Lead", "<Member>.Lead(<Numeric Expression>)", "Returns a member further along the specified member's dimension.", new String[]{"mmmn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); int n = getIntArg(evaluator, args, 1); return evaluator.getSchemaReader().getLeadMember(member, n); } public void testLead(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q2].[4].Lead(4)"); Assert.assertEquals("8", member.getName()); } public void testLeadNegative(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(-1)"); Assert.assertEquals("F", member.getName()); } public void testLeadLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(3)"); Assert.assertNull(member); } })); define(new FunDefBase("Members", "Members(<String Expression>)", "Returns the member whose name is specified by a string expression.", "fmS")); define(new FunDefBase( "NextMember", "<Member>.NextMember", "Returns the next member in the level that contains a specified member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getLeadMember(member, +1); } public void testBasic2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[F].NextMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("M")); } public void testFirstInLevel2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[M].NextMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions.length == 0); } public void testAll2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].PrevMember} ON COLUMNS from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions.length == 0); } }); if (false) define(new FunDefBase("OpeningPeriod", "OpeningPeriod([<Level>[, <Member>]])", "Returns the first sibling among the descendants of a member at a level.", "fm*")); if (false) define(new FunDefBase("ParallelPeriod", "ParallelPeriod([<Level>[, <Numeric Expression>[, <Member>]]])", "Returns a member from a prior period in the same relative position as a specified member.", "fm*")); define(new FunDefBase("Parent", "<Member>.Parent", "Returns the parent of a member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); if (parent == null || !evaluator.getSchemaReader().getRole().canAccess(parent)) { parent = member.getHierarchy().getNullMember(); } return parent; } public void testBasic5(FoodMartTestCase test) { Result result = test.runQuery( "select{ [Product].[All Products].[Drink].Parent} on columns from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("All Products")); } public void testFirstInLevel5(FoodMartTestCase test) { Result result = test.runQuery( "select {[Time].[1997].[Q2].[4].Parent} on columns,{[Gender].[M]} on rows from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("Q2")); } public void testAll5(FoodMartTestCase test) { Result result = test.runQuery( "select {[Time].[1997].[Q2].Parent} on columns,{[Gender].[M]} on rows from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("1997")); } }); define(new FunDefBase("PrevMember", "<Member>.PrevMember", "Returns the previous member in the level that contains a specified member.", "pmm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return evaluator.getSchemaReader().getLeadMember(member, -1); } public void testBasic(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[M].PrevMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions[0].members[0].getName().equals("F")); } public void testFirstInLevel(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[F].PrevMember} ON COLUMNS from Sales"); Assert.assertTrue(result.getAxes()[0].positions.length == 0); } public void testAll(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].PrevMember} ON COLUMNS from Sales"); // previous to [Gender].[All] is null, so no members are returned Assert.assertTrue(result.getAxes()[0].positions.length == 0); } }); if (false) define(new FunDefBase("ValidMeasure", "ValidMeasure(<Tuple>)", "Returns a valid measure in a virtual cube by forcing inapplicable dimensions to their top level.", "fm*")); // // NUMERIC FUNCTIONS define(new FunkResolver("Aggregate", "Aggregate(<Set>[, <Numeric Expression>])", "Returns a calculated value using the appropriate aggregate function, based on the context of the query.", new String[] {"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); Aggregator aggregator = (Aggregator) evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE); if (aggregator == null) { throw newEvalException(null, "Could not find an aggregator in the current evaluation context"); } Aggregator rollup = aggregator.getRollup(); if (rollup == null) { throw newEvalException(null, "Don't know how to rollup aggregator '" + aggregator + "'"); } return rollup.aggregate(evaluator.push(), members, exp); } public void testAggregate(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Store].[CA plus OR] AS 'AGGREGATE({[Store].[USA].[CA], [Store].[USA].[OR]})'" + nl + "SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} ON COLUMNS," + nl + " {[Store].[USA].[CA], [Store].[USA].[OR], [Store].[CA plus OR]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE ([1997].[Q1])", "Axis #0:" + nl + "{[Time].[1997].[Q1]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[CA]}" + nl + "{[Store].[All Stores].[USA].[OR]}" + nl + "{[Store].[CA plus OR]}" + nl + "Row #0: 16,890" + nl + "Row #0: 36,175.20" + nl + "Row #1: 19,287" + nl + "Row #1: 40,170.29" + nl + "Row #2: 36,177" + nl + "Row #2: 76,345.49" + nl); } public void testAggregate2(FoodMartTestCase test) { test.runQueryCheckResult( "WITH" + nl + " MEMBER [Time].[1st Half Sales] AS 'Aggregate({Time.[1997].[Q1], Time.[1997].[Q2]})'" + nl + " MEMBER [Time].[2nd Half Sales] AS 'Aggregate({Time.[1997].[Q3], Time.[1997].[Q4]})'" + nl + " MEMBER [Time].[Difference] AS 'Time.[2nd Half Sales] - Time.[1st Half Sales]'" + nl + "SELECT" + nl + " { [Store].[Store State].Members} ON COLUMNS," + nl + " { Time.[1st Half Sales], Time.[2nd Half Sales], Time.[Difference]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE [Measures].[Store Sales]", "Axis #0:" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[Canada].[BC]}" + nl + "{[Store].[All Stores].[Mexico].[DF]}" + nl + "{[Store].[All Stores].[Mexico].[Guerrero]}" + nl + "{[Store].[All Stores].[Mexico].[Jalisco]}" + nl + "{[Store].[All Stores].[Mexico].[Veracruz]}" + nl + "{[Store].[All Stores].[Mexico].[Yucatan]}" + nl + "{[Store].[All Stores].[Mexico].[Zacatecas]}" + nl + "{[Store].[All Stores].[USA].[CA]}" + nl + "{[Store].[All Stores].[USA].[OR]}" + nl + "{[Store].[All Stores].[USA].[WA]}" + nl + "Axis #2:" + nl + "{[Time].[1st Half Sales]}" + nl + "{[Time].[2nd Half Sales]}" + nl + "{[Time].[Difference]}" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: (null)" + nl + "Row #0: 74,571.95" + nl + "Row #0: 71,943.17" + nl + "Row #0: 125,779.50" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: (null)" + nl + "Row #1: 84,595.89" + nl + "Row #1: 70,333.90" + nl + "Row #1: 138,013.72" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: .00" + nl + "Row #2: 10,023.94" + nl + "Row #2: -1,609.27" + nl + "Row #2: 12,234.22" + nl); } public void testAggregateToSimulateCompoundSlicer(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Time].[1997 H1] as 'Aggregate({[Time].[1997].[Q1], [Time].[1997].[Q2]})'" + nl + " MEMBER [Education Level].[College or higher] as 'Aggregate({[Education Level].[Bachelors Degree], [Education Level].[Graduate Degree]})'" + nl + "SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} on columns," + nl + " {[Product].children} on rows" + nl + "FROM [Sales]" + nl + "WHERE ([Time].[1997 H1], [Education Level].[College or higher], [Gender].[F])", "Axis #0:" + nl + "{[Time].[1997 H1], [Education Level].[College or higher], [Gender].[All Gender].[F]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink]}" + nl + "{[Product].[All Products].[Food]}" + nl + "{[Product].[All Products].[Non-Consumable]}" + nl + "Row #0: 1,797" + nl + "Row #0: 3,620.49" + nl + "Row #1: 15,002" + nl + "Row #1: 31,931.88" + nl + "Row #2: 3,845" + nl + "Row #2: 8,173.22" + nl); } })); define(new FunkResolver("$AggregateChildren", "$AggregateChildren(<Hierarchy>)", "Equivalent to 'Aggregate(<Hierarchy>.CurrentMember.Children); for internal use.", new String[] {"Inh"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); Member member = evaluator.getParent().getContext(hierarchy.getDimension()); List members = (List) member.getPropertyValue(Property.PROPERTY_CONTRIBUTING_CHILDREN); Aggregator aggregator = (Aggregator) evaluator.getProperty(Property.PROPERTY_AGGREGATION_TYPE); if (aggregator == null) { throw newEvalException(null, "Could not find an aggregator in the current evaluation context"); } Aggregator rollup = aggregator.getRollup(); if (rollup == null) { throw newEvalException(null, "Don't know how to rollup aggregator '" + aggregator + "'"); } return rollup.aggregate(evaluator.push(), members, valueFunCall); } })); define(new FunkResolver( "Avg", "Avg(<Set>[, <Numeric Expression>])", "Returns the average value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return avg(evaluator.push(), members, exp); } public void testAvg(FoodMartTestCase test) { String result = test.executeExpr( "AVG({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("188,412.71", result); } //todo: testAvgWithNulls })); define(new FunkResolver( "Correlation", "Correlation(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the correlation of two series evaluated over a set.", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2, valueFunCall); return correlation(evaluator.push(), members, exp1, exp2); } public void testCorrelation(FoodMartTestCase test) { String result = test.executeExpr("Correlation({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales]) * 1000000"); Assert.assertEquals("999,906", result); } })); defineReserved(new String[] {"EXCLUDEEMPTY","INCLUDEEMPTY"}); define(new FunkResolver( "Count", "Count(<Set>[, EXCLUDEEMPTY | INCLUDEEMPTY])", "Returns the number of tuples in a set, empty cells included unless the optional EXCLUDEEMPTY flag is used.", new String[]{"fnx", "fnxy"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); String empties = getLiteralArg(args, 1, "INCLUDEEMPTY", new String[] {"INCLUDEEMPTY", "EXCLUDEEMPTY"}, null); final boolean includeEmpty = empties.equals("INCLUDEEMPTY"); return count(evaluator, members, includeEmpty); } public void testCount(FoodMartTestCase test) { String result = test.executeExpr( "count({[Promotion Media].[Media Type].members})"); Assert.assertEquals("14", result); } public void testCountExcludeEmpty(FoodMartTestCase test) { test.runQueryCheckResult( "with member [Measures].[Promo Count] as " + nl + " ' Count(Crossjoin({[Measures].[Unit Sales]}," + nl + " {[Promotion Media].[Media Type].members}), EXCLUDEEMPTY)'" + nl + "select {[Measures].[Unit Sales], [Measures].[Promo Count]} on columns," + nl + " {[Product].[Drink].[Beverages].[Carbonated Beverages].[Soda].children} on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Promo Count]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Excellent]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Fabulous]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Skinner]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Token]}" + nl + "{[Product].[All Products].[Drink].[Beverages].[Carbonated Beverages].[Soda].[Washington]}" + nl + "Row #0: 738" + nl + "Row #0: 14" + nl + "Row #1: 632" + nl + "Row #1: 13" + nl + "Row #2: 655" + nl + "Row #2: 14" + nl + "Row #3: 735" + nl + "Row #3: 14" + nl + "Row #4: 647" + nl + "Row #4: 12" + nl); } //todo: testCountNull, testCountNoExp })); define(new FunkResolver( "Covariance", "Covariance(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the covariance of two series evaluated over a set (biased).", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2); return covariance(evaluator.push(), members, exp1, exp2, true); } public void testCovariance(FoodMartTestCase test) { String result = test.executeExpr("Covariance({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales])"); Assert.assertEquals("1,355,761,899", result); } })); define(new FunkResolver( "CovarianceN", "CovarianceN(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Returns the covariance of two series evaluated over a set (unbiased).", new String[]{"fnxn","fnxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2, valueFunCall); return covariance(evaluator.push(), members, exp1, exp2, false); } public void testCovarianceN(FoodMartTestCase test) { String result = test.executeExpr("CovarianceN({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales])"); Assert.assertEquals("2,033,642,849", result); } })); define(new FunDefBase("IIf", "IIf(<Logical Expression>, <Numeric Expression1>, <Numeric Expression2>)", "Returns one of two numeric values determined by a logical test.", "fnbnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { boolean logical = getBooleanArg(evaluator, args, 0); return getDoubleArg(evaluator, args, logical ? 1 : 2); } public void testIIfNumeric(FoodMartTestCase test) { String s = test.executeExpr( "IIf(([Measures].[Unit Sales],[Product].[Drink].[Alcoholic Beverages].[Beer and Wine]) > 100, 45, 32)"); Assert.assertEquals("45", s); } }); if (false) define(new FunDefBase("LinRegIntercept", "LinRegIntercept(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of b in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegPoint", "LinRegPoint(<Numeric Expression>, <Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of y in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegR2", "LinRegR2(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns R2 (the coefficient of determination).", "fn*")); if (false) define(new FunDefBase("LinRegSlope", "LinRegSlope(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the value of a in the regression line y = ax + b.", "fn*")); if (false) define(new FunDefBase("LinRegVariance", "LinRegVariance(<Set>, <Numeric Expression>[, <Numeric Expression>])", "Calculates the linear regression of a set and returns the variance associated with the regression line y = ax + b.", "fn*")); define(new FunkResolver( "Max", "Max(<Set>[, <Numeric Expression>])", "Returns the maximum value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return max(evaluator.push(), members, exp); } public void testMax(FoodMartTestCase test) { String result = test.executeExpr( "MAX({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("263,793.22", result); } })); define(new FunkResolver( "Median", "Median(<Set>[, <Numeric Expression>])", "Returns the median value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); //todo: ignore nulls, do we need to ignore the List? return median(evaluator.push(), members, exp); } public void testMedian(FoodMartTestCase test) { String result = test.executeExpr( "MEDIAN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("159,167.84", result); } public void testMedian2(FoodMartTestCase test) { test.runQueryCheckResult( "WITH" + nl + " MEMBER [Time].[1st Half Sales] AS 'Sum({[Time].[1997].[Q1], [Time].[1997].[Q2]})'" + nl + " MEMBER [Time].[2nd Half Sales] AS 'Sum({[Time].[1997].[Q3], [Time].[1997].[Q4]})'" + nl + " MEMBER [Time].[Median] AS 'Median(Time.Members)'" + nl + "SELECT" + nl + " NON EMPTY { [Store].[Store Name].Members} ON COLUMNS," + nl + " { [Time].[1st Half Sales], [Time].[2nd Half Sales], [Time].[Median]} ON ROWS" + nl + "FROM Sales" + nl + "WHERE [Measures].[Store Sales]", "Axis #0:" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #1:" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills].[Store 6]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles].[Store 7]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego].[Store 24]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco].[Store 14]}" + nl + "{[Store].[All Stores].[USA].[OR].[Portland].[Store 11]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem].[Store 13]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham].[Store 2]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton].[Store 3]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle].[Store 15]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane].[Store 16]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma].[Store 17]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla].[Store 22]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima].[Store 23]}" + nl + "Axis #2:" + nl + "{[Time].[1st Half Sales]}" + nl + "{[Time].[2nd Half Sales]}" + nl + "{[Time].[Median]}" + nl + "Row #0: 20,801.04" + nl + "Row #0: 25,421.41" + nl + "Row #0: 26,275.11" + nl + "Row #0: 2,074.39" + nl + "Row #0: 28,519.18" + nl + "Row #0: 43,423.99" + nl + "Row #0: 2,140.99" + nl + "Row #0: 25,502.08" + nl + "Row #0: 25,293.50" + nl + "Row #0: 23,265.53" + nl + "Row #0: 34,926.91" + nl + "Row #0: 2,159.60" + nl + "Row #0: 12,490.89" + nl + "Row #1: 24,949.20" + nl + "Row #1: 29,123.87" + nl + "Row #1: 28,156.03" + nl + "Row #1: 2,366.79" + nl + "Row #1: 26,539.61" + nl + "Row #1: 43,794.29" + nl + "Row #1: 2,598.24" + nl + "Row #1: 27,394.22" + nl + "Row #1: 27,350.57" + nl + "Row #1: 26,368.93" + nl + "Row #1: 39,917.05" + nl + "Row #1: 2,546.37" + nl + "Row #1: 11,838.34" + nl + "Row #2: 4,577.35" + nl + "Row #2: 5,211.38" + nl + "Row #2: 4,722.87" + nl + "Row #2: 398.24" + nl + "Row #2: 5,039.50" + nl + "Row #2: 7,374.59" + nl + "Row #2: 410.22" + nl + "Row #2: 4,924.04" + nl + "Row #2: 4,569.13" + nl + "Row #2: 4,511.68" + nl + "Row #2: 6,630.91" + nl + "Row #2: 419.51" + nl + "Row #2: 2,169.48" + nl); } })); define(new FunkResolver( "Min", "Min(<Set>[, <Numeric Expression>])", "Returns the minimum value of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return min(evaluator.push(), members, exp); } public void testMin(FoodMartTestCase test) { String result = test.executeExpr( "MIN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("142,277.07", result); } })); define(new FunDefBase("Ordinal", "<Level>.Ordinal", "Returns the zero-based ordinal value associated with a level.", "pnl")); if (false) define(new FunDefBase("Rank", "Rank(<Tuple>, <Set>)", "Returns the one-based rank of a tuple in a set.", "fn*")); define(new FunkResolver( "Stddev", "Stddev(<Set>[, <Numeric Expression>])", "Alias for Stdev.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, false); } })); define(new FunkResolver( "Stdev", "Stdev(<Set>[, <Numeric Expression>])", "Returns the standard deviation of a numeric expression evaluated over a set (unbiased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, false); } public void testStdev(FoodMartTestCase test) { String result = test.executeExpr( "STDEV({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("65,825.45", result); } })); define(new FunkResolver( "StddevP", "StddevP(<Set>[, <Numeric Expression>])", "Alias for StdevP.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, true); } })); define(new FunkResolver( "StdevP", "StdevP(<Set>[, <Numeric Expression>])", "Returns the standard deviation of a numeric expression evaluated over a set (biased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return stdev(evaluator.push(), members, exp, true); } public void testStdevP(FoodMartTestCase test) { String result = test.executeExpr( "STDEVP({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("53,746.26", result); } })); define(new FunkResolver( "Sum", "Sum(<Set>[, <Numeric Expression>])", "Returns the sum of a numeric expression evaluated over a set.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return sum(evaluator.push(), members, exp); } public void testSumNoExp(FoodMartTestCase test) { String result = test.executeExpr( "SUM({[Promotion Media].[Media Type].members})"); Assert.assertEquals("266,773", result); } })); define(new FunDefBase("Value", "<Measure>.Value", "Returns the value of a measure.", "pnm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.evaluateScalar(evaluator); } }); define(new FunDefBase("_Value", "_Value(<Tuple>)", "Returns the value of the current measure within the context of a tuple.", "fnt") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member[] members = getTupleArg(evaluator, args, 0); Evaluator evaluator2 = evaluator.push(members); return evaluator2.evaluateCurrent(); } }); define(new FunDefBase("_Value", "_Value()", "Returns the value of the current measure.", "fn") { public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluator.evaluateCurrent(); } }); // _Value is a pseudo-function which evaluates a tuple to a number. // It needs a custom resolver. if (false) define(new ResolverBase("_Value", null, null, Syntax.Parentheses) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length == 1 && args[0].getType() == Category.Tuple) { return new ValueFunDef(new int[] {Category.Tuple}); } for (int i = 0; i < args.length; i++) { Exp arg = args[i]; if (!canConvert(arg, Category.Member, conversionCount)) { return null; } } int[] argTypes = new int[args.length]; for (int i = 0; i < argTypes.length; i++) { argTypes[i] = Category.Member; } return new ValueFunDef(argTypes); } }); define(new FunkResolver( "Var", "Var(<Set>[, <Numeric Expression>])", "Returns the variance of a numeric expression evaluated over a set (unbiased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, false); } public void testVar(FoodMartTestCase test) { String result = test.executeExpr( "VAR({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("4,332,990,493.69", result); } })); define(new FunkResolver( "Variance", "Variance(<Set>[, <Numeric Expression>])", "Alias for Var.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, false); } })); define(new FunkResolver( "VarianceP", "VarianceP(<Set>[, <Numeric Expression>])", "Alias for VarP.", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, true); } })); define(new FunkResolver( "VarP", "VarP(<Set>[, <Numeric Expression>])", "Returns the variance of a numeric expression evaluated over a set (biased).", new String[]{"fnx", "fnxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1, valueFunCall); return var(evaluator.push(), members, exp, true); } public void testVarP(FoodMartTestCase test) { String result = test.executeExpr( "VARP({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); Assert.assertEquals("2,888,660,329.13", result); } })); // // SET FUNCTIONS if (false) define(new FunDefBase("AddCalculatedMembers", "AddCalculatedMembers(<Set>)", "Adds calculated members to a set.", "fx*")); define(new FunDefBase("Ascendants", "Ascendants(<Member>)", "Returns the set of the ascendants of a specified member.", "fxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, false); if (member.isNull()) { return new ArrayList(); } Member[] members = member.getAncestorMembers(); final ArrayList result = new ArrayList(members.length + 1); result.add(member); addAll(result, members); return result; } public void testAscendants(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Store].[USA].[CA])", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]"); } public void testAscendantsAll(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Store].DefaultMember)", "[Store].[All Stores]"); } public void testAscendantsNull(FoodMartTestCase test) { test.assertAxisReturns( "Ascendants([Gender].[F].PrevMember)", ""); } }); define(new FunkResolver( "BottomCount", "BottomCount(<Set>, <Count>[, <Numeric Expression>])", "Returns a specified number of items from the bottom of a set, optionally ordering the set first.", new String[]{"fxxnn", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List list = (List) getArg(evaluator, args, 0); int n = getIntArg(evaluator, args, 1); ExpBase exp = (ExpBase) getArg(evaluator, args, 2, null); if (exp != null) { boolean desc = false, brk = true; sort(evaluator, list, exp, desc, brk); } if (n < list.size()) { list = list.subList(0, n); } return list; } public void testBottomCount(FoodMartTestCase test) { test.assertAxisReturns("BottomCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } //todo: test unordered })); define(new FunkResolver( "BottomPercent", "BottomPercent(<Set>, <Percentage>, <Numeric Expression>)", "Sorts a set and returns the bottom N elements whose cumulative total is at least a specified percentage.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, false, true, n.doubleValue()); } public void testBottomPercent(FoodMartTestCase test) { test.assertAxisReturns("BottomPercent({[Promotion Media].[Media Type].members}, 1, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } //todo: test precision })); define(new FunkResolver( "BottomSum", "BottomSum(<Set>, <Value>, <Numeric Expression>)", "Sorts a set and returns the bottom N elements whose cumulative total is at least a specified value.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, false, false, n.doubleValue()); } public void testBottomSum(FoodMartTestCase test) { test.assertAxisReturns("BottomSum({[Promotion Media].[Media Type].members}, 5000, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"); } })); define(new FunDefBase("Children", "<Member>.Children", "Returns the children of a member.", "pxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member[] children = evaluator.getSchemaReader().getMemberChildren(member); return Arrays.asList(children); } }); define(new MultiResolver( "Crossjoin", "Crossjoin(<Set1>, <Set2>)", "Returns the cross product of two sets.", new String[]{"fxxx"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { return new CrossJoinFunDef(dummyFunDef); } public void testCrossjoinNested(FoodMartTestCase test) { test.assertAxisReturns( " CrossJoin(" + nl + " CrossJoin(" + nl + " [Gender].members," + nl + " [Marital Status].members)," + nl + " {[Store], [Store].children})", "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Store].[All Stores].[USA]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}"); } public void testCrossjoinSingletonTuples(FoodMartTestCase test) { test.assertAxisReturns("CrossJoin({([Gender].[M])}, {([Marital Status].[S])})", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}"); } public void testCrossjoinSingletonTuplesNested(FoodMartTestCase test) { test.assertAxisReturns("CrossJoin({([Gender].[M])}, CrossJoin({([Marital Status].[S])}, [Store].children))", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Canada]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[Mexico]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Store].[All Stores].[USA]}"); } }); define(new MultiResolver( "*", "<Set1> * <Set2>", "Returns the cross product of two sets.", new String[]{"ixxx", "ixmx", "ixxm", "ixmm"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { return new CrossJoinFunDef(dummyFunDef); } public void testCrossjoinAsterisk(FoodMartTestCase test) { test.assertAxisReturns("{[Gender].[M]} * {[Marital Status].[S]}", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}"); } public void testCrossjoinAsteriskAssoc(FoodMartTestCase test) { test.assertAxisReturns("Order({[Gender].Children} * {[Marital Status].Children} * {[Time].[1997].[Q2].Children}," + "[Measures].[Unit Sales])", "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}"); } public void testCrossjoinAsteriskInsideBraces(FoodMartTestCase test) { test.assertAxisReturns("{[Gender].[M] * [Marital Status].[S] * [Time].[1997].[Q2].Children}", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[4]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[5]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S], [Time].[1997].[Q2].[6]}"); } public void testCrossJoinAsteriskQuery(FoodMartTestCase test) { test.runQueryCheckResult( "SELECT {[Measures].members * [1997].children} ON COLUMNS," + nl + " {[Store].[USA].children * [Position].[All Position].children} DIMENSION PROPERTIES [Store].[Store SQFT] ON ROWS" + nl + "FROM [HR]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q1]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q2]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q3]}" + nl + "{[Measures].[Org Salary], [Time].[1997].[Q4]}" + nl + "{[Measures].[Count], [Time].[1997].[Q1]}" + nl + "{[Measures].[Count], [Time].[1997].[Q2]}" + nl + "{[Measures].[Count], [Time].[1997].[Q3]}" + nl + "{[Measures].[Count], [Time].[1997].[Q4]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q1]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q2]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q3]}" + nl + "{[Measures].[Number of Employees], [Time].[1997].[Q4]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[CA], [Position].[All Position].[Store Temp Staff]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[OR], [Position].[All Position].[Store Temp Staff]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Middle Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Senior Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Full Time Staf]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Management]}" + nl + "{[Store].[All Stores].[USA].[WA], [Position].[All Position].[Store Temp Staff]}" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: $275.40" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 27" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #0: 9" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: $837.00" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 24" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #1: 8" + nl + "Row #2: $1,728.45" + nl + "Row #2: $1,727.02" + nl + "Row #2: $1,727.72" + nl + "Row #2: $1,726.55" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 357" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #2: 119" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: $473.04" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 51" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #3: 17" + nl + "Row #4: $401.35" + nl + "Row #4: $405.73" + nl + "Row #4: $400.61" + nl + "Row #4: $402.31" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 120" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #4: 40" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #5: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #6: (null)" + nl + "Row #7: $1,343.62" + nl + "Row #7: $1,342.61" + nl + "Row #7: $1,342.57" + nl + "Row #7: $1,343.65" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 279" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #7: 93" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: $286.74" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 30" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #8: 10" + nl + "Row #9: $333.20" + nl + "Row #9: $332.65" + nl + "Row #9: $331.28" + nl + "Row #9: $332.43" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 99" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #9: 33" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #10: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #11: (null)" + nl + "Row #12: $2,768.60" + nl + "Row #12: $2,769.18" + nl + "Row #12: $2,766.78" + nl + "Row #12: $2,769.50" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 579" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #12: 193" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: $736.29" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 81" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #13: 27" + nl + "Row #14: $674.70" + nl + "Row #14: $674.54" + nl + "Row #14: $676.25" + nl + "Row #14: $676.48" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 201" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl + "Row #14: 67" + nl); } }); defineReserved(DescendantsFlags.instance); define(new MultiResolver( "Descendants", "Descendants(<Member>[, <Level>[, <Desc_flag>]])", "Returns the set of descendants of a member at a specified level, optionally including or excluding descendants in other levels.", new String[]{"fxm", "fxml", "fxmly", "fxmn", "fxmny"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { int depthLimit = -1; // unlimited boolean depthSpecified = false; int flag = DescendantsFlags.SELF; if (args.length == 1) { depthLimit = -1; flag = DescendantsFlags.SELF_BEFORE_AFTER; } if (args.length >= 2) { if (args[1] instanceof Literal) { Literal literal = (Literal) args[1]; if (literal.getValue() instanceof Number) { Number number = (Number) literal.getValue(); depthLimit = number.intValue(); depthSpecified = true; } } } if (args.length >= 3) { flag = getLiteralArg(args, 2, DescendantsFlags.SELF, DescendantsFlags.instance, dummyFunDef); } final int depthLimitFinal = depthLimit < 0 ? Integer.MAX_VALUE : depthLimit; final int flagFinal = flag; final boolean depthSpecifiedFinal = depthSpecified; return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Level level; if (depthSpecifiedFinal) { level = null; } else if (args.length > 1) { level = getLevelArg(evaluator, args, 1, true); } else { level = member.getLevel(); } // Expand member to its children, until we get to the right // level. We assume that all children are in the same // level. final SchemaReader schemaReader = evaluator.getSchemaReader(); Member[] children = {member}; int depth = 0; List result = new ArrayList(); while (true) { final int currentDepth; final int targetDepth; if (level == null) { currentDepth = depth++; targetDepth = depthLimitFinal; } else { final Member firstChild = children[0]; currentDepth = firstChild.getLevel().getDepth(); targetDepth = level.getDepth(); } if (currentDepth == targetDepth) { if ((flagFinal & DescendantsFlags.SELF) == DescendantsFlags.SELF) { Util.addAll(result, children); } if ((flagFinal & DescendantsFlags.AFTER) != DescendantsFlags.AFTER) { break; // no more results after this level } } else if (currentDepth < targetDepth) { if ((flagFinal & DescendantsFlags.BEFORE) == DescendantsFlags.BEFORE) { Util.addAll(result, children); } } else { if ((flagFinal & DescendantsFlags.AFTER) == DescendantsFlags.AFTER) { Util.addAll(result, children); } else { break; // no more results after this level } } children = schemaReader.getMemberChildren(children); if (children.length == 0) { break; } } return result; } }; } public void testDescendantsM(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997].[Q1])", "[Time].[1997].[Q1]" + nl + "[Time].[1997].[Q1].[1]" + nl + "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]"); } public void testDescendantsML(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month])", months); } public void testDescendantsMLSelf(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF)", quarters); } public void testDescendantsMLSelfBefore(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF_AND_BEFORE)", year1997 + nl + quarters); } public void testDescendantsMLSelfBeforeAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], SELF_BEFORE_AFTER)", year1997 + nl + quarters + nl + months); } public void testDescendantsMLBefore(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], BEFORE)", year1997); } public void testDescendantsMLBeforeAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], BEFORE_AND_AFTER)", year1997 + nl + months); } public void testDescendantsMLAfter(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Quarter], AFTER)", months); } public void testDescendantsMLAfterEnd(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month], AFTER)", ""); } public void _testDescendantsMLLeaves(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], [Time].[Month], LEAVES)", "foo"); } public void testDescendantsM0(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 0)", year1997); } public void testDescendantsM2(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 2)", months); } public void testDescendantsMNY(FoodMartTestCase test) { test.assertAxisReturns("Descendants([Time].[1997], 1, BEFORE_AND_AFTER)", year1997 + nl + months); } public void testDescendantsParentChild(FoodMartTestCase test) { test.assertAxisReturns("HR", "Descendants([Employees], 2)", "[Employees].[All Employees].[Sheri Nowmer].[Derrick Whelply]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Michael Spence]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Maya Gutierrez]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Roberta Damstra]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Rebecca Kanagaki]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Darren Stanz]" + nl + "[Employees].[All Employees].[Sheri Nowmer].[Donna Arnold]"); } public void testDescendantsParentChildBefore(FoodMartTestCase test) { test.assertAxisReturns("HR", "Descendants([Employees], 2, BEFORE)", "[Employees].[All Employees]" + nl + "[Employees].[All Employees].[Sheri Nowmer]"); } }); if (false) define(new FunDefBase("Distinct", "Distinct(<Set>)", "Eliminates duplicate tuples from a set.", "fxx")); define(new FunkResolver("DrilldownLevel", "DrilldownLevel(<Set>[, <Level>]) or DrilldownLevel(<Set>, , <Index>)", "Drills down the members of a set, at a specified level, to one level below. Alternatively, drills down on a specified dimension in the set.", new String[]{"fxx", "fxxl"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { //todo add fssl functionality List set0 = (List) getArg(evaluator, args, 0); int[] depthArray = new int[set0.size()]; List drilledSet = new ArrayList(); for (int i = 0, m = set0.size(); i < m; i++) { Member member = (Member) set0.get(i); depthArray[i] = member.getLevel().getDepth(); // Object o0 = set0.get(i); // depthList.addElement(new Object[] {o0}); } Arrays.sort(depthArray); int maxDepth = depthArray[depthArray.length - 1]; for (int i = 0, m = set0.size(); i < m; i++) { Member member = (Member) set0.get(i); drilledSet.add(member); if (member.getLevel().getDepth() == maxDepth) { Member[] childMembers = evaluator.getSchemaReader().getMemberChildren(member); for (int j = 0; j < childMembers.length; j++) { drilledSet.add(childMembers[j]); } } } return drilledSet; } } )); if (false) define(new FunDefBase("DrilldownLevelBottom", "DrilldownLevelBottom(<Set>, <Count>[, [<Level>][, <Numeric Expression>]])", "Drills down the bottom N members of a set, at a specified level, to one level below.", "fx*")); if (false) define(new FunDefBase("DrilldownLevelTop", "DrilldownLevelTop(<Set>, <Count>[, [<Level>][, <Numeric Expression>]])", "Drills down the top N members of a set, at a specified level, to one level below.", "fx*")); if (false) define(new FunDefBase("DrilldownMember", "DrilldownMember(<Set1>, <Set2>[, RECURSIVE])", "Drills down the members in a set that are present in a second specified set.", "fx*")); if (false) define(new FunDefBase("DrilldownMemberBottom", "DrilldownMemberBottom(<Set1>, <Set2>, <Count>[, [<Numeric Expression>][, RECURSIVE]])", "Like DrilldownMember except that it includes only the bottom N children.", "fx*")); if (false) define(new FunDefBase("DrilldownMemberTop", "DrilldownMemberTop(<Set1>, <Set2>, <Count>[, [<Numeric Expression>][, RECURSIVE]])", "Like DrilldownMember except that it includes only the top N children.", "fx*")); if (false) define(new FunDefBase("DrillupLevel", "DrillupLevel(<Set>[, <Level>])", "Drills up the members of a set that are below a specified level.", "fx*")); if (false) define(new FunDefBase("DrillupMember", "DrillupMember(<Set1>, <Set2>)", "Drills up the members in a set that are present in a second specified set.", "fx*")); define(new FunkResolver( "Except", "Except(<Set1>, <Set2>[, ALL])", "Finds the difference between two sets, optionally retaining duplicates.", new String[]{"fxxx", "fxxxs"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { // todo: implement ALL HashSet set = new HashSet(); set.addAll((List) getArg(evaluator, args, 1)); List set1 = (List) getArg(evaluator, args, 0); List result = new ArrayList(); for (int i = 0, count = set1.size(); i < count; i++) { Object o = set1.get(i); if (!set.contains(o)) { result.add(o); } } return result; } })); if (false) define(new FunDefBase("Extract", "Extract(<Set>, <Dimension>[, <Dimension>...])", "Returns a set of tuples from extracted dimension elements. The opposite of Crossjoin.", "fx*")); define(new FunDefBase("Filter", "Filter(<Set>, <Search Condition>)", "Returns the set resulting from filtering a set based on a search condition.", "fxxb") { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); Exp exp = args[1]; List result = new ArrayList(); Evaluator evaluator2 = evaluator.push(); for (int i = 0, count = members.size(); i < count; i++) { Object o = members.get(i); if (o instanceof Member) { evaluator2.setContext((Member) o); } else if (o instanceof Member[]) { evaluator2.setContext((Member[]) o); } else { throw Util.newInternal( "unexpected type in set: " + o.getClass()); } Boolean b = (Boolean) exp.evaluateScalar(evaluator2); if (b.booleanValue()) { result.add(o); } } return result; } /** * Make sure that slicer is in force when expression is applied * on axis, E.g. select filter([Customers].members, [Unit Sales] > 100) * from sales where ([Time].[1998]) **/ public void testFilterWithSlicer(FoodMartTestCase test) { Result result = test.execute( "select {[Measures].[Unit Sales]} on columns," + nl + " filter([Customers].[USA].children," + nl + " [Measures].[Unit Sales] > 20000) on rows" + nl + "from Sales" + nl + "where ([Time].[1997].[Q1])"); Axis rows = result.getAxes()[1]; // if slicer were ignored, there would be 3 rows Assert.assertEquals(1, rows.positions.length); Cell cell = result.getCell(new int[] {0,0}); Assert.assertEquals("30,114", cell.getFormattedValue()); } public void testFilterCompound(FoodMartTestCase test) { Result result = test.execute( "select {[Measures].[Unit Sales]} on columns," + nl + " Filter(" + nl + " CrossJoin(" + nl + " [Gender].Children," + nl + " [Customers].[USA].Children)," + nl + " [Measures].[Unit Sales] > 9500) on rows" + nl + "from Sales" + nl + "where ([Time].[1997].[Q1])"); Position[] rows = result.getAxes()[1].positions; Assert.assertTrue(rows.length == 3); Assert.assertEquals("F", rows[0].members[0].getName()); Assert.assertEquals("WA", rows[0].members[1].getName()); Assert.assertEquals("M", rows[1].members[0].getName()); Assert.assertEquals("OR", rows[1].members[1].getName()); Assert.assertEquals("M", rows[2].members[0].getName()); Assert.assertEquals("WA", rows[2].members[1].getName()); } }); define(new MultiResolver( "Generate", "Generate(<Set1>, <Set2>[, ALL])", "Applies a set to each member of another set and joins the resulting sets by union.", new String[] {"fxxx", "fxxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { final boolean all = getLiteralArg(args, 2, "", new String[] {"ALL"}, dummyFunDef).equalsIgnoreCase("ALL"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); List result = new ArrayList(); HashSet emitted = all ? null : new HashSet(); for (int i = 0; i < members.size(); i++) { Object o = members.get(i); if (o instanceof Member) { evaluator.setContext((Member) o); } else { evaluator.setContext((Member[]) o); } final List result2 = (List) args[1].evaluate(evaluator); if (all) { result.addAll(result2); } else { for (int j = 0; j < result2.size(); j++) { Object row = result2.get(j); if (emitted.add(row)) { result.add(row); } } } } return result; } }; } public void testGenerate(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA], [Store].[USA].[CA]}, {[Store].CurrentMember.Children})", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[WA]" + nl + "[Store].[All Stores].[USA].[CA].[Alameda]" + nl + "[Store].[All Stores].[USA].[CA].[Beverly Hills]" + nl + "[Store].[All Stores].[USA].[CA].[Los Angeles]" + nl + "[Store].[All Stores].[USA].[CA].[San Diego]" + nl + "[Store].[All Stores].[USA].[CA].[San Francisco]"); } public void testGenerateAll(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[OR].[Portland]}," + " Ascendants([Store].CurrentMember)," + " ALL)", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]" + nl + "[Store].[All Stores].[USA].[OR].[Portland]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]"); } public void testGenerateUnique(FoodMartTestCase test) { test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[OR].[Portland]}," + " Ascendants([Store].CurrentMember))", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores]" + nl + "[Store].[All Stores].[USA].[OR].[Portland]" + nl + "[Store].[All Stores].[USA].[OR]"); } public void testGenerateCrossJoin(FoodMartTestCase test) { // Note that the different regions have different Top 2. test.assertAxisReturns( "Generate({[Store].[USA].[CA], [Store].[USA].[CA].[San Francisco]}," + nl + " CrossJoin({[Store].CurrentMember}," + nl + " TopCount([Product].[Brand Name].members, " + nl + " 2," + nl + " [Measures].[Unit Sales])))", "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Hermanos]}" + nl + "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Tell Tale]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[Ebony]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Food].[Produce].[Vegetables].[Fresh Vegetables].[High Top]}"); } }); define(new FunkResolver( "Head", "Head(<Set>[, < Numeric Expression >])", "Returns the first specified number of elements in a set.", new String[] {"fxx", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int count = args.length < 2 ? 1 : getIntArg(evaluator, args, 1); if (count >= members.size()) { return members; } if (count <= 0) { return new ArrayList(); } return members.subList(0, count); } public void testHead(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]"); } public void testHeadNegative(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2 - 3)", ""); } public void testHeadDefault(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children)", "[Store].[All Stores].[Canada]"); } public void testHeadOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Head([Store].Children, 2 + 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testHeadEmpty(FoodMartTestCase test) { test.assertAxisReturns("Head([Gender].[F].Children, 2)", ""); } })); defineReserved(new String[] {"PRE","POST"}); define(new MultiResolver( "Hierarchize", "Hierarchize(<Set>[, POST])", "Orders the members of a set in a hierarchy.", new String[] {"fxx", "fxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String order = getLiteralArg(args, 1, "PRE", new String[] {"PRE", "POST"}, dummyFunDef); final boolean post = order.equals("POST"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); hierarchize(members, post); return members; } }; } public void testHierarchize(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]})", "[Product].[All Products]" + nl + "[Product].[All Products].[Drink]" + nl + "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Non-Consumable]"); } public void testHierarchizePost(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " POST)", "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products]"); } public void testHierarchizeCrossJoinPre(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " PRE)", "{[Product].[All Products], [Gender].[All Gender]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[M]}"); } public void testHierarchizeCrossJoinPost(FoodMartTestCase test) { test.assertAxisReturns( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " POST)", "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Drink].[Dairy], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Gender].[All Gender]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products].[Food], [Gender].[All Gender]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[F]}" + nl + "{[Product].[All Products], [Gender].[All Gender].[M]}" + nl + "{[Product].[All Products], [Gender].[All Gender]}"); } }); define(new MultiResolver( "Intersect", "Intersect(<Set1>, <Set2>[, ALL])", "Returns the intersection of two input sets, optionally retaining duplicates.", new String[] {"fxxxy", "fxxx"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { final boolean all = getLiteralArg(args, 2, "", new String[] {"ALL"}, dummyFunDef).equalsIgnoreCase("ALL"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List left = (List) getArg(evaluator, args, 0); if (left == null) { left = Collections.EMPTY_LIST; } List right = (List) getArg(evaluator, args, 1); if (right == null) { right = Collections.EMPTY_LIST; } ArrayList result = new ArrayList(); for (Iterator i = left.iterator(); i.hasNext();) { Object leftObject = i.next(); if (right.contains(leftObject)) { if (all || !result.contains(leftObject)) { result.add(leftObject); } } } return result; } }; } public void testIntersect(FoodMartTestCase test) { // Note: duplicates retained from left, not from right; and order is preserved. test.assertAxisReturns("Intersect({[Time].[1997].[Q2], [Time].[1997], [Time].[1997].[Q1], [Time].[1997].[Q2]}, " + "{[Time].[1998], [Time].[1997], [Time].[1997].[Q2], [Time].[1997]}, " + "ALL)", "[Time].[1997].[Q2]" + nl + "[Time].[1997]" + nl + "[Time].[1997].[Q2]"); } public void testIntersectRightEmpty(FoodMartTestCase test) { test.assertAxisReturns("Intersect({[Time].[1997]}, {})", ""); } public void testIntersectLeftEmpty(FoodMartTestCase test) { test.assertAxisReturns("Intersect({}, {[Store].[USA].[CA]})", ""); } }); if (false) define(new FunDefBase("LastPeriods", "LastPeriods(<Index>[, <Member>])", "Returns a set of members prior to and including a specified member.", "fx*")); define(new FunDefBase("Members", "<Dimension>.Members", "Returns the set of all members in a dimension.", "pxd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = (Dimension) getArg(evaluator, args, 0); Hierarchy hierarchy = dimension.getHierarchy(); return addMembers(evaluator.getSchemaReader(), new ArrayList(), hierarchy); } }); define(new FunDefBase("Members", "<Hierarchy>.Members", "Returns the set of all members in a hierarchy.", "pxh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = (Hierarchy) getArg(evaluator, args, 0); return addMembers(evaluator.getSchemaReader(), new ArrayList(), hierarchy); } }); define(new FunDefBase("Members", "<Level>.Members", "Returns the set of all members in a level.", "pxl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = (Level) getArg(evaluator, args, 0); return Arrays.asList(evaluator.getSchemaReader().getLevelMembers(level)); } }); define(new FunkResolver( "Mtd", "Mtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Month.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getMonthLevel(), getMemberArg(evaluator, args, 0, false)); } })); defineReserved(OrderFlags.instance); define(new MultiResolver( "Order", "Order(<Set>, <Value Expression>[, ASC | DESC | BASC | BDESC])", "Arranges members of a set, optionally preserving or breaking the hierarchy.", new String[]{"fxxvy", "fxxv"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { int order = getLiteralArg(args, 2, OrderFlags.ASC, OrderFlags.instance, dummyFunDef); final boolean desc = OrderFlags.isDescending(order); final boolean brk = OrderFlags.isBreak(order); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArgNoEval(args, 1); sort(evaluator, members, exp, desc, brk); return members; } }; } public void testOrder(FoodMartTestCase test) { test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + nl + " order({" + nl + " [Product].[All Products].[Drink]," + nl + " [Product].[All Products].[Drink].[Beverages]," + nl + " [Product].[All Products].[Drink].[Dairy]," + nl + " [Product].[All Products].[Food]," + nl + " [Product].[All Products].[Food].[Baked Goods]," + nl + " [Product].[All Products].[Food].[Eggs]," + nl + " [Product].[All Products]}," + nl + " [Measures].[Unit Sales]) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products]}" + nl + "{[Product].[All Products].[Drink]}" + nl + "{[Product].[All Products].[Drink].[Dairy]}" + nl + "{[Product].[All Products].[Drink].[Beverages]}" + nl + "{[Product].[All Products].[Food]}" + nl + "{[Product].[All Products].[Food].[Eggs]}" + nl + "{[Product].[All Products].[Food].[Baked Goods]}" + nl + "Row #0: 266,773" + nl + "Row #1: 24,597" + nl + "Row #2: 4,186" + nl + "Row #3: 13,573" + nl + "Row #4: 191,940" + nl + "Row #5: 4,132" + nl + "Row #6: 7,870" + nl); } public void testOrderParentsMissing(FoodMartTestCase test) { // Paradoxically, [Alcoholic Beverages] comes before // [Eggs] even though it has a larger value, because // its parent [Drink] has a smaller value than [Food]. test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + " order({" + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages]," + nl + " [Product].[All Products].[Food].[Eggs]}," + nl + " [Measures].[Unit Sales], ASC) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Product].[All Products].[Food].[Eggs]}" + nl + "Row #0: 6,838" + nl + "Row #1: 4,132" + nl); } public void testOrderCrossJoinBreak(FoodMartTestCase test) { test.runQueryCheckResult( "select {[Measures].[Unit Sales]} on columns," + nl + " Order(" + nl + " CrossJoin(" + nl + " [Gender].children," + nl + " [Marital Status].children)," + nl + " [Measures].[Unit Sales]," + nl + " BDESC) on rows" + nl + "from Sales" + nl + "where [Time].[1997].[Q1]", "Axis #0:" + nl + "{[Time].[1997].[Q1]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[M]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S]}" + nl + "Row #0: 17,070" + nl + "Row #1: 16,790" + nl + "Row #2: 16,311" + nl + "Row #3: 16,120" + nl); } public void testOrderCrossJoin(FoodMartTestCase test) { // Note: // 1. [Alcoholic Beverages] collates before [Eggs] and // [Seafood] because its parent, [Drink], is less // than [Food] // 2. [Seattle] generally sorts after [CA] and [OR] // because invisible parent [WA] is greater. test.runQueryCheckResult( "select CrossJoin(" + nl + " {[Time].[1997]," + nl + " [Time].[1997].[Q1]}," + nl + " {[Measures].[Unit Sales]}) on columns," + nl + " Order(" + nl + " CrossJoin( " + nl + " {[Product].[All Products].[Food].[Eggs]," + nl + " [Product].[All Products].[Food].[Seafood]," + nl + " [Product].[All Products].[Drink].[Alcoholic Beverages]}," + nl + " {[Store].[USA].[WA].[Seattle]," + nl + " [Store].[USA].[CA]," + nl + " [Store].[USA].[OR]})," + nl + " ([Time].[1997].[Q1], [Measures].[Unit Sales])," + nl + " ASC) on rows" + nl + "from Sales", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Time].[1997], [Measures].[Unit Sales]}" + nl + "{[Time].[1997].[Q1], [Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Food].[Seafood], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[CA]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[OR]}" + nl + "{[Product].[All Products].[Food].[Eggs], [Store].[All Stores].[USA].[WA].[Seattle]}" + nl + "Row #0: 1,680" + nl + "Row #0: 393" + nl + "Row #1: 1,936" + nl + "Row #1: 431" + nl + "Row #2: 635" + nl + "Row #2: 142" + nl + "Row #3: 441" + nl + "Row #3: 91" + nl + "Row #4: 451" + nl + "Row #4: 107" + nl + "Row #5: 217" + nl + "Row #5: 44" + nl + "Row #6: 1,116" + nl + "Row #6: 240" + nl + "Row #7: 1,119" + nl + "Row #7: 251" + nl + "Row #8: 373" + nl + "Row #8: 57" + nl); } public void testOrderHierarchicalDesc(FoodMartTestCase test) { test.assertAxisReturns( "Order(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Measures].[Unit Sales]," + nl + " DESC)", "[Product].[All Products]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Non-Consumable]" + nl + "[Product].[All Products].[Drink]" + nl + "[Product].[All Products].[Drink].[Dairy]"); } public void testOrderCrossJoinDesc(FoodMartTestCase test) { test.assertAxisReturns( "Order(" + nl + " CrossJoin(" + nl + " {[Gender].[M], [Gender].[F]}," + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]})," + nl + " [Measures].[Unit Sales]," + nl + " DESC)", "{[Gender].[All Gender].[M], [Product].[All Products]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Food]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Food].[Eggs]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Non-Consumable]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Drink]}" + nl + "{[Gender].[All Gender].[M], [Product].[All Products].[Drink].[Dairy]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Food]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Food].[Eggs]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Non-Consumable]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Drink]}" + nl + "{[Gender].[All Gender].[F], [Product].[All Products].[Drink].[Dairy]}"); } public void testOrderBug656802(FoodMartTestCase test) { // Note: // 1. [Alcoholic Beverages] collates before [Eggs] and // [Seafood] because its parent, [Drink], is less // than [Food] // 2. [Seattle] generally sorts after [CA] and [OR] // because invisible parent [WA] is greater. test.runQueryCheckResult( "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON columns, " + nl + "Order(" + nl + " ToggleDrillState(" + nl + " {([Promotion Media].[All Media], [Product].[All Products])}," + nl + " {[Product].[All Products]} ), " + nl + " [Measures].[Unit Sales], DESC) ON rows " + nl + "from [Sales] where ([Time].[1997])", "Axis #0:" + nl + "{[Time].[1997]}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "{[Measures].[Store Cost]}" + nl + "{[Measures].[Store Sales]}" + nl + "Axis #2:" + nl + "{[Promotion Media].[All Media], [Product].[All Products]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Food]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Non-Consumable]}" + nl + "{[Promotion Media].[All Media], [Product].[All Products].[Drink]}" + nl + "Row #0: 266,773" + nl + "Row #0: 225,627.23" + nl + "Row #0: 565,238.13" + nl + "Row #1: 191,940" + nl + "Row #1: 163,270.72" + nl + "Row #1: 409,035.59" + nl + "Row #2: 50,236" + nl + "Row #2: 42,879.28" + nl + "Row #2: 107,366.33" + nl + "Row #3: 24,597" + nl + "Row #3: 19,477.23" + nl + "Row #3: 48,836.21" + nl); } public void testOrderBug712702_Simplified(FoodMartTestCase test) { test.runQueryCheckResult("SELECT Order({[Time].[Year].members}, [Measures].[Unit Sales]) on columns" + nl + "from [Sales]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Time].[1998]}" + nl + "{[Time].[1997]}" + nl + "Row #0: (null)" + nl + "Row #0: 266,773" + nl); } public void testOrderBug712702_Original(FoodMartTestCase test) { test.runQueryCheckResult("with member [Measures].[Average Unit Sales] as 'Avg(Descendants([Time].CurrentMember, [Time].[Month]), " + nl + "[Measures].[Unit Sales])' " + nl + "member [Measures].[Max Unit Sales] as 'Max(Descendants([Time].CurrentMember, [Time].[Month]), [Measures].[Unit Sales])' " + nl + "select {[Measures].[Average Unit Sales], [Measures].[Max Unit Sales], [Measures].[Unit Sales]} ON columns, " + nl + " NON EMPTY Order(" + nl + " Crossjoin( " + nl + " {[Store].[All Stores].[USA].[OR].[Portland]," + nl + " [Store].[All Stores].[USA].[OR].[Salem]," + nl + " [Store].[All Stores].[USA].[OR].[Salem].[Store 13]," + nl + " [Store].[All Stores].[USA].[CA].[San Francisco]," + nl + " [Store].[All Stores].[USA].[CA].[San Diego]," + nl + " [Store].[All Stores].[USA].[CA].[Beverly Hills]," + nl + " [Store].[All Stores].[USA].[CA].[Los Angeles]," + nl + " [Store].[All Stores].[USA].[WA].[Walla Walla]," + nl + " [Store].[All Stores].[USA].[WA].[Bellingham]," + nl + " [Store].[All Stores].[USA].[WA].[Yakima]," + nl + " [Store].[All Stores].[USA].[WA].[Spokane]," + nl + " [Store].[All Stores].[USA].[WA].[Seattle], " + nl + " [Store].[All Stores].[USA].[WA].[Bremerton]," + nl + " [Store].[All Stores].[USA].[WA].[Tacoma]}," + nl + " [Time].[Year].Members), " + nl + " [Measures].[Average Unit Sales], ASC) ON rows" + nl + "from [Sales] ", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Average Unit Sales]}" + nl + "{[Measures].[Max Unit Sales]}" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Store].[All Stores].[USA].[OR].[Portland], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[OR].[Salem].[Store 13], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Walla Walla], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bellingham], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Yakima], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Spokane], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Bremerton], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Seattle], [Time].[1997]}" + nl + "{[Store].[All Stores].[USA].[WA].[Tacoma], [Time].[1997]}" + nl + "Row #0: 2,173" + nl + "Row #0: 2,933" + nl + "Row #0: 26,079" + nl + "Row #1: 3,465" + nl + "Row #1: 5,891" + nl + "Row #1: 41,580" + nl + "Row #2: 3,465" + nl + "Row #2: 5,891" + nl + "Row #2: 41,580" + nl + "Row #3: 176" + nl + "Row #3: 222" + nl + "Row #3: 2,117" + nl + "Row #4: 1,778" + nl + "Row #4: 2,545" + nl + "Row #4: 21,333" + nl + "Row #5: 2,136" + nl + "Row #5: 2,686" + nl + "Row #5: 25,635" + nl + "Row #6: 2,139" + nl + "Row #6: 2,669" + nl + "Row #6: 25,663" + nl + "Row #7: 184" + nl + "Row #7: 301" + nl + "Row #7: 2,203" + nl + "Row #8: 186" + nl + "Row #8: 275" + nl + "Row #8: 2,237" + nl + "Row #9: 958" + nl + "Row #9: 1,163" + nl + "Row #9: 11,491" + nl + "Row #10: 1,966" + nl + "Row #10: 2,634" + nl + "Row #10: 23,591" + nl + "Row #11: 2,048" + nl + "Row #11: 2,623" + nl + "Row #11: 24,576" + nl + "Row #12: 2,084" + nl + "Row #12: 2,304" + nl + "Row #12: 25,011" + nl + "Row #13: 2,938" + nl + "Row #13: 3,818" + nl + "Row #13: 35,257" + nl); } }); define(new FunkResolver( "PeriodsToDate", "PeriodsToDate([<Level>[, <Member>]])", "Returns a set of periods (members) from a specified level starting with the first period and ending with a specified member.", new String[]{"fx", "fxl", "fxlm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, false); Member member = getMemberArg(evaluator, args, 1, false); return periodsToDate(evaluator, level, member); } })); define(new FunkResolver( "Qtd", "Qtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Quarter.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getQuarterLevel(), getMemberArg(evaluator, args, 0, false)); } })); if (false) define(new FunDefBase("StripCalculatedMembers", "StripCalculatedMembers(<Set>)", "Removes calculated members from a set.", "fx*")); // "Siblings" is not a standard MDX function. define(new FunDefBase("Siblings", "<Member>.Siblings", "Returns the set of siblings of the specified member.", "pxm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Member parent = member.getParentMember(); final SchemaReader schemaReader = evaluator.getSchemaReader(); Member[] siblings; if (parent == null) { siblings = schemaReader.getHierarchyRootMembers(member.getHierarchy()); } else { siblings = schemaReader.getMemberChildren(parent); } return Arrays.asList(siblings); } public void testSiblingsA(FoodMartTestCase test) { test.assertAxisReturns("{[Time].[1997].Siblings}", "[Time].[1997]" + nl + "[Time].[1998]"); } public void testSiblingsB(FoodMartTestCase test) { test.assertAxisReturns("{[Store].Siblings}", "[Store].[All Stores]"); } public void testSiblingsC(FoodMartTestCase test) { test.assertAxisReturns("{[Store].[USA].[CA].Siblings}", "[Store].[All Stores].[USA].[CA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[WA]"); } }); define(new FunDefBase("StrToSet", "StrToSet(<String Expression>)", "Constructs a set from a string expression.", "fxS") { public Hierarchy getHierarchy(Exp[] args) { // StrToSet(s, <Hie1>, ... <HieN>) is of type [Hie1] x ... x [HieN]; // so, for example, So StrToTuple("[Time].[1997]", [Time]) is of type // [Time]. But if n > 1, we cannot represent the compound type, and we // return null. return (args.length == 2) ? (Hierarchy) args[1] : null; } }); define(new FunkResolver( "Subset", "Subset(<Set>, <Start>[, <Count>])", "Returns a subset of elements from a set.", new String[] {"fxxn", "fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int start = getIntArg(evaluator, args, 1); final int end; if (args.length < 3) { end = members.size(); } else { final int count = getIntArg(evaluator, args, 2); end = start + count; } if (start >= end || start < 0) { return new ArrayList(); } if (start == 0 && end >= members.size()) { return members; } return members.subList(start, end); } public void testSubset(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 7, 2)", "[Promotion Media].[All Media].[Product Attachment]" + nl + "[Promotion Media].[All Media].[Radio]"); } public void testSubsetNegativeCount(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 3, -1)", ""); } public void testSubsetNegativeStart(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, -2, 4)", ""); } public void testSubsetDefault(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 11)", "[Promotion Media].[All Media].[Sunday Paper, Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]" + nl + "[Promotion Media].[All Media].[TV]"); } public void testSubsetOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Subset([Promotion Media].Children, 15)", ""); } public void testSubsetEmpty(FoodMartTestCase test) { test.assertAxisReturns("Subset([Gender].[F].Children, 1)", ""); } })); define(new FunkResolver( "Tail", "Tail(<Set>[, <Count>])", "Returns a subset from the end of a set.", new String[] {"fxx", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); final int count = args.length < 2 ? 1 : getIntArg(evaluator, args, 1); if (count >= members.size()) { return members; } if (count <= 0) { return new ArrayList(); } return members.subList(members.size() - count, members.size()); } public void testTail(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2)", "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testTailNegative(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2 - 3)", ""); } public void testTailDefault(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children)", "[Store].[All Stores].[USA]"); } public void testTailOvershoot(FoodMartTestCase test) { test.assertAxisReturns("Tail([Store].Children, 2 + 2)", "[Store].[All Stores].[Canada]" + nl + "[Store].[All Stores].[Mexico]" + nl + "[Store].[All Stores].[USA]"); } public void testTailEmpty(FoodMartTestCase test) { test.assertAxisReturns("Tail([Gender].[F].Children, 2)", ""); } })); defineReserved("RECURSIVE"); define(new FunkResolver( "ToggleDrillState", "ToggleDrillState(<Set1>, <Set2>[, RECURSIVE])", "Toggles the drill state of members. This function is a combination of DrillupMember and DrilldownMember.", new String[]{"fxxx", "fxxx#"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List v0 = (List) getArg(evaluator, args, 0), v1 = (List) getArg(evaluator, args, 1); if (args.length > 2) { throw Util.newInternal( "ToggleDrillState(RECURSIVE) not supported"); } if (v1.isEmpty()) { return v0; } if (v0.isEmpty()) { return v0; } HashSet set = new HashSet(); set.addAll(v1); HashSet set1 = set; List result = new ArrayList(); int i = 0, n = v0.size(); while (i < n) { Object o = v0.get(i++); result.add(o); Member m = null; int k = -1; if (o instanceof Member) { if (!set1.contains(o)) { continue; } m = (Member) o; k = -1; } else { Util.assertTrue(o instanceof Member[]); Member[] members = (Member[]) o; for (int j = 0; j < members.length; j++) { Member member = members[j]; if (set1.contains(member)) { k = j; m = member; break; } } if (k == -1) { continue; } } boolean isDrilledDown = false; if (i < n) { Object next = v0.get(i); Member nextMember = (k < 0) ? (Member) next : ((Member[]) next)[k]; boolean strict = true; if (isAncestorOf(m, nextMember, strict)) { isDrilledDown = true; } } if (isDrilledDown) { // skip descendants of this member do { Object next = v0.get(i); Member nextMember = (k < 0) ? (Member) next : ((Member[]) next)[k]; boolean strict = true; if (isAncestorOf(m, nextMember, strict)) { i++; } else { break; } } while (i < n); } else { Member[] children = evaluator.getSchemaReader().getMemberChildren(m); for (int j = 0; j < children.length; j++) { if (k < 0) { result.add(children[j]); } else { Member[] members = (Member[]) ((Member[]) o).clone(); members[k] = children[j]; result.add(members); } } } } return result; } public void testToggleDrillState(FoodMartTestCase test) { test.assertAxisReturns("ToggleDrillState({[Customers].[USA],[Customers].[Canada]},{[Customers].[USA],[Customers].[USA].[CA]})", "[Customers].[All Customers].[USA]" + nl + "[Customers].[All Customers].[USA].[CA]" + nl + "[Customers].[All Customers].[USA].[OR]" + nl + "[Customers].[All Customers].[USA].[WA]" + nl + "[Customers].[All Customers].[Canada]"); } public void testToggleDrillState2(FoodMartTestCase test) { test.assertAxisReturns("ToggleDrillState([Product].[Product Department].members, {[Product].[All Products].[Food].[Snack Foods]})", "[Product].[All Products].[Drink].[Alcoholic Beverages]" + nl + "[Product].[All Products].[Drink].[Beverages]" + nl + "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food].[Baked Goods]" + nl + "[Product].[All Products].[Food].[Baking Goods]" + nl + "[Product].[All Products].[Food].[Breakfast Foods]" + nl + "[Product].[All Products].[Food].[Canned Foods]" + nl + "[Product].[All Products].[Food].[Canned Products]" + nl + "[Product].[All Products].[Food].[Dairy]" + nl + "[Product].[All Products].[Food].[Deli]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Food].[Frozen Foods]" + nl + "[Product].[All Products].[Food].[Meat]" + nl + "[Product].[All Products].[Food].[Produce]" + nl + "[Product].[All Products].[Food].[Seafood]" + nl + "[Product].[All Products].[Food].[Snack Foods]" + nl + "[Product].[All Products].[Food].[Snack Foods].[Snack Foods]" + nl + "[Product].[All Products].[Food].[Snacks]" + nl + "[Product].[All Products].[Food].[Starchy Foods]" + nl + "[Product].[All Products].[Non-Consumable].[Carousel]" + nl + "[Product].[All Products].[Non-Consumable].[Checkout]" + nl + "[Product].[All Products].[Non-Consumable].[Health and Hygiene]" + nl + "[Product].[All Products].[Non-Consumable].[Household]" + nl + "[Product].[All Products].[Non-Consumable].[Periodicals]"); } public void testToggleDrillState3(FoodMartTestCase test) { test.assertAxisReturns( "ToggleDrillState(" + "{[Time].[1997].[Q1]," + " [Time].[1997].[Q2]," + " [Time].[1997].[Q2].[4]," + " [Time].[1997].[Q2].[6]," + " [Time].[1997].[Q3]}," + "{[Time].[1997].[Q2]})", "[Time].[1997].[Q1]" + nl + "[Time].[1997].[Q2]" + nl + "[Time].[1997].[Q3]"); } // bug 634860 public void testToggleDrillStateTuple(FoodMartTestCase test) { test.assertAxisReturns( "ToggleDrillState(" + nl + "{([Store].[All Stores].[USA].[CA]," + " [Product].[All Products].[Drink].[Alcoholic Beverages])," + nl + " ([Store].[All Stores].[USA]," + " [Product].[All Products].[Drink])}," + nl + "{[Store].[All stores].[USA].[CA]})", "{[Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Alameda], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Beverly Hills], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[Los Angeles], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Diego], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Store].[All Stores].[USA], [Product].[All Products].[Drink]}"); } })); define(new FunkResolver( "TopCount", "TopCount(<Set>, <Count>[, <Numeric Expression>])", "Returns a specified number of items from the top of a set, optionally ordering the set first.", new String[]{"fxxnn", "fxxn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List list = (List) getArg(evaluator, args, 0); int n = getIntArg(evaluator, args, 1); ExpBase exp = (ExpBase) getArg(evaluator, args, 2, null); if (exp != null) { boolean desc = true, brk = true; sort(evaluator, list, exp, desc, brk); } if (n < list.size()) { list = list.subList(0, n); } return list; } public void testTopCount(FoodMartTestCase test) { test.assertAxisReturns("TopCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"); } })); define(new FunkResolver( "TopPercent", "TopPercent(<Set>, <Percentage>, <Numeric Expression>)", "Sorts a set and returns the top N elements whose cumulative total is at least a specified percentage.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, true, true, n.doubleValue()); } public void testTopPercent(FoodMartTestCase test) { test.assertAxisReturns("TopPercent({[Promotion Media].[Media Type].members}, 70, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]"); } //todo: test precision })); define(new FunkResolver( "TopSum", "TopSum(<Set>, <Value>, <Numeric Expression>)", "Sorts a set and returns the top N elements whose cumulative total is at least a specified value.", new String[]{"fxxnn"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { List members = (List) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 2); Double n = getDoubleArg(evaluator, args, 1); return topOrBottom(evaluator.push(), members, exp, true, false, n.doubleValue()); } public void testTopSum(FoodMartTestCase test) { test.assertAxisReturns("TopSum({[Promotion Media].[Media Type].members}, 200000, [Measures].[Unit Sales])", "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"); } })); defineReserved(new String[] {"ALL", "DISTINCT"}); define(new MultiResolver( "Union", "Union(<Set1>, <Set2>[, ALL])", "Returns the union of two sets, optionally retaining duplicates.", new String[] {"fxxx", "fxxxy"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String allString = getLiteralArg(args, 2, "DISTINCT", new String[] {"ALL", "DISTINCT"}, dummyFunDef); final boolean all = allString.equalsIgnoreCase("ALL"); checkCompatible(args[0], args[1], dummyFunDef); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { List left = (List) getArg(evaluator, args, 0), right = (List) getArg(evaluator, args, 1); if (all) { if (left == null || left.isEmpty()) { return right; } left.addAll(right); return left; } else { HashSet added = new HashSet(); List result = new ArrayList(); addUnique(result, left, added); addUnique(result, right, added); return result; } } }; } public void testUnionAll(FoodMartTestCase test) { test.assertAxisReturns("Union({[Gender].[M]}, {[Gender].[F]}, ALL)", "[Gender].[All Gender].[M]" + nl + "[Gender].[All Gender].[F]"); // order is preserved } public void testUnion(FoodMartTestCase test) { test.assertAxisReturns("Union({[Store].[USA], [Store].[USA], [Store].[USA].[OR]}, {[Store].[USA].[CA], [Store].[USA]})", "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[CA]"); } public void testUnionEmptyBoth(FoodMartTestCase test) { test.assertAxisReturns("Union({}, {})", ""); } public void testUnionEmptyRight(FoodMartTestCase test) { test.assertAxisReturns("Union({[Gender].[M]}, {})", "[Gender].[All Gender].[M]"); } public void testUnionTuple(FoodMartTestCase test) { test.assertAxisReturns( "Union({" + " ([Gender].[M], [Marital Status].[S])," + " ([Gender].[F], [Marital Status].[S])" + "}, {" + " ([Gender].[M], [Marital Status].[M])," + " ([Gender].[M], [Marital Status].[S])" + "})", "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[F], [Marital Status].[All Marital Status].[S]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M]}"); } public void testUnionQuery(FoodMartTestCase test) { Result result = test.runQuery( "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} on columns," + nl + " Hierarchize( " + nl + " Union(" + nl + " Crossjoin(" + nl + " Crossjoin([Gender].[All Gender].children," + nl + " [Marital Status].[All Marital Status].children )," + nl + " Crossjoin([Customers].[All Customers].children," + nl + " [Product].[All Products].children ) ) ," + nl + " Crossjoin( {([Gender].[All Gender].[M], [Marital Status].[All Marital Status].[M] )}," + nl + " Crossjoin(" + nl + " [Customers].[All Customers].[USA].children," + nl + " [Product].[All Products].children ) ) )) on rows" +nl + "from Sales where ([Time].[1997])"); final Axis rowsAxis = result.getAxes()[1]; Assert.assertEquals(45, rowsAxis.positions.length); } }); if (false) define(new FunDefBase("VisualTotals", "VisualTotals(<Set>, <Pattern>)", "Dynamically totals child members specified in a set using a pattern for the total label in the result set.", "fx*")); define(new FunkResolver( "Wtd", "Wtd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Week.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getWeekLevel(), getMemberArg(evaluator, args, 0, false)); } })); define(new FunkResolver( "Ytd", "Ytd([<Member>])", "A shortcut function for the PeriodsToDate function that specifies the level to be Year.", new String[]{"fx", "fxm"}, new FunkBase() { public Object evaluate(Evaluator evaluator, Exp[] args) { return periodsToDate( evaluator, evaluator.getCube().getYearLevel(), getMemberArg(evaluator, args, 0, false)); } })); define(new FunDefBase( ":", "<Member>:<Member>", "Infix colon operator returns the set of members between a given pair of members.", "ixmm") { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { final Member member0 = getMemberArg(evaluator, args, 0, true); final Member member1 = getMemberArg(evaluator, args, 1, true); if (member0.isNull() || member1.isNull()) { return Collections.EMPTY_LIST; } if (member0.getLevel() != member1.getLevel()) { throw newEvalException(this, "Members must belong to the same level"); } return FunUtil.memberRange(evaluator, member0, member1); } public void testRange(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q1].[2] : [Time].[1997].[Q2].[5]", "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]" + nl + "[Time].[1997].[Q2].[4]" + nl + "[Time].[1997].[Q2].[5]"); // not parents } /** * Large dimensions use a different member reader, therefore need to * be tested separately. */ public void testRangeLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[CA].[San Francisco] : [Customers].[USA].[WA].[Bellingham]", "[Customers].[All Customers].[USA].[CA].[San Francisco]" + nl + "[Customers].[All Customers].[USA].[CA].[San Gabriel]" + nl + "[Customers].[All Customers].[USA].[CA].[San Jose]" + nl + "[Customers].[All Customers].[USA].[CA].[Santa Cruz]" + nl + "[Customers].[All Customers].[USA].[CA].[Santa Monica]" + nl + "[Customers].[All Customers].[USA].[CA].[Spring Valley]" + nl + "[Customers].[All Customers].[USA].[CA].[Torrance]" + nl + "[Customers].[All Customers].[USA].[CA].[West Covina]" + nl + "[Customers].[All Customers].[USA].[CA].[Woodland Hills]" + nl + "[Customers].[All Customers].[USA].[OR].[Albany]" + nl + "[Customers].[All Customers].[USA].[OR].[Beaverton]" + nl + "[Customers].[All Customers].[USA].[OR].[Corvallis]" + nl + "[Customers].[All Customers].[USA].[OR].[Lake Oswego]" + nl + "[Customers].[All Customers].[USA].[OR].[Lebanon]" + nl + "[Customers].[All Customers].[USA].[OR].[Milwaukie]" + nl + "[Customers].[All Customers].[USA].[OR].[Oregon City]" + nl + "[Customers].[All Customers].[USA].[OR].[Portland]" + nl + "[Customers].[All Customers].[USA].[OR].[Salem]" + nl + "[Customers].[All Customers].[USA].[OR].[W. Linn]" + nl + "[Customers].[All Customers].[USA].[OR].[Woodburn]" + nl + "[Customers].[All Customers].[USA].[WA].[Anacortes]" + nl + "[Customers].[All Customers].[USA].[WA].[Ballard]" + nl + "[Customers].[All Customers].[USA].[WA].[Bellingham]"); } public void testRangeStartEqualsEnd(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q3].[7] : [Time].[1997].[Q3].[7]", "[Time].[1997].[Q3].[7]"); } public void testRangeStartEqualsEndLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[CA] : [Customers].[USA].[CA]", "[Customers].[All Customers].[USA].[CA]"); } public void testRangeEndBeforeStart(FoodMartTestCase test) { test.assertAxisReturns("[Time].[1997].[Q3].[7] : [Time].[1997].[Q2].[5]", "[Time].[1997].[Q2].[5]" + nl + "[Time].[1997].[Q2].[6]" + nl + "[Time].[1997].[Q3].[7]"); // same as if reversed } public void testRangeEndBeforeStartLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].[USA].[WA] : [Customers].[USA].[CA]", "[Customers].[All Customers].[USA].[CA]" + nl + "[Customers].[All Customers].[USA].[OR]" + nl + "[Customers].[All Customers].[USA].[WA]"); } public void testRangeBetweenDifferentLevelsIsError(FoodMartTestCase test) { test.assertAxisThrows("[Time].[1997].[Q2] : [Time].[1997].[Q2].[5]", "Members must belong to the same level"); } public void testRangeBoundedByAll(FoodMartTestCase test) { test.assertAxisReturns("[Gender] : [Gender]", "[Gender].[All Gender]"); } public void testRangeBoundedByAllLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].DefaultMember : [Customers]", "[Customers].[All Customers]"); } public void testRangeBoundedByNull(FoodMartTestCase test) { test.assertAxisReturns("[Gender].[F] : [Gender].[M].NextMember", ""); } public void testRangeBoundedByNullLarge(FoodMartTestCase test) { test.assertAxisReturns("[Customers].PrevMember : [Customers].[USA].[OR]", ""); } }); // special resolver for the "{...}" operator define(new ResolverBase( "{}", "{<Member> [, <Member>]...}", "Brace operator constructs a set.", Syntax.Braces) { public FunDef resolve(Exp[] args, int[] conversionCount) { int[] parameterTypes = new int[args.length]; for (int i = 0; i < args.length; i++) { if (canConvert( args[i], Category.Member, conversionCount)) { parameterTypes[i] = Category.Member; continue; } if (canConvert( args[i], Category.Set, conversionCount)) { parameterTypes[i] = Category.Set; continue; } if (canConvert( args[i], Category.Tuple, conversionCount)) { parameterTypes[i] = Category.Tuple; continue; } return null; } return new SetFunDef(this, parameterTypes); } public void testSetContainingLevelFails(FoodMartTestCase test) { test.assertAxisThrows( "[Store].[Store City]", "no function matches signature '{<Level>}'"); } public void testBug715177(FoodMartTestCase test) { test.runQueryCheckResult( "WITH MEMBER [Product].[All Products].[Non-Consumable].[Other] AS" + nl + " 'Sum( Except( [Product].[Product Department].Members," + nl + " TopCount( [Product].[Product Department].Members, 3 ))," + nl + " Measures.[Unit Sales] )'" + nl + "SELECT" + nl + " { [Measures].[Unit Sales] } ON COLUMNS ," + nl + " { TopCount( [Product].[Product Department].Members,3 )," + nl + " [Product].[All Products].[Non-Consumable].[Other] } ON ROWS" + nl + "FROM [Sales]", "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Measures].[Unit Sales]}" + nl + "Axis #2:" + nl + "{[Product].[All Products].[Drink].[Alcoholic Beverages]}" + nl + "{[Product].[All Products].[Drink].[Beverages]}" + nl + "{[Product].[All Products].[Drink].[Dairy]}" + nl + "{[Product].[All Products].[Non-Consumable].[Other]}" + nl + "Row #0: 6,838" + nl + "Row #1: 13,573" + nl + "Row #2: 4,186" + nl + "Row #3: 242,176" + nl); } public void testBug714707(FoodMartTestCase test) { // Same issue as bug 715177 -- "children" returns immutable // list, which set operator must make mutable. test.assertAxisReturns("{[Store].[USA].[CA].children, [Store].[USA]}", "[Store].[All Stores].[USA].[CA].[Alameda]" + nl + "[Store].[All Stores].[USA].[CA].[Beverly Hills]" + nl + "[Store].[All Stores].[USA].[CA].[Los Angeles]" + nl + "[Store].[All Stores].[USA].[CA].[San Diego]" + nl + "[Store].[All Stores].[USA].[CA].[San Francisco]" + nl + "[Store].[All Stores].[USA]"); } public void todo_testBug715177c(FoodMartTestCase test) { test.assertAxisReturns("Order(TopCount({[Store].[USA].[CA].children}, [Measures].[Unit Sales], 2), [Measures].[Unit Sales])", "foo"); } }); // // STRING FUNCTIONS define(new MultiResolver("Format", "Format(<Numeric Expression>, <String Expression>)", "Formats a number to string.", new String[] { "fSmS", "fSnS" }) { protected FunDef createFunDef(final Exp[] args, final FunDef dummyFunDef) { final Locale locale = Locale.getDefault(); // todo: use connection's locale if (args[1] instanceof Literal) { // Constant string expression: optimize by compiling // format string. String formatString = (String) ((Literal) args[1]).getValue(); final Format format = new Format(formatString, locale); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o = getDoubleArg(evaluator, args, 0); return format.format(o); } }; } else { // Variable string expression return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o = getDoubleArg(evaluator, args, 0); String formatString = getStringArg(evaluator, args, 1, null); final Format format = new Format(formatString, locale); return format.format(o); } }; } } public void testFormatFixed(FoodMartTestCase test) { String s = test.executeExpr("Format(12.2, \"#,##0.00\")"); Assert.assertEquals("12.20", s); } public void testFormatVariable(FoodMartTestCase test) { String s = test.executeExpr("Format(1234.5, \"#,#\" || \"#0.00\")"); Assert.assertEquals("1,234.50", s); } }); define(new FunDefBase("IIf", "IIf(<Logical Expression>, <String Expression1>, <String Expression2>)", "Returns one of two string values determined by a logical test.", "fSbSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { boolean logical = getBooleanArg(evaluator, args, 0); return getStringArg(evaluator, args, logical ? 1 : 2, null); } public void testIIf(FoodMartTestCase test) { String s = test.executeExpr( "IIf(([Measures].[Unit Sales],[Product].[Drink].[Alcoholic Beverages].[Beer and Wine]) > 100, \"Yes\",\"No\")"); Assert.assertEquals("Yes", s); } }); define(new FunDefBase("Name", "<Dimension>.Name", "Returns the name of a dimension.", "pSd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getName(); } public void testDimensionName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Dimension.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Name", "<Hierarchy>.Name", "Returns the name of a hierarchy.", "pSh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getName(); } public void testHierarchyName(FoodMartTestCase test) { String s = test.executeExpr( "[Time].[1997].Hierarchy.Name"); Assert.assertEquals("Time", s); } }); define(new FunDefBase("Name", "<Level>.Name", "Returns the name of a level.", "pSl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getName(); } public void testLevelName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Level.Name"); Assert.assertEquals("Year", s); } }); define(new FunDefBase("Name", "<Member>.Name", "Returns the name of a member.", "pSm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getName(); } public void testMemberName(FoodMartTestCase test) { String s = test.executeExpr("[Time].[1997].Name"); Assert.assertEquals("1997", s); } }); define(new FunDefBase("SetToStr", "SetToStr(<Set>)", "Constructs a string from a set.", "fSx")); define(new FunDefBase("TupleToStr", "TupleToStr(<Tuple>)", "Constructs a string from a tuple.", "fSt")); define(new FunDefBase("UniqueName", "<Dimension>.UniqueName", "Returns the unique name of a dimension.", "pSd") { public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getUniqueName(); } public void testDimensionUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Dimension.UniqueName"); Assert.assertEquals("[Gender]", s); } }); define(new FunDefBase("UniqueName", "<Hierarchy>.UniqueName", "Returns the unique name of a hierarchy.", "pSh") { public Object evaluate(Evaluator evaluator, Exp[] args) { Hierarchy hierarchy = getHierarchyArg(evaluator, args, 0, true); return hierarchy.getUniqueName(); } public void testHierarchyUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Hierarchy.UniqueName"); Assert.assertEquals("[Gender]", s); } }); define(new FunDefBase("UniqueName", "<Level>.UniqueName", "Returns the unique name of a level.", "pSl") { public Object evaluate(Evaluator evaluator, Exp[] args) { Level level = getLevelArg(evaluator, args, 0, true); return level.getUniqueName(); } public void testLevelUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.Level.UniqueName"); Assert.assertEquals("[Gender].[(All)]", s); } }); define(new FunDefBase("UniqueName", "<Member>.UniqueName", "Returns the unique name of a member.", "pSm") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); return member.getUniqueName(); } public void testMemberUniqueName(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].DefaultMember.UniqueName"); Assert.assertEquals("[Gender].[All Gender]", s); } public void testMemberUniqueNameOfNull(FoodMartTestCase test) { String s = test.executeExpr( "[Measures].[Unit Sales].FirstChild.UniqueName"); Assert.assertEquals("[Measures].[#Null]", s); // MSOLAP gives "" here } }); // // TUPLE FUNCTIONS define(new FunDefBase("Current", "<Set>.Current", "Returns the current tuple from a set during an iteration.", "ptx")); if (false) define(new FunDefBase("Item", "<Set>.Item(<String Expression>[, <String Expression>...] | <Index>)", "Returns a tuple from a set.", "mt*")); define(new FunDefBase("StrToTuple", "StrToTuple(<String Expression>)", "Constructs a tuple from a string.", "ftS") { public Hierarchy getHierarchy(Exp[] args) { // StrToTuple(s, <Hie1>, ... <HieN>) is of type [Hie1] x // ... x [HieN]; so, for example, So // StrToTuple("[Time].[1997]", [Time]) is of type [Time]. // But if n > 1, we cannot represent the compound type, and // we return null. return (args.length == 2) ? (Hierarchy) args[1] : null; } }); // special resolver for "()" define(new ResolverBase("()", null, null, Syntax.Parentheses) { public FunDef resolve(Exp[] args, int[] conversionCount) { // Compare with TupleFunDef.getReturnType(). For example, // ([Gender].members) is a set, // ([Gender].[M]) is a member, // (1 + 2) is a numeric, // but // ([Gender].[M], [Marital Status].[S]) is a tuple. if (args.length == 1) { return new ParenthesesFunDef(args[0].getType()); } else { return new TupleFunDef(ExpBase.getTypes(args)); } } }); // // GENERIC VALUE FUNCTIONS define(new ResolverBase( "CoalesceEmpty", "CoalesceEmpty(<Value Expression>[, <Value Expression>]...)", "Coalesces an empty cell value to a different value. All of the expressions must be of the same type (number or string).", Syntax.Function) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 1) { return null; } final int[] types = {Category.Numeric, Category.String}; for (int j = 0; j < types.length; j++) { int type = types[j]; int matchingArgs = 0; conversionCount[0] = 0; for (int i = 0; i < args.length; i++) { if (canConvert(args[i], type, conversionCount)) { matchingArgs++; } } if (matchingArgs == args.length) { return new FunDefBase(this, type, ExpBase.getTypes(args)); } } return null; } public boolean requiresExpression(int k) { return true; } }); define(new ResolverBase( "_CaseTest", "Case When <Logical Expression> Then <Expression> [...] [Else <Expression>] End", "Evaluates various conditions, and returns the corresponding expression for the first which evaluates to true.", Syntax.Case) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 1) { return null; } int j = 0, clauseCount = args.length / 2, mismatchingArgs = 0; int returnType = args[1].getType(); for (int i = 0; i < clauseCount; i++) { if (!canConvert(args[j++], Category.Logical, conversionCount)) { mismatchingArgs++; } if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } if (j < args.length) { if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } Util.assertTrue(j == args.length); if (mismatchingArgs == 0) { return new FunDefBase(this, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseTest(evaluator, args); } }; } else { return null; } } public boolean requiresExpression(int k) { return true; } Object evaluateCaseTest(Evaluator evaluator, Exp[] args) { int clauseCount = args.length / 2, j = 0; for (int i = 0; i < clauseCount; i++) { boolean logical = getBooleanArg(evaluator, args, j++); if (logical) { return getArg(evaluator, args, j); } else { j++; } } if (j < args.length) { return getArg(evaluator, args, j); // ELSE } else { return null; } } public void testCaseTestMatch(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" WHEN 1=1 THEN \"second\" WHEN 1=2 THEN \"third\" ELSE \"fourth\" END"); Assert.assertEquals("second", s); } public void testCaseTestMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" ELSE \"fourth\" END"); Assert.assertEquals("fourth", s); } public void testCaseTestMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" END"); Assert.assertEquals("(null)", s); } }); define(new ResolverBase( "_CaseMatch", "Case <Expression> When <Expression> Then <Expression> [...] [Else <Expression>] End", "Evaluates various expressions, and returns the corresponding expression for the first which matches a particular value.", Syntax.Case) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 3) { return null; } int valueType = args[0].getType(); int returnType = args[2].getType(); int j = 0, clauseCount = (args.length - 1) / 2, mismatchingArgs = 0; if (!canConvert(args[j++], valueType, conversionCount)) { mismatchingArgs++; } for (int i = 0; i < clauseCount; i++) { if (!canConvert(args[j++], valueType, conversionCount)) { mismatchingArgs++; } if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } if (j < args.length) { if (!canConvert(args[j++], returnType, conversionCount)) { mismatchingArgs++; } } Util.assertTrue(j == args.length); if (mismatchingArgs == 0) { return new FunDefBase(this, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseMatch(evaluator, args); } }; } else { return null; } } public boolean requiresExpression(int k) { return true; } Object evaluateCaseMatch(Evaluator evaluator, Exp[] args) { int clauseCount = (args.length - 1)/ 2, j = 0; Object value = getArg(evaluator, args, j++); for (int i = 0; i < clauseCount; i++) { Object match = getArg(evaluator, args, j++); if (match.equals(value)) { return getArg(evaluator, args, j); } else { j++; } } if (j < args.length) { return getArg(evaluator, args, j); // ELSE } else { return null; } } public void testCaseMatch(FoodMartTestCase test) { String s = test.executeExpr( "CASE 2 WHEN 1 THEN \"first\" WHEN 2 THEN \"second\" WHEN 3 THEN \"third\" ELSE \"fourth\" END"); Assert.assertEquals("second", s); } public void testCaseMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 7 WHEN 1 THEN \"first\" ELSE \"fourth\" END"); Assert.assertEquals("fourth", s); } public void testCaseMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 8 WHEN 0 THEN \"first\" END"); Assert.assertEquals("(null)", s); } }); define(new ResolverBase( "Properties", "<Member>.Properties(<String Expression>)", "Returns the value of a member property.", Syntax.Method) { public FunDef resolve(Exp[] args, int[] conversionCount) { final int[] argTypes = new int[]{Category.Member, Category.String}; if (args.length != 2 || args[0].getType() != Category.Member || args[1].getType() != Category.String) { return null; } int returnType; if (args[1] instanceof Literal) { String propertyName = (String) ((Literal) args[1]).getValue(); Hierarchy hierarchy = args[0].getHierarchy(); Level[] levels = hierarchy.getLevels(); Property property = lookupProperty( levels[levels.length - 1], propertyName); if (property == null) { // we'll likely get a runtime error returnType = Category.Value; } else { switch (property.getType()) { case Property.TYPE_BOOLEAN: returnType = Category.Logical; break; case Property.TYPE_NUMERIC: returnType = Category.Numeric; break; case Property.TYPE_STRING: returnType = Category.String; break; default: throw Util.newInternal("Unknown property type " + property.getType()); } } } else { returnType = Category.Value; } return new PropertiesFunDef(name, signature, description, syntax, returnType, argTypes); } public boolean requiresExpression(int k) { return true; } public void testPropertiesExpr(FoodMartTestCase test) { String s = test.executeExpr( "[Store].[USA].[CA].[Beverly Hills].[Store 6].Properties(\"Store Type\")"); Assert.assertEquals("Gourmet Supermarket", s); } /** Tests that non-existent property throws an error. **/ public void testPropertiesNonExistent(FoodMartTestCase test) { test.assertExprThrows( "[Store].[USA].[CA].[Beverly Hills].[Store 6].Properties(\"Foo\")", "Property 'Foo' is not valid for"); } public void testPropertiesFilter(FoodMartTestCase test) { Result result = test.execute( "SELECT { [Store Sales] } ON COLUMNS," + nl + " TOPCOUNT( Filter( [Store].[Store Name].Members," + nl + " [Store].CurrentMember.Properties(\"Store Type\") = \"Supermarket\" )," + nl + " 10, [Store Sales]) ON ROWS" + nl + "FROM [Sales]"); Assert.assertEquals(8, result.getAxes()[1].positions.length); } public void testPropertyInCalculatedMember(FoodMartTestCase test) { Result result = test.execute( "WITH MEMBER [Measures].[Store Sales per Sqft]" + nl + "AS '[Measures].[Store Sales] / " + " [Store].CurrentMember.Properties(\"Store Sqft\")'" + nl + "SELECT " + nl + " {[Measures].[Unit Sales], [Measures].[Store Sales per Sqft]} ON COLUMNS," + nl + " {[Store].[Store Name].members} ON ROWS" + nl + "FROM Sales"); Member member; Cell cell; member = result.getAxes()[1].positions[18].members[0]; Assert.assertEquals("[Store].[All Stores].[USA].[WA].[Bellingham].[Store 2]", member.getUniqueName()); cell = result.getCell(new int[] {0,18}); Assert.assertEquals("2,237", cell.getFormattedValue()); cell = result.getCell(new int[] {1,18}); Assert.assertEquals(".17", cell.getFormattedValue()); member = result.getAxes()[1].positions[3].members[0]; Assert.assertEquals("[Store].[All Stores].[Mexico].[DF].[San Andres].[Store 21]", member.getUniqueName()); cell = result.getCell(new int[] {0,3}); Assert.assertEquals("(null)", cell.getFormattedValue()); cell = result.getCell(new int[] {1,3}); Assert.assertEquals("NaN", cell.getFormattedValue()); } }); // // PARAMETER FUNCTIONS defineReserved(new String[] {"NUMERIC","STRING"}); define(new MultiResolver("Parameter", "Parameter(<Name>, <Type>, <DefaultValue>, <Description>)", "Returns default value of parameter.", new String[] { "fS#yS#", "fs#yS", // Parameter(string const, symbol, string[, string const]): string "fn#yn#", "fn#yn", // Parameter(string const, symbol, numeric[, string const]): numeric "fm#hm#", "fm#hm", // Parameter(string const, hierarchy constant, member[, string const]): member }) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String parameterName; if (args[0] instanceof Literal && args[0].getType() == Category.String) { parameterName = (String) ((Literal) args[0]).getValue(); } else { throw newEvalException(dummyFunDef, "Parameter name must be a string constant"); } Exp typeArg = args[1]; Hierarchy hierarchy; int type; switch (typeArg.getType()) { case Category.Hierarchy: case Category.Dimension: hierarchy = typeArg.getHierarchy(); if (hierarchy == null || !isConstantHierarchy(typeArg)) { throw newEvalException(dummyFunDef, "Invalid hierarchy for parameter '" + parameterName + "'"); } type = Category.Member; break; case Category.Symbol: hierarchy = null; String s = (String) ((Literal) typeArg).getValue(); if (s.equalsIgnoreCase("NUMERIC")) { type = Category.Numeric; break; } else if (s.equalsIgnoreCase("STRING")) { type = Category.String; break; } // fall through and throw error default: // Error is internal because the function call has already been // type-checked. throw newEvalException(dummyFunDef, "Invalid type for parameter '" + parameterName + "'; expecting NUMERIC, STRING or a hierarchy"); } Exp exp = args[2]; if (exp.getType() != type) { String typeName = Category.instance.getName(type).toUpperCase(); throw newEvalException(dummyFunDef, "Default value of parameter '" + parameterName + "' is inconsistent with its type, " + typeName); } if (type == Category.Member) { Hierarchy expHierarchy = exp.getHierarchy(); if (expHierarchy != hierarchy) { throw newEvalException(dummyFunDef, "Default value of parameter '" + parameterName + "' must belong to the hierarchy " + hierarchy); } } String parameterDescription = null; if (args.length > 3) { if (args[3] instanceof Literal && args[3].getType() == Category.String) { parameterDescription = (String) ((Literal) args[3]).getValue(); } else { throw newEvalException(dummyFunDef, "Description of parameter '" + parameterName + "' must be a string constant"); } } return new ParameterFunDef(dummyFunDef, parameterName, hierarchy, type, exp, parameterDescription); } }); define(new MultiResolver("ParamRef", "ParamRef(<Name>)", "Returns current value of parameter. If it's null, returns default.", new String[] {"fv#"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String parameterName; if (args[0] instanceof Literal && args[0].getType() == Category.String) { parameterName = (String) ((Literal) args[0]).getValue(); } else { throw newEvalException(dummyFunDef, "Parameter name must be a string constant"); } return new ParameterFunDef(dummyFunDef, parameterName, null, Category.Unknown, null, null); } }); // // OPERATORS define(new FunDefBase("+", "<Numeric Expression> + <Numeric Expression>", "Adds two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() + o1.doubleValue()); } public void testPlus(FoodMartTestCase test) { String s = test.executeExpr("1+2"); Assert.assertEquals("3", s); } }); define(new FunDefBase("-", "<Numeric Expression> - <Numeric Expression>", "Subtracts two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() - o1.doubleValue()); } public void testMinus(FoodMartTestCase test) { String s = test.executeExpr("1-3"); Assert.assertEquals("-2", s); } public void testMinusAssociativity(FoodMartTestCase test) { String s = test.executeExpr("11-7-5"); // right-associative would give 11-(7-5) = 9, which is wrong Assert.assertEquals("-1", s); } }); define(new FunDefBase("*", "<Numeric Expression> * <Numeric Expression>", "Multiplies two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() * o1.doubleValue()); } public void testMultiply(FoodMartTestCase test) { String s = test.executeExpr("4*7"); Assert.assertEquals("28", s); } public void testMultiplyPrecedence(FoodMartTestCase test) { String s = test.executeExpr("3 + 4 * 5 + 6"); Assert.assertEquals("29", s); } /** Bug 774807 caused expressions to be mistaken for the crossjoin * operator. */ public void testMultiplyBug774807(FoodMartTestCase test) { final String desiredResult = "Axis #0:" + nl + "{}" + nl + "Axis #1:" + nl + "{[Store].[All Stores]}" + nl + "Axis #2:" + nl + "{[Measures].[Store Sales]}" + nl + "{[Measures].[A]}" + nl + "Row #0: 565,238.13" + nl + "Row #1: 319,494,143,605.90" + nl; test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '([Measures].[Store Sales] * [Measures].[Store Sales])'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); // as above, no parentheses test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '[Measures].[Store Sales] * [Measures].[Store Sales]'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); // as above, plus 0 test.runQueryCheckResult( "WITH MEMBER [Measures].[A] AS" + nl + " '[Measures].[Store Sales] * [Measures].[Store Sales] + 0'" + nl + "SELECT {[Store]} ON COLUMNS," + nl + " {[Measures].[Store Sales], [Measures].[A]} ON ROWS" + nl + "FROM Sales", desiredResult); } }); define(new FunDefBase("/", "<Numeric Expression> / <Numeric Expression>", "Divides two numbers.", "innn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); Double result = new Double(o0.doubleValue() / o1.doubleValue()); return result; } // todo: use this, via reflection public double evaluate(double d1, double d2) { return d1 / d2; } public void testDivide(FoodMartTestCase test) { String s = test.executeExpr("10 / 5"); Assert.assertEquals("2", s); } public void testDivideByZero(FoodMartTestCase test) { String s = test.executeExpr("-3 / (2 - 2)"); Assert.assertEquals("-Infinity", s); } public void testDividePrecedence(FoodMartTestCase test) { String s = test.executeExpr("24 / 4 / 2 * 10 - -1"); Assert.assertEquals("31", s); } }); define(new FunDefBase("-", "- <Numeric Expression>", "Returns the negative of a number.", "Pnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0); return new Double(- o0.doubleValue()); } public void testUnaryMinus(FoodMartTestCase test) { String s = test.executeExpr("-3"); Assert.assertEquals("-3", s); } public void testUnaryMinusMember(FoodMartTestCase test) { String s = test.executeExpr("- ([Measures].[Unit Sales],[Gender].[F])"); Assert.assertEquals("-131,558", s); } public void testUnaryMinusPrecedence(FoodMartTestCase test) { String s = test.executeExpr("1 - -10.5 * 2 -3"); Assert.assertEquals("19", s); } }); define(new FunDefBase("||", "<String Expression> || <String Expression>", "Concatenates two strings.", "iSSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return o0 + o1; } public void testStringConcat(FoodMartTestCase test) { String s = test.executeExpr(" \"foo\" || \"bar\" "); Assert.assertEquals("foobar", s); } public void testStringConcat2(FoodMartTestCase test) { String s = test.executeExpr(" \"foo\" || [Gender].[M].Name || \"\" "); Assert.assertEquals("fooM", s); } }); define(new FunDefBase("AND", "<Logical Expression> AND <Logical Expression>", "Returns the conjunction of two conditions.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { return toBoolean( getBooleanArg(evaluator, args, 0) && getBooleanArg(evaluator, args, 1)); } public void testAnd(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 2=2 "); Assert.assertEquals("true", s); } public void testAnd2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 2=0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("OR", "<Logical Expression> OR <Logical Expression>", "Returns the disjunction of two conditions.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { // Only evaluate 2nd if first is false. return toBoolean( getBooleanArg(evaluator, args, 0) || getBooleanArg(evaluator, args, 1)); } public void testOr(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=0 OR 2=0 "); Assert.assertEquals("false", s); } public void testOr2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=0 OR 0=0 "); Assert.assertEquals("true", s); } public void testOrAssociativity1(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 1=0 OR 1=1 "); // Would give 'false' if OR were stronger than AND (wrong!) Assert.assertEquals("true", s); } public void testOrAssociativity2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 OR 1=0 AND 1=1 "); // Would give 'false' if OR were stronger than AND (wrong!) Assert.assertEquals("true", s); } public void testOrAssociativity3(FoodMartTestCase test) { String s = test.executeBooleanExpr(" (1=0 OR 1=1) AND 1=1 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("XOR", "<Logical Expression> XOR <Logical Expression>", "Returns whether two conditions are mutually exclusive.", "ibbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { final boolean b0 = getBooleanArg(evaluator, args, 0); final boolean b1 = getBooleanArg(evaluator, args, 1); return toBoolean(b0 != b1); } public void testXor(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 XOR 2=2 "); Assert.assertEquals("false", s); } public void testXorAssociativity(FoodMartTestCase test) { // Would give 'false' if XOR were stronger than AND (wrong!) String s = test.executeBooleanExpr(" 1 = 1 AND 1 = 1 XOR 1 = 0 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("NOT", "NOT <Logical Expression>", "Returns the negation of a condition.", "Pbb") { public Object evaluate(Evaluator evaluator, Exp[] args) { return toBoolean(!getBooleanArg(evaluator, args, 0)); } public void testNot(FoodMartTestCase test) { String s = test.executeBooleanExpr(" NOT 1=1 "); Assert.assertEquals("false", s); } public void testNotNot(FoodMartTestCase test) { String s = test.executeBooleanExpr(" NOT NOT 1=1 "); Assert.assertEquals("true", s); } public void testNotAssociativity(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND NOT 1=1 OR NOT 1=1 AND 1=1 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("=", "<String Expression> = <String Expression>", "Returns whether two expressions are equal.", "ibSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return toBoolean(o0.equals(o1)); } public void testStringEquals(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" = \"bar\" "); Assert.assertEquals("false", s); } public void testStringEqualsAssociativity(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" = \"fo\" || \"o\" "); Assert.assertEquals("true", s); } public void testStringEqualsEmpty(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"\" = \"\" "); Assert.assertEquals("true", s); } }); define(new FunDefBase("=", "<Numeric Expression> = <Numeric Expression>", "Returns whether two expressions are equal.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.equals(o1)); } public void testEq(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1.0 = 1 "); Assert.assertEquals("true", s); } }); define(new FunDefBase("<>", "<String Expression> <> <String Expression>", "Returns whether two expressions are not equal.", "ibSS") { public Object evaluate(Evaluator evaluator, Exp[] args) { String o0 = getStringArg(evaluator, args, 0, null), o1 = getStringArg(evaluator, args, 1, null); return toBoolean(!o0.equals(o1)); } public void testStringNe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" <> \"bar\" "); Assert.assertEquals("true", s); } }); define(new FunDefBase("<>", "<Numeric Expression> <> <Numeric Expression>", "Returns whether two expressions are not equal.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(!o0.equals(o1)); } public void testNe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 <> 1.0 + 1.0 "); Assert.assertEquals("false", s); } public void testNeInfinity(FoodMartTestCase test) { String s = test.executeBooleanExpr("(1 / 0) <> (1 / 0)"); // Infinity does not equal itself Assert.assertEquals("false", s); } }); define(new FunDefBase("<", "<Numeric Expression> < <Numeric Expression>", "Returns whether an expression is less than another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) < 0); } public void testLt(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 < 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase("<=", "<Numeric Expression> <= <Numeric Expression>", "Returns whether an expression is less than or equal to another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) <= 0); } public void testLe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 <= 1.0 + 1.0 "); Assert.assertEquals("true", s); } }); define(new FunDefBase(">", "<Numeric Expression> > <Numeric Expression>", "Returns whether an expression is greater than another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) > 0); } public void testGt(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 > 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); define(new FunDefBase(">=", "<Numeric Expression> >= <Numeric Expression>", "Returns whether an expression is greater than or equal to another.", "ibnn") { public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return toBoolean(o0.compareTo(o1) >= 0); } public void testGe(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 2 > 1.0 + 1.0 "); Assert.assertEquals("false", s); } }); }
37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/0ab3be7797c0940dd5a113451bfd9a43186433e0/BuiltinFunTable.java/clean/src/main/mondrian/olap/fun/BuiltinFunTable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 4426, 7503, 1435, 288, 202, 202, 11255, 10435, 2932, 8560, 8863, 202, 202, 759, 1122, 1149, 30, 293, 33, 1396, 16, 312, 33, 1305, 16, 277, 33, 382, 904, 16, 453, 33, 2244, 202, 202, 759, 576, 4880, 30, 202, 202, 759, 14884, 13690, 55, 202, 202, 430, 261, 5743, 13, 4426, 12, 2704, 478, 318, 3262, 2171, 2932, 694, 11698, 3113, 315, 694, 11698, 12, 32, 694, 23224, 16, 411, 694, 34, 65, 2777, 63, 16, 411, 9902, 5371, 34, 65, 2225, 16, 315, 5692, 1245, 578, 1898, 1678, 358, 392, 526, 364, 999, 316, 279, 729, 17, 430, 261, 5743, 13, 2553, 445, 1199, 16, 315, 507, 7388, 10019, 202, 202, 759, 202, 202, 759, 463, 3114, 3156, 1146, 13690, 55, 202, 202, 11255, 12, 2704, 478, 318, 3262, 2171, 2932, 8611, 3113, 3532, 12074, 18652, 8611, 3113, 315, 1356, 326, 4968, 716, 1914, 279, 1269, 9360, 1199, 16, 315, 84, 19153, 7923, 288, 1082, 202, 482, 1033, 5956, 12, 15876, 18256, 16, 7784, 8526, 833, 13, 288, 9506, 202, 12074, 9360, 273, 7628, 6000, 4117, 12, 14168, 639, 16, 833, 16, 374, 16, 638, 1769, 9506, 202, 2463, 9360, 18, 588, 8611, 5621, 1082, 202, 97, 202, 202, 22938, 202, 202, 759, 14646, 44, 361, 358, 527, 333, 358, 336, 411, 12074, 18652, 8611, 358, 1440, 35, 202, 202, 11255, 12, 2704, 478, 318, 3262, 2171, 2932, 8611, 3113, 3532, 8611, 18652, 8611, 3113, 315, 1356, 326, 4968, 716, 1914, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 4426, 7503, 1435, 288, 202, 202, 11255, 10435, 2932, 8560, 8863, 202, 202, 759, 1122, 1149, 30, 293, 33, 1396, 16, 312, 33, 1305, 16, 277, 33, 382, 904, 16, 453, 33, 2244, 202, 202, 759, 576, 4880, 30, 202, 202, 759, 14884, 13690, 55, 202, 202, 430, 261, 5743, 13, 4426, 12, 2704, 478, 318, 3262, 2171, 2932, 694, 11698, 3113, 315, 694, 11698, 12, 32, 694, 23224, 16, 411, 694, 34, 65, 2777, 63, 16, 411, 9902, 5371, 34, 65, 2225, 16, 315, 5692, 1245, 578, 1898, 1678, 358, 392, 526, 364, 999, 316, 279, 729, 17, 430, 261, 5743, 13, 2553, 445, 1199, 16, 315, 507, 7388, 10019, 202, 202, 759, 202, 2 ]
boolean autoKern = true; boolean doWordSpacing = false; boolean doLetterSpacing = false;
boolean autoKern = true; boolean doWordSpacing = false; boolean doLetterSpacing = false;
protected Point2D doSpacing(Float kern, Float letterSpacing, Float wordSpacing) { boolean autoKern = true; boolean doWordSpacing = false; boolean doLetterSpacing = false; float kernVal = 0f; float letterSpacingVal = 0f; float wordSpacingVal = 0f; if ((kern instanceof Float) && (!kern.isNaN())) { kernVal = kern.floatValue(); autoKern = false; //System.out.println("KERNING: "+kernVal); } if ((letterSpacing instanceof Float) && (!letterSpacing.isNaN())) { letterSpacingVal = letterSpacing.floatValue(); doLetterSpacing = true; //System.out.println("LETTER-SPACING: "+letterSpacingVal); } if ((wordSpacing instanceof Float) && (!wordSpacing.isNaN())) { wordSpacingVal = wordSpacing.floatValue(); doWordSpacing = true; //System.out.println("WORD_SPACING: "+wordSpacingVal); } int numGlyphs = gv.getNumGlyphs(); float dx = 0f; float dy = 0f; Point2D newPositions[] = new Point2D[numGlyphs]; Point2D prevPos = glyphPositions[0]; float x = (float) prevPos.getX(); float y = (float) prevPos.getY(); try { if ((numGlyphs > 1) && (doWordSpacing || doLetterSpacing || !autoKern)) { for (int i=1; i<numGlyphs; ++i) { Point2D gpos = glyphPositions[i]; dx = (float)gpos.getX()-(float)prevPos.getX(); dy = (float)gpos.getY()-(float)prevPos.getY(); boolean inWS = false; // while this is whitespace, increment int beginWS = i; int endWS = i; GlyphMetrics gm = gv.getGlyphMetrics(i); // BUG: gm.isWhitespace() fails for latin SPACE glyph! while ((gm.getBounds2D().getWidth()<0.01d) || gm.isWhitespace()) { ++i; ++endWS; if (!inWS) inWS = true; if (i>=numGlyphs) { inWS = false; break; } gpos = glyphPositions[i]; gm = gv.getGlyphMetrics(i); } // then apply wordSpacing if ( inWS ) { if (doWordSpacing) { int nWS = endWS-beginWS; float px = (float) prevPos.getX(); float py = (float) prevPos.getY(); dx = (float) (gpos.getX() - px)/nWS; dy = (float) (gpos.getY() - py)/nWS; if (isVertical()) { dy = (float) (wordSpacing.floatValue()+ gv.getGlyphMetrics(beginWS-1). getBounds2D().getHeight())/nWS; } else { dx = (float) (wordSpacing.floatValue()+ gv.getGlyphMetrics(beginWS-1). getBounds2D().getWidth())/nWS; } for (int j=beginWS; j<=endWS; ++j) { x += dx; y += dy; newPositions[j] = new Point2D.Float(x, y); } } } else { dx = (float) (gpos.getX()-prevPos.getX()); dy = (float) (gpos.getY()-prevPos.getY()); if (autoKern) { if (isVertical()) dy += letterSpacingVal; else dx += letterSpacingVal; } else { // apply explicit kerning adjustments, // discarding any auto-kern dx values if (isVertical()) { dy = (float) gv.getGlyphMetrics(i-1).getBounds2D().getWidth()+ kernVal + letterSpacingVal; } else { dx = (float) gv.getGlyphMetrics(i-1).getBounds2D().getWidth()+ kernVal + letterSpacingVal; } } x += dx; y += dy; newPositions[i] = new Point2D.Float(x, y); } prevPos = gpos; } for (int i=1; i<numGlyphs; ++i) { // assign the new positions glyphPositions[i] = newPositions[i]; gv.setGlyphPosition(i, glyphPositions[i]); } } if (isVertical()) { dx = 0f; dy = (float) gv.getGlyphMetrics(numGlyphs-1).getBounds2D().getHeight()+ kernVal+letterSpacingVal; } else { dx = (float) gv.getGlyphMetrics(numGlyphs-1).getBounds2D().getWidth()+ kernVal+letterSpacingVal; dy = 0f; } } catch (Exception e) { e.printStackTrace(); } //Point2D newAdvance = new Point2D.Float((float) prevPos.getX()+dx, // (float) prevPos.getY()+dy); Point2D newAdvance = advance; gv.setGlyphPosition(numGlyphs, newAdvance); return newAdvance; }
45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/d864a7831760c16be2dce5726c3e6b15bbbba80a/GlyphLayout.java/clean/sources/org/apache/batik/gvt/text/GlyphLayout.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 4686, 22, 40, 741, 18006, 12, 4723, 24579, 16, 1875, 2398, 5450, 9471, 18006, 16, 17311, 5450, 2076, 18006, 13, 288, 202, 6494, 3656, 47, 8865, 273, 638, 31, 202, 6494, 741, 3944, 18006, 273, 629, 31, 202, 6494, 741, 13938, 18006, 273, 629, 31, 3639, 1431, 24579, 3053, 273, 374, 74, 31, 202, 5659, 9471, 18006, 3053, 273, 374, 74, 31, 3639, 1431, 2076, 18006, 3053, 273, 374, 74, 31, 202, 430, 14015, 79, 8865, 1276, 5450, 13, 597, 16051, 79, 8865, 18, 291, 21172, 1435, 3719, 288, 5411, 24579, 3053, 273, 24579, 18, 5659, 620, 5621, 202, 565, 3656, 47, 8865, 273, 629, 31, 5411, 368, 3163, 18, 659, 18, 8222, 2932, 27221, 15870, 30, 13773, 79, 8865, 3053, 1769, 202, 97, 202, 430, 14015, 13449, 18006, 1276, 5450, 13, 597, 16051, 13449, 18006, 18, 291, 21172, 1435, 3719, 288, 5411, 9471, 18006, 3053, 273, 9471, 18006, 18, 5659, 620, 5621, 202, 565, 741, 13938, 18006, 273, 638, 31, 5411, 368, 3163, 18, 659, 18, 8222, 2932, 26379, 17, 3118, 2226, 1360, 30, 13773, 13449, 18006, 3053, 1769, 202, 97, 202, 430, 14015, 1095, 18006, 1276, 5450, 13, 597, 16051, 1095, 18006, 18, 291, 21172, 1435, 3719, 288, 5411, 2076, 18006, 3053, 273, 2076, 18006, 18, 5659, 620, 5621, 5411, 741, 3944, 18006, 273, 638, 31, 5411, 368, 3163, 18, 659, 18, 8222, 2932, 7952, 67, 3118, 2226, 1360, 30, 13773, 1095, 18006, 3053, 1769, 202, 97, 3639, 509, 818, 25399, 273, 11404, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 4686, 22, 40, 741, 18006, 12, 4723, 24579, 16, 1875, 2398, 5450, 9471, 18006, 16, 17311, 5450, 2076, 18006, 13, 288, 202, 6494, 3656, 47, 8865, 273, 638, 31, 202, 6494, 741, 3944, 18006, 273, 629, 31, 202, 6494, 741, 13938, 18006, 273, 629, 31, 3639, 1431, 24579, 3053, 273, 374, 74, 31, 202, 5659, 9471, 18006, 3053, 273, 374, 74, 31, 3639, 1431, 2076, 18006, 3053, 273, 374, 74, 31, 202, 430, 14015, 79, 8865, 1276, 5450, 13, 597, 16051, 79, 8865, 18, 291, 21172, 1435, 3719, 288, 5411, 24579, 3053, 273, 24579, 18, 5659, 620, 5621, 202, 565, 3656, 47, 8865, 273, 629, 31, 5411, 368, 3163, 18, 659, 18, 8222, 2932, 27221, 15870, 30, 2 ]
private static void createClassObjects() {
private static void createClassObjects() throws VM_PragmaInterruptible {
private static void createClassObjects() { for (int i=0; i<classObjects.length; i++) { classObjects[i].getClassForType(); } }
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/4a987a25f93ceebb0f47a68989f48a184a7ef4ca/VM.java/buggy/rvm/src/vm/VM.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 918, 752, 797, 4710, 1435, 1216, 8251, 67, 2050, 9454, 14126, 1523, 288, 565, 364, 261, 474, 277, 33, 20, 31, 277, 32, 1106, 4710, 18, 2469, 31, 277, 27245, 288, 1377, 667, 4710, 63, 77, 8009, 588, 797, 22405, 5621, 565, 289, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 918, 752, 797, 4710, 1435, 1216, 8251, 67, 2050, 9454, 14126, 1523, 288, 565, 364, 261, 474, 277, 33, 20, 31, 277, 32, 1106, 4710, 18, 2469, 31, 277, 27245, 288, 1377, 667, 4710, 63, 77, 8009, 588, 797, 22405, 5621, 565, 289, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
presences.addAll(room.addMember(jid.toBareJID(), null, senderRole));
presences.addAll(room.addMember(jid.toBareJID(), nick, senderRole));
private void handleItemsElement(MUCRole senderRole, List itemsList, IQ reply) throws ForbiddenException, ConflictException, NotAllowedException { Element item; String affiliation = null; String roleAttribute = null; boolean hasJID = ((Element)itemsList.get(0)).attributeValue("jid") != null; boolean hasNick = ((Element)itemsList.get(0)).attributeValue("nick") != null; // Check if the client is requesting or changing the list of moderators/members/etc. if (!hasJID && !hasNick) { // The client is requesting the list of moderators/members/participants/outcasts for (Iterator items = itemsList.iterator(); items.hasNext();) { item = (Element)items.next(); affiliation = item.attributeValue("affiliation"); roleAttribute = item.attributeValue("role"); // Create the result that will hold an item for each // moderator/member/participant/outcast Element result = reply.setChildElement("query", "http://jabber.org/protocol/muc#admin"); Element metaData; if ("outcast".equals(affiliation)) { // The client is requesting the list of outcasts if (MUCRole.ADMINISTRATOR != senderRole.getAffiliation() && MUCRole.OWNER != senderRole.getAffiliation()) { throw new ForbiddenException(); } for (String jid : room.getOutcasts()) { metaData = result.addElement("item", "http://jabber.org/protocol/muc#admin"); metaData.addAttribute("affiliation", "outcast"); metaData.addAttribute("jid", jid); } } else if ("member".equals(affiliation)) { // The client is requesting the list of members // In a members-only room members can get the list of members if (!room.isMembersOnly() && MUCRole.ADMINISTRATOR != senderRole.getAffiliation() && MUCRole.OWNER != senderRole.getAffiliation()) { throw new ForbiddenException(); } for (String jid : room.getMembers()) { metaData = result.addElement("item", "http://jabber.org/protocol/muc#admin"); metaData.addAttribute("affiliation", "member"); metaData.addAttribute("jid", jid); try { List<MUCRole> roles = room.getOccupantsByBareJID(jid); MUCRole role = roles.get(0); metaData.addAttribute("role", role.getRoleAsString()); metaData.addAttribute("nick", role.getNickname()); } catch (UserNotFoundException e) { // Do nothing } } } else if ("moderator".equals(roleAttribute)) { // The client is requesting the list of moderators if (MUCRole.ADMINISTRATOR != senderRole.getAffiliation() && MUCRole.OWNER != senderRole.getAffiliation()) { throw new ForbiddenException(); } for (MUCRole role : room.getModerators()) { metaData = result.addElement("item", "http://jabber.org/protocol/muc#admin"); metaData.addAttribute("role", "moderator"); metaData.addAttribute("jid", role.getChatUser().getAddress().toString()); metaData.addAttribute("nick", role.getNickname()); metaData.addAttribute("affiliation", role.getAffiliationAsString()); } } else if ("participant".equals(roleAttribute)) { // The client is requesting the list of participants if (MUCRole.MODERATOR != senderRole.getRole()) { throw new ForbiddenException(); } for (MUCRole role : room.getParticipants()) { metaData = result.addElement("item", "http://jabber.org/protocol/muc#admin"); metaData.addAttribute("role", "participant"); metaData.addAttribute("jid", role.getChatUser().getAddress().toString()); metaData.addAttribute("nick", role.getNickname()); metaData.addAttribute("affiliation", role.getAffiliationAsString()); } } else { reply.setError(PacketError.Condition.bad_request); } } } else { // The client is modifying the list of moderators/members/participants/outcasts JID jid = null; String nick; String target = null; boolean hasAffiliation = ((Element) itemsList.get(0)).attributeValue("affiliation") != null; // Keep a registry of the updated presences List<Presence> presences = new ArrayList<Presence>(itemsList.size()); // Collect the new affiliations or roles for the specified jids for (Iterator items = itemsList.iterator(); items.hasNext();) { try { item = (Element)items.next(); target = (hasAffiliation ? item.attributeValue("affiliation") : item .attributeValue("role")); // jid could be of the form "full JID" or "bare JID" depending if we are // going to change a role or an affiliation if (hasJID) { jid = new JID(item.attributeValue("jid")); } else { // Get the JID based on the requested nick nick = item.attributeValue("nick"); jid = room.getOccupant(nick).getChatUser().getAddress(); } room.lock.writeLock().lock(); try { if ("moderator".equals(target)) { // Add the user as a moderator of the room based on the full JID presences.add(room.addModerator(jid, senderRole)); } else if ("participant".equals(target)) { // Add the user as a participant of the room based on the full JID presences.add(room.addParticipant(jid, item.elementTextTrim("reason"), senderRole)); } else if ("visitor".equals(target)) { // Add the user as a visitor of the room based on the full JID presences.add(room.addVisitor(jid, senderRole)); } else if ("member".equals(target)) { // Add the user as a member of the room based on the bare JID boolean hadAffiliation = room.getAffiliation(jid.toBareJID()) != MUCRole.NONE; presences.addAll(room.addMember(jid.toBareJID(), null, senderRole)); // If the user had an affiliation don't send an invitation. Otherwise // send an invitation if the room is members-only if (!hadAffiliation && room.isMembersOnly()) { room.sendInvitation(jid, null, senderRole); } } else if ("outcast".equals(target)) { // Add the user as an outcast of the room based on the bare JID presences.addAll(room.addOutcast(jid.toBareJID(), item.elementTextTrim("reason"), senderRole)); } else if ("none".equals(target)) { if (hasAffiliation) { // Set that this jid has a NONE affiliation based on the bare JID presences.addAll(room.addNone(jid.toBareJID(), senderRole)); } else { // Kick the user from the room if (MUCRole.MODERATOR != senderRole.getRole()) { throw new ForbiddenException(); } presences.add(room.kickOccupant(jid, senderRole.getChatUser().getAddress(), item.elementTextTrim("reason"))); } } else { reply.setError(PacketError.Condition.bad_request); } } finally { room.lock.writeLock().unlock(); } } catch (UserNotFoundException e) { // Do nothing } } // Send the updated presences to the room occupants for (Presence presence : presences) { room.send(presence); } } }
51636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51636/e6e4f0b67f4352fefe33ce27230a0d0d200a4bfa/IQAdminHandler.java/buggy/src/java/org/jivesoftware/messenger/muc/spi/IQAdminHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1640, 3126, 1046, 12, 49, 17479, 2996, 5793, 2996, 16, 987, 1516, 682, 16, 26950, 4332, 13, 5411, 1216, 20204, 503, 16, 23460, 503, 16, 2288, 5042, 503, 288, 3639, 3010, 761, 31, 3639, 514, 7103, 16278, 273, 446, 31, 3639, 514, 2478, 1499, 273, 446, 31, 3639, 1250, 711, 46, 734, 273, 14015, 1046, 13, 3319, 682, 18, 588, 12, 20, 13, 2934, 4589, 620, 2932, 18252, 7923, 480, 446, 31, 3639, 1250, 711, 29756, 273, 14015, 1046, 13, 3319, 682, 18, 588, 12, 20, 13, 2934, 4589, 620, 2932, 17091, 7923, 480, 446, 31, 3639, 368, 2073, 309, 326, 1004, 353, 18709, 578, 12770, 326, 666, 434, 681, 264, 3062, 19, 7640, 19, 14175, 18, 3639, 309, 16051, 5332, 46, 734, 597, 401, 5332, 29756, 13, 288, 5411, 368, 1021, 1004, 353, 18709, 326, 666, 434, 681, 264, 3062, 19, 7640, 19, 2680, 27620, 19, 659, 4155, 87, 5411, 364, 261, 3198, 1516, 273, 1516, 682, 18, 9838, 5621, 1516, 18, 5332, 2134, 5621, 13, 288, 7734, 761, 273, 261, 1046, 13, 3319, 18, 4285, 5621, 7734, 7103, 16278, 273, 761, 18, 4589, 620, 2932, 7329, 16278, 8863, 7734, 2478, 1499, 273, 761, 18, 4589, 620, 2932, 4615, 8863, 7734, 368, 1788, 326, 563, 716, 903, 6887, 392, 761, 364, 1517, 7734, 368, 681, 7385, 19, 5990, 19, 2680, 14265, 19, 659, 4155, 7734, 3010, 563, 273, 4332, 18, 542, 1763, 1046, 2932, 2271, 3113, 315, 2505, 2207, 78, 378, 744, 18, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1640, 3126, 1046, 12, 49, 17479, 2996, 5793, 2996, 16, 987, 1516, 682, 16, 26950, 4332, 13, 5411, 1216, 20204, 503, 16, 23460, 503, 16, 2288, 5042, 503, 288, 3639, 3010, 761, 31, 3639, 514, 7103, 16278, 273, 446, 31, 3639, 514, 2478, 1499, 273, 446, 31, 3639, 1250, 711, 46, 734, 273, 14015, 1046, 13, 3319, 682, 18, 588, 12, 20, 13, 2934, 4589, 620, 2932, 18252, 7923, 480, 446, 31, 3639, 1250, 711, 29756, 273, 14015, 1046, 13, 3319, 682, 18, 588, 12, 20, 13, 2934, 4589, 620, 2932, 17091, 7923, 480, 446, 31, 3639, 368, 2073, 309, 326, 1004, 353, 18709, 578, 12770, 326, 666, 434, 681, 264, 3062, 19, 7640, 19, 14175, 2 ]
int idx = (int) RubyNumeric.num2long(args[0]);
int idx = (int) args[0].convertToInteger().getLongValue();
public IRubyObject aref(IRubyObject[] args) { if (checkArgumentCount(args, 1, 2) == 2) { return substr(RubyNumeric.fix2int(args[0]), RubyNumeric.fix2int(args[1])); } if (args[0] instanceof RubyFixnum) { int idx = RubyNumeric.fix2int(args[0]); if (idx < 0) { idx += getValue().length(); } return idx < 0 || idx >= getValue().length() ? getRuntime().getNil() : getRuntime().newFixnum(getValue().charAt(idx)); } else if (args[0] instanceof RubyRegexp) { return RubyRegexp.regexpValue(args[0]).search(this, 0) >= 0 ? RubyRegexp.last_match(getRuntime().getBackref()) : getRuntime().getNil(); } else if (args[0] instanceof RubyString) { return getValue().indexOf(stringValue(args[0]).getValue()) != -1 ? args[0] : getRuntime().getNil(); } else if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getValue().length(), true, false); return begLen == null ? getRuntime().getNil() : substr((int) begLen[0], (int) begLen[1]); } int idx = (int) RubyNumeric.num2long(args[0]); if (idx < 0) { idx += getValue().length(); } return idx < 0 || idx >= getValue().length() ? getRuntime().getNil() : getRuntime().newFixnum(getValue().charAt(idx)); }
49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyString.java/buggy/src/org/jruby/RubyString.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 15908, 10340, 921, 854, 74, 12, 7937, 10340, 921, 8526, 833, 13, 288, 202, 565, 309, 261, 1893, 1379, 1380, 12, 1968, 16, 404, 16, 576, 13, 422, 576, 13, 288, 202, 3639, 327, 2373, 12, 54, 10340, 9902, 18, 904, 22, 474, 12, 1968, 63, 20, 65, 3631, 202, 1171, 202, 225, 19817, 9902, 18, 904, 22, 474, 12, 1968, 63, 21, 5717, 1769, 202, 565, 289, 202, 565, 309, 261, 1968, 63, 20, 65, 1276, 19817, 8585, 2107, 13, 288, 202, 3639, 509, 2067, 273, 19817, 9902, 18, 904, 22, 474, 12, 1968, 63, 20, 19226, 202, 3639, 309, 261, 3465, 411, 374, 13, 288, 202, 5411, 2067, 1011, 2366, 7675, 2469, 5621, 202, 3639, 289, 202, 3639, 327, 2067, 411, 374, 747, 2067, 1545, 2366, 7675, 2469, 1435, 692, 18814, 7675, 588, 12616, 1435, 294, 202, 540, 202, 588, 5576, 7675, 2704, 8585, 2107, 12, 24805, 7675, 3001, 861, 12, 3465, 10019, 202, 565, 289, 469, 309, 261, 1968, 63, 20, 65, 1276, 19817, 14621, 13, 288, 202, 377, 202, 2463, 19817, 14621, 18, 17745, 620, 12, 1968, 63, 20, 65, 2934, 3072, 12, 2211, 16, 374, 13, 1545, 374, 692, 202, 5411, 19817, 14621, 18, 2722, 67, 1916, 12, 588, 5576, 7675, 588, 2711, 1734, 10756, 294, 202, 2398, 202, 588, 5576, 7675, 588, 12616, 5621, 202, 565, 289, 469, 309, 261, 1968, 63, 20, 65, 1276, 19817, 780, 13, 288, 202, 3639, 327, 2366, 7675, 31806, 12, 1080, 620, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 15908, 10340, 921, 854, 74, 12, 7937, 10340, 921, 8526, 833, 13, 288, 202, 565, 309, 261, 1893, 1379, 1380, 12, 1968, 16, 404, 16, 576, 13, 422, 576, 13, 288, 202, 3639, 327, 2373, 12, 54, 10340, 9902, 18, 904, 22, 474, 12, 1968, 63, 20, 65, 3631, 202, 1171, 202, 225, 19817, 9902, 18, 904, 22, 474, 12, 1968, 63, 21, 5717, 1769, 202, 565, 289, 202, 565, 309, 261, 1968, 63, 20, 65, 1276, 19817, 8585, 2107, 13, 288, 202, 3639, 509, 2067, 273, 19817, 9902, 18, 904, 22, 474, 12, 1968, 63, 20, 19226, 202, 3639, 309, 261, 3465, 411, 374, 13, 288, 202, 5411, 2067, 1011, 2366, 7675, 2469, 5621, 202, 2 ]
serviceGroupDescription.addService(axisService); serviceGroupDescription.getServiceGroupContext(sysContext); serviceGroupDescription.setServiceGroupName(assumedServiceName.getLocalPart()); sysContext.getAxisConfiguration().addServiceGroup(serviceGroupDescription);
sysContext.getAxisConfiguration().addService(axisService);
protected static ServiceContext assumeServiceContext(String clientHome) throws AxisFault { ConfigurationContext sysContext = null; //we are trying to keep one configuration Context at the Client side. That make it easier to //manage the TransportListeners. But using the static referance is bit crude!. if (ListenerManager.configurationContext == null) { ConfigurationContextFactory efac = new ConfigurationContextFactory(); sysContext = efac.buildClientConfigurationContext(clientHome); ListenerManager.configurationContext = sysContext; } else { sysContext = ListenerManager.configurationContext; } //we will assume a Service and operations QName assumedServiceName = new QName("AnonymousService"); ServiceDescription axisService = new ServiceDescription(assumedServiceName); operationTemplate = new OperationDescription(new QName("TemplateOperation")); ServiceGroupDescription serviceGroupDescription = new ServiceGroupDescription(sysContext.getAxisConfiguration()); PhasesInfo info =((AxisConfigurationImpl)sysContext.getAxisConfiguration()).getPhasesinfo(); //to set the operation flows if(info != null){ info.setOperationPhases(operationTemplate); } axisService.addOperation(operationTemplate); serviceGroupDescription.addService(axisService); serviceGroupDescription.getServiceGroupContext(sysContext); serviceGroupDescription.setServiceGroupName(assumedServiceName.getLocalPart()); sysContext.getAxisConfiguration().addServiceGroup(serviceGroupDescription);// return sysContext.createServiceContext(assumedServiceName); return serviceGroupDescription.getServiceGroupContext(sysContext).getServiceContext( assumedServiceName.getLocalPart()); }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/87a78f5e48b48943c93e5553e20184f813628e25/Call.java/buggy/modules/core/src/org/apache/axis2/clientapi/Call.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 760, 1956, 1042, 6750, 1179, 1042, 12, 780, 1004, 8684, 13, 5411, 1216, 15509, 7083, 288, 3639, 4659, 1042, 2589, 1042, 273, 446, 31, 3639, 368, 1814, 854, 8374, 358, 3455, 1245, 1664, 1772, 622, 326, 2445, 4889, 18, 12466, 1221, 518, 15857, 358, 3639, 368, 12633, 326, 9514, 5583, 18, 12484, 1450, 326, 760, 8884, 1359, 353, 2831, 4422, 1317, 5, 18, 540, 309, 261, 2223, 1318, 18, 7025, 1042, 422, 446, 13, 288, 5411, 4659, 29871, 425, 11639, 273, 10792, 394, 4659, 29871, 5621, 5411, 2589, 1042, 273, 425, 11639, 18, 3510, 1227, 1750, 1042, 12, 2625, 8684, 1769, 5411, 10652, 1318, 18, 7025, 1042, 273, 2589, 1042, 31, 3639, 289, 469, 288, 5411, 2589, 1042, 273, 10652, 1318, 18, 7025, 1042, 31, 3639, 289, 3639, 368, 1814, 903, 6750, 279, 1956, 471, 5295, 3639, 16723, 12034, 16789, 273, 394, 16723, 2932, 18792, 1179, 8863, 3639, 1956, 3291, 2654, 1179, 273, 394, 1956, 3291, 12, 428, 379, 329, 16789, 1769, 3639, 1674, 2283, 273, 394, 4189, 3291, 12, 2704, 16723, 2932, 2283, 2988, 7923, 1769, 3639, 1956, 1114, 3291, 1156, 1114, 3291, 273, 7734, 394, 1956, 1114, 3291, 12, 9499, 1042, 18, 588, 6558, 1750, 10663, 3639, 4360, 3304, 966, 1123, 273, 12443, 6558, 1750, 2828, 13, 9499, 1042, 18, 588, 6558, 1750, 1435, 2934, 588, 3731, 3304, 1376, 5621, 3639, 368, 869, 444, 326, 1674, 22465, 3639, 309, 12, 1376, 480, 446, 15329, 5411, 1123, 18, 542, 2988, 3731, 3304, 12, 7624, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 760, 1956, 1042, 6750, 1179, 1042, 12, 780, 1004, 8684, 13, 5411, 1216, 15509, 7083, 288, 3639, 4659, 1042, 2589, 1042, 273, 446, 31, 3639, 368, 1814, 854, 8374, 358, 3455, 1245, 1664, 1772, 622, 326, 2445, 4889, 18, 12466, 1221, 518, 15857, 358, 3639, 368, 12633, 326, 9514, 5583, 18, 12484, 1450, 326, 760, 8884, 1359, 353, 2831, 4422, 1317, 5, 18, 540, 309, 261, 2223, 1318, 18, 7025, 1042, 422, 446, 13, 288, 5411, 4659, 29871, 425, 11639, 273, 10792, 394, 4659, 29871, 5621, 5411, 2589, 1042, 273, 425, 11639, 18, 3510, 1227, 1750, 1042, 12, 2625, 8684, 1769, 5411, 10652, 1318, 18, 7025, 1042, 273, 2589, 1042, 31, 3639, 289, 469, 288, 5411, 2589, 2 ]
if (repositoryTask.getSyncState() == RepositoryTaskSyncState.SYNCHRONIZED) { image = TaskListImages.getImage(TaskListImages.TASK_REPOSITORY); } else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.OUTGOING) {
if (repositoryTask.getSyncState() == RepositoryTaskSyncState.OUTGOING) {
public Image getImage(Object element) { Image image = null; if (element instanceof TaskCategory) { TaskCategory category = (TaskCategory) element; if (category.isArchive()) { image = TaskListImages.getImage(TaskListImages.CATEGORY_ARCHIVE); } else { image = TaskListImages.getImage(TaskListImages.CATEGORY); } } else if (element instanceof AbstractRepositoryQuery) { image = TaskListImages.getImage(TaskListImages.QUERY); } else if (element instanceof AbstractQueryHit) { AbstractQueryHit hit = (AbstractQueryHit)element; if (hit.getCorrespondingTask() != null) { image = getImage(hit.getCorrespondingTask()); } else { image = TaskListImages.getImage(TaskListImages.TASK_REMOTE); } } else if (element instanceof AbstractRepositoryTask) { AbstractRepositoryTask repositoryTask = (AbstractRepositoryTask)element; if (repositoryTask.getSyncState() == RepositoryTaskSyncState.SYNCHRONIZED) { image = TaskListImages.getImage(TaskListImages.TASK_REPOSITORY); } else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.OUTGOING) { image = TaskListImages.getImage(TaskListImages.TASK_REPOSITORY_OUTGOING); } else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.INCOMING) { image = TaskListImages.getImage(TaskListImages.TASK_REPOSITORY_INCOMMING); } else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.CONFLICT) { image = TaskListImages.getImage(TaskListImages.TASK_REPOSITORY_CONFLICT); } else { image = TaskListImages.getImage(TaskListImages.TASK_REPOSITORY); } } else if (element instanceof ITask) { ITask task = (ITask)element; String url = task.getUrl(); if (url != null && !url.trim().equals("") && !url.equals("http://")) { image = TaskListImages.getImage(TaskListImages.TASK_WEB); } else { image = TaskListImages.getImage(TaskListImages.TASK); } } return image;// return decorator.decorateImage(image, element); }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/eed6cfb6d398e180fd9bd900652104fb4bc58182/TaskElementLabelProvider.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskElementLabelProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3421, 10567, 12, 921, 930, 13, 288, 202, 202, 2040, 1316, 273, 446, 31, 202, 202, 430, 261, 2956, 1276, 3837, 4457, 13, 288, 1082, 202, 2174, 4457, 3150, 273, 261, 2174, 4457, 13, 930, 31, 1082, 202, 430, 261, 4743, 18, 291, 7465, 10756, 288, 9506, 202, 2730, 273, 3837, 682, 8946, 18, 588, 2040, 12, 2174, 682, 8946, 18, 24847, 67, 10586, 5354, 1769, 1082, 202, 97, 469, 288, 9506, 202, 2730, 273, 3837, 682, 8946, 18, 588, 2040, 12, 2174, 682, 8946, 18, 24847, 1769, 1082, 202, 97, 202, 202, 97, 469, 309, 261, 2956, 1276, 4115, 3305, 1138, 13, 288, 1082, 202, 2730, 273, 3837, 682, 8946, 18, 588, 2040, 12, 2174, 682, 8946, 18, 10753, 1769, 202, 202, 97, 469, 309, 261, 2956, 1276, 4115, 1138, 13616, 13, 288, 1082, 202, 7469, 1138, 13616, 6800, 273, 261, 7469, 1138, 13616, 13, 2956, 31, 1082, 202, 430, 261, 15989, 18, 588, 6217, 17863, 310, 2174, 1435, 480, 446, 13, 288, 9506, 202, 2730, 273, 10567, 12, 15989, 18, 588, 6217, 17863, 310, 2174, 10663, 1082, 202, 97, 469, 288, 9506, 202, 2730, 273, 3837, 682, 8946, 18, 588, 2040, 12, 2174, 682, 8946, 18, 15580, 67, 15790, 1769, 1082, 202, 97, 202, 202, 97, 469, 309, 261, 2956, 1276, 4115, 3305, 2174, 13, 288, 1082, 202, 7469, 3305, 2174, 3352, 2174, 273, 261, 7469, 3305, 2174, 13, 2956, 31, 1082, 202, 430, 261, 9071, 2174, 18, 588, 4047, 1119, 1435, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3421, 10567, 12, 921, 930, 13, 288, 202, 202, 2040, 1316, 273, 446, 31, 202, 202, 430, 261, 2956, 1276, 3837, 4457, 13, 288, 1082, 202, 2174, 4457, 3150, 273, 261, 2174, 4457, 13, 930, 31, 1082, 202, 430, 261, 4743, 18, 291, 7465, 10756, 288, 9506, 202, 2730, 273, 3837, 682, 8946, 18, 588, 2040, 12, 2174, 682, 8946, 18, 24847, 67, 10586, 5354, 1769, 1082, 202, 97, 469, 288, 9506, 202, 2730, 273, 3837, 682, 8946, 18, 588, 2040, 12, 2174, 682, 8946, 18, 24847, 1769, 1082, 202, 97, 202, 202, 97, 469, 309, 261, 2956, 1276, 4115, 3305, 1138, 13, 288, 1082, 202, 2730, 273, 3837, 682, 8946, 18, 588, 2040, 12, 2174, 2 ]
boolean one2n = role.isReversable() && !role.getReverse().isCollection(); if (one2n && e instanceof RemoveEvent) { op = m_engine.getOperation(arg, null, table);
boolean one2n = role.isReversable() && !role.getReverse().isCollection(); if (one2n && e instanceof RemoveEvent) { op = m_engine.getOperation(arg, null, table); } else { op = m_engine.getOperation(arg, obj, table); } if (op != null) { return; } if (e instanceof AddEvent || e instanceof SetEvent && arg != null) { op = new Insert(table); set(op, m.getFrom(), obj); set(op, m.getTo(), arg); m_engine.addOperation(obj, arg, op); } else if (e instanceof RemoveEvent || e instanceof SetEvent && arg == null) { Delete del = new Delete(table, null); if (e instanceof SetEvent) { filter(del, m.getFrom(), KEY_FROM, obj); } else if (one2n) { filter(del, m.getTo(), KEY_TO, arg);
public void onJoinThrough(JoinThrough m) { Table table = m.getFrom().getTable(); DML op = m_engine.getOperation(obj, arg, table); // This should eliminate duplicates, but we could be // smarter by canceling out inserts and updates which // we don't do right now. if (op != null) { return; } boolean one2n = role.isReversable() && !role.getReverse().isCollection(); if (one2n && e instanceof RemoveEvent) { op = m_engine.getOperation(arg, null, table); } else { op = m_engine.getOperation(arg, obj, table); } if (op != null) { return; } if (e instanceof AddEvent || e instanceof SetEvent && arg != null) { op = new Insert(table); set(op, m.getFrom(), obj); set(op, m.getTo(), arg); m_engine.addOperation(obj, arg, op); } else if (e instanceof RemoveEvent || e instanceof SetEvent && arg == null) { Delete del = new Delete(table, null); if (e instanceof SetEvent) { filter(del, m.getFrom(), KEY_FROM, obj); } else if (one2n) { filter(del, m.getTo(), KEY_TO, arg); } else { filter(del, m.getFrom(), KEY_FROM, obj); filter(del, m.getTo(), KEY_TO, arg); } if (one2n) { m_engine.addOperation(arg, null, del); } else { m_engine.addOperation(obj, arg, del); } } else { throw new IllegalArgumentException ("not a set, add, or remove"); } }
12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/9b6a9166672395cb98245049c4053134da8e686a/EventSwitch.java/buggy/archive/proto/src/com/arsdigita/persistence/proto/engine/rdbms/EventSwitch.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1171, 1071, 918, 603, 4572, 14287, 12, 4572, 14287, 312, 13, 288, 10792, 3555, 1014, 273, 312, 18, 588, 1265, 7675, 588, 1388, 5621, 10792, 463, 1495, 1061, 273, 312, 67, 8944, 18, 588, 2988, 12, 2603, 16, 1501, 16, 1014, 1769, 10792, 368, 1220, 1410, 29529, 11211, 16, 1496, 732, 3377, 506, 10792, 368, 3029, 14153, 635, 3755, 310, 596, 15607, 471, 4533, 1492, 10792, 368, 732, 2727, 1404, 741, 2145, 2037, 18, 10792, 309, 261, 556, 480, 446, 13, 288, 327, 31, 289, 10792, 1250, 1245, 22, 82, 273, 2478, 18, 291, 426, 2496, 429, 1435, 597, 13491, 401, 4615, 18, 588, 12650, 7675, 291, 2532, 5621, 10792, 309, 261, 476, 22, 82, 597, 425, 1276, 3581, 1133, 13, 288, 13491, 1061, 273, 312, 67, 8944, 18, 588, 2988, 12, 3175, 16, 446, 16, 1014, 1769, 10792, 289, 469, 288, 13491, 1061, 273, 312, 67, 8944, 18, 588, 2988, 12, 3175, 16, 1081, 16, 1014, 1769, 10792, 289, 10792, 309, 261, 556, 480, 446, 13, 288, 327, 31, 289, 10792, 309, 261, 73, 1276, 1436, 1133, 747, 13491, 425, 1276, 1000, 1133, 597, 13491, 1501, 480, 446, 13, 288, 13491, 1061, 273, 394, 8040, 12, 2121, 1769, 13491, 444, 12, 556, 16, 312, 18, 588, 1265, 9334, 1081, 1769, 13491, 444, 12, 556, 16, 312, 18, 588, 774, 9334, 1501, 1769, 13491, 312, 67, 8944, 18, 1289, 2988, 12, 2603, 16, 1501, 16, 1061, 1769, 10792, 289, 469, 309, 261, 73, 1276, 3581, 1133, 747, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1171, 1071, 918, 603, 4572, 14287, 12, 4572, 14287, 312, 13, 288, 10792, 3555, 1014, 273, 312, 18, 588, 1265, 7675, 588, 1388, 5621, 10792, 463, 1495, 1061, 273, 312, 67, 8944, 18, 588, 2988, 12, 2603, 16, 1501, 16, 1014, 1769, 10792, 368, 1220, 1410, 29529, 11211, 16, 1496, 732, 3377, 506, 10792, 368, 3029, 14153, 635, 3755, 310, 596, 15607, 471, 4533, 1492, 10792, 368, 732, 2727, 1404, 741, 2145, 2037, 18, 10792, 309, 261, 556, 480, 446, 13, 288, 327, 31, 289, 10792, 1250, 1245, 22, 82, 273, 2478, 18, 291, 426, 2496, 429, 1435, 597, 13491, 401, 4615, 18, 588, 12650, 7675, 291, 2532, 5621, 10792, 309, 261, 476, 22, 82, 597, 425, 1276, 3581, 2 ]
break;
break;
protected Document translateCDTProjectToDocument() { Document document = null; Element rootElement = null; try { document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); ICDescriptor descriptor; descriptor = CCorePlugin.getDefault().getCProjectDescription(getProject()); rootElement = descriptor.getProjectData(MAKE_TARGET_KEY); } catch ( ParserConfigurationException e) { return document; } catch ( CoreException e) { return document; } Element element = rootElement.getOwnerDocument().getDocumentElement(); NodeList list = rootElement.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { if ( list.item(i).getNodeType() == Node.ELEMENT_NODE) { Node appendNode = document.importNode(list.item(i), true); document.appendChild(appendNode); break; // show never have multiple <buildtargets> } } return document; }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/d8a96ca65d097d6d2456c9c1de3141f791626acb/ProjectTargets.java/clean/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 4319, 4204, 39, 9081, 4109, 774, 2519, 1435, 288, 202, 202, 2519, 1668, 273, 446, 31, 202, 202, 1046, 27575, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 5457, 273, 30236, 18, 2704, 1442, 7675, 2704, 2519, 1263, 7675, 2704, 2519, 5621, 1082, 202, 2871, 3187, 4950, 31, 1082, 202, 12628, 273, 385, 4670, 3773, 18, 588, 1868, 7675, 588, 39, 4109, 3291, 12, 588, 4109, 10663, 1082, 202, 3085, 1046, 273, 4950, 18, 588, 4109, 751, 12, 5535, 6859, 67, 16374, 67, 3297, 1769, 202, 202, 97, 1044, 261, 6783, 10737, 425, 13, 288, 1082, 202, 2463, 1668, 31, 202, 202, 97, 1044, 261, 30015, 425, 13, 288, 1082, 202, 2463, 1668, 31, 202, 202, 97, 202, 202, 1046, 930, 273, 27575, 18, 588, 5541, 2519, 7675, 588, 2519, 1046, 5621, 202, 202, 19914, 666, 273, 27575, 18, 588, 22460, 5621, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 666, 18, 588, 1782, 5621, 277, 27245, 288, 1082, 202, 430, 261, 666, 18, 1726, 12, 77, 2934, 588, 15101, 1435, 422, 2029, 18, 10976, 67, 8744, 13, 288, 9506, 202, 907, 714, 907, 273, 1668, 18, 5666, 907, 12, 1098, 18, 1726, 12, 77, 3631, 638, 1769, 9506, 202, 5457, 18, 6923, 1763, 12, 6923, 907, 1769, 9506, 202, 8820, 31, 368, 2405, 5903, 1240, 3229, 411, 3510, 11358, 34, 1082, 202, 97, 202, 202, 97, 202, 202, 2463, 1668, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 4319, 4204, 39, 9081, 4109, 774, 2519, 1435, 288, 202, 202, 2519, 1668, 273, 446, 31, 202, 202, 1046, 27575, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 5457, 273, 30236, 18, 2704, 1442, 7675, 2704, 2519, 1263, 7675, 2704, 2519, 5621, 1082, 202, 2871, 3187, 4950, 31, 1082, 202, 12628, 273, 385, 4670, 3773, 18, 588, 1868, 7675, 588, 39, 4109, 3291, 12, 588, 4109, 10663, 1082, 202, 3085, 1046, 273, 4950, 18, 588, 4109, 751, 12, 5535, 6859, 67, 16374, 67, 3297, 1769, 202, 202, 97, 1044, 261, 6783, 10737, 425, 13, 288, 1082, 202, 2463, 1668, 31, 202, 202, 97, 1044, 261, 30015, 425, 13, 288, 1082, 202, 2463, 1668, 31, 202, 2 ]
if (cbItem != null) coolBarMgr.remove(cbItem);
if (cbItem != null) { coolBarMgr.remove(cbItem); }
protected void revokeAdjunctCoolbarAction(ActionDescriptor ad, ActionSetActionBars bars) { String toolBarId = ad.getToolbarId();// String toolGroupId = ad.getToolbarGroupId();//// String contributingId = bars.getActionSetId(); ICoolBarManager coolBarMgr = bars.getCoolBarManager(); // ((CoolItemToolBarManager)bars.getToolBarManager()).getParentManager(); PluginAction action = ad.getAction(); PluginActionCoolBarContributionItem actionContribution = new PluginActionCoolBarContributionItem( action); bars.removeAdjunctContribution(actionContribution); // remove a coolitem for the toolbar id if it exists IContributionItem cbItem = coolBarMgr.find(toolBarId); if (cbItem != null) coolBarMgr.remove(cbItem); // activeManager = cbItem.getToolBarManager(); // activeManager.remove(contributingId); // IContributionItem groupMarker = activeManager.find(toolGroupId); // if (groupMarker != null) { // int idx = activeManager.indexOf(toolGroupId); // IContributionItem[] items = activeManager.getItems(); // if (items.length == idx+1 || // ((items.length > idx && items[idx+1] instanceof Separator))) // if (activeManager.find(toolGroupId) != null) // activeManager.remove(toolGroupId); // } // activeManager.addAdjunctItemToGroup(toolGroupId, contributingId, actionContribution); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/PluginActionSetBuilder.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 4750, 918, 18007, 17886, 6931, 39, 1371, 3215, 1803, 12, 1803, 3187, 1261, 16, 7734, 4382, 694, 1803, 5190, 87, 22252, 13, 288, 5411, 514, 5226, 5190, 548, 273, 1261, 18, 588, 17907, 548, 5621, 759, 5411, 514, 5226, 8722, 273, 1261, 18, 588, 17907, 8722, 5621, 1307, 5411, 514, 13608, 8490, 548, 273, 22252, 18, 588, 1803, 18523, 5621, 5411, 26899, 1371, 5190, 1318, 27367, 5190, 9455, 273, 22252, 18, 588, 39, 1371, 5190, 1318, 5621, 5411, 368, 9506, 202, 12443, 39, 1371, 1180, 6364, 5190, 1318, 13, 13518, 18, 588, 6364, 5190, 1318, 1435, 2934, 588, 3054, 1318, 5621, 5411, 6258, 1803, 1301, 273, 1261, 18, 588, 1803, 5621, 5411, 6258, 1803, 39, 1371, 5190, 442, 4027, 1180, 1301, 442, 4027, 273, 394, 6258, 1803, 39, 1371, 5190, 442, 4027, 1180, 12, 10792, 1301, 1769, 5411, 22252, 18, 4479, 17886, 6931, 442, 4027, 12, 1128, 442, 4027, 1769, 5411, 368, 1206, 279, 27367, 1726, 364, 326, 12748, 612, 309, 518, 1704, 4697, 5411, 467, 442, 4027, 1180, 2875, 1180, 273, 27367, 5190, 9455, 18, 4720, 12, 6738, 5190, 548, 1769, 5411, 309, 261, 7358, 1180, 480, 446, 13, 7734, 27367, 5190, 9455, 18, 4479, 12, 7358, 1180, 1769, 5411, 368, 1082, 202, 3535, 1318, 273, 2875, 1180, 18, 588, 6364, 5190, 1318, 5621, 202, 5411, 368, 1082, 202, 3535, 1318, 18, 4479, 12, 26930, 8490, 548, 1769, 202, 5411, 368, 1082, 202, 45, 442, 4027, 1180, 1041, 7078, 273, 2695, 1318, 18, 4720, 12, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 4750, 918, 18007, 17886, 6931, 39, 1371, 3215, 1803, 12, 1803, 3187, 1261, 16, 7734, 4382, 694, 1803, 5190, 87, 22252, 13, 288, 5411, 514, 5226, 5190, 548, 273, 1261, 18, 588, 17907, 548, 5621, 759, 5411, 514, 5226, 8722, 273, 1261, 18, 588, 17907, 8722, 5621, 1307, 5411, 514, 13608, 8490, 548, 273, 22252, 18, 588, 1803, 18523, 5621, 5411, 26899, 1371, 5190, 1318, 27367, 5190, 9455, 273, 22252, 18, 588, 39, 1371, 5190, 1318, 5621, 5411, 368, 9506, 202, 12443, 39, 1371, 1180, 6364, 5190, 1318, 13, 13518, 18, 588, 6364, 5190, 1318, 1435, 2934, 588, 3054, 1318, 5621, 5411, 6258, 1803, 1301, 273, 1261, 18, 588, 1803, 5621, 5411, 6258, 1803, 39, 1371, 5190, 442, 2 ]
System.out.println("done");
public Structure parsePDBFile(InputStream inStream) throws IOException, PDBParseException { System.out.println("preparing buffer"); BufferedReader buf ; try { buf = getBufferedReader(inStream); } catch (IOException e) { e.printStackTrace(); throw new IOException ("error initializing BufferedReader"); } System.out.println("done"); return parsePDBFile(buf); }
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/48b81fa6f6cf265c4791633b465fa65eb34fc9d3/PDBFileReader.java/clean/src/org/biojava/bio/structure/io/PDBFileReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 13348, 1109, 52, 2290, 812, 12, 4348, 28987, 13, 225, 202, 15069, 1860, 16, 21601, 13047, 565, 288, 202, 3163, 18, 659, 18, 8222, 2932, 1484, 12583, 1613, 8863, 202, 17947, 2514, 1681, 274, 202, 698, 288, 202, 565, 1681, 273, 336, 17947, 2514, 12, 267, 1228, 1769, 202, 377, 202, 97, 1044, 261, 14106, 425, 13, 288, 202, 565, 425, 18, 1188, 6332, 5621, 202, 565, 604, 394, 1860, 7566, 1636, 22584, 10633, 8863, 202, 97, 202, 3163, 18, 659, 18, 8222, 2932, 8734, 8863, 202, 2463, 1109, 52, 2290, 812, 12, 4385, 1769, 202, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 13348, 1109, 52, 2290, 812, 12, 4348, 28987, 13, 225, 202, 15069, 1860, 16, 21601, 13047, 565, 288, 202, 3163, 18, 659, 18, 8222, 2932, 1484, 12583, 1613, 8863, 202, 17947, 2514, 1681, 274, 202, 698, 288, 202, 565, 1681, 273, 336, 17947, 2514, 12, 267, 1228, 1769, 202, 377, 202, 97, 1044, 261, 14106, 425, 13, 288, 202, 565, 425, 18, 1188, 6332, 5621, 202, 565, 604, 394, 1860, 7566, 1636, 22584, 10633, 8863, 202, 97, 202, 3163, 18, 659, 18, 8222, 2932, 8734, 8863, 202, 2463, 1109, 52, 2290, 812, 12, 4385, 1769, 202, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
/* if ("POP".equals(s.getKey())) staticLogger.info(this.toString()+" StateMachine set to "+s, new Throwable()); else */
public void set(State s) { super.set(s); if (staticLogger.isInfoEnabled()) { /* if ("POP".equals(s.getKey())) staticLogger.info(this.toString()+" StateMachine set to "+s, new Throwable()); else */ staticLogger.info(this.toString()+" StateMachine set to "+s); } }
14011 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14011/a3e3c833854d13adf48efd969f944067feaed061/UDDI4JRegistrationServiceComponent.java/buggy/servicediscovery/src/org/cougaar/servicediscovery/service/UDDI4JRegistrationServiceComponent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4202, 1071, 225, 918, 444, 12, 1119, 272, 13, 288, 202, 9565, 18, 542, 12, 87, 1769, 202, 430, 261, 3845, 3328, 18, 291, 966, 1526, 10756, 288, 202, 225, 1748, 1850, 309, 7566, 30374, 9654, 14963, 12, 87, 18, 588, 653, 1435, 3719, 5411, 760, 3328, 18, 1376, 12, 2211, 18, 10492, 1435, 9078, 3287, 6981, 444, 358, 13773, 87, 16, 394, 4206, 10663, 1850, 469, 1850, 1195, 202, 225, 760, 3328, 18, 1376, 12, 2211, 18, 10492, 1435, 9078, 3287, 6981, 444, 358, 13773, 87, 1769, 202, 97, 1377, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4202, 1071, 225, 918, 444, 12, 1119, 272, 13, 288, 202, 9565, 18, 542, 12, 87, 1769, 202, 430, 261, 3845, 3328, 18, 291, 966, 1526, 10756, 288, 202, 225, 1748, 1850, 309, 7566, 30374, 9654, 14963, 12, 87, 18, 588, 653, 1435, 3719, 5411, 760, 3328, 18, 1376, 12, 2211, 18, 10492, 1435, 9078, 3287, 6981, 444, 358, 13773, 87, 16, 394, 4206, 10663, 1850, 469, 1850, 1195, 202, 225, 760, 3328, 18, 1376, 12, 2211, 18, 10492, 1435, 9078, 3287, 6981, 444, 358, 13773, 87, 1769, 202, 97, 1377, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if (tried != null) { throw UniversalRuntimeException.accumulate(new FileNotFoundException(), "Cannot load template file from any of paths " + tried.toString());
if (xcvt != null && xcvt.roottemplate == null) { throw UniversalRuntimeException.accumulate(new IllegalArgumentException(), "No TemplateResolverStrategy which was marked as a root resolver (rootPriority > 0) " + "returned a template: tried paths (expected) " + tried.toString());
public ViewTemplate locateTemplate(ViewParameters viewparams) { TemplateResolverStrategy rootstrategy = null; int highestpriority = 0; // NB if we really want this optimisation, it must be based on # // of RETURNED templates, not the number of strategies! XMLCompositeViewTemplate xcvt = strategies.size() == 1 ? null : new XMLCompositeViewTemplate(); for (int i = 0; i < strategies.size(); ++i) { TemplateResolverStrategy trs = (TemplateResolverStrategy) strategies .get(i); int thispri = trs instanceof RootAwareTRS ? ((RootAwareTRS) trs) .getRootResolverPriority() : 1; if (thispri == highestpriority && thispri != 0) { if (rootstrategy != null) { Logger.log.warn("Duplicate root TemplateResolverStrategy " + trs + " found, using first entry " + rootstrategy); } } if (thispri > highestpriority) { rootstrategy = trs; highestpriority = thispri; } } if (rootstrategy == null) { rootstrategy = (TemplateResolverStrategy) strategies.get(0); Logger.log .warn("No root TemplateResolverStrategy found, using first entry of " + rootstrategy); } StringList tried = new StringList(); for (int i = 0; i < strategies.size(); ++i) { TemplateResolverStrategy trs = (TemplateResolverStrategy) strategies .get(i); boolean isexpected = trs instanceof ExpectedTRS ? ((ExpectedTRS) trs) .isExpected() : true; boolean ismultiple = trs instanceof MultipleTemplateResolverStrategy ? ((MultipleTemplateResolverStrategy) trs) .isMultiple() : false; StringList bases = trs.resolveTemplatePath(viewparams); StringList[] usebases; if (ismultiple) { usebases = new StringList[bases.size()]; for (int j = 0; j < usebases.length; ++j) { usebases[j] = new StringList(bases.stringAt(j)); } } else { usebases = new StringList[] { bases }; } for (int j = 0; j < usebases.length; ++j) { XMLViewTemplate template = locateTemplate(viewparams, trs, usebases[j], isexpected ? tried : null); if (template != null) { tried = null; if (xcvt != null) { xcvt.globalmap.aggregate(template.globalmap); if (trs == rootstrategy) { xcvt.roottemplate = template; } } else { return template; } } // end if template returned } } if (tried != null) { throw UniversalRuntimeException.accumulate(new FileNotFoundException(), "Cannot load template file from any of paths " + tried.toString()); } return xcvt; }
29 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/29/8b3b89346c5e43c41b830e44c5b5626a37f65035/BasicTemplateResolver.java/buggy/rsf-core/core/src/uk/org/ponder/rsf/templateresolver/BasicTemplateResolver.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 4441, 2283, 10627, 2283, 12, 1767, 2402, 1476, 2010, 13, 288, 565, 5035, 4301, 4525, 1365, 14914, 273, 446, 31, 565, 509, 9742, 8457, 273, 374, 31, 565, 368, 20096, 309, 732, 8654, 2545, 333, 5213, 10742, 16, 518, 1297, 506, 2511, 603, 468, 565, 368, 434, 14780, 2056, 5539, 16, 486, 326, 1300, 434, 20417, 5, 565, 3167, 9400, 1767, 2283, 15192, 11734, 273, 20417, 18, 1467, 1435, 422, 404, 692, 446, 3639, 294, 394, 3167, 9400, 1767, 2283, 5621, 565, 364, 261, 474, 277, 273, 374, 31, 277, 411, 20417, 18, 1467, 5621, 965, 77, 13, 288, 1377, 5035, 4301, 4525, 433, 87, 273, 261, 2283, 4301, 4525, 13, 20417, 1850, 263, 588, 12, 77, 1769, 1377, 509, 333, 29112, 273, 433, 87, 1276, 7450, 10155, 4349, 55, 692, 14015, 2375, 10155, 4349, 55, 13, 433, 87, 13, 1850, 263, 588, 2375, 4301, 8183, 1435, 1850, 294, 404, 31, 1377, 309, 261, 2211, 29112, 422, 9742, 8457, 597, 333, 29112, 480, 374, 13, 288, 3639, 309, 261, 3085, 14914, 480, 446, 13, 288, 1850, 4242, 18, 1330, 18, 8935, 2932, 11826, 1365, 5035, 4301, 4525, 315, 397, 433, 87, 2868, 397, 315, 1392, 16, 1450, 1122, 1241, 315, 397, 1365, 14914, 1769, 3639, 289, 1377, 289, 1377, 309, 261, 2211, 29112, 405, 9742, 8457, 13, 288, 3639, 1365, 14914, 273, 433, 87, 31, 3639, 9742, 8457, 273, 333, 29112, 31, 1377, 289, 565, 289, 565, 309, 261, 3085, 14914, 422, 446, 13, 288, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 4441, 2283, 10627, 2283, 12, 1767, 2402, 1476, 2010, 13, 288, 565, 5035, 4301, 4525, 1365, 14914, 273, 446, 31, 565, 509, 9742, 8457, 273, 374, 31, 565, 368, 20096, 309, 732, 8654, 2545, 333, 5213, 10742, 16, 518, 1297, 506, 2511, 603, 468, 565, 368, 434, 14780, 2056, 5539, 16, 486, 326, 1300, 434, 20417, 5, 565, 3167, 9400, 1767, 2283, 15192, 11734, 273, 20417, 18, 1467, 1435, 422, 404, 692, 446, 3639, 294, 394, 3167, 9400, 1767, 2283, 5621, 565, 364, 261, 474, 277, 273, 374, 31, 277, 411, 20417, 18, 1467, 5621, 965, 77, 13, 288, 1377, 5035, 4301, 4525, 433, 87, 273, 261, 2283, 4301, 4525, 13, 20417, 1850, 263, 588, 12, 77, 2 ]
if ( format == null ) super.setOutputFormat( new OutputFormat( Method.HTML, null, false ) ); else super.setOutputFormat( format );
if ( format == null ) super.setOutputFormat( new OutputFormat( Method.HTML, null, false ) ); else super.setOutputFormat( format );
public void setOutputFormat( OutputFormat format ) { if ( format == null ) super.setOutputFormat( new OutputFormat( Method.HTML, null, false ) ); else super.setOutputFormat( format ); }
6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/af047e33ee4283cd437ffa6760ccff3d3d2bf9ea/HTMLSerializer.java/buggy/src/org/apache/xml/serialize/HTMLSerializer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 18113, 1630, 12, 3633, 1630, 740, 262, 565, 288, 202, 430, 261, 740, 422, 446, 262, 202, 565, 2240, 18, 542, 1447, 1630, 12, 394, 3633, 1630, 12, 2985, 18, 4870, 16, 446, 16, 629, 262, 11272, 202, 12107, 202, 565, 2240, 18, 542, 1447, 1630, 12, 740, 11272, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 18113, 1630, 12, 3633, 1630, 740, 262, 565, 288, 202, 430, 261, 740, 422, 446, 262, 202, 565, 2240, 18, 542, 1447, 1630, 12, 394, 3633, 1630, 12, 2985, 18, 4870, 16, 446, 16, 629, 262, 11272, 202, 12107, 202, 565, 2240, 18, 542, 1447, 1630, 12, 740, 11272, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
protected void writePortTypes(WSDLDescription desc) throws XMLStreamException {
protected void writePortTypes(WSDLDescription desc) throws XMLStreamException, IOException {
protected void writePortTypes(WSDLDescription desc) throws XMLStreamException { Map interfaceMap = desc.getWsdlInterfaces(); if (!interfaceMap.isEmpty()) { Iterator interfaceIterator = interfaceMap.values().iterator(); WSDLInterface wsdlInterface; while (interfaceIterator.hasNext()) { wsdlInterface = (WSDLInterface) interfaceIterator.next(); writer.writeStartElement(defaultWSDLPrefix, PORTTYPE_NAME, WSDL1_1_NAMESPACE_URI); writer.writeAttribute("name", wsdlInterface.getName() == null ? "" : wsdlInterface.getName().getLocalPart()); //write the operations writePorttypeOperations(wsdlInterface); writer.writeEndElement(); } } }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/c7dcf4252c1e1a06d3afeda50a891e5244ab3771/WOMtoWSDL11Writer.java/buggy/modules/wsdl/src/org/apache/axis2/wsdl/writer/WOMtoWSDL11Writer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1045, 2617, 2016, 12, 2651, 8914, 3291, 3044, 13, 1216, 21526, 16, 1860, 288, 3639, 1635, 1560, 863, 273, 3044, 18, 588, 15444, 5761, 10273, 5621, 3639, 309, 16051, 5831, 863, 18, 291, 1921, 10756, 288, 5411, 4498, 1560, 3198, 273, 1560, 863, 18, 2372, 7675, 9838, 5621, 5411, 30567, 1358, 17642, 1358, 31, 5411, 1323, 261, 5831, 3198, 18, 5332, 2134, 10756, 288, 7734, 17642, 1358, 273, 261, 2651, 8914, 1358, 13, 1560, 3198, 18, 4285, 5621, 7734, 2633, 18, 2626, 1685, 1046, 12, 1886, 2651, 8914, 2244, 16, 453, 916, 30651, 67, 1985, 16, 30567, 21, 67, 21, 67, 11368, 67, 3098, 1769, 7734, 2633, 18, 2626, 1499, 2932, 529, 3113, 13491, 17642, 1358, 18, 17994, 1435, 422, 446, 692, 1408, 294, 17642, 1358, 18, 17994, 7675, 588, 2042, 1988, 10663, 7734, 368, 2626, 326, 5295, 7734, 1045, 2617, 723, 9343, 12, 4749, 5761, 1358, 1769, 7734, 2633, 18, 2626, 1638, 1046, 5621, 5411, 289, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1045, 2617, 2016, 12, 2651, 8914, 3291, 3044, 13, 1216, 21526, 16, 1860, 288, 3639, 1635, 1560, 863, 273, 3044, 18, 588, 15444, 5761, 10273, 5621, 3639, 309, 16051, 5831, 863, 18, 291, 1921, 10756, 288, 5411, 4498, 1560, 3198, 273, 1560, 863, 18, 2372, 7675, 9838, 5621, 5411, 30567, 1358, 17642, 1358, 31, 5411, 1323, 261, 5831, 3198, 18, 5332, 2134, 10756, 288, 7734, 17642, 1358, 273, 261, 2651, 8914, 1358, 13, 1560, 3198, 18, 4285, 5621, 7734, 2633, 18, 2626, 1685, 1046, 12, 1886, 2651, 8914, 2244, 16, 453, 916, 30651, 67, 1985, 16, 30567, 21, 67, 21, 67, 11368, 67, 3098, 1769, 7734, 2633, 18, 2626, 1499, 2932, 529, 3113, 13491, 17642, 1358, 2 ]
public void elementDecl(String name, String contentModel)
public void elementDecl(String name, String contentModel)
public void elementDecl(String name, String contentModel) throws XNIException { try { // SAX2 extension if (fDeclHandler != null) { fDeclHandler.elementDecl(name, contentModel); } } catch (SAXException e) { throw new XNIException(e); } } // elementDecl(String,String)
4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/c1347feb11416eb839b46a76d6c41f1d84f3217a/AbstractSAXParser.java/buggy/src/org/apache/xerces/parsers/AbstractSAXParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 930, 3456, 12, 780, 508, 16, 514, 913, 1488, 13, 540, 1216, 1139, 50, 45, 503, 288, 3639, 775, 288, 5411, 368, 10168, 22, 2710, 5411, 309, 261, 74, 3456, 1503, 480, 446, 13, 288, 7734, 284, 3456, 1503, 18, 2956, 3456, 12, 529, 16, 913, 1488, 1769, 5411, 289, 3639, 289, 3639, 1044, 261, 55, 2501, 503, 425, 13, 288, 5411, 604, 394, 1139, 50, 45, 503, 12, 73, 1769, 3639, 289, 565, 289, 368, 930, 3456, 12, 780, 16, 780, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 930, 3456, 12, 780, 508, 16, 514, 913, 1488, 13, 540, 1216, 1139, 50, 45, 503, 288, 3639, 775, 288, 5411, 368, 10168, 22, 2710, 5411, 309, 261, 74, 3456, 1503, 480, 446, 13, 288, 7734, 284, 3456, 1503, 18, 2956, 3456, 12, 529, 16, 913, 1488, 1769, 5411, 289, 3639, 289, 3639, 1044, 261, 55, 2501, 503, 425, 13, 288, 5411, 604, 394, 1139, 50, 45, 503, 12, 73, 1769, 3639, 289, 565, 289, 368, 930, 3456, 12, 780, 16, 780, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
return c; }
return c; }
public static char getFieldChar (Object instance, Class declaringClass, String fieldName) throws NoSuchFieldError { char c = '0'; try { // following may throw NoSuchFieldError; Field f = declaringClass.getDeclaredField( fieldName ); f.setAccessible( true ); // to allow access to private fields c = f.getChar(instance); } catch ( Exception e ) { VM.sysWrite( "exception in ObjectOutputStream.getFieldChar(): " + e ); } return c; }
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/705cb85b3c7e05696189446f5268011580d80945/ReflectionSupport.java/buggy/rvm/src/vm/libSupport/ReflectionSupport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 1149, 5031, 2156, 261, 921, 791, 16, 1659, 3496, 14682, 16, 514, 4289, 13, 565, 1216, 5823, 974, 668, 288, 1377, 1149, 276, 273, 296, 20, 13506, 1377, 775, 288, 3639, 368, 3751, 2026, 604, 5823, 974, 668, 31, 3639, 2286, 284, 273, 3496, 14682, 18, 588, 18888, 974, 12, 4289, 11272, 3639, 284, 18, 542, 10451, 12, 638, 11272, 377, 368, 358, 1699, 2006, 358, 3238, 1466, 3639, 276, 273, 284, 18, 588, 2156, 12, 1336, 1769, 1377, 289, 1377, 1044, 261, 1185, 425, 262, 288, 3639, 8251, 18, 9499, 3067, 12, 315, 4064, 316, 23438, 18, 588, 974, 2156, 13332, 315, 397, 425, 11272, 1377, 289, 1377, 327, 276, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 1149, 5031, 2156, 261, 921, 791, 16, 1659, 3496, 14682, 16, 514, 4289, 13, 565, 1216, 5823, 974, 668, 288, 1377, 1149, 276, 273, 296, 20, 13506, 1377, 775, 288, 3639, 368, 3751, 2026, 604, 5823, 974, 668, 31, 3639, 2286, 284, 273, 3496, 14682, 18, 588, 18888, 974, 12, 4289, 11272, 3639, 284, 18, 542, 10451, 12, 638, 11272, 377, 368, 358, 1699, 2006, 358, 3238, 1466, 3639, 276, 273, 284, 18, 588, 2156, 12, 1336, 1769, 1377, 289, 1377, 1044, 261, 1185, 425, 262, 288, 3639, 8251, 18, 9499, 3067, 12, 315, 4064, 316, 23438, 18, 588, 974, 2156, 13332, 315, 397, 425, 11272, 1377, 289, 1377, 327, 276, 31, 565, 289, 2, -100, -100 ]
int noex = (name.equals("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC;
Visibility noex = name.equals("initialize") ? Visibility.PRIVATE : Visibility.PUBLIC;
public void defineMethod(String name, Callback method) { int noex = (name.equals("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC; addMethod(name, new CallbackMethod(method), noex | Constants.NOEX_CFUNC); }
49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/f05423516c2d1bfe54c4363eedb9654f7cfb6898/RubyModule.java/clean/org/jruby/RubyModule.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4426, 1305, 12, 780, 508, 16, 8444, 707, 13, 288, 3639, 27791, 1158, 338, 273, 508, 18, 14963, 2932, 11160, 7923, 692, 27791, 18, 20055, 294, 27791, 18, 14939, 31, 3639, 18223, 12, 529, 16, 394, 8444, 1305, 12, 2039, 3631, 1158, 338, 571, 5245, 18, 3417, 2294, 67, 8955, 21163, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4426, 1305, 12, 780, 508, 16, 8444, 707, 13, 288, 3639, 27791, 1158, 338, 273, 508, 18, 14963, 2932, 11160, 7923, 692, 27791, 18, 20055, 294, 27791, 18, 14939, 31, 3639, 18223, 12, 529, 16, 394, 8444, 1305, 12, 2039, 3631, 1158, 338, 571, 5245, 18, 3417, 2294, 67, 8955, 21163, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
boolean synPredMatched27 = false;
boolean synPredMatched369 = false;
public final void document_function( PathExpr expr ) throws RecognitionException, TokenStreamException, PermissionDeniedException,EXistException { Token arg3 = null; Token arg1 = null; Token arg2 = null; Token arg4 = null; Expression step = null; boolean inclusive = true; switch ( LA(1)) { case LITERAL_doctype: { match(LITERAL_doctype); match(LPAREN); arg3 = LT(1); match(CONST); match(RPAREN); if ( inputState.guessing==0 ) { DBBroker broker = null; try { broker = pool.get(); includeDocs = broker.getDocumentsByDoctype(user, arg3.getText()); step = new RootNode(pool); expr.add(step); expr.setDocumentSet(includeDocs); } catch(EXistException e) { e.printStackTrace(); } finally { pool.release( broker ); } } break; } case LITERAL_collection: { match(LITERAL_collection); match(LPAREN); arg4 = LT(1); match(CONST); { _loop32: do { if ((LA(1)==COMMA)) { match(COMMA); { switch ( LA(1)) { case LITERAL_false: { match(LITERAL_false); if ( inputState.guessing==0 ) { inclusive = false; } break; } case LITERAL_true: { match(LITERAL_true); if ( inputState.guessing==0 ) { inclusive = true; } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } } else { break _loop32; } } while (true); } match(RPAREN); if ( inputState.guessing==0 ) { DBBroker broker = null; try { broker = pool.get(); includeDocs = broker.getDocumentsByCollection(user, arg4.getText(), inclusive); step = new RootNode(pool); expr.setDocumentSet(includeDocs); expr.add(step); } catch(EXistException e) { e.printStackTrace(); } finally { pool.release( broker ); } } break; } default: boolean synPredMatched27 = false; if (((LA(1)==LITERAL_document) && (LA(2)==LPAREN))) { int _m27 = mark(); synPredMatched27 = true; inputState.guessing++; try { { match(LITERAL_document); match(LPAREN); match(STAR); } } catch (RecognitionException pe) { synPredMatched27 = false; } rewind(_m27); inputState.guessing--; } if ( synPredMatched27 ) { match(LITERAL_document); match(LPAREN); match(STAR); match(RPAREN); if ( inputState.guessing==0 ) { DBBroker broker = null; try { broker = pool.get(); includeDocs = broker.getAllDocuments(user); step = new RootNode(pool); expr.setDocumentSet(includeDocs); expr.add(step); } catch(EXistException e) { e.printStackTrace(); } finally { pool.release( broker ); } } } else if ((LA(1)==LITERAL_document) && (LA(2)==LPAREN)) { match(LITERAL_document); match(LPAREN); arg1 = LT(1); match(CONST); if ( inputState.guessing==0 ) { DBBroker broker = null; try { broker = pool.get(); step = new RootNode(pool); expr.add(step); DocumentImpl doc = (DocumentImpl)broker.getDocument(user, arg1.getText()); if(doc != null) { expr.addDocument(doc); includeDocs.add(doc); } } catch(EXistException e) { e.printStackTrace(); } finally { pool.release( broker ); } } { _loop29: do { if ((LA(1)==COMMA)) { match(COMMA); arg2 = LT(1); match(CONST); if ( inputState.guessing==0 ) { DBBroker broker = null; try { broker = pool.get(); DocumentImpl doc = (DocumentImpl)broker.getDocument(arg2.getText()); if(doc != null) { expr.addDocument(doc); includeDocs.add(doc); } } catch(EXistException e) { e.printStackTrace(); } finally { pool.release( broker ); } } } else { break _loop29; } } while (true); } match(RPAREN); } else { throw new NoViableAltException(LT(1), getFilename()); } } }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/19d6ae2fb06165d4fc5664b5ba1d63fffa036bdf/XPathParser.java/clean/src/org/exist/parser/XPathParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 1668, 67, 915, 12, 202, 202, 743, 4742, 3065, 202, 13, 1216, 9539, 16, 3155, 1228, 503, 16, 8509, 15877, 16, 2294, 376, 503, 288, 9506, 202, 1345, 225, 1501, 23, 273, 446, 31, 202, 202, 1345, 225, 1501, 21, 273, 446, 31, 202, 202, 1345, 225, 1501, 22, 273, 446, 31, 202, 202, 1345, 225, 1501, 24, 273, 446, 31, 6862, 202, 2300, 2235, 273, 446, 31, 1082, 202, 6494, 13562, 273, 638, 31, 25083, 202, 9610, 261, 2928, 12, 21, 3719, 288, 202, 202, 3593, 511, 18454, 67, 2896, 12387, 30, 202, 202, 95, 1082, 202, 1916, 12, 23225, 67, 2896, 12387, 1769, 1082, 202, 1916, 12, 48, 15111, 1769, 1082, 202, 3175, 23, 273, 11807, 12, 21, 1769, 1082, 202, 1916, 12, 26411, 1769, 1082, 202, 1916, 12, 54, 15111, 1769, 1082, 202, 430, 261, 810, 1119, 18, 20885, 310, 631, 20, 262, 288, 6862, 9506, 202, 2290, 11194, 8625, 273, 446, 31, 9506, 202, 698, 288, 9506, 202, 21722, 273, 2845, 18, 588, 5621, 9506, 202, 6702, 12656, 273, 8625, 18, 588, 12922, 858, 3244, 12387, 12, 1355, 16, 1501, 23, 18, 588, 1528, 10663, 9506, 202, 4119, 273, 394, 7450, 907, 12, 6011, 1769, 9506, 202, 8638, 18, 1289, 12, 4119, 1769, 9506, 202, 8638, 18, 542, 2519, 694, 12, 6702, 12656, 1769, 9506, 202, 97, 1044, 12, 2294, 376, 503, 425, 13, 288, 9506, 202, 73, 18, 1188, 6332, 5621, 9506, 202, 97, 3095, 288, 9506, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 1668, 67, 915, 12, 202, 202, 743, 4742, 3065, 202, 13, 1216, 9539, 16, 3155, 1228, 503, 16, 8509, 15877, 16, 2294, 376, 503, 288, 9506, 202, 1345, 225, 1501, 23, 273, 446, 31, 202, 202, 1345, 225, 1501, 21, 273, 446, 31, 202, 202, 1345, 225, 1501, 22, 273, 446, 31, 202, 202, 1345, 225, 1501, 24, 273, 446, 31, 6862, 202, 2300, 2235, 273, 446, 31, 1082, 202, 6494, 13562, 273, 638, 31, 25083, 202, 9610, 261, 2928, 12, 21, 3719, 288, 202, 202, 3593, 511, 18454, 67, 2896, 12387, 30, 202, 202, 95, 1082, 202, 1916, 12, 23225, 67, 2896, 12387, 1769, 1082, 202, 1916, 12, 48, 15111, 1769, 1082, 202, 2 ]
String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : "";
String email = (a.getEmail() != null && a.getEmail().length() > 0) ? (" <" + a.getEmail() + ">") : "";
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = LabelFactory.create(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = LabelFactory.create(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = LabelFactory.create(" - " + a.getName() + email, parent.icons .getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = LabelFactory.create(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
58440 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58440/ff074568ede98ddede5353ca62d513b0de039e17/HelloPanel.java/buggy/izpack-src/trunk/src/lib/com/izforge/izpack/panels/HelloPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 20889, 5537, 12, 18678, 3219, 982, 16, 10284, 751, 612, 396, 13, 565, 288, 3639, 2240, 12, 2938, 16, 612, 396, 1769, 3639, 368, 1021, 296, 9565, 11, 3511, 3639, 7145, 5013, 3744, 2240, 3744, 273, 394, 7145, 5013, 3744, 5621, 3639, 18479, 12, 9565, 3744, 1769, 3639, 13075, 21649, 4878, 273, 394, 13075, 5621, 3639, 21649, 4878, 18, 267, 4424, 273, 394, 22300, 12, 20, 16, 374, 16, 374, 16, 374, 1769, 3639, 21649, 4878, 18, 5935, 273, 13075, 18, 9826, 31, 3639, 21649, 4878, 18, 16215, 273, 13075, 18, 19835, 31, 3639, 368, 1660, 4046, 3134, 296, 7688, 11, 3511, 3639, 24048, 4617, 5537, 273, 394, 24048, 5621, 3639, 3511, 273, 394, 8549, 3744, 12, 5693, 5537, 16, 8549, 3744, 18, 61, 67, 25614, 1769, 3639, 4617, 5537, 18, 542, 3744, 12, 6741, 1769, 3639, 2240, 3744, 18, 1289, 3744, 1841, 12, 5693, 5537, 16, 21649, 4878, 1769, 3639, 527, 12, 5693, 5537, 1769, 3639, 368, 1660, 752, 471, 1378, 326, 3249, 3639, 514, 609, 31, 3639, 4617, 5537, 18, 1289, 12, 3514, 18, 2640, 15704, 1585, 322, 12, 2163, 10019, 3639, 609, 273, 982, 18, 4936, 2920, 18, 588, 780, 2932, 18601, 5537, 18, 91, 16312, 21, 7923, 397, 612, 396, 18, 1376, 18, 588, 3371, 461, 1435, 397, 315, 315, 7734, 397, 612, 396, 18, 1376, 18, 588, 3371, 1444, 1435, 397, 982, 18, 4936, 2920, 18, 588, 780, 2932, 18601, 5537, 18, 91, 16312, 22, 8863, 3639, 28329, 2224, 273, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 20889, 5537, 12, 18678, 3219, 982, 16, 10284, 751, 612, 396, 13, 565, 288, 3639, 2240, 12, 2938, 16, 612, 396, 1769, 3639, 368, 1021, 296, 9565, 11, 3511, 3639, 7145, 5013, 3744, 2240, 3744, 273, 394, 7145, 5013, 3744, 5621, 3639, 18479, 12, 9565, 3744, 1769, 3639, 13075, 21649, 4878, 273, 394, 13075, 5621, 3639, 21649, 4878, 18, 267, 4424, 273, 394, 22300, 12, 20, 16, 374, 16, 374, 16, 374, 1769, 3639, 21649, 4878, 18, 5935, 273, 13075, 18, 9826, 31, 3639, 21649, 4878, 18, 16215, 273, 13075, 18, 19835, 31, 3639, 368, 1660, 4046, 3134, 296, 7688, 11, 3511, 3639, 24048, 4617, 5537, 273, 394, 24048, 5621, 3639, 3511, 273, 394, 8549, 3744, 12, 2 ]
public void doTask() throws IOException {
public void doTask() throws IOException {
public void doTask() throws IOException { int count = 0; Socket socket = null; SocketChannel socketChannel = null; boolean keepAlive = false; Exception exception = null; isReturned = false; try { inKeepAliveProcess = true; socketChannel = (SocketChannel)key.channel(); socket = socketChannel.socket(); if ( algorithm.parse(byteBuffer) ){ keepAlive = executeProcessorTask(); if (!keepAlive) { inKeepAliveProcess = false; } } else { // This shoudn't happens by default' keepAlive = true; inKeepAliveProcess = false; } // Catch IO AND NIO exception } catch (IOException ex) { exception = ex; } catch (RuntimeException ex) { exception = ex; } finally { manageKeepAlive(keepAlive,count,exception); } }
13242 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13242/9b2e41409583e68ab8b180ec394bc683eae49696/JettyReadTask.java/clean/trunk/extras/grizzly/src/main/java/org/mortbay/jetty/grizzly/JettyReadTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 2174, 1435, 1216, 1860, 288, 3639, 509, 1056, 273, 374, 31, 3639, 8758, 2987, 273, 446, 31, 3639, 8758, 2909, 2987, 2909, 273, 446, 31, 3639, 1250, 24115, 273, 629, 31, 3639, 1185, 1520, 273, 446, 31, 3639, 353, 22360, 273, 629, 31, 3639, 775, 288, 5411, 316, 24456, 2227, 273, 638, 31, 5411, 2987, 2909, 273, 261, 4534, 2909, 13, 856, 18, 4327, 5621, 5411, 2987, 273, 2987, 2909, 18, 7814, 5621, 13491, 309, 261, 4886, 18, 2670, 12, 7229, 1892, 13, 262, 95, 7734, 24115, 273, 1836, 5164, 2174, 5621, 7734, 309, 16051, 10102, 10608, 13, 288, 10792, 316, 24456, 2227, 273, 629, 31, 7734, 289, 5411, 289, 469, 288, 7734, 368, 1220, 699, 83, 1100, 82, 1404, 10555, 635, 805, 11, 7734, 24115, 273, 638, 31, 7734, 316, 24456, 2227, 273, 629, 31, 5411, 289, 5411, 368, 21984, 1665, 4116, 423, 4294, 1520, 3639, 289, 1044, 261, 14106, 431, 13, 288, 5411, 1520, 273, 431, 31, 3639, 289, 1044, 261, 11949, 431, 13, 288, 5411, 1520, 273, 431, 31, 3639, 289, 3095, 288, 5411, 10680, 24456, 12, 10102, 10608, 16, 1883, 16, 4064, 1769, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 2174, 1435, 1216, 1860, 288, 3639, 509, 1056, 273, 374, 31, 3639, 8758, 2987, 273, 446, 31, 3639, 8758, 2909, 2987, 2909, 273, 446, 31, 3639, 1250, 24115, 273, 629, 31, 3639, 1185, 1520, 273, 446, 31, 3639, 353, 22360, 273, 629, 31, 3639, 775, 288, 5411, 316, 24456, 2227, 273, 638, 31, 5411, 2987, 2909, 273, 261, 4534, 2909, 13, 856, 18, 4327, 5621, 5411, 2987, 273, 2987, 2909, 18, 7814, 5621, 13491, 309, 261, 4886, 18, 2670, 12, 7229, 1892, 13, 262, 95, 7734, 24115, 273, 1836, 5164, 2174, 5621, 7734, 309, 16051, 10102, 10608, 13, 288, 10792, 316, 24456, 2227, 273, 629, 31, 7734, 289, 5411, 289, 469, 288, 7734, 368, 1220, 2 ]
short getEndPC(Label labelTable[])
short getEndPC(LabelTable table)
short getEndPC(Label labelTable[]) { short pc = labelTable[itsEndLabel & 0x7FFFFFFF].getPC(); if (pc == -1) throw new RuntimeException("end label not defined"); return pc; }
47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/59fedca6b17819e313ac22545d4a0c523cfdf08c/ClassFileWriter.java/buggy/js/rhino/src/org/mozilla/classfile/ClassFileWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3025, 9968, 3513, 12, 2224, 1388, 1014, 13, 565, 288, 3639, 3025, 6125, 273, 1433, 1388, 63, 1282, 1638, 2224, 473, 374, 92, 27, 18343, 42, 8009, 588, 3513, 5621, 3639, 309, 261, 2436, 422, 300, 21, 13, 5411, 604, 394, 3235, 2932, 409, 1433, 486, 2553, 8863, 3639, 327, 6125, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3025, 9968, 3513, 12, 2224, 1388, 1014, 13, 565, 288, 3639, 3025, 6125, 273, 1433, 1388, 63, 1282, 1638, 2224, 473, 374, 92, 27, 18343, 42, 8009, 588, 3513, 5621, 3639, 309, 261, 2436, 422, 300, 21, 13, 5411, 604, 394, 3235, 2932, 409, 1433, 486, 2553, 8863, 3639, 327, 6125, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
case 594: {
case 595: {
public void ruleAction(int ruleNumber) { if (bad_rule != 0) return; switch (ruleNumber) { // // Rule 1: identifier ::= IDENTIFIER // case 1: { if (prsStream.getKind(btParser.getToken(1)) != X10Parsersym.TK_IDENTIFIER) { System.out.println("Parser turning keyword " + prsStream.getName(btParser.getToken(1)) + " at " + prsStream.getLine(btParser.getToken(1)) + ":" + prsStream.getColumn(btParser.getToken(1)) + " into an identifier"); } break; } // // Rule 2: PrimitiveType ::= NumericType // case 2: break; // // Rule 3: PrimitiveType ::= boolean // case 3: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Boolean())); break; } // // Rule 4: NumericType ::= IntegralType // case 4: break; // // Rule 5: NumericType ::= FloatingPointType // case 5: break; // // Rule 6: IntegralType ::= byte // case 6: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 7: IntegralType ::= char // case 7: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 8: IntegralType ::= short // case 8: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 9: IntegralType ::= int // case 9: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 10: IntegralType ::= long // case 10: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 11: FloatingPointType ::= float // case 11: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 12: FloatingPointType ::= double // case 12: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 13: ReferenceType ::= ClassOrInterfaceType // case 13: break; // // Rule 14: ReferenceType ::= ArrayType // case 14: break; // // Rule 15: ClassType ::= TypeName // case 15: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 16: InterfaceType ::= TypeName // case 16: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 17: TypeName ::= identifier // case 17: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 18: TypeName ::= TypeName DOT identifier // case 18: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 19: ClassName ::= TypeName // case 19: break; // // Rule 20: TypeVariable ::= identifier // case 20: break; // // Rule 21: ArrayType ::= Type LBRACKET RBRACKET // case 21: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.array(a, pos(), 1)); break; } // // Rule 22: TypeParameter ::= TypeVariable TypeBoundopt // case 22: bad_rule = 22; break; // // Rule 23: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 23: bad_rule = 23; break; // // Rule 24: AdditionalBoundList ::= AdditionalBound // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBound ::= AND InterfaceType // case 26: bad_rule = 26; break; // // Rule 27: TypeArguments ::= LESS ActualTypeArgumentList GREATER // case 27: bad_rule = 27; break; // // Rule 28: ActualTypeArgumentList ::= ActualTypeArgument // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgumentList COMMA ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: Wildcard ::= QUESTION WildcardBoundsOpt // case 30: bad_rule = 30; break; // // Rule 31: WildcardBounds ::= extends ReferenceType // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= super ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: PackageName ::= identifier // case 33: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 34: PackageName ::= PackageName DOT identifier // case 34: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 35: ExpressionName ::= identifier // case 35: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 36: ExpressionName ::= AmbiguousName DOT identifier // case 36: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 37: MethodName ::= identifier // case 37: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 38: MethodName ::= AmbiguousName DOT identifier // case 38: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 39: PackageOrTypeName ::= identifier // case 39: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 40: PackageOrTypeName ::= PackageOrTypeName DOT identifier // case 40: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 41: AmbiguousName ::= identifier // case 41: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 42: AmbiguousName ::= AmbiguousName DOT identifier // case 42: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 43: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 43: { PackageNode a = (PackageNode) btParser.getSym(1); List b = (List) btParser.getSym(2), c = (List) btParser.getSym(3); // Add import x10.lang.* by default. Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Import x10LangImport = nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, x10Lang.toString()); b.add(x10LangImport); btParser.setSym1(nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c)); break; } // // Rule 44: ImportDeclarations ::= ImportDeclaration // case 44: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 45: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 45: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 46: TypeDeclarations ::= TypeDeclaration // case 46: { List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); TopLevelDecl a = (TopLevelDecl) btParser.getSym(1); if (a != null) l.add(a); btParser.setSym1(l); break; } // // Rule 47: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 47: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 48: PackageDeclaration ::= package PackageName SEMICOLON // case 48: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 49: ImportDeclaration ::= SingleTypeImportDeclaration // case 49: break; // // Rule 50: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 50: break; // // Rule 51: ImportDeclaration ::= SingleStaticImportDeclaration // case 51: break; // // Rule 52: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 52: break; // // Rule 53: SingleTypeImportDeclaration ::= import TypeName SEMICOLON // case 53: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 54: TypeImportOnDemandDeclaration ::= import PackageOrTypeName DOT MULTIPLY SEMICOLON // case 54: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 55: SingleStaticImportDeclaration ::= import static TypeName DOT identifier SEMICOLON // case 55: bad_rule = 55; break; // // Rule 56: StaticImportOnDemandDeclaration ::= import static TypeName DOT MULTIPLY SEMICOLON // case 56: bad_rule = 56; break; // // Rule 57: TypeDeclaration ::= ClassDeclaration // case 57: break; // // Rule 58: TypeDeclaration ::= InterfaceDeclaration // case 58: break; // // Rule 59: TypeDeclaration ::= SEMICOLON // case 59: { btParser.setSym1(null); break; } // // Rule 60: ClassDeclaration ::= NormalClassDeclaration // case 60: break; // // Rule 61: NormalClassDeclaration ::= ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 61: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3));//vj assert(btParser.getSym(4) == null); TypeNode c = (TypeNode) btParser.getSym(4); // by default extend x10.lang.Object if (c == null) { c= new Name(nf, ts, pos(), "x10.lang.Object").toType(); } List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(a.isValue() ? nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e) : nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 62: ClassModifiers ::= ClassModifier // case 62: break; // // Rule 63: ClassModifiers ::= ClassModifiers ClassModifier // case 63: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 64: ClassModifier ::= public // case 64: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 65: ClassModifier ::= protected // case 65: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 66: ClassModifier ::= private // case 66: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 67: ClassModifier ::= abstract // case 67: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 68: ClassModifier ::= static // case 68: { btParser.setSym1(Flags.STATIC); break; } // // Rule 69: ClassModifier ::= final // case 69: { btParser.setSym1(Flags.FINAL); break; } // // Rule 70: ClassModifier ::= strictfp // case 70: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 71: TypeParameters ::= LESS TypeParameterList GREATER // case 71: bad_rule = 71; break; // // Rule 72: TypeParameterList ::= TypeParameter // case 72: bad_rule = 72; break; // // Rule 73: TypeParameterList ::= TypeParameterList COMMA TypeParameter // case 73: bad_rule = 73; break; // // Rule 74: Super ::= extends ClassType // case 74: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 75: Interfaces ::= implements InterfaceTypeList // case 75: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 76: InterfaceTypeList ::= InterfaceType // case 76: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 77: InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType // case 77: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 78: ClassBody ::= LBRACE ClassBodyDeclarationsopt RBRACE // case 78: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 79: ClassBodyDeclarations ::= ClassBodyDeclaration // case 79: break; // // Rule 80: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 80: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 81: ClassBodyDeclaration ::= ClassMemberDeclaration // case 81: break; // // Rule 82: ClassBodyDeclaration ::= InstanceInitializer // case 82: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.NONE, a)); btParser.setSym1(l); break; } // // Rule 83: ClassBodyDeclaration ::= StaticInitializer // case 83: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.STATIC, a)); btParser.setSym1(l); break; } // // Rule 84: ClassBodyDeclaration ::= ConstructorDeclaration // case 84: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 85: ClassMemberDeclaration ::= FieldDeclaration // case 85: break; // // Rule 86: ClassMemberDeclaration ::= MethodDeclaration // case 86: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 87: ClassMemberDeclaration ::= ClassDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= InterfaceDeclaration // case 88: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 89: ClassMemberDeclaration ::= SEMICOLON // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 90: FieldDeclaration ::= FieldModifiersopt Type VariableDeclarators SEMICOLON // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); d.setFlag(a); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), d.flags, nf.array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 91: VariableDeclarators ::= VariableDeclarator // case 91: { List l = new TypedList(new LinkedList(), X10VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 92: VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator // case 92: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 93: VariableDeclarator ::= VariableDeclaratorId // case 93: break; // // Rule 94: VariableDeclarator ::= VariableDeclaratorId EQUAL VariableInitializer // case 94: { X10VarDeclarator a = (X10VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 95: VariableDeclaratorId ::= identifier // case 95: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new X10VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 96: VariableDeclaratorId ::= VariableDeclaratorId LBRACKET RBRACKET // case 96: { X10VarDeclarator a = (X10VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 97: VariableDeclaratorId ::= identifier LBRACKET IdentifierList RBRACKET // case 97: { polyglot.lex.Identifier a = id(btParser.getToken(1)); List paramList = (List) btParser.getSym(3); btParser.setSym1(new X10VarDeclarator(pos(), a.getIdentifier(), paramList)); break; } // // Rule 98: VariableDeclaratorId ::= LBRACKET IdentifierList RBRACKET // case 98: { String name = polyglot.ext.x10.visit.X10PrettyPrinterVisitor.getId(); List paramList = (List) btParser.getSym(2); btParser.setSym1(new X10VarDeclarator(pos(), name, paramList)); break; } // // Rule 99: VariableInitializer ::= Expression // case 99: break; // // Rule 100: VariableInitializer ::= ArrayInitializer // case 100: break; // // Rule 101: FieldModifiers ::= FieldModifier // case 101: break; // // Rule 102: FieldModifiers ::= FieldModifiers FieldModifier // case 102: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 103: FieldModifier ::= public // case 103: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 104: FieldModifier ::= protected // case 104: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 105: FieldModifier ::= private // case 105: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 106: FieldModifier ::= static // case 106: { btParser.setSym1(Flags.STATIC); break; } // // Rule 107: FieldModifier ::= final // case 107: { btParser.setSym1(Flags.FINAL); break; } // // Rule 108: FieldModifier ::= transient // case 108: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 109: FieldModifier ::= volatile // case 109: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 110: MethodDeclaration ::= MethodHeader MethodBody // case 110: { MethodDecl a = (MethodDecl) btParser.getSym(1); List l = a.formals(); List s = new TypedList(new LinkedList(), Stmt.class, false); Block b = (Block) btParser.getSym(2); for (Iterator i = l.iterator(); i.hasNext(); ) { X10Formal d = (X10Formal) i.next(); if (d.hasExplodedVars()) s.addAll( d.explode()); } if (! s.isEmpty()) { s.addAll(b.statements()); b = b.statements(s); } btParser.setSym1(a.body(b)); break; } // // Rule 111: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 111: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, nf.array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 112: ResultType ::= Type // case 112: break; // // Rule 113: ResultType ::= void // case 113: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 114: MethodDeclarator ::= identifier LPAREN FormalParameterListopt RPAREN // case 114: { Object[] a = new Object[3]; a[0] = new Name(nf, ts, pos(), id(btParser.getToken(1)).getIdentifier()); a[1] = btParser.getSym(3); a[2] = new Integer(0); btParser.setSym1(a); break; } // // Rule 115: MethodDeclarator ::= MethodDeclarator LBRACKET RBRACKET // case 115: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 116: FormalParameterList ::= LastFormalParameter // case 116: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 117: FormalParameterList ::= FormalParameters COMMA LastFormalParameter // case 117: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 118: FormalParameters ::= FormalParameter // case 118: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 119: FormalParameters ::= FormalParameters COMMA FormalParameter // case 119: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 120: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 120: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); X10VarDeclarator b = (X10VarDeclarator) btParser.getSym(3); b.setFlag(f); btParser.setSym1(nf.Formal(pos(), nf.array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b)); break; } // // Rule 122: VariableModifiers ::= VariableModifiers VariableModifier // case 122: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 123: VariableModifier ::= final // case 123: { btParser.setSym1(Flags.FINAL); break; } // // Rule 124: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 124: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); X10VarDeclarator b = (X10VarDeclarator) btParser.getSym(4); b.setFlag(f); btParser.setSym1(nf.Formal(pos(), nf.array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b)); break; } // // Rule 125: MethodModifiers ::= MethodModifier // case 125: break; // // Rule 126: MethodModifiers ::= MethodModifiers MethodModifier // case 126: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 127: MethodModifier ::= public // case 127: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 128: MethodModifier ::= protected // case 128: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 129: MethodModifier ::= private // case 129: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 130: MethodModifier ::= abstract // case 130: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 131: MethodModifier ::= static // case 131: { btParser.setSym1(Flags.STATIC); break; } // // Rule 132: MethodModifier ::= final // case 132: { btParser.setSym1(Flags.FINAL); break; } // // Rule 133: MethodModifier ::= synchronized // case 133: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 134: MethodModifier ::= native // case 134: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 135: MethodModifier ::= strictfp // case 135: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 136: Throws ::= throws ExceptionTypeList // case 136: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 137: ExceptionTypeList ::= ExceptionType // case 137: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 138: ExceptionTypeList ::= ExceptionTypeList COMMA ExceptionType // case 138: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 139: ExceptionType ::= ClassType // case 139: break; // // Rule 140: ExceptionType ::= TypeVariable // case 140: break; // // Rule 141: MethodBody ::= Block // case 141: break; // // Rule 142: MethodBody ::= SEMICOLON // case 142: btParser.setSym1(null); break; // // Rule 143: InstanceInitializer ::= Block // case 143: break; // // Rule 144: StaticInitializer ::= static Block // case 144: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 145: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 145: { Flags m = (Flags) btParser.getSym(1); Object[] o = (Object []) btParser.getSym(2); Name a = (Name) o[1]; List b = (List) o[2]; List c = (List) btParser.getSym(3); Block d = (Block) btParser.getSym(4); btParser.setSym1(nf.ConstructorDecl(pos(), m, a.toString(), b, c, d)); break; } // // Rule 146: ConstructorDeclarator ::= SimpleTypeName LPAREN FormalParameterListopt RPAREN // case 146: {//vj assert(btParser.getSym(1) == null); Object[] a = new Object[3];//vj a[0] = btParser.getSym(1); a[1] = btParser.getSym(1); a[2] = btParser.getSym(3); btParser.setSym1(a); break; } // // Rule 147: SimpleTypeName ::= identifier // case 147: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 148: ConstructorModifiers ::= ConstructorModifier // case 148: break; // // Rule 149: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 149: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 150: ConstructorModifier ::= public // case 150: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 151: ConstructorModifier ::= protected // case 151: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 152: ConstructorModifier ::= private // case 152: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 153: ConstructorBody ::= LBRACE ExplicitConstructorInvocationopt BlockStatementsopt RBRACE // case 153: { Stmt a = (Stmt) btParser.getSym(2); List l; if (a == null) l = (List) btParser.getSym(3); else { l = new TypedList(new LinkedList(), Stmt.class, false); List l2 = (List) btParser.getSym(3); l.add(a); l.addAll(l2); } btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 154: ExplicitConstructorInvocation ::= this LPAREN ArgumentListopt RPAREN SEMICOLON // case 154: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.ThisCall(pos(), b)); break; } // // Rule 155: ExplicitConstructorInvocation ::= super LPAREN ArgumentListopt RPAREN SEMICOLON // case 155: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.SuperCall(pos(), b)); break; } // // Rule 156: ExplicitConstructorInvocation ::= Primary DOT this LPAREN ArgumentListopt RPAREN SEMICOLON // case 156: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.ThisCall(pos(), a, b)); break; } // // Rule 157: ExplicitConstructorInvocation ::= Primary DOT super LPAREN ArgumentListopt RPAREN SEMICOLON // case 157: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.SuperCall(pos(), a, b)); break; } // // Rule 158: EnumDeclaration ::= ClassModifiersopt enum identifier Interfacesopt EnumBody // case 158: bad_rule = 158; break; // // Rule 159: EnumBody ::= LBRACE EnumConstantsopt ,opt EnumBodyDeclarationsopt RBRACE // case 159: bad_rule = 159; break; // // Rule 160: EnumConstants ::= EnumConstant // case 160: bad_rule = 160; break; // // Rule 161: EnumConstants ::= EnumConstants COMMA EnumConstant // case 161: bad_rule = 161; break; // // Rule 162: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 162: bad_rule = 162; break; // // Rule 163: Arguments ::= LPAREN ArgumentListopt RPAREN // case 163: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 164: EnumBodyDeclarations ::= SEMICOLON ClassBodyDeclarationsopt // case 164: bad_rule = 164; break; // // Rule 165: InterfaceDeclaration ::= NormalInterfaceDeclaration // case 165: break; // // Rule 166: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier ExtendsInterfacesopt InterfaceBody // case 166: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3));//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(4); ClassBody d = (ClassBody) btParser.getSym(5); btParser.setSym1(nf.ClassDecl(pos(), a.Interface(), b.getIdentifier(), null, c, d)); break; } // // Rule 167: InterfaceModifiers ::= InterfaceModifier // case 167: break; // // Rule 168: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 168: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 169: InterfaceModifier ::= public // case 169: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 170: InterfaceModifier ::= protected // case 170: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 171: InterfaceModifier ::= private // case 171: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 172: InterfaceModifier ::= abstract // case 172: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 173: InterfaceModifier ::= static // case 173: { btParser.setSym1(Flags.STATIC); break; } // // Rule 174: InterfaceModifier ::= strictfp // case 174: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 175: ExtendsInterfaces ::= extends InterfaceType // case 175: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 176: ExtendsInterfaces ::= ExtendsInterfaces COMMA InterfaceType // case 176: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 177: InterfaceBody ::= LBRACE InterfaceMemberDeclarationsopt RBRACE // case 177: { List a = (List)btParser.getSym(2); btParser.setSym1(nf.ClassBody(pos(), a)); break; } // // Rule 178: InterfaceMemberDeclarations ::= InterfaceMemberDeclaration // case 178: break; // // Rule 179: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 179: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 180: InterfaceMemberDeclaration ::= ConstantDeclaration // case 180: break; // // Rule 181: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 181: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 182: InterfaceMemberDeclaration ::= ClassDeclaration // case 182: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 183: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 183: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 184: InterfaceMemberDeclaration ::= SEMICOLON // case 184: { btParser.setSym1(Collections.EMPTY_LIST); break; } // // Rule 185: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 185: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, nf.array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 186: ConstantModifiers ::= ConstantModifier // case 186: break; // // Rule 187: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 187: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 188: ConstantModifier ::= public // case 188: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 189: ConstantModifier ::= static // case 189: { btParser.setSym1(Flags.STATIC); break; } // // Rule 190: ConstantModifier ::= final // case 190: { btParser.setSym1(Flags.FINAL); break; } // // Rule 191: AbstractMethodDeclaration ::= AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt SEMICOLON // case 191: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, nf.array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 192: AbstractMethodModifiers ::= AbstractMethodModifier // case 192: break; // // Rule 193: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 193: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 194: AbstractMethodModifier ::= public // case 194: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 195: AbstractMethodModifier ::= abstract // case 195: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 196: AnnotationTypeDeclaration ::= InterfaceModifiersopt AT interface identifier AnnotationTypeBody // case 196: bad_rule = 196; break; // // Rule 197: AnnotationTypeBody ::= LBRACE AnnotationTypeElementDeclarationsopt RBRACE // case 197: bad_rule = 197; break; // // Rule 198: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclaration // case 198: bad_rule = 198; break; // // Rule 199: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration // case 199: bad_rule = 199; break; // // Rule 200: AnnotationTypeElementDeclaration ::= AbstractMethodModifiersopt Type identifier LPAREN RPAREN DefaultValueopt SEMICOLON // case 200: bad_rule = 200; break; // // Rule 201: AnnotationTypeElementDeclaration ::= ConstantDeclaration // case 201: bad_rule = 201; break; // // Rule 202: AnnotationTypeElementDeclaration ::= ClassDeclaration // case 202: bad_rule = 202; break; // // Rule 203: AnnotationTypeElementDeclaration ::= InterfaceDeclaration // case 203: bad_rule = 203; break; // // Rule 204: AnnotationTypeElementDeclaration ::= EnumDeclaration // case 204: bad_rule = 204; break; // // Rule 205: AnnotationTypeElementDeclaration ::= AnnotationTypeDeclaration // case 205: bad_rule = 205; break; // // Rule 206: AnnotationTypeElementDeclaration ::= SEMICOLON // case 206: bad_rule = 206; break; // // Rule 207: DefaultValue ::= default ElementValue // case 207: bad_rule = 207; break; // // Rule 208: Annotations ::= Annotation // case 208: bad_rule = 208; break; // // Rule 209: Annotations ::= Annotations Annotation // case 209: bad_rule = 209; break; // // Rule 210: Annotation ::= NormalAnnotation // case 210: bad_rule = 210; break; // // Rule 211: Annotation ::= MarkerAnnotation // case 211: bad_rule = 211; break; // // Rule 212: Annotation ::= SingleElementAnnotation // case 212: bad_rule = 212; break; // // Rule 213: NormalAnnotation ::= AT TypeName LPAREN ElementValuePairsopt RPAREN // case 213: bad_rule = 213; break; // // Rule 214: ElementValuePairs ::= ElementValuePair // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePairs ::= ElementValuePairs COMMA ElementValuePair // case 215: bad_rule = 215; break; // // Rule 216: ElementValuePair ::= SimpleName EQUAL ElementValue // case 216: bad_rule = 216; break; // // Rule 217: SimpleName ::= identifier // case 217: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 218: ElementValue ::= ConditionalExpression // case 218: bad_rule = 218; break; // // Rule 219: ElementValue ::= Annotation // case 219: bad_rule = 219; break; // // Rule 220: ElementValue ::= ElementValueArrayInitializer // case 220: bad_rule = 220; break; // // Rule 221: ElementValueArrayInitializer ::= LBRACE ElementValuesopt ,opt RBRACE // case 221: bad_rule = 221; break; // // Rule 222: ElementValues ::= ElementValue // case 222: bad_rule = 222; break; // // Rule 223: ElementValues ::= ElementValues COMMA ElementValue // case 223: bad_rule = 223; break; // // Rule 224: MarkerAnnotation ::= AT TypeName // case 224: bad_rule = 224; break; // // Rule 225: SingleElementAnnotation ::= AT TypeName LPAREN ElementValue RPAREN // case 225: bad_rule = 225; break; // // Rule 226: ArrayInitializer ::= LBRACE VariableInitializersopt ,opt RBRACE // case 226: { List a = (List) btParser.getSym(2); if (a == null) btParser.setSym1(nf.ArrayInit(pos())); else btParser.setSym1(nf.ArrayInit(pos(), a)); break; } // // Rule 227: VariableInitializers ::= VariableInitializer // case 227: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 228: VariableInitializers ::= VariableInitializers COMMA VariableInitializer // case 228: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 229: Block ::= LBRACE BlockStatementsopt RBRACE // case 229: { List l = (List) btParser.getSym(2); btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 230: BlockStatements ::= BlockStatement // case 230: { List l = new TypedList(new LinkedList(), Stmt.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 231: BlockStatements ::= BlockStatements BlockStatement // case 231: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 232: BlockStatement ::= LocalVariableDeclarationStatement // case 232: break; // // Rule 233: BlockStatement ::= ClassDeclaration // case 233: { ClassDecl a = (ClassDecl) btParser.getSym(1); List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), a)); btParser.setSym1(l); break; } // // Rule 234: BlockStatement ::= Statement // case 234: { List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 235: LocalVariableDeclarationStatement ::= LocalVariableDeclaration SEMICOLON // case 235: break; // // Rule 236: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 236: { Flags flags = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); List l = new TypedList(new LinkedList(), LocalDecl.class, false); List s = new TypedList(new LinkedList(), Stmt.class, false); for (Iterator i = b.iterator(); i.hasNext(); ) { X10VarDeclarator d = (X10VarDeclarator) i.next(); d.setFlag( flags ); // use d.flags below and not flags, setFlag may change it. l.add(nf.LocalDecl(d.pos, d.flags, nf.array(a, pos(d), d.dims), d.name, d.init)); if (d.hasExplodedVars()) s.addAll( d.explode() ); } l.addAll(s); btParser.setSym1(l); break; } // // Rule 237: Statement ::= StatementWithoutTrailingSubstatement // case 237: break; // // Rule 238: Statement ::= LabeledStatement // case 238: break; // // Rule 239: Statement ::= IfThenStatement // case 239: break; // // Rule 240: Statement ::= IfThenElseStatement // case 240: break; // // Rule 241: Statement ::= WhileStatement // case 241: break; // // Rule 242: Statement ::= ForStatement // case 242: break; // // Rule 243: StatementWithoutTrailingSubstatement ::= Block // case 243: break; // // Rule 244: StatementWithoutTrailingSubstatement ::= EmptyStatement // case 244: break; // // Rule 245: StatementWithoutTrailingSubstatement ::= ExpressionStatement // case 245: break; // // Rule 246: StatementWithoutTrailingSubstatement ::= AssertStatement // case 246: break; // // Rule 247: StatementWithoutTrailingSubstatement ::= SwitchStatement // case 247: break; // // Rule 248: StatementWithoutTrailingSubstatement ::= DoStatement // case 248: break; // // Rule 249: StatementWithoutTrailingSubstatement ::= BreakStatement // case 249: break; // // Rule 250: StatementWithoutTrailingSubstatement ::= ContinueStatement // case 250: break; // // Rule 251: StatementWithoutTrailingSubstatement ::= ReturnStatement // case 251: break; // // Rule 252: StatementWithoutTrailingSubstatement ::= SynchronizedStatement // case 252: break; // // Rule 253: StatementWithoutTrailingSubstatement ::= ThrowStatement // case 253: break; // // Rule 254: StatementWithoutTrailingSubstatement ::= TryStatement // case 254: break; // // Rule 255: StatementNoShortIf ::= StatementWithoutTrailingSubstatement // case 255: break; // // Rule 256: StatementNoShortIf ::= LabeledStatementNoShortIf // case 256: break; // // Rule 257: StatementNoShortIf ::= IfThenElseStatementNoShortIf // case 257: break; // // Rule 258: StatementNoShortIf ::= WhileStatementNoShortIf // case 258: break; // // Rule 259: StatementNoShortIf ::= ForStatementNoShortIf // case 259: break; // // Rule 260: IfThenStatement ::= if LPAREN Expression RPAREN Statement // case 260: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.If(pos(), a, b)); break; } // // Rule 261: IfThenElseStatement ::= if LPAREN Expression RPAREN StatementNoShortIf else Statement // case 261: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 262: IfThenElseStatementNoShortIf ::= if LPAREN Expression RPAREN StatementNoShortIf else StatementNoShortIf // case 262: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 263: EmptyStatement ::= SEMICOLON // case 263: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 264: LabeledStatement ::= identifier COLON Statement // case 264: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 265: LabeledStatementNoShortIf ::= identifier COLON StatementNoShortIf // case 265: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 266: ExpressionStatement ::= StatementExpression SEMICOLON // case 266: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Eval(pos(), a)); break; } // // Rule 267: StatementExpression ::= Assignment // case 267: break; // // Rule 268: StatementExpression ::= PreIncrementExpression // case 268: break; // // Rule 269: StatementExpression ::= PreDecrementExpression // case 269: break; // // Rule 270: StatementExpression ::= PostIncrementExpression // case 270: break; // // Rule 271: StatementExpression ::= PostDecrementExpression // case 271: break; // // Rule 272: StatementExpression ::= MethodInvocation // case 272: break; // // Rule 273: StatementExpression ::= ClassInstanceCreationExpression // case 273: break; // // Rule 274: AssertStatement ::= assert Expression SEMICOLON // case 274: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 275: AssertStatement ::= assert Expression COLON Expression SEMICOLON // case 275: { Expr a = (Expr) btParser.getSym(2), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Assert(pos(), a, b)); break; } // // Rule 276: SwitchStatement ::= switch LPAREN Expression RPAREN SwitchBlock // case 276: { Expr a = (Expr) btParser.getSym(3); List b = (List) btParser.getSym(5); btParser.setSym1(nf.Switch(pos(), a, b)); break; } // // Rule 277: SwitchBlock ::= LBRACE SwitchBlockStatementGroupsopt SwitchLabelsopt RBRACE // case 277: { List l = (List) btParser.getSym(2), l2 = (List) btParser.getSym(3); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 278: SwitchBlockStatementGroups ::= SwitchBlockStatementGroup // case 278: break; // // Rule 279: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 279: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 280: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 280: { List l = new TypedList(new LinkedList(), SwitchElement.class, false); List l1 = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l1); l.add(nf.SwitchBlock(pos(), l2)); btParser.setSym1(l); break; } // // Rule 281: SwitchLabels ::= SwitchLabel // case 281: { List l = new TypedList(new LinkedList(), Case.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 282: SwitchLabels ::= SwitchLabels SwitchLabel // case 282: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 283: SwitchLabel ::= case ConstantExpression COLON // case 283: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 284: SwitchLabel ::= case EnumConstant COLON // case 284: bad_rule = 284; break; // // Rule 285: SwitchLabel ::= default COLON // case 285: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 286: EnumConstant ::= identifier // case 286: bad_rule = 286; break; // // Rule 287: WhileStatement ::= while LPAREN Expression RPAREN Statement // case 287: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 288: WhileStatementNoShortIf ::= while LPAREN Expression RPAREN StatementNoShortIf // case 288: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 289: DoStatement ::= do Statement while LPAREN Expression RPAREN SEMICOLON // case 289: { Stmt a = (Stmt) btParser.getSym(2); Expr b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Do(pos(), a, b)); break; } // // Rule 290: ForStatement ::= BasicForStatement // case 290: break; // // Rule 291: ForStatement ::= EnhancedForStatement // case 291: break; // // Rule 292: BasicForStatement ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN Statement // case 292: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 293: ForStatementNoShortIf ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN StatementNoShortIf // case 293: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 294: ForInit ::= StatementExpressionList // case 294: break; // // Rule 295: ForInit ::= LocalVariableDeclaration // case 295: { List l = new TypedList(new LinkedList(), ForInit.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 296: ForUpdate ::= StatementExpressionList // case 296: break; // // Rule 297: StatementExpressionList ::= StatementExpression // case 297: { List l = new TypedList(new LinkedList(), Eval.class, false); Expr a = (Expr) btParser.getSym(1); l.add(nf.Eval(pos(), a)); btParser.setSym1(l); break; } // // Rule 298: StatementExpressionList ::= StatementExpressionList COMMA StatementExpression // case 298: { List l = (List) btParser.getSym(1); Expr a = (Expr) btParser.getSym(3); l.add(nf.Eval(pos(), a)); //btParser.setSym1(l); break; } // // Rule 299: BreakStatement ::= break identifieropt SEMICOLON // case 299: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Break(pos())); else btParser.setSym1(nf.Break(pos(), a.toString())); break; } // // Rule 300: ContinueStatement ::= continue identifieropt SEMICOLON // case 300: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Continue(pos())); else btParser.setSym1(nf.Continue(pos(), a.toString())); break; } // // Rule 301: ReturnStatement ::= return Expressionopt SEMICOLON // case 301: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 302: ThrowStatement ::= throw Expression SEMICOLON // case 302: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 303: SynchronizedStatement ::= synchronized LPAREN Expression RPAREN Block // case 303: { Expr a = (Expr) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Synchronized(pos(), a, b)); break; } // // Rule 304: TryStatement ::= try Block Catches // case 304: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Try(pos(), a, b)); break; } // // Rule 305: TryStatement ::= try Block Catchesopt Finally // case 305: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); Block c = (Block) btParser.getSym(4); btParser.setSym1(nf.Try(pos(), a, b, c)); break; } // // Rule 306: Catches ::= CatchClause // case 306: { List l = new TypedList(new LinkedList(), Catch.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 307: Catches ::= Catches CatchClause // case 307: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 308: CatchClause ::= catch LPAREN FormalParameter RPAREN Block // case 308: { Formal a = (Formal) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Catch(pos(), a, b)); break; } // // Rule 309: Finally ::= finally Block // case 309: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 310: Primary ::= PrimaryNoNewArray // case 310: break; // // Rule 311: Primary ::= ArrayCreationExpression // case 311: break; // // Rule 312: PrimaryNoNewArray ::= Literal // case 312: break; // // Rule 313: PrimaryNoNewArray ::= Type DOT class // case 313: { Object o = btParser.getSym(1); if (o instanceof Name) { Name a = (Name) o; btParser.setSym1(nf.ClassLit(pos(), a.toType())); } else if (o instanceof TypeNode) { TypeNode a = (TypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else if (o instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 314: PrimaryNoNewArray ::= void DOT class // case 314: { btParser.setSym1(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(btParser.getToken(1)), ts.Void()))); break; } // // Rule 315: PrimaryNoNewArray ::= this // case 315: { btParser.setSym1(nf.This(pos())); break; } // // Rule 316: PrimaryNoNewArray ::= ClassName DOT this // case 316: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 317: PrimaryNoNewArray ::= LPAREN Expression RPAREN // case 317: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 318: PrimaryNoNewArray ::= ClassInstanceCreationExpression // case 318: break; // // Rule 319: PrimaryNoNewArray ::= FieldAccess // case 319: break; // // Rule 320: PrimaryNoNewArray ::= MethodInvocation // case 320: break; // // Rule 321: PrimaryNoNewArray ::= ArrayAccess // case 321: break; // // Rule 322: Literal ::= IntegerLiteral // case 322: { polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1)); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 323: Literal ::= LongLiteral // case 323: { polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1)); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 324: Literal ::= FloatingPointLiteral // case 324: { polyglot.lex.FloatLiteral a = float_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 325: Literal ::= DoubleLiteral // case 325: { polyglot.lex.DoubleLiteral a = double_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 326: Literal ::= BooleanLiteral // case 326: { polyglot.lex.BooleanLiteral a = boolean_lit(btParser.getToken(1)); btParser.setSym1(nf.BooleanLit(pos(), a.getValue().booleanValue())); break; } // // Rule 327: Literal ::= CharacterLiteral // case 327: { polyglot.lex.CharacterLiteral a = char_lit(btParser.getToken(1)); btParser.setSym1(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 328: Literal ::= StringLiteral // case 328: { String s = prsStream.getName(btParser.getToken(1)); btParser.setSym1(nf.StringLit(pos(), s.substring(1, s.length() - 1))); break; } // // Rule 329: Literal ::= null // case 329: { btParser.setSym1(nf.NullLit(pos())); break; } // // Rule 330: BooleanLiteral ::= true // case 330: break; // // Rule 331: BooleanLiteral ::= false // case 331: break; // // Rule 332: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN ClassBodyopt // case 332: {//vj assert(btParser.getSym(2) == null); TypeNode a = (TypeNode) btParser.getSym(2);//vj assert(btParser.getSym(4) == null); List b = (List) btParser.getSym(4); ClassBody c = (ClassBody) btParser.getSym(6); if (c == null) btParser.setSym1(nf.New(pos(), a, b)); else btParser.setSym1(nf.New(pos(), a, b, c)); break; } // // Rule 333: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 333: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a, b.toType(), c)); else btParser.setSym1(nf.New(pos(), a, b.toType(), c, d)); break; } // // Rule 334: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 334: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(4) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(6) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c)); else btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c, d)); break; } // // Rule 335: ArgumentList ::= Expression // case 335: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 336: ArgumentList ::= ArgumentList COMMA Expression // case 336: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 337: DimExprs ::= DimExpr // case 337: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 338: DimExprs ::= DimExprs DimExpr // case 338: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 339: DimExpr ::= LBRACKET Expression RBRACKET // case 339: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 340: Dims ::= LBRACKET RBRACKET // case 340: { btParser.setSym1(new Integer(1)); break; } // // Rule 341: Dims ::= Dims LBRACKET RBRACKET // case 341: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 342: FieldAccess ::= Primary DOT identifier // case 342: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 343: FieldAccess ::= super DOT identifier // case 343: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 344: FieldAccess ::= ClassName DOT super DOT identifier // case 344: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier())); break; } // // Rule 345: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN // case 345: { Name a = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Call(pos(), a.prefix == null ? null : a.prefix.toReceiver(), a.name, b)); break; } // // Rule 346: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN // case 346: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), a, b.getIdentifier(), c)); break; } // // Rule 347: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN // case 347: {//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken())), b.getIdentifier(), c)); break; } // // Rule 348: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN // case 348: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(5) == null); polyglot.lex.Identifier b = id(btParser.getToken(5)); List c = (List) btParser.getSym(7); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier(), c)); break; } // // Rule 349: PostfixExpression ::= Primary // case 349: break; // // Rule 350: PostfixExpression ::= ExpressionName // case 350: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 351: PostfixExpression ::= PostIncrementExpression // case 351: break; // // Rule 352: PostfixExpression ::= PostDecrementExpression // case 352: break; // // Rule 353: PostIncrementExpression ::= PostfixExpression PLUS_PLUS // case 353: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 354: PostDecrementExpression ::= PostfixExpression MINUS_MINUS // case 354: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 355: UnaryExpression ::= PreIncrementExpression // case 355: break; // // Rule 356: UnaryExpression ::= PreDecrementExpression // case 356: break; // // Rule 357: UnaryExpression ::= PLUS UnaryExpression // case 357: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 358: UnaryExpression ::= MINUS UnaryExpression // case 358: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 360: PreIncrementExpression ::= PLUS_PLUS UnaryExpression // case 360: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 361: PreDecrementExpression ::= MINUS_MINUS UnaryExpression // case 361: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 362: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 362: break; // // Rule 363: UnaryExpressionNotPlusMinus ::= TWIDDLE UnaryExpression // case 363: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 364: UnaryExpressionNotPlusMinus ::= NOT UnaryExpression // case 364: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 366: MultiplicativeExpression ::= UnaryExpression // case 366: break; // // Rule 367: MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression // case 367: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 368: MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression // case 368: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 369: MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression // case 369: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 370: AdditiveExpression ::= MultiplicativeExpression // case 370: break; // // Rule 371: AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression // case 371: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 372: AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression // case 372: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 373: ShiftExpression ::= AdditiveExpression // case 373: break; // // Rule 374: ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression // case 374: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 375: ShiftExpression ::= ShiftExpression GREATER GREATER AdditiveExpression // case 375: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.SHR, b)); break; } // // Rule 376: ShiftExpression ::= ShiftExpression GREATER GREATER GREATER AdditiveExpression // case 376: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Binary(pos(), a, Binary.USHR, b)); break; } // // Rule 377: RelationalExpression ::= ShiftExpression // case 377: break; // // Rule 378: RelationalExpression ::= RelationalExpression LESS ShiftExpression // case 378: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 379: RelationalExpression ::= RelationalExpression GREATER ShiftExpression // case 379: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 380: RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression // case 380: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 381: RelationalExpression ::= RelationalExpression GREATER EQUAL ShiftExpression // case 381: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 382: EqualityExpression ::= RelationalExpression // case 382: break; // // Rule 383: EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression // case 383: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 384: EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression // case 384: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 385: AndExpression ::= EqualityExpression // case 385: break; // // Rule 386: AndExpression ::= AndExpression AND EqualityExpression // case 386: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 387: ExclusiveOrExpression ::= AndExpression // case 387: break; // // Rule 388: ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression // case 388: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 389: InclusiveOrExpression ::= ExclusiveOrExpression // case 389: break; // // Rule 390: InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression // case 390: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 391: ConditionalAndExpression ::= InclusiveOrExpression // case 391: break; // // Rule 392: ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression // case 392: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 393: ConditionalOrExpression ::= ConditionalAndExpression // case 393: break; // // Rule 394: ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression // case 394: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 395: ConditionalExpression ::= ConditionalOrExpression // case 395: break; // // Rule 396: ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON ConditionalExpression // case 396: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3), c = (Expr) btParser.getSym(5); btParser.setSym1(nf.Conditional(pos(), a, b, c)); break; } // // Rule 397: AssignmentExpression ::= ConditionalExpression // case 397: break; // // Rule 398: AssignmentExpression ::= Assignment // case 398: break; // // Rule 399: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 399: { Expr a = (Expr) btParser.getSym(1); Assign.Operator b = (Assign.Operator) btParser.getSym(2); Expr c = (Expr) btParser.getSym(3); btParser.setSym1(nf.Assign(pos(), a, b, c)); break; } // // Rule 400: LeftHandSide ::= ExpressionName // case 400: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 401: LeftHandSide ::= FieldAccess // case 401: break; // // Rule 402: LeftHandSide ::= ArrayAccess // case 402: break; // // Rule 403: AssignmentOperator ::= EQUAL // case 403: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 404: AssignmentOperator ::= MULTIPLY_EQUAL // case 404: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 405: AssignmentOperator ::= DIVIDE_EQUAL // case 405: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 406: AssignmentOperator ::= REMAINDER_EQUAL // case 406: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 407: AssignmentOperator ::= PLUS_EQUAL // case 407: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= MINUS_EQUAL // case 408: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= LEFT_SHIFT_EQUAL // case 409: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= GREATER GREATER EQUAL // case 410: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= GREATER GREATER GREATER EQUAL // case 411: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= AND_EQUAL // case 412: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= XOR_EQUAL // case 413: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 414: AssignmentOperator ::= OR_EQUAL // case 414: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 415: Expression ::= AssignmentExpression // case 415: break; // // Rule 416: ConstantExpression ::= Expression // case 416: break; // // Rule 417: Dimsopt ::= // case 417: { btParser.setSym1(new Integer(0)); break; } // // Rule 418: Dimsopt ::= Dims // case 418: break; // // Rule 419: Catchesopt ::= // case 419: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 420: Catchesopt ::= Catches // case 420: break; // // Rule 421: identifieropt ::= // case 421: btParser.setSym1(null); break; // // Rule 422: identifieropt ::= identifier // case 422: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 423: ForUpdateopt ::= // case 423: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 424: ForUpdateopt ::= ForUpdate // case 424: break; // // Rule 425: Expressionopt ::= // case 425: btParser.setSym1(null); break; // // Rule 426: Expressionopt ::= Expression // case 426: break; // // Rule 427: ForInitopt ::= // case 427: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 428: ForInitopt ::= ForInit // case 428: break; // // Rule 429: SwitchLabelsopt ::= // case 429: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 430: SwitchLabelsopt ::= SwitchLabels // case 430: break; // // Rule 431: SwitchBlockStatementGroupsopt ::= // case 431: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 432: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 432: break; // // Rule 433: VariableModifiersopt ::= // case 433: { btParser.setSym1(Flags.NONE); break; } // // Rule 434: VariableModifiersopt ::= VariableModifiers // case 434: break; // // Rule 435: VariableInitializersopt ::= // case 435: btParser.setSym1(null); break; // // Rule 436: VariableInitializersopt ::= VariableInitializers // case 436: break; // // Rule 437: ElementValuesopt ::= // case 437: btParser.setSym1(null); break; // // Rule 438: ElementValuesopt ::= ElementValues // case 438: bad_rule = 438; break; // // Rule 439: ElementValuePairsopt ::= // case 439: btParser.setSym1(null); break; // // Rule 440: ElementValuePairsopt ::= ElementValuePairs // case 440: bad_rule = 440; break; // // Rule 441: DefaultValueopt ::= // case 441: btParser.setSym1(null); break; // // Rule 442: DefaultValueopt ::= DefaultValue // case 442: break; // // Rule 443: AnnotationTypeElementDeclarationsopt ::= // case 443: btParser.setSym1(null); break; // // Rule 444: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 444: bad_rule = 444; break; // // Rule 445: AbstractMethodModifiersopt ::= // case 445: { btParser.setSym1(Flags.NONE); break; } // // Rule 446: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 446: break; // // Rule 447: ConstantModifiersopt ::= // case 447: { btParser.setSym1(Flags.NONE); break; } // // Rule 448: ConstantModifiersopt ::= ConstantModifiers // case 448: break; // // Rule 449: InterfaceMemberDeclarationsopt ::= // case 449: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 450: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 450: break; // // Rule 451: ExtendsInterfacesopt ::= // case 451: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 452: ExtendsInterfacesopt ::= ExtendsInterfaces // case 452: break; // // Rule 453: InterfaceModifiersopt ::= // case 453: { btParser.setSym1(Flags.NONE); break; } // // Rule 454: InterfaceModifiersopt ::= InterfaceModifiers // case 454: break; // // Rule 455: ClassBodyopt ::= // case 455: btParser.setSym1(null); break; // // Rule 456: ClassBodyopt ::= ClassBody // case 456: break; // // Rule 457: Argumentsopt ::= // case 457: btParser.setSym1(null); break; // // Rule 458: Argumentsopt ::= Arguments // case 458: bad_rule = 458; break; // // Rule 459: EnumBodyDeclarationsopt ::= // case 459: btParser.setSym1(null); break; // // Rule 460: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 460: bad_rule = 460; break; // // Rule 461: ,opt ::= // case 461: btParser.setSym1(null); break; // // Rule 462: ,opt ::= COMMA // case 462: break; // // Rule 463: EnumConstantsopt ::= // case 463: btParser.setSym1(null); break; // // Rule 464: EnumConstantsopt ::= EnumConstants // case 464: bad_rule = 464; break; // // Rule 465: ArgumentListopt ::= // case 465: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 466: ArgumentListopt ::= ArgumentList // case 466: break; // // Rule 467: BlockStatementsopt ::= // case 467: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 468: BlockStatementsopt ::= BlockStatements // case 468: break; // // Rule 469: ExplicitConstructorInvocationopt ::= // case 469: btParser.setSym1(null); break; // // Rule 470: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 470: break; // // Rule 471: ConstructorModifiersopt ::= // case 471: { btParser.setSym1(Flags.NONE); break; } // // Rule 472: ConstructorModifiersopt ::= ConstructorModifiers // case 472: break; // // Rule 473: ...opt ::= // case 473: btParser.setSym1(null); break; // // Rule 474: ...opt ::= ELLIPSIS // case 474: break; // // Rule 475: FormalParameterListopt ::= // case 475: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 476: FormalParameterListopt ::= FormalParameterList // case 476: break; // // Rule 477: Throwsopt ::= // case 477: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 478: Throwsopt ::= Throws // case 478: break; // // Rule 479: MethodModifiersopt ::= // case 479: { btParser.setSym1(Flags.NONE); break; } // // Rule 480: MethodModifiersopt ::= MethodModifiers // case 480: break; // // Rule 481: FieldModifiersopt ::= // case 481: { btParser.setSym1(Flags.NONE); break; } // // Rule 482: FieldModifiersopt ::= FieldModifiers // case 482: break; // // Rule 483: ClassBodyDeclarationsopt ::= // case 483: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 484: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 484: break; // // Rule 485: Interfacesopt ::= // case 485: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 486: Interfacesopt ::= Interfaces // case 486: break; // // Rule 487: Superopt ::= // case 487: btParser.setSym1(null); break; // // Rule 488: Superopt ::= Super // case 488: break; // // Rule 489: TypeParametersopt ::= // case 489: btParser.setSym1(null); break; // // Rule 490: TypeParametersopt ::= TypeParameters // case 490: break; // // Rule 491: ClassModifiersopt ::= // case 491: { btParser.setSym1(Flags.NONE); break; } // // Rule 492: ClassModifiersopt ::= ClassModifiers // case 492: break; // // Rule 493: Annotationsopt ::= // case 493: btParser.setSym1(null); break; // // Rule 494: Annotationsopt ::= Annotations // case 494: bad_rule = 494; break; // // Rule 495: TypeDeclarationsopt ::= // case 495: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 496: TypeDeclarationsopt ::= TypeDeclarations // case 496: break; // // Rule 497: ImportDeclarationsopt ::= // case 497: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 498: ImportDeclarationsopt ::= ImportDeclarations // case 498: break; // // Rule 499: PackageDeclarationopt ::= // case 499: btParser.setSym1(null); break; // // Rule 500: PackageDeclarationopt ::= PackageDeclaration // case 500: break; // // Rule 501: WildcardBoundsOpt ::= // case 501: btParser.setSym1(null); break; // // Rule 502: WildcardBoundsOpt ::= WildcardBounds // case 502: bad_rule = 502; break; // // Rule 503: AdditionalBoundListopt ::= // case 503: btParser.setSym1(null); break; // // Rule 504: AdditionalBoundListopt ::= AdditionalBoundList // case 504: bad_rule = 504; break; // // Rule 505: TypeBoundopt ::= // case 505: btParser.setSym1(null); break; // // Rule 506: TypeBoundopt ::= TypeBound // case 506: bad_rule = 506; break; // // Rule 507: TypeArgumentsopt ::= // case 507: btParser.setSym1(null); break; // // Rule 508: TypeArgumentsopt ::= TypeArguments // case 508: bad_rule = 508; break; // // Rule 509: Type ::= DataType PlaceTypeSpecifieropt // case 509: { // Just parse the placetype and drop it for now. break; } // // Rule 510: Type ::= nullable LESS Type GREATER // case 510: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 511: Type ::= future LESS Type GREATER // case 511: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 512: DataType ::= PrimitiveType // case 512: break; // // Rule 513: DataType ::= ClassOrInterfaceType // case 513: break; // // Rule 514: DataType ::= ArrayType // case 514: break; // // Rule 515: PlaceTypeSpecifier ::= AT PlaceType // case 515: break; // // Rule 516: PlaceType ::= place // case 516: break; // // Rule 517: PlaceType ::= activity // case 517: break; // // Rule 518: PlaceType ::= method // case 518: break; // // Rule 519: PlaceType ::= current // case 519: break; // // Rule 520: PlaceType ::= PlaceExpression // case 520: break; // // Rule 521: ClassOrInterfaceType ::= TypeName DepParametersopt // case 521: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(b == null ? t : nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 522: DepParameters ::= LPAREN DepParameterExpr RPAREN // case 522: break; // // Rule 523: DepParameterExpr ::= ArgumentList WhereClauseopt // case 523: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 524: DepParameterExpr ::= WhereClause // case 524: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 525: WhereClause ::= COLON Expression // case 525: break; // // Rule 527: X10ArrayType ::= Type LBRACKET DOT RBRACKET // case 527: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); btParser.setSym1(t); break; } // // Rule 528: X10ArrayType ::= Type reference LBRACKET DOT RBRACKET // case 528: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 529: X10ArrayType ::= Type value LBRACKET DOT RBRACKET // case 529: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 530: X10ArrayType ::= Type LBRACKET DepParameterExpr RBRACKET // case 530: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 531: X10ArrayType ::= Type reference LBRACKET DepParameterExpr RBRACKET // case 531: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 532: X10ArrayType ::= Type value LBRACKET DepParameterExpr RBRACKET // case 532: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 533: ObjectKind ::= value // case 533: bad_rule = 533; break; // // Rule 534: ObjectKind ::= reference // case 534: bad_rule = 534; break; // // Rule 535: MethodModifier ::= atomic // case 535: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 536: MethodModifier ::= extern // case 536: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 537: ClassDeclaration ::= ValueClassDeclaration // case 537: break; // // Rule 538: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 538: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); TypeNode c = (TypeNode) btParser.getSym(4); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 539: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 539: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(4)); TypeNode c = (TypeNode) btParser.getSym(5); List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 540: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET RBRACKET ArrayInitializer // case 540: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(6); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 1, d)); break; } // // Rule 541: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET // case 541: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, null)); break; } // // Rule 542: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET X10ArrayInitializer // case 542: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, d)); break; } // // Rule 543: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET // case 543: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(6); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, null)); break; } // // Rule 544: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET Expression // case 544: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(4) != null); Expr c = (Expr) btParser.getSym(6); Expr d = (Expr) btParser.getSym(8); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, d)); break; } // // Rule 545: X10ArrayInitializer ::= Expression // case 545: break; // Sigh this is not trivial to do just yet :-( // // Rule 546: X10ArrayInitializer ::= LPAREN FormalParameter RPAREN MethodBody // case 546: bad_rule = 546; break; // // Rule 547: ArrayBaseType ::= PrimitiveType // case 547: break; // // Rule 548: ArrayBaseType ::= ClassOrInterfaceType // case 548: break; // // Rule 549: ArrayAccess ::= ExpressionName LBRACKET ArgumentList RBRACKET // case 549: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), e.toExpr(), (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), e.toExpr(), b)); break; } // // Rule 550: ArrayAccess ::= PrimaryNoNewArray LBRACKET ArgumentList RBRACKET // case 550: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 551: Statement ::= NowStatement // case 551: break; // // Rule 552: Statement ::= ClockedStatement // case 552: break; // // Rule 553: Statement ::= AsyncStatement // case 553: break; // // Rule 554: Statement ::= AtomicStatement // case 554: break; // // Rule 555: Statement ::= WhenStatement // case 555: break; // // Rule 556: Statement ::= ForEachStatement // case 556: break; // // Rule 557: Statement ::= AtEachStatement // case 557: break; // // Rule 558: Statement ::= FinishStatement // case 558: break; // // Rule 559: StatementWithoutTrailingSubstatement ::= NextStatement // case 559: break; // // Rule 560: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 560: break; // // Rule 561: StatementNoShortIf ::= NowStatementNoShortIf // case 561: break; // // Rule 562: StatementNoShortIf ::= ClockedStatementNoShortIf // case 562: break; // // Rule 563: StatementNoShortIf ::= AsyncStatementNoShortIf // case 563: break; // // Rule 564: StatementNoShortIf ::= AtomicStatementNoShortIf // case 564: break; // // Rule 565: StatementNoShortIf ::= WhenStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= ForEachStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AtEachStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= FinishStatementNoShortIf // case 568: break; // // Rule 569: NowStatement ::= now LPAREN Clock RPAREN Statement // case 569: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 570: ClockedStatement ::= clocked LPAREN ClockList RPAREN Statement // case 570: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 571: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 571: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 572: AsyncStatement ::= async LPAREN here RPAREN Statement // case 572: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 573: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 573: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 574: AtomicStatement ::= atomic LPAREN here RPAREN Statement // case 574: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 575: WhenStatement ::= when LPAREN Expression RPAREN Statement // case 575: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 576: WhenStatement ::= WhenStatement or LPAREN Expression RPAREN Statement // case 576: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); When.Branch wb = nf.WhenBranch(pos(btParser.getFirstToken(2), btParser.getLastToken(6)), e, s); w.add(wb); btParser.setSym1(w); break; } // // Rule 577: ForEachStatement ::= foreach LPAREN FormalParameter COLON Expression RPAREN Statement // case 577: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 578: AtEachStatement ::= ateach LPAREN FormalParameter COLON Expression RPAREN Statement // case 578: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 579: EnhancedForStatement ::= for LPAREN FormalParameter COLON Expression RPAREN Statement // case 579: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 580: FinishStatement ::= finish Statement // case 580: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 581: NowStatementNoShortIf ::= now LPAREN Clock RPAREN StatementNoShortIf // case 581: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 582: ClockedStatementNoShortIf ::= clocked LPAREN ClockList RPAREN StatementNoShortIf // case 582: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 583: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 583: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 584: AsyncStatementNoShortIf ::= async LPAREN here RPAREN StatementNoShortIf // case 584: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 585: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 585: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 586: AtomicStatementNoShortIf ::= atomic LPAREN here RPAREN StatementNoShortIf // case 586: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 587: WhenStatementNoShortIf ::= when LPAREN Expression RPAREN StatementNoShortIf // case 587: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 588: WhenStatementNoShortIf ::= WhenStatement or LPAREN Expression RPAREN StatementNoShortIf // case 588: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); When.Branch wb = nf.WhenBranch(pos(btParser.getFirstToken(2), btParser.getLastToken(6)), e, s); w.add(wb); btParser.setSym1(w); break; } // // Rule 589: ForEachStatementNoShortIf ::= foreach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 589: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 590: AtEachStatementNoShortIf ::= ateach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 590: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 591: EnhancedForStatementNoShortIf ::= for LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 591: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 592: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 592: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 593: PlaceExpressionSingleList ::= LPAREN PlaceExpression RPAREN // case 593: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 594: PlaceExpression ::= here // case 594: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 595: PlaceExpression ::= this // case 595: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 596: PlaceExpression ::= Expression // case 596: break; // // Rule 597: PlaceExpression ::= ArrayAccess // case 597: bad_rule = 597; break; // // Rule 598: NextStatement ::= next SEMICOLON // case 598: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 599: AwaitStatement ::= await Expression SEMICOLON // case 599: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 600: ClockList ::= Clock // case 600: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 601: ClockList ::= ClockList COMMA Clock // case 601: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 602: Clock ::= identifier // case 602: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 603: CastExpression ::= LPAREN Type RPAREN UnaryExpressionNotPlusMinus // case 603: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 604: MethodInvocation ::= Primary ARROW identifier LPAREN ArgumentListopt RPAREN // case 604: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.RemoteCall(pos(), a, b.getIdentifier(), c)); break; } // // Rule 605: RelationalExpression ::= RelationalExpression instanceof Type // case 605: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 606: ExpressionName ::= here // case 606: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return ((X10NodeFactory) nf).Here(pos); } }); break; } // // Rule 607: IdentifierList ::= IdentifierList COMMA identifier // case 607: { List l = (List) btParser.getSym(1); polyglot.lex.Identifier a = id(btParser.getToken(3)); l.add(new Name(nf, ts, pos(), a.getIdentifier())); btParser.setSym1(l); break; } // // Rule 608: IdentifierList ::= identifier // case 608: { List l = new LinkedList(); polyglot.lex.Identifier a = id(btParser.getToken(1)); l.add(new Name(nf, ts, pos(), a.getIdentifier())); btParser.setSym1(l); break; } // // Rule 609: Primary ::= FutureExpression // case 609: break; // // Rule 610: Primary ::= LBRACKET ArgumentList RBRACKET // case 610: { List a = (List) btParser.getSym(2); Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); Name x10LangPoint = new Name(nf, ts, pos(), x10Lang, "point"); Name x10LangPointFactory = new Name(nf, ts, pos(), x10LangPoint, "factory"); Name x10LangPointFactoryPoint = new Name(nf, ts, pos(), x10LangPointFactory, "point"); Tuple tuple = nf.Tuple(pos(), x10LangPointFactoryPoint, x10LangRegionFactoryRegion, a); btParser.setSym1(tuple); break; } // // Rule 611: AssignmentExpression ::= Expression ARROW Expression // case 611: { Expr a = (Expr) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); System.out.println("Distribution:" + a + "|" + b + "|"); // x10.lang.region.factory.region( ArgumentList ) // Construct the MethodName Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangDistribution = new Name(nf, ts, pos(), x10Lang, "distribution"); Name x10LangDistributionFactory = new Name(nf, ts, pos(), x10LangDistribution, "factory"); Name x10LangDistributionFactoryConstant = new Name(nf, ts, pos(), x10LangDistributionFactory, "constant"); List l = new LinkedList(); l.add(a); l.add(b); Call call = nf.Call(pos(), x10LangDistributionFactoryConstant.prefix.toReceiver(), "constant", l); btParser.setSym1(call); break; } // // Rule 612: Primary ::= Expression COLON Expression // case 612: { Expr a = (Expr) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); List l = new LinkedList(); l.add(a); l.add(b); Call regionCall = nf.Call(pos(), x10LangRegionFactoryRegion.prefix.toReceiver(), "region", l); btParser.setSym1(regionCall); break; } // // Rule 613: FutureExpression ::= future PlaceExpressionSingleListopt LBRACE Expression RBRACE // case 613: { Expr e1 = (Expr) btParser.getSym(2), e2 = (Expr) btParser.getSym(4); btParser.setSym1(nf.Future(pos(), (e1 == null ? nf.Here(pos(btParser.getFirstToken())) : e1), e2)); break; } // // Rule 614: FutureExpression ::= future LPAREN here RPAREN LBRACE Expression RBRACE // case 614: { Expr e2 = (Expr) btParser.getSym(6); btParser.setSym1(nf.Future(pos(), nf.Here(pos(btParser.getFirstToken(3))), e2)); break; } // // Rule 615: FieldModifier ::= mutable // case 615: { btParser.setSym1(Flags.MUTABLE); break; } // // Rule 616: FieldModifier ::= const // case 616: { btParser.setSym1(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 617: FunExpression ::= fun Type LPAREN FormalParameterListopt RPAREN LBRACE Expression RBRACE // case 617: bad_rule = 617; break; // // Rule 618: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 618: bad_rule = 618; break; // // Rule 619: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 619: bad_rule = 619; break; // // Rule 620: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 620: bad_rule = 620; break; // // Rule 621: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 621: bad_rule = 621; break; // // Rule 622: MethodInvocation ::= TypeName DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 622: bad_rule = 622; break; // // Rule 623: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 623: bad_rule = 623; break; // // Rule 624: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 624: bad_rule = 624; break; // // Rule 625: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 625: bad_rule = 625; break; // // Rule 626: PlaceTypeSpecifieropt ::= // case 626: btParser.setSym1(null); break; // // Rule 627: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 627: break; // // Rule 628: DepParametersopt ::= // case 628: btParser.setSym1(null); break; // // Rule 629: DepParametersopt ::= DepParameters // case 629: break; // // Rule 630: WhereClauseopt ::= // case 630: btParser.setSym1(null); break; // // Rule 631: WhereClauseopt ::= WhereClause // case 631: break; // // Rule 632: ObjectKindopt ::= // case 632: btParser.setSym1(null); break; // // Rule 633: ObjectKindopt ::= ObjectKind // case 633: break; // // Rule 634: ArrayInitializeropt ::= // case 634: btParser.setSym1(null); break; // // Rule 635: ArrayInitializeropt ::= ArrayInitializer // case 635: break; // // Rule 636: PlaceExpressionSingleListopt ::= // case 636: btParser.setSym1(null); break; // // Rule 637: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 637: break; // // Rule 638: ArgumentListopt ::= // case 638: btParser.setSym1(null); break; // // Rule 639: ArgumentListopt ::= ArgumentList // case 639: break; // // Rule 640: DepParametersopt ::= // case 640: btParser.setSym1(null); break; // // Rule 641: DepParametersopt ::= DepParameters // case 641: break; // // Rule 642: Unsafeopt ::= // case 642: btParser.setSym1(null); break; // // Rule 643: Unsafeopt ::= unsafe // case 643: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken(1)))); break; } // // Rule 644: ParamIdopt ::= // case 644: btParser.setSym1(null); break; // // Rule 645: ParamIdopt ::= identifier // case 645: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } default: break; } return; }
1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/af3f97f921355862c552fa98c4a60e77625996f2/X10Parser.java/buggy/x10.compiler/src/x10/parser/X10Parser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 474, 1720, 1854, 13, 565, 288, 3639, 309, 261, 8759, 67, 5345, 480, 374, 13, 5411, 327, 31, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, 6781, 404, 30, 225, 2756, 493, 33, 26765, 5411, 368, 5411, 648, 404, 30, 288, 7734, 309, 261, 683, 87, 1228, 18, 588, 5677, 12, 23602, 2678, 18, 588, 1345, 12, 21, 3719, 480, 1139, 2163, 26954, 2942, 18, 56, 47, 67, 16606, 13, 7734, 288, 10792, 2332, 18, 659, 18, 8222, 2932, 2678, 7005, 310, 4932, 315, 397, 4766, 4202, 846, 87, 1228, 18, 17994, 12, 23602, 2678, 18, 588, 1345, 12, 21, 3719, 397, 4766, 4202, 315, 622, 315, 397, 4766, 4202, 846, 87, 1228, 18, 588, 1670, 12, 23602, 2678, 18, 588, 1345, 12, 21, 3719, 397, 4766, 4202, 6153, 397, 4766, 4202, 846, 87, 1228, 18, 588, 1494, 12, 23602, 2678, 18, 588, 1345, 12, 21, 3719, 397, 4766, 4202, 315, 1368, 392, 2756, 8863, 7734, 289, 7734, 898, 31, 5411, 289, 1171, 368, 5411, 368, 6781, 576, 30, 225, 14488, 559, 493, 33, 16980, 559, 5411, 368, 5411, 648, 576, 30, 7734, 898, 31, 2398, 368, 5411, 368, 6781, 890, 30, 225, 14488, 559, 493, 33, 1250, 5411, 368, 5411, 648, 890, 30, 288, 7734, 10921, 2678, 18, 542, 11901, 21, 12, 82, 74, 18, 15512, 559, 907, 12, 917, 9334, 3742, 18, 5507, 1435, 10019, 7734, 898, 31, 5411, 289, 1171, 368, 5411, 368, 6781, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 474, 1720, 1854, 13, 565, 288, 3639, 309, 261, 8759, 67, 5345, 480, 374, 13, 5411, 327, 31, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, 6781, 404, 30, 225, 2756, 493, 33, 26765, 5411, 368, 5411, 648, 404, 30, 288, 7734, 309, 261, 683, 87, 1228, 18, 588, 5677, 12, 23602, 2678, 18, 588, 1345, 12, 21, 3719, 480, 1139, 2163, 26954, 2942, 18, 56, 47, 67, 16606, 13, 7734, 288, 10792, 2332, 18, 659, 18, 8222, 2932, 2678, 7005, 310, 4932, 315, 397, 4766, 4202, 846, 87, 1228, 18, 17994, 12, 23602, 2678, 18, 588, 1345, 12, 21, 3719, 397, 4766, 4202, 315, 622, 315, 397, 4766, 2 ]
try { Provisioning prov = Provisioning.getInstance(); Account account = prov.getAccountById(authToken.getAccountId()); Zimlet z = prov.getZimlet(zimletName); boolean isAdmin = (authToken.isAdmin() || authToken.isDomainAdmin()); if (z.isExtension()) { if (!isAdmin) { ZimbraLog.zimlet.info("unauthorized request to zimlet "+zimletName+" from non admin user "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } } else { Set zimlets = account.getCOS().getMultiAttrSet(Provisioning.A_zimbraZimletAvailableZimlets); if (!zimlets.contains(zimletName)) { ZimbraLog.zimlet.info("unauthorized request to zimlet "+zimletName+" from user "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } } } catch (ServiceException se) { ZimbraLog.zimlet.info("cannot resolve account "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; }
if (!zimletName.equals(com.zimbra.cs.zimlet.ZimletUtil.ZIMLET_DEV_DIR)) { try { Provisioning prov = Provisioning.getInstance(); Account account = prov.getAccountById(authToken.getAccountId()); Zimlet z = prov.getZimlet(zimletName); boolean isAdmin = (authToken.isAdmin() || authToken.isDomainAdmin()); if (z.isExtension()) { if (!isAdmin) { ZimbraLog.zimlet.info("unauthorized request to zimlet "+zimletName+" from non admin user "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } } else { Set zimlets = account.getCOS().getMultiAttrSet(Provisioning.A_zimbraZimletAvailableZimlets); if (!zimlets.contains(zimletName)) { ZimbraLog.zimlet.info("unauthorized request to zimlet "+zimletName+" from user "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } } } catch (ServiceException se) { ZimbraLog.zimlet.info("cannot resolve account "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } }
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!isHttpReq(request, response)) { return; } HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; AuthToken authToken; try { authToken = getAuthTokenForApp(req, resp); } catch (ServiceException se) { ZimbraLog.zimlet.info("can't get authToken: "+se.getMessage()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } String zimletName = getZimletName(req); if (zimletName == null) { ZimbraLog.zimlet.info("no zimlet in the request"); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } try { Provisioning prov = Provisioning.getInstance(); Account account = prov.getAccountById(authToken.getAccountId()); Zimlet z = prov.getZimlet(zimletName); boolean isAdmin = (authToken.isAdmin() || authToken.isDomainAdmin()); if (z.isExtension()) { // admin zimlets are accessible only by admins through admin app. if (!isAdmin) { ZimbraLog.zimlet.info("unauthorized request to zimlet "+zimletName+" from non admin user "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } } else { Set zimlets = account.getCOS().getMultiAttrSet(Provisioning.A_zimbraZimletAvailableZimlets); if (!zimlets.contains(zimletName)) { ZimbraLog.zimlet.info("unauthorized request to zimlet "+zimletName+" from user "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } } } catch (ServiceException se) { ZimbraLog.zimlet.info("cannot resolve account "+authToken.getAccountId()); resp.setStatus(HttpServletResponse.SC_FORBIDDEN); return; } chain.doFilter(req, resp); }
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/77fc60171f8979771050ef6a0a6f87073e7a4515/ZimletFilter.java/clean/ZimbraServer/src/java/com/zimbra/cs/zimlet/ZimletFilter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 741, 1586, 12, 18572, 590, 16, 7971, 1064, 766, 16, 1082, 202, 1586, 3893, 2687, 13, 1216, 1860, 16, 16517, 288, 202, 202, 430, 16051, 291, 2940, 6113, 12, 2293, 16, 766, 3719, 288, 1082, 202, 2463, 31, 202, 202, 97, 202, 202, 2940, 18572, 225, 1111, 273, 261, 2940, 18572, 13, 590, 31, 202, 202, 2940, 29910, 1718, 273, 261, 2940, 29910, 13, 766, 31, 3639, 3123, 1345, 24050, 31, 3639, 775, 288, 540, 202, 1944, 1345, 273, 14191, 1345, 1290, 3371, 12, 3658, 16, 1718, 1769, 3639, 289, 1044, 261, 15133, 695, 13, 288, 540, 202, 62, 381, 15397, 1343, 18, 94, 381, 1810, 18, 1376, 2932, 4169, 1404, 336, 24050, 30, 13773, 307, 18, 24906, 10663, 540, 202, 12243, 18, 542, 1482, 12, 2940, 29910, 18, 2312, 67, 7473, 30198, 1769, 540, 202, 2463, 31, 3639, 289, 2398, 202, 780, 998, 381, 1810, 461, 273, 23448, 381, 1810, 461, 12, 3658, 1769, 377, 202, 430, 261, 94, 381, 1810, 461, 422, 446, 13, 288, 202, 377, 202, 62, 381, 15397, 1343, 18, 94, 381, 1810, 18, 1376, 2932, 2135, 998, 381, 1810, 316, 326, 590, 8863, 540, 202, 12243, 18, 542, 1482, 12, 2940, 29910, 18, 2312, 67, 7473, 30198, 1769, 377, 202, 202, 2463, 31, 377, 202, 97, 377, 202, 3639, 775, 288, 540, 202, 17485, 17197, 273, 26423, 18, 588, 1442, 5621, 540, 202, 3032, 2236, 273, 17197, 18, 588, 3032, 5132, 12, 1944, 1345, 18, 588, 14594, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 741, 1586, 12, 18572, 590, 16, 7971, 1064, 766, 16, 1082, 202, 1586, 3893, 2687, 13, 1216, 1860, 16, 16517, 288, 202, 202, 430, 16051, 291, 2940, 6113, 12, 2293, 16, 766, 3719, 288, 1082, 202, 2463, 31, 202, 202, 97, 202, 202, 2940, 18572, 225, 1111, 273, 261, 2940, 18572, 13, 590, 31, 202, 202, 2940, 29910, 1718, 273, 261, 2940, 29910, 13, 766, 31, 3639, 3123, 1345, 24050, 31, 3639, 775, 288, 540, 202, 1944, 1345, 273, 14191, 1345, 1290, 3371, 12, 3658, 16, 1718, 1769, 3639, 289, 1044, 261, 15133, 695, 13, 288, 540, 202, 62, 381, 15397, 1343, 18, 94, 381, 1810, 18, 1376, 2932, 4169, 1404, 336, 24050, 30, 13773, 2 ]
} else { sContext = SearchContext.newSearchContext(pageContext); pageContext.setAttribute(mVar, sContext, PageContext.REQUEST_SCOPE);
public void doTag() throws JspException, IOException { ZMailbox mailbox = getMailbox(); PageContext pageContext = (PageContext) getJspContext(); ServletRequest req = pageContext.getRequest(); int si = getInt(req, QP_SEARCH_INDEX, 0); int so = getInt(req, QP_SEARCH_OFFSET, 0); int usecache = getInt(req, QP_SEARCH_USE_CACHE, -1); if (usecache == 1) mUseCache = true; // otherwise, leave it set to what was passed in... String sc = req.getParameter(QP_SEARCH_CONTEXT); SearchContext sContext = SearchContext.getSearchContext(pageContext, sc); if (sContext != null) { pageContext.setAttribute(mVar, sContext, PageContext.REQUEST_SCOPE); if (si != -1) sContext.setCurrentItemIndex(si); if ((sContext.getSearchResult().getOffset() != so) || !mUseCache) { sContext.getParams().setOffset(so); sContext.doSearch(mailbox); } } else { // if we get here, we don't have a session, or the one we had timed out sContext = SearchContext.newSearchContext(pageContext); pageContext.setAttribute(mVar, sContext, PageContext.REQUEST_SCOPE); determineQuery(pageContext, sContext, req); // TODO: throw exception? sContext.setParams(determineParams(sContext, req, so, mailbox)); sContext.doSearch(mailbox); } if (sContext.getCurrentItemIndex() != si) sContext.setCurrentItemIndex(si); }
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/0730982992a4e62fefa7990659e41af28bf829d3/ComputeSearchContextTag.java/clean/ZimbraTagLib/src/java/com/zimbra/cs/taglib/tag/ComputeSearchContextTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 1805, 1435, 1216, 27485, 16, 1860, 288, 3639, 2285, 30239, 14187, 273, 31991, 2147, 5621, 3639, 3460, 1042, 21442, 273, 261, 1964, 1042, 13, 31162, 1042, 5621, 3639, 26470, 1111, 273, 21442, 18, 588, 691, 5621, 3639, 509, 7533, 273, 8145, 12, 3658, 16, 2238, 52, 67, 17251, 67, 9199, 16, 374, 1769, 3639, 509, 1427, 273, 8145, 12, 3658, 16, 2238, 52, 67, 17251, 67, 11271, 16, 374, 1769, 3639, 509, 999, 2493, 273, 8145, 12, 3658, 16, 2238, 52, 67, 17251, 67, 8001, 67, 8495, 16, 300, 21, 1769, 3639, 309, 261, 1202, 2493, 422, 404, 13, 312, 3727, 1649, 273, 638, 31, 368, 3541, 16, 8851, 518, 444, 358, 4121, 1703, 2275, 316, 2777, 3639, 514, 888, 273, 1111, 18, 588, 1662, 12, 53, 52, 67, 17251, 67, 13181, 1769, 3639, 5167, 1042, 272, 1042, 273, 5167, 1042, 18, 588, 2979, 1042, 12, 2433, 1042, 16, 888, 1769, 3639, 309, 261, 87, 1042, 480, 446, 13, 288, 5411, 21442, 18, 542, 1499, 12, 81, 1537, 16, 272, 1042, 16, 3460, 1042, 18, 5519, 67, 19444, 1769, 5411, 309, 261, 7722, 480, 300, 21, 13, 272, 1042, 18, 542, 3935, 1180, 1016, 12, 7722, 1769, 5411, 309, 14015, 87, 1042, 18, 588, 24916, 7675, 588, 2335, 1435, 480, 1427, 13, 747, 401, 81, 3727, 1649, 13, 288, 7734, 272, 1042, 18, 588, 1370, 7675, 542, 2335, 12, 2048, 1769, 7734, 272, 1042, 18, 2896, 2979, 12, 4408, 2147, 1769, 5411, 289, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 1805, 1435, 1216, 27485, 16, 1860, 288, 3639, 2285, 30239, 14187, 273, 31991, 2147, 5621, 3639, 3460, 1042, 21442, 273, 261, 1964, 1042, 13, 31162, 1042, 5621, 3639, 26470, 1111, 273, 21442, 18, 588, 691, 5621, 3639, 509, 7533, 273, 8145, 12, 3658, 16, 2238, 52, 67, 17251, 67, 9199, 16, 374, 1769, 3639, 509, 1427, 273, 8145, 12, 3658, 16, 2238, 52, 67, 17251, 67, 11271, 16, 374, 1769, 3639, 509, 999, 2493, 273, 8145, 12, 3658, 16, 2238, 52, 67, 17251, 67, 8001, 67, 8495, 16, 300, 21, 1769, 3639, 309, 261, 1202, 2493, 422, 404, 13, 312, 3727, 1649, 273, 638, 31, 368, 3541, 16, 8851, 518, 444, 358, 4121, 1703, 2275, 2 ]
public void testAccumulateModify() throws Exception { //read in the source final Reader reader = new InputStreamReader( getClass().getResourceAsStream( "test_AccumulateModify.drl" ) ); final DrlParser parser = new DrlParser(); final PackageDescr packageDescr = parser.parse( reader ); //pre build the package final PackageBuilder builder = new PackageBuilder(); builder.addPackage( packageDescr ); final Package pkg = builder.getPackage(); //add the package to a rulebase final RuleBase ruleBase = getRuleBase(); ruleBase.addPackage( pkg ); //load up the rulebase final WorkingMemory wm = ruleBase.newWorkingMemory(); List results = new ArrayList(); wm.setGlobal( "results", results ); Cheese[] cheese = new Cheese[] { new Cheese("stilton", 10), new Cheese("stilton", 2), new Cheese("stilton", 5), new Cheese("brie", 15), new Cheese("brie", 16), new Cheese("provolone", 8) }; Person bob = new Person("Bob", "stilton"); FactHandle[] cheeseHandles = new FactHandle[cheese.length]; for( int i = 0; i < cheese.length; i++ ) { cheeseHandles[i] = wm.assertObject( cheese[i] ); } FactHandle bobHandle = wm.assertObject( bob ); // ---------------- 1st scenario wm.fireAllRules(); // no fire, as per rule constraints Assert.assertEquals( 0, results.size() ); // ---------------- 2nd scenario int index = 1; cheese[index].setPrice( 9 ); wm.modifyObject( cheeseHandles[index], cheese[index] ); wm.fireAllRules(); // 1 fire Assert.assertEquals( 1, results.size()); Assert.assertEquals( 24, ((Cheesery)results.get( results.size()-1 )).getTotalAmount() ); // ---------------- 3rd scenario bob.setLikes( "brie" ); wm.modifyObject( bobHandle, bob ); wm.fireAllRules(); // 2 fires Assert.assertEquals( 2, results.size()); Assert.assertEquals( 31, ((Cheesery)results.get( results.size()-1 )).getTotalAmount() ); // ---------------- 4th scenario wm.retractObject( cheeseHandles[3] ); wm.fireAllRules(); // should not have fired as per constraint Assert.assertEquals( 2, results.size()); }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/8bf342687afa7ece5d554db21146984eff9076c8/IntegrationCases.java/clean/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8973, 31284, 11047, 1435, 1216, 1185, 288, 3639, 368, 896, 316, 326, 1084, 3639, 727, 5393, 2949, 273, 394, 15322, 12, 2900, 7675, 588, 1420, 17052, 12, 315, 3813, 67, 8973, 31284, 11047, 18, 72, 1321, 6, 262, 11272, 3639, 727, 463, 1321, 2678, 2082, 273, 394, 463, 1321, 2678, 5621, 3639, 727, 7508, 16198, 2181, 16198, 273, 2082, 18, 2670, 12, 2949, 11272, 3639, 368, 1484, 1361, 326, 2181, 3639, 727, 7508, 1263, 2089, 273, 394, 7508, 1263, 5621, 3639, 2089, 18, 1289, 2261, 12, 2181, 16198, 11272, 3639, 727, 7508, 3475, 273, 2089, 18, 588, 2261, 5621, 3639, 368, 1289, 326, 2181, 358, 279, 1720, 1969, 3639, 727, 6781, 2171, 1720, 2171, 273, 19048, 2171, 5621, 3639, 1720, 2171, 18, 1289, 2261, 12, 3475, 11272, 3639, 368, 945, 731, 326, 1720, 1969, 3639, 727, 22732, 6031, 18200, 273, 1720, 2171, 18, 2704, 14836, 6031, 5621, 3639, 987, 1686, 273, 394, 2407, 5621, 7734, 18200, 18, 542, 5160, 12, 315, 4717, 3113, 1686, 11272, 7734, 22682, 3392, 8526, 19315, 3392, 273, 394, 22682, 3392, 8526, 288, 15604, 394, 22682, 3392, 2932, 334, 330, 1917, 3113, 1728, 3631, 15604, 394, 22682, 3392, 2932, 334, 330, 1917, 3113, 576, 3631, 15604, 394, 22682, 3392, 2932, 334, 330, 1917, 3113, 1381, 3631, 15604, 394, 22682, 3392, 2932, 70, 566, 73, 3113, 4711, 3631, 15604, 394, 22682, 3392, 2932, 70, 566, 73, 3113, 2872, 3631, 15604, 394, 22682, 3392, 2932, 685, 15416, 476, 3113, 1725, 13, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8973, 31284, 11047, 1435, 1216, 1185, 288, 3639, 368, 896, 316, 326, 1084, 3639, 727, 5393, 2949, 273, 394, 15322, 12, 2900, 7675, 588, 1420, 17052, 12, 315, 3813, 67, 8973, 31284, 11047, 18, 72, 1321, 6, 262, 11272, 3639, 727, 463, 1321, 2678, 2082, 273, 394, 463, 1321, 2678, 5621, 3639, 727, 7508, 16198, 2181, 16198, 273, 2082, 18, 2670, 12, 2949, 11272, 3639, 368, 1484, 1361, 326, 2181, 3639, 727, 7508, 1263, 2089, 273, 394, 7508, 1263, 5621, 3639, 2089, 18, 1289, 2261, 12, 2181, 16198, 11272, 3639, 727, 7508, 3475, 273, 2089, 18, 588, 2261, 5621, 3639, 368, 1289, 326, 2181, 358, 279, 1720, 1969, 3639, 727, 6781, 2171, 1720, 2171, 273, 2 ]
addDomain( descs, "planning", "org.cougaar.planning.ldm.PlanningDomain");
if (isPlanningEnabled) { addDomain( descs, "planning", "org.cougaar.planning.ldm.PlanningDomain"); }
public void load() { super.load(); domainSP = new DomainServiceProvider(new DomainServiceImpl(this)); serviceBroker.addService(DomainService.class, domainSP); domainForBlackboardSP = new DomainForBlackboardServiceProvider(new DomainForBlackboardServiceImpl(this)); serviceBroker.addService(DomainForBlackboardService.class, domainForBlackboardSP); loggingService = (LoggingService) serviceBroker.getService(this, LoggingService.class, null); if (loggingService == null) { System.out.println("DomainManager: unable to get LoggingService"); } // display the agent id if (loggingService.isDebugEnabled()) { loggingService.debug("DomainManager "+this+" loading Domains for agent "+self); } // get an array of child Components Object[] children; if (loadState instanceof StateTuple[]) { // use the existing state children = (StateTuple[])loadState; loadState = null; // load the child Components (Domains, etc) int n = ((children != null) ? children.length : 0); for (int i = 0; i < n; i++) { add(children[i]); } } else { /* Order - root, planning, domain-file, agent.ini */ List descs = new ArrayList(5); // setup the root domain addDomain(descs, "root", "org.cougaar.core.domain.RootDomain"); // setup the planning domain addDomain( descs, "planning", "org.cougaar.planning.ldm.PlanningDomain"); /* read domain file */ initializeFromProperties(descs); initializeFromConfigFiles(descs); /* load root domain and domains specified in domain file */ children = descs.toArray(); for (int i = 0; i < children.length; i++) { add(children[i]); } /* load domains specified in agent.ini */ loadFromComponentInitializer(); } }
7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/2ebb49f74d5cae06c9f0b6ea0d57759fd5bc91f4/DomainManager.java/clean/core/src/org/cougaar/core/domain/DomainManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1262, 1435, 288, 565, 2240, 18, 945, 5621, 565, 2461, 3118, 273, 394, 6648, 16300, 12, 2704, 6648, 1179, 2828, 12, 2211, 10019, 565, 1156, 11194, 18, 1289, 1179, 12, 3748, 1179, 18, 1106, 16, 2461, 3118, 1769, 565, 2461, 1290, 13155, 3752, 3118, 273, 4202, 394, 6648, 1290, 13155, 3752, 16300, 12, 2704, 6648, 1290, 13155, 3752, 1179, 2828, 12, 2211, 10019, 565, 1156, 11194, 18, 1289, 1179, 12, 3748, 1290, 13155, 3752, 1179, 18, 1106, 16, 17311, 2461, 1290, 13155, 3752, 3118, 1769, 565, 2907, 1179, 273, 4202, 261, 7735, 1179, 13, 1156, 11194, 18, 588, 1179, 12, 2211, 16, 10253, 1179, 18, 1106, 16, 4766, 7734, 446, 1769, 565, 309, 261, 11167, 1179, 422, 446, 13, 288, 1377, 2332, 18, 659, 18, 8222, 2932, 3748, 1318, 30, 13496, 358, 336, 10253, 1179, 8863, 565, 289, 565, 368, 2562, 326, 4040, 612, 565, 309, 261, 11167, 1179, 18, 291, 2829, 1526, 10756, 288, 1377, 2907, 1179, 18, 4148, 2932, 3748, 1318, 13773, 2211, 9078, 7153, 6648, 87, 364, 4040, 13773, 2890, 1769, 565, 289, 565, 368, 336, 392, 526, 434, 1151, 25286, 565, 1033, 8526, 2325, 31, 565, 309, 261, 945, 1119, 1276, 3287, 9038, 63, 5717, 288, 1377, 368, 999, 326, 2062, 919, 1377, 2325, 273, 261, 1119, 9038, 63, 5717, 945, 1119, 31, 1377, 1262, 1119, 273, 446, 31, 1377, 368, 1262, 326, 1151, 25286, 261, 15531, 16, 5527, 13, 1377, 509, 290, 273, 14015, 5906, 480, 446, 13, 692, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1262, 1435, 288, 565, 2240, 18, 945, 5621, 565, 2461, 3118, 273, 394, 6648, 16300, 12, 2704, 6648, 1179, 2828, 12, 2211, 10019, 565, 1156, 11194, 18, 1289, 1179, 12, 3748, 1179, 18, 1106, 16, 2461, 3118, 1769, 565, 2461, 1290, 13155, 3752, 3118, 273, 4202, 394, 6648, 1290, 13155, 3752, 16300, 12, 2704, 6648, 1290, 13155, 3752, 1179, 2828, 12, 2211, 10019, 565, 1156, 11194, 18, 1289, 1179, 12, 3748, 1290, 13155, 3752, 1179, 18, 1106, 16, 17311, 2461, 1290, 13155, 3752, 3118, 1769, 565, 2907, 1179, 273, 4202, 261, 7735, 1179, 13, 1156, 11194, 18, 588, 1179, 12, 2211, 16, 10253, 1179, 18, 1106, 16, 4766, 7734, 446, 1769, 565, 309, 261, 11167, 1179, 2 ]
if (_target == null) throw new IllegalStateException("Target may not be null in synchronized dispatch");
if (_target == null) { throw new IllegalStateException("Target may not be null in " + "synchronized dispatch"); }
private void synchronizedDispatch(Container cont) { if (_target == null) throw new IllegalStateException("Target may not be null in synchronized dispatch"); synchronized (_target) { dispatch(cont); } }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/c9a43357d2e82ece30c25a3910d13430ab5013bf/UMLChangeDispatch.java/clean/src_new/org/argouml/uml/ui/UMLChangeDispatch.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3852, 5325, 12, 2170, 466, 13, 288, 3639, 309, 261, 67, 3299, 422, 446, 13, 288, 604, 394, 5477, 2932, 2326, 2026, 486, 506, 446, 316, 315, 397, 315, 22043, 3435, 8863, 289, 3639, 3852, 261, 67, 3299, 13, 288, 5411, 3435, 12, 1213, 1769, 3639, 289, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3852, 5325, 12, 2170, 466, 13, 288, 3639, 309, 261, 67, 3299, 422, 446, 13, 288, 604, 394, 5477, 2932, 2326, 2026, 486, 506, 446, 316, 315, 397, 315, 22043, 3435, 8863, 289, 3639, 3852, 261, 67, 3299, 13, 288, 5411, 3435, 12, 1213, 1769, 3639, 289, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
public void mBOOL() throws RecognitionException { try { ruleNestingLevel++; int _type = BOOL; int _start = getCharIndex(); int _line = getLine(); int _charPosition = getCharPositionInLine(); int _channel = Token.DEFAULT_CHANNEL; // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:4: ( ( 'true' | 'false' ) ) // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:4: ( 'true' | 'false' ) { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:4: ( 'true' | 'false' ) int alt13=2; int LA13_0 = input.LA(1); if ( (LA13_0=='t') ) { alt13=1; } else if ( (LA13_0=='f') ) { alt13=2; } else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("1382:4: ( 'true' | 'false' )", 13, 0, input); throw nvae; } switch (alt13) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:5: 'true' { match("true"); if (failed) return ; } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:12: 'false' { match("false"); if (failed) return ; } break; } } if ( backtracking==0 ) { if ( token==null && ruleNestingLevel==1 ) { emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1); } } } finally { ruleNestingLevel--; } }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/158de3e3177d9b48d45fb4c3fae8404e0f01f690/DRLLexer.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 312, 19040, 1435, 1216, 9539, 288, 3639, 775, 288, 5411, 1720, 50, 10100, 2355, 9904, 31, 5411, 509, 389, 723, 273, 9784, 1741, 31, 5411, 509, 389, 1937, 273, 23577, 1016, 5621, 5411, 509, 389, 1369, 273, 9851, 5621, 5411, 509, 389, 3001, 2555, 273, 23577, 2555, 382, 1670, 5621, 5411, 509, 389, 4327, 273, 3155, 18, 5280, 67, 15814, 31, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 30, 3437, 11149, 30, 24, 30, 261, 261, 296, 3767, 11, 571, 296, 5743, 11, 262, 262, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 30, 3437, 11149, 30, 24, 30, 261, 296, 3767, 11, 571, 296, 5743, 11, 262, 5411, 288, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 30, 3437, 11149, 30, 24, 30, 261, 296, 3767, 11, 571, 296, 5743, 11, 262, 5411, 509, 3770, 3437, 33, 22, 31, 5411, 509, 2928, 3437, 67, 20, 273, 810, 18, 2534, 12, 21, 1769, 5411, 309, 261, 261, 2534, 3437, 67, 20, 18920, 88, 6134, 262, 288, 7734, 3770, 3437, 33, 21, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 312, 19040, 1435, 1216, 9539, 288, 3639, 775, 288, 5411, 1720, 50, 10100, 2355, 9904, 31, 5411, 509, 389, 723, 273, 9784, 1741, 31, 5411, 509, 389, 1937, 273, 23577, 1016, 5621, 5411, 509, 389, 1369, 273, 9851, 5621, 5411, 509, 389, 3001, 2555, 273, 23577, 2555, 382, 1670, 5621, 5411, 509, 389, 4327, 273, 3155, 18, 5280, 67, 15814, 31, 5411, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, 1695, 12215, 1695, 4936, 1695, 16483, 18, 75, 30, 3437, 11149, 30, 24, 30, 261, 261, 296, 3767, 11, 571, 296, 5743, 11, 262, 262, 5411, 368, 463, 31027, 14915, 1695, 2 ]
map.put(key, properties);
PropertyManager.setResponseProperties(portletWindow, this.getHttpServletRequest(), _getHttpServletResponse(), props);
public void addProperty(String key, String value) { if (key == null) { throw new IllegalArgumentException("Property key == null"); } // get properties from PropertyManager Map map = PropertyManager.getRequestProperties(portletWindow, this.getHttpServletRequest()); if (map == null) { map = new HashMap(); } String[] properties = (String[]) map.get(key); if (properties == null) { properties = new String[]{value}; } else { properties[properties.length] = value; } map.put(key, properties); PropertyManager.setResponseProperties(portletWindow, this.getHttpServletRequest(), _getHttpServletResponse(), map); }
51810 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51810/eea6e1a14b7683941fbec5a2fe976dd6a81bd5ce/PortletResponseImpl.java/clean/src/container/org/apache/pluto/core/impl/PortletResponseImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 14324, 12, 780, 498, 16, 514, 460, 13, 377, 288, 3639, 309, 261, 856, 422, 446, 13, 3639, 288, 5411, 604, 394, 2754, 2932, 1396, 498, 422, 446, 8863, 3639, 289, 3639, 368, 336, 1790, 628, 4276, 1318, 3639, 1635, 852, 273, 4276, 1318, 18, 588, 691, 2297, 12, 655, 1810, 3829, 16, 333, 18, 588, 2940, 18572, 10663, 3639, 309, 261, 1458, 422, 446, 13, 3639, 288, 5411, 852, 273, 394, 4317, 5621, 3639, 289, 3639, 514, 8526, 1790, 273, 261, 780, 63, 5717, 852, 18, 588, 12, 856, 1769, 3639, 309, 261, 4738, 422, 446, 13, 3639, 288, 5411, 1790, 273, 394, 514, 63, 7073, 1132, 20451, 3639, 289, 3639, 469, 3639, 288, 5411, 1790, 63, 4738, 18, 2469, 65, 273, 460, 31, 3639, 289, 3639, 4276, 1318, 18, 542, 1064, 2297, 12, 655, 1810, 3829, 16, 333, 18, 588, 2940, 18572, 9334, 389, 588, 2940, 29910, 9334, 3458, 1769, 3639, 4276, 1318, 18, 542, 1064, 2297, 12, 655, 1810, 3829, 16, 333, 18, 588, 2940, 18572, 9334, 389, 588, 2940, 29910, 9334, 852, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 14324, 12, 780, 498, 16, 514, 460, 13, 377, 288, 3639, 309, 261, 856, 422, 446, 13, 3639, 288, 5411, 604, 394, 2754, 2932, 1396, 498, 422, 446, 8863, 3639, 289, 3639, 368, 336, 1790, 628, 4276, 1318, 3639, 1635, 852, 273, 4276, 1318, 18, 588, 691, 2297, 12, 655, 1810, 3829, 16, 333, 18, 588, 2940, 18572, 10663, 3639, 309, 261, 1458, 422, 446, 13, 3639, 288, 5411, 852, 273, 394, 4317, 5621, 3639, 289, 3639, 514, 8526, 1790, 273, 261, 780, 63, 5717, 852, 18, 588, 12, 856, 1769, 3639, 309, 261, 4738, 422, 446, 13, 3639, 288, 5411, 1790, 273, 394, 514, 63, 7073, 1132, 20451, 3639, 289, 3639, 469, 3639, 288, 5411, 2 ]
Molecule mol = model.getSetOfMolecules().getMolecule(0); assertNotNull(mol); assertEquals(mol.getAtomCount(), 15); assertEquals(mol.getBondCount(), 16); assertTrue(!GeometryTools.has3DCoordinates(mol)); assertTrue(GeometryTools.has2DCoordinates(mol)); } else { logger.error("The CMLReader was not tested with a CML file."); logger.error("Due to missing file: " + filename); fail("Missing file: " + filename); }
Molecule mol = model.getSetOfMolecules().getMolecule(0); assertNotNull(mol); assertEquals(mol.getAtomCount(), 15); assertEquals(mol.getBondCount(), 16); assertTrue(!GeometryTools.has3DCoordinates(mol)); assertTrue(GeometryTools.has2DCoordinates(mol));
public void testCephNS() { String filename = "data/cmltest/ceph-ns.xml"; logger.info("Testing: " + filename); try { File f = new File(filename); if (f.canRead()) { // read the file CMLReader reader = new CMLReader(new FileReader(f)); ChemFile chemFile = (ChemFile)reader.read((ChemObject)new ChemFile()); // test the resulting ChemFile content assertNotNull(chemFile); assertEquals(chemFile.getChemSequenceCount(), 1); ChemSequence seq = chemFile.getChemSequence(0); assertNotNull(seq); assertEquals(seq.getChemModelCount(), 1); ChemModel model = seq.getChemModel(0); assertNotNull(model); assertEquals(model.getSetOfMolecules().getMoleculeCount(), 1); // test the molecule Molecule mol = model.getSetOfMolecules().getMolecule(0); assertNotNull(mol); assertEquals(mol.getAtomCount(), 15); assertEquals(mol.getBondCount(), 16); assertTrue(!GeometryTools.has3DCoordinates(mol)); assertTrue(GeometryTools.has2DCoordinates(mol)); } else { logger.error("The CMLReader was not tested with a CML file."); logger.error("Due to missing file: " + filename); fail("Missing file: " + filename); } } catch (Exception e) { fail(e.toString()); } }
46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/2c7c43d2f4308010328c092f9e157e53e6cab8b2/JumboTest.java/buggy/src/org/openscience/cdk/test/io/cml/JumboTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 39, 73, 844, 3156, 1435, 288, 3639, 514, 1544, 273, 315, 892, 19, 71, 781, 3813, 19, 311, 844, 17, 2387, 18, 2902, 14432, 3639, 1194, 18, 1376, 2932, 22218, 30, 315, 397, 1544, 1769, 3639, 775, 288, 5411, 1387, 284, 273, 394, 1387, 12, 3459, 1769, 5411, 309, 261, 74, 18, 4169, 1994, 10756, 288, 7734, 368, 855, 326, 585, 7734, 385, 1495, 2514, 2949, 273, 394, 385, 1495, 2514, 12, 2704, 23010, 12, 74, 10019, 7734, 26542, 812, 19028, 812, 273, 261, 20200, 812, 13, 10530, 18, 896, 12443, 20200, 921, 13, 2704, 26542, 812, 10663, 7734, 368, 1842, 326, 8156, 26542, 812, 913, 7734, 25395, 12, 1036, 812, 1769, 7734, 1815, 8867, 12, 1036, 812, 18, 588, 20200, 4021, 1380, 9334, 404, 1769, 7734, 26542, 4021, 3833, 273, 19028, 812, 18, 588, 20200, 4021, 12, 20, 1769, 7734, 25395, 12, 5436, 1769, 7734, 1815, 8867, 12, 5436, 18, 588, 20200, 1488, 1380, 9334, 404, 1769, 7734, 26542, 1488, 938, 273, 3833, 18, 588, 20200, 1488, 12, 20, 1769, 7734, 25395, 12, 2284, 1769, 7734, 1815, 8867, 12, 2284, 18, 588, 694, 951, 49, 29466, 7675, 588, 29669, 1380, 9334, 404, 1769, 7734, 368, 1842, 326, 13661, 7734, 490, 10545, 12629, 273, 938, 18, 588, 694, 951, 49, 29466, 7675, 588, 29669, 12, 20, 1769, 7734, 25395, 12, 21260, 1769, 7734, 1815, 8867, 12, 21260, 18, 588, 3641, 1380, 9334, 4711, 1769, 7734, 1815, 8867, 12, 21260, 18, 588, 9807, 1380, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 39, 73, 844, 3156, 1435, 288, 3639, 514, 1544, 273, 315, 892, 19, 71, 781, 3813, 19, 311, 844, 17, 2387, 18, 2902, 14432, 3639, 1194, 18, 1376, 2932, 22218, 30, 315, 397, 1544, 1769, 3639, 775, 288, 5411, 1387, 284, 273, 394, 1387, 12, 3459, 1769, 5411, 309, 261, 74, 18, 4169, 1994, 10756, 288, 7734, 368, 855, 326, 585, 7734, 385, 1495, 2514, 2949, 273, 394, 385, 1495, 2514, 12, 2704, 23010, 12, 74, 10019, 7734, 26542, 812, 19028, 812, 273, 261, 20200, 812, 13, 10530, 18, 896, 12443, 20200, 921, 13, 2704, 26542, 812, 10663, 7734, 368, 1842, 326, 8156, 26542, 812, 913, 7734, 25395, 12, 1036, 812, 1769, 7734, 1815, 8867, 2 ]
System.out.println("Transaction terminated event recieved");
if (transactionTerminatedEvent.isServerTransaction()) System.out.println("Transaction terminated event recieved" + transactionTerminatedEvent.getServerTransaction()); else System.out.println("Transaction terminated " + transactionTerminatedEvent.getClientTransaction());
public void processTransactionTerminated( TransactionTerminatedEvent transactionTerminatedEvent) { System.out.println("Transaction terminated event recieved"); }
7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/4f12c0c8b2fbf4bc0524f4624c4324731f35bcc9/Shootme.java/clean/trunk/src/examples/simplecallsetup/Shootme.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1207, 3342, 21888, 12, 1082, 202, 3342, 21888, 1133, 2492, 21888, 1133, 13, 288, 202, 202, 3163, 18, 659, 18, 8222, 2932, 3342, 14127, 871, 1950, 1385, 2155, 8863, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1207, 3342, 21888, 12, 1082, 202, 3342, 21888, 1133, 2492, 21888, 1133, 13, 288, 202, 202, 3163, 18, 659, 18, 8222, 2932, 3342, 14127, 871, 1950, 1385, 2155, 8863, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
minX = minY = 0; maxX = width; maxY = height;
public SlimPlotter(String[] args) throws Exception { ProgressMonitor progress = new ProgressMonitor(null, "Launching SlimPlotter", "Initializing", 0, 23); progress.setMillisToPopup(0); progress.setMillisToDecideToPopup(0); int p = 0; // parse command line arguments String filename = null; File file = null; if (args == null || args.length < 1) { JFileChooser jc = new JFileChooser(System.getProperty("user.dir")); jc.addChoosableFileFilter(new ExtensionFileFilter("sdt", "Becker & Hickl SPC-Image SDT")); int rval = jc.showOpenDialog(null); if (rval != JFileChooser.APPROVE_OPTION) { System.out.println("Please specify an SDT file."); System.exit(1); } file = jc.getSelectedFile(); filename = file.getPath(); } else { filename = args[0]; file = new File(filename); } width = height = timeBins = channels = -1; if (args.length >= 3) { width = parse(args[1], -1); height = parse(args[2], -1); } if (args.length >= 4) timeBins = parse(args[3], -1); if (args.length >= 5) channels = parse(args[4], -1); minX = minY = 0; maxX = width; maxY = height; // read SDT file header DataInputStream fin = new DataInputStream(new BufferedInputStream( new FileInputStream(file))); fin.mark(4096); fin.skipBytes(14); // skip 14 byte header int offset = DataTools.read2UnsignedBytes(fin, true) + 22; System.out.println("Data offset: " + offset);//TEMP byte[] stuff = new byte[4077]; fin.readFully(stuff); String s = new String(stuff); fin.reset(); int leftToFind = 3; if (width < 0) { String wstr = "[SP_SCAN_X,I,"; int wndx = s.indexOf(wstr); width = 128; if (wndx >= 0) { int q = s.indexOf("]", wndx); if (q >= 0) { width = parse(s.substring(wndx + wstr.length(), q), width); System.out.println("Got width from file: " + width);//TEMP leftToFind--; } } } if (height < 0) { height = 128; String hstr = "[SP_SCAN_Y,I,"; int hndx = s.indexOf(hstr); if (hndx >= 0) { int q = s.indexOf("]", hndx); if (q >= 0) { height = parse(s.substring(hndx + hstr.length(), q), height); System.out.println("Got height from file: " + height);//TEMP leftToFind--; } } } if (timeBins < 0) { timeBins = 64; String tstr = "[SP_ADC_RE,I,"; int tndx = s.indexOf(tstr); if (tndx >= 0) { int q = s.indexOf("]", tndx); if (q >= 0) { timeBins = parse(s.substring(tndx + tstr.length(), q), timeBins); System.out.println("Got timeBins from file: " + timeBins);//TEMP leftToFind--; } } } if (channels < 0) { // autodetect number of channels based on file size channels = (int) ((file.length() - offset) / (2 * timeBins * width * height)); } timeRange = 12.5; minWave = 400; waveStep = 10; // warn user if some numbers were not found if (leftToFind > 0) { JOptionPane.showMessageDialog(null, "Some numbers (image width, image height, and number of time bins)\n" + "were not found within the file. The numbers you are about to see\n" + "are best guesses. Please change them if they are incorrect.", "SlimPlotter", JOptionPane.WARNING_MESSAGE); } // show dialog confirming data parameters paramDialog = new JDialog((Frame) null, "SlimPlotter", true); JPanel paramPane = new JPanel(); paramPane.setBorder(new EmptyBorder(10, 10, 10, 10)); paramDialog.setContentPane(paramPane); paramPane.setLayout(new GridLayout(9, 3)); wField = addRow(paramPane, "Image width", width, "pixels"); hField = addRow(paramPane, "Image height", height, "pixels"); tField = addRow(paramPane, "Time bins", timeBins, ""); cField = addRow(paramPane, "Channel count", channels, ""); trField = addRow(paramPane, "Time range", timeRange, "nanoseconds"); wlField = addRow(paramPane, "Starting wavelength", minWave, "nanometers"); sField = addRow(paramPane, "Channel width", waveStep, "nanometers"); JButton ok = new JButton("OK"); ok.addActionListener(this); paramPane.add(new JLabel()); paramPane.add(new JLabel()); paramPane.add(new JLabel()); paramPane.add(new JLabel()); paramPane.add(ok); paramDialog.pack(); Dimension ss = Toolkit.getDefaultToolkit().getScreenSize(); Dimension ps = paramDialog.getSize(); paramDialog.setLocation((ss.width - ps.width) / 2, (ss.height - ps.height) / 2); paramDialog.setVisible(true); int maxWave = minWave + (channels - 1) * waveStep; // read pixel data progress.setMaximum(channels + 7); progress.setNote("Reading data"); fin.skipBytes(offset); // skip to data byte[] data = new byte[2 * channels * height * width * timeBins]; fin.readFully(data); fin.close(); progress.setProgress(++p); if (progress.isCanceled()) System.exit(0); // create types progress.setNote("Creating types"); RealType xType = RealType.getRealType("element"); RealType yType = RealType.getRealType("line"); ScaledUnit ns = new ScaledUnit(1e-9, SI.second, "ns"); ScaledUnit nm = new ScaledUnit(1e-9, SI.meter, "nm"); RealType bType = RealType.getRealType("bin", ns); cType = RealType.getRealType("channel", nm); RealType vType = RealType.getRealType("value"); RealTupleType xy = new RealTupleType(xType, yType); FunctionType xyvFunc = new FunctionType(xy, vType); Integer2DSet xySet = new Integer2DSet(xy, width, height); FunctionType cxyvFunc = new FunctionType(cType, xyvFunc); Linear1DSet cSet = new Linear1DSet(cType, minWave, maxWave, channels, null, new Unit[] {nm}, null); RealTupleType bc = new RealTupleType(bType, cType); bcvFunc = new FunctionType(bc, vType); bcSet = new Linear2DSet(bc, 0, timeRange, timeBins, minWave, maxWave, channels, null, new Unit[] {ns, nm}, null); progress.setProgress(++p); if (progress.isCanceled()) System.exit(0); // plot intensity data in 2D display progress.setNote("Building displays"); iPlot = new DisplayImplJ3D("intensity", new TwoDDisplayRendererJ3D()); iPlot.getMouseBehavior().getMouseHelper().setFunctionMap(new int[][][] { {{MouseHelper.DIRECT, MouseHelper.NONE}, // L, shift-L {MouseHelper.NONE, MouseHelper.NONE}}, // ctrl-L, ctrl-shift-L {{MouseHelper.CURSOR_TRANSLATE, MouseHelper.CURSOR_ZOOM}, // M, shift-M {MouseHelper.CURSOR_ROTATE, MouseHelper.NONE}}, // ctrl-M, ctrl-shift-M {{MouseHelper.ROTATE, MouseHelper.ZOOM}, // R, shift-R {MouseHelper.TRANSLATE, MouseHelper.NONE}}, // ctrl-R, ctrl-shift-R }); iPlot.enableEvent(DisplayEvent.MOUSE_DRAGGED); iPlot.enableEvent(DisplayEvent.MOUSE_MOVED); iPlot.addDisplayListener(this); iPlot.addMap(new ScalarMap(xType, Display.XAxis)); iPlot.addMap(new ScalarMap(yType, Display.YAxis)); iPlot.addMap(new ScalarMap(vType, Display.RGB)); iPlot.addMap(new ScalarMap(cType, Display.Animation)); DataReferenceImpl intensityRef = new DataReferenceImpl("intensity"); iPlot.addReference(intensityRef); final DataReferenceImpl boxRef = new DataReferenceImpl("box"); boxRef.setData(new Gridded2DSet(xy, null, 1)); // dummy iPlot.addReferences(new RubberBandBoxRendererJ3D(xType, yType, 0, 0), boxRef); CellImpl cell = new CellImpl() { public void doAction() throws VisADException, RemoteException { Set set = (Set) boxRef.getData(); if (set == null) return; float[][] samples = set.getSamples(false); if (samples == null) return; minX = (int) Math.round(samples[0][0]); minY = (int) Math.round(samples[1][0]); maxX = (int) Math.round(samples[0][1]); maxY = (int) Math.round(samples[1][1]); plotData(true); } }; cell.addReference(boxRef); ac = (AnimationControl) iPlot.getControl(AnimationControl.class); iPlot.getProjectionControl().setMatrix( iPlot.make_matrix(0, 0, 0, 0.85, 0, 0, 0)); progress.setProgress(++p); if (progress.isCanceled()) System.exit(0); // plot decay curves in 3D display decayPlot = new DisplayImplJ3D("decay"); ScalarMap xMap = new ScalarMap(bType, Display.XAxis); ScalarMap yMap = new ScalarMap(cType, Display.YAxis); zMap = new ScalarMap(vType, Display.ZAxis); decayPlot.addMap(xMap); decayPlot.addMap(yMap); decayPlot.addMap(zMap); vMap = new ScalarMap(vType, Display.RGB); decayPlot.addMap(vMap); ref = new DataReferenceImpl("decay"); decayPlot.addReference(ref); xMap.getAxisScale().setTitle("Time (ns)"); yMap.getAxisScale().setTitle("Wavelength (nm)"); zMap.getAxisScale().setTitle("Count"); decayPlot.getGraphicsModeControl().setScaleEnable(true); decayPlot.getGraphicsModeControl().setTextureEnable(false); decayPlot.getProjectionControl().setMatrix(MATRIX); decayPlot.getProjectionControl().setAspectCartesian( new double[] {2, 1, 1}); progress.setProgress(++p); if (progress.isCanceled()) System.exit(0); // convert byte data to shorts progress.setNote("Constructing images "); values = new int[channels][height][width][timeBins]; float[][][] pix = new float[channels][1][width * height]; FieldImpl field = new FieldImpl(cxyvFunc, cSet); int max = 0; int maxChan = 0; for (int c=0; c<channels; c++) { progress.setProgress(++p); if (progress.isCanceled()) System.exit(0); int oc = timeBins * width * height * c; for (int h=0; h<height; h++) { int oh = timeBins * width * h; for (int w=0; w<width; w++) { int ow = timeBins * w; int sum = 0; for (int t=0; t<timeBins; t++) { int ndx = 2 * (oc + oh + ow + t); int val = DataTools.bytesToInt(data, ndx, 2, true); if (val > max) { max = val; maxChan = c; } values[c][h][w][t] = val; sum += val; } pix[c][0][width * h + w] = sum; } } FlatField ff = new FlatField(xyvFunc, xySet); ff.setSamples(pix[c], false); field.setSample(c, ff); } progress.setProgress(++p); if (progress.isCanceled()) System.exit(0); // show 2D window on screen progress.setNote("Creating plots"); JFrame intensityFrame = new JFrame("Intensity Data"); intensityFrame.addWindowListener(this); JPanel intensityPane = new JPanel(); intensityPane.setLayout(new BorderLayout()); intensityPane.add(iPlot.getComponent(), BorderLayout.CENTER); cSlider = new JSlider(1, channels, 1); cSlider.setSnapToTicks(true); cSlider.setMajorTickSpacing(channels / 4); cSlider.setMinorTickSpacing(1); cSlider.setPaintTicks(true); cSlider.addChangeListener(this); intensityPane.add(cSlider, BorderLayout.SOUTH); int pad = 30; int ifx = pad / 2, ify = pad / 2; int ifw = (ss.width - pad) / 2, ifh = ifw; intensityFrame.setContentPane(intensityPane); intensityFrame.setBounds(ifx, ify, ifw, ifh); intensityRef.setData(field); ColorControl cc = (ColorControl) iPlot.getControl(ColorControl.class); cc.setTable(ColorControl.initTableGreyWedge(new float[3][256])); intensityFrame.setVisible(true); progress.setProgress(++p); if (progress.isCanceled()) System.exit(0); // show 3D window on screen JFrame decayFrame = new JFrame("Spectral Lifetime Data"); decayFrame.addWindowListener(this); JPanel decayPane = new JPanel(); decayPane.setLayout(new BorderLayout()); decayPane.add(decayPlot.getComponent(), BorderLayout.CENTER); decayLabel = new JLabel("Decay curve for all pixels"); decayPane.add(decayLabel, BorderLayout.NORTH); JPanel options = new JPanel(); options.setLayout(new BoxLayout(options, BoxLayout.X_AXIS)); surface = new JCheckBox("Surface", true); surface.addChangeListener(this); parallel = new JCheckBox("Parallel projection", false); parallel.addChangeListener(this); logScale = new JCheckBox("Log scale", false); logScale.addChangeListener(this); options.add(surface); options.add(parallel); options.add(logScale); decayPane.add(options, BorderLayout.SOUTH); decayFrame.setContentPane(decayPane); decayFrame.setBounds(ifx + ifw, ify, ifw, ifh); plotData(true); cSlider.setValue(maxChan + 1); decayFrame.setVisible(true); progress.setProgress(++p); }
49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/584e350d800a20cd44131b1c19500a33e19a265c/SlimPlotter.java/buggy/loci/slim/SlimPlotter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 348, 7091, 11532, 387, 12, 780, 8526, 833, 13, 1216, 1185, 288, 565, 10980, 7187, 4007, 273, 394, 10980, 7187, 12, 2011, 16, 1377, 315, 9569, 310, 348, 7091, 11532, 387, 3113, 315, 29782, 3113, 374, 16, 10213, 1769, 565, 4007, 18, 542, 4814, 774, 13770, 12, 20, 1769, 565, 4007, 18, 542, 4814, 774, 1799, 831, 774, 13770, 12, 20, 1769, 565, 509, 293, 273, 374, 31, 565, 368, 1109, 1296, 980, 1775, 565, 514, 1544, 273, 446, 31, 565, 1387, 585, 273, 446, 31, 565, 309, 261, 1968, 422, 446, 747, 833, 18, 2469, 411, 404, 13, 288, 1377, 804, 812, 17324, 19807, 273, 394, 804, 812, 17324, 12, 3163, 18, 588, 1396, 2932, 1355, 18, 1214, 7923, 1769, 1377, 19807, 18, 1289, 9636, 538, 429, 29837, 12, 2704, 10021, 29837, 2932, 6427, 88, 3113, 3639, 315, 38, 762, 264, 473, 670, 1200, 80, 348, 3513, 17, 2040, 348, 9081, 7923, 1769, 1377, 509, 14267, 273, 19807, 18, 4500, 3678, 6353, 12, 2011, 1769, 1377, 309, 261, 86, 1125, 480, 804, 812, 17324, 18, 2203, 3373, 3412, 67, 7425, 13, 288, 3639, 2332, 18, 659, 18, 8222, 2932, 8496, 4800, 392, 348, 9081, 585, 1199, 1769, 3639, 2332, 18, 8593, 12, 21, 1769, 1377, 289, 1377, 585, 273, 19807, 18, 588, 7416, 812, 5621, 1377, 1544, 273, 585, 18, 588, 743, 5621, 565, 289, 565, 469, 288, 1377, 1544, 273, 833, 63, 20, 15533, 1377, 585, 273, 394, 1387, 12, 3459, 1769, 565, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 348, 7091, 11532, 387, 12, 780, 8526, 833, 13, 1216, 1185, 288, 565, 10980, 7187, 4007, 273, 394, 10980, 7187, 12, 2011, 16, 1377, 315, 9569, 310, 348, 7091, 11532, 387, 3113, 315, 29782, 3113, 374, 16, 10213, 1769, 565, 4007, 18, 542, 4814, 774, 13770, 12, 20, 1769, 565, 4007, 18, 542, 4814, 774, 1799, 831, 774, 13770, 12, 20, 1769, 565, 509, 293, 273, 374, 31, 565, 368, 1109, 1296, 980, 1775, 565, 514, 1544, 273, 446, 31, 565, 1387, 585, 273, 446, 31, 565, 309, 261, 1968, 422, 446, 747, 833, 18, 2469, 411, 404, 13, 288, 1377, 804, 812, 17324, 19807, 273, 394, 804, 812, 17324, 12, 3163, 18, 588, 1396, 2932, 1355, 2 ]
unsafe.put(l.getIdent(), Boolean.TRUE);
unsafeField.add(l.getIdent());
public Object visitAssignmentExpression(JAssignmentExpression self, JExpression left, JExpression right) { if((left instanceof JLocalVariableExpression)&&(right instanceof JNewArrayExpression)) { JLocalVariable var=((JLocalVariableExpression)left).getVariable(); if(!declared.containsKey(var)) { declared.put(var,Boolean.TRUE); return self; } } else if (left instanceof JFieldAccessExpression) { // assigning one array to another. We do // not yet track the flow of values // through an assignment such as this. // // This means that if you pass an array of // coefficients to a filter and store it // to a field, the array cannot be // destroyed. To support this, would need // to propagate constants from locals to // fields, which I don't think FieldProp // or Propagator currently dues. // SEE RT #257. --BFT JFieldAccessExpression l = (JFieldAccessExpression)left; targetsField.remove(l.getIdent()); unsafe.put(l.getIdent(), Boolean.TRUE); } return super.visitAssignmentExpression(self,left,right); }
47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/36df840bed9d10465a8010782783234e19a026cd/ArrayDestroyer.java/buggy/streams/src/at/dms/kjc/sir/lowering/ArrayDestroyer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 5397, 1071, 1033, 3757, 7729, 2300, 12, 46, 7729, 2300, 365, 16, 4766, 18701, 804, 2300, 2002, 16, 4766, 18701, 804, 2300, 2145, 13, 288, 13491, 309, 12443, 4482, 1276, 804, 2042, 3092, 2300, 13, 10, 10, 12, 4083, 1276, 804, 1908, 1076, 2300, 3719, 288, 18701, 804, 2042, 3092, 569, 33, 12443, 46, 2042, 3092, 2300, 13, 4482, 2934, 588, 3092, 5621, 18701, 309, 12, 5, 16571, 18, 12298, 653, 12, 1401, 3719, 288, 27573, 7886, 18, 458, 12, 1401, 16, 5507, 18, 18724, 1769, 27573, 327, 365, 31, 18701, 289, 13491, 289, 469, 309, 261, 4482, 1276, 804, 974, 1862, 2300, 13, 288, 18701, 368, 28639, 1245, 526, 358, 4042, 18, 225, 1660, 741, 18701, 368, 486, 4671, 3298, 326, 4693, 434, 924, 18701, 368, 3059, 392, 6661, 4123, 487, 333, 18, 18701, 368, 18701, 368, 1220, 4696, 716, 309, 1846, 1342, 392, 526, 434, 18701, 368, 14229, 358, 279, 1034, 471, 1707, 518, 18701, 368, 358, 279, 652, 16, 326, 526, 2780, 506, 18701, 368, 17689, 18, 225, 2974, 2865, 333, 16, 4102, 1608, 18701, 368, 358, 13551, 6810, 628, 8985, 358, 18701, 368, 1466, 16, 1492, 467, 2727, 1404, 15507, 2286, 4658, 18701, 368, 578, 1186, 9095, 639, 4551, 302, 3610, 18, 11794, 368, 3174, 41, 13060, 468, 2947, 27, 18, 225, 1493, 38, 4464, 18701, 804, 974, 1862, 2300, 328, 273, 261, 46, 974, 1862, 2300, 13, 4482, 31, 18701, 5774, 974, 18, 4479, 12, 80, 18, 588, 6106, 10663, 18701, 7127, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 5397, 1071, 1033, 3757, 7729, 2300, 12, 46, 7729, 2300, 365, 16, 4766, 18701, 804, 2300, 2002, 16, 4766, 18701, 804, 2300, 2145, 13, 288, 13491, 309, 12443, 4482, 1276, 804, 2042, 3092, 2300, 13, 10, 10, 12, 4083, 1276, 804, 1908, 1076, 2300, 3719, 288, 18701, 804, 2042, 3092, 569, 33, 12443, 46, 2042, 3092, 2300, 13, 4482, 2934, 588, 3092, 5621, 18701, 309, 12, 5, 16571, 18, 12298, 653, 12, 1401, 3719, 288, 27573, 7886, 18, 458, 12, 1401, 16, 5507, 18, 18724, 1769, 27573, 327, 365, 31, 18701, 289, 13491, 289, 469, 309, 261, 4482, 1276, 804, 974, 1862, 2300, 13, 288, 18701, 368, 28639, 1245, 526, 358, 4042, 18, 225, 1660, 741, 18701, 368, 486, 2 ]
public void setOwner(Object owner) { this.owner = owner; }
public void setOwner(Object owner) { this.owner = owner; }
public void setOwner(Object owner) { this.owner = owner; }
54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/40effaf129249b2248e897d030f9998321d4020f/XMLDecoder.java/buggy/modules/beans/src/main/java/java/beans/XMLDecoder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 31309, 12, 921, 3410, 13, 288, 333, 18, 8443, 273, 3410, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 31309, 12, 921, 3410, 13, 288, 333, 18, 8443, 273, 3410, 31, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
PsiLocalVariable var) { final PsiExpression strippedExpression = ParenthesesUtils.stripParentheses(exp); if (strippedExpression == null) { return false; } if (!(strippedExpression instanceof PsiAssignmentExpression)) { return false; } final PsiAssignmentExpression assignment = (PsiAssignmentExpression)strippedExpression; final PsiJavaToken sign = assignment.getOperationSign(); final IElementType tokenType = sign.getTokenType(); if (!tokenType.equals(JavaTokenType.EQ)) { return false; } final PsiExpression lhs = assignment.getLExpression(); if (SideEffectChecker.mayHaveSideEffects(lhs)) { return false; } if (!isOffsetArrayAccess(lhs, var)) { return false; } final PsiExpression rhs = assignment.getRExpression(); if (rhs == null) { return false; } if (SideEffectChecker.mayHaveSideEffects(rhs)) { return false; } final PsiType lhsType = lhs.getType(); if (lhsType == null) { return false; } final PsiType rhsType = rhs.getType(); if (!lhsType.equals(rhsType)) { return false; } return isOffsetArrayAccess(rhs, var); }
PsiLocalVariable var) { final PsiExpression strippedExpression = ParenthesesUtils.stripParentheses(exp); if (strippedExpression == null) { return false; } if (!(strippedExpression instanceof PsiAssignmentExpression)) { return false; } final PsiAssignmentExpression assignment = (PsiAssignmentExpression)strippedExpression; final PsiJavaToken sign = assignment.getOperationSign(); final IElementType tokenType = sign.getTokenType(); if (!tokenType.equals(JavaTokenType.EQ)) { return false; } final PsiExpression lhs = assignment.getLExpression(); if (SideEffectChecker.mayHaveSideEffects(lhs)) { return false; } if (!isOffsetArrayAccess(lhs, var)) { return false; } final PsiExpression rhs = assignment.getRExpression(); if (rhs == null) { return false; } if (SideEffectChecker.mayHaveSideEffects(rhs)) { return false; } final PsiType lhsType = lhs.getType(); if (lhsType == null) { return false; } final PsiType rhsType = rhs.getType(); if (rhsType == null) { return false; } if (!lhsType.equals(rhsType)) { return false; } return isOffsetArrayAccess(rhs, var); }
private static boolean expressionIsArrayMove(PsiExpression exp, PsiLocalVariable var) { final PsiExpression strippedExpression = ParenthesesUtils.stripParentheses(exp); if (strippedExpression == null) { return false; } if (!(strippedExpression instanceof PsiAssignmentExpression)) { return false; } final PsiAssignmentExpression assignment = (PsiAssignmentExpression)strippedExpression; final PsiJavaToken sign = assignment.getOperationSign(); final IElementType tokenType = sign.getTokenType(); if (!tokenType.equals(JavaTokenType.EQ)) { return false; } final PsiExpression lhs = assignment.getLExpression(); if (SideEffectChecker.mayHaveSideEffects(lhs)) { return false; } if (!isOffsetArrayAccess(lhs, var)) { return false; } final PsiExpression rhs = assignment.getRExpression(); if (rhs == null) { return false; } if (SideEffectChecker.mayHaveSideEffects(rhs)) { return false; } final PsiType lhsType = lhs.getType(); if (lhsType == null) { return false; } final PsiType rhsType = rhs.getType(); if (!lhsType.equals(rhsType)) { return false; } return isOffsetArrayAccess(rhs, var); }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/e3503b4b6b4df6ff03ded1daf2f2a2d3c9436efd/ManualArrayCopyInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/performance/ManualArrayCopyInspection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 1250, 2652, 2520, 1076, 7607, 12, 52, 7722, 2300, 1329, 16, 4766, 1171, 453, 7722, 2042, 3092, 569, 13, 288, 1377, 727, 453, 7722, 2300, 13300, 2300, 273, 3639, 453, 10640, 281, 1989, 18, 6406, 17880, 281, 12, 2749, 1769, 1377, 309, 261, 6406, 1845, 2300, 422, 446, 13, 288, 3639, 327, 629, 31, 1377, 289, 1377, 309, 16051, 12, 6406, 1845, 2300, 1276, 453, 7722, 7729, 2300, 3719, 288, 3639, 327, 629, 31, 1377, 289, 1377, 727, 453, 7722, 7729, 2300, 6661, 273, 3639, 261, 52, 7722, 7729, 2300, 13, 6406, 1845, 2300, 31, 1377, 727, 453, 7722, 5852, 1345, 1573, 273, 6661, 18, 588, 2988, 2766, 5621, 1377, 727, 467, 17481, 22302, 273, 1573, 18, 588, 28675, 5621, 1377, 309, 16051, 2316, 559, 18, 14963, 12, 5852, 28675, 18, 27247, 3719, 288, 3639, 327, 629, 31, 1377, 289, 1377, 727, 453, 7722, 2300, 8499, 273, 6661, 18, 588, 48, 2300, 5621, 1377, 309, 261, 8895, 12477, 8847, 18, 24877, 17944, 8895, 29013, 12, 80, 4487, 3719, 288, 3639, 327, 629, 31, 1377, 289, 1377, 309, 16051, 291, 2335, 1076, 1862, 12, 80, 4487, 16, 569, 3719, 288, 3639, 327, 629, 31, 1377, 289, 1377, 727, 453, 7722, 2300, 7711, 273, 6661, 18, 588, 54, 2300, 5621, 1377, 309, 261, 86, 4487, 422, 446, 13, 288, 3639, 327, 629, 31, 1377, 289, 1377, 309, 261, 8895, 12477, 8847, 18, 24877, 17944, 8895, 29013, 12, 86, 4487, 3719, 288, 3639, 327, 629, 31, 1377, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 1250, 2652, 2520, 1076, 7607, 12, 52, 7722, 2300, 1329, 16, 4766, 1171, 453, 7722, 2042, 3092, 569, 13, 288, 1377, 727, 453, 7722, 2300, 13300, 2300, 273, 3639, 453, 10640, 281, 1989, 18, 6406, 17880, 281, 12, 2749, 1769, 1377, 309, 261, 6406, 1845, 2300, 422, 446, 13, 288, 3639, 327, 629, 31, 1377, 289, 1377, 309, 16051, 12, 6406, 1845, 2300, 1276, 453, 7722, 7729, 2300, 3719, 288, 3639, 327, 629, 31, 1377, 289, 1377, 727, 453, 7722, 7729, 2300, 6661, 273, 3639, 261, 52, 7722, 7729, 2300, 13, 6406, 1845, 2300, 31, 1377, 727, 453, 7722, 5852, 1345, 1573, 273, 6661, 18, 588, 2988, 2766, 5621, 1377, 727, 467, 17481, 22302, 273, 1573, 2 ]
bottomGradientSaturation, bottomGradientValue, 1.0f);
bottomGradientSaturation, bottomGradientValue, 0.6f);
private void setGradientColours() { HSV col = new HSV(colour); // top gradient value from HSV model. float topGradientValue = col.getValue(); // bottom gradient value from HSV model. float bottomGradientValue = col.getValue(); // top and bottom gradient saturation from HSV model. float topGradientSaturation, bottomGradientSaturation; // if colour greyscale(achromatic) don't touch saturation if (col.getSaturation() == 0) { topGradientSaturation = bottomGradientSaturation = col.getSaturation(); // A check to see what gives greatest increase, +0.3 or *1.3 // and set topGradientValue to that. topGradientValue = col.getValue()+0.3f; if (col.getValue()*1.3f > topGradientValue) topGradientValue = col.getValue()*1.3f; if (topGradientValue>1) topGradientValue = 1; // Set bottomGradientValue to 75% of colour value. bottomGradientValue = col.getValue()*0.75f; } else { // We're in a colour space. // Increase topGradientValue to 1.5 * value of colour face. topGradientValue = col.getValue()*1.5f; if (topGradientValue>1) topGradientValue = 1; topGradientSaturation = col.getSaturation()*0.3f; bottomGradientSaturation = col.getSaturation(); } gradientStartHSV = new HSV(col.getHue(), topGradientSaturation, topGradientValue, 1.0f); gradientStartRGB = gradientStartHSV.toColorA(); gradientEndHSV = new HSV(col.getHue(), bottomGradientSaturation, bottomGradientValue, 1.0f); gradientEndRGB = gradientEndHSV.toColorA(); }
55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/bd72dbfc5bee43ac7248328a84834b231b8e2d15/ColouredButtonUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/ColouredButtonUI.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 444, 15651, 914, 4390, 1435, 565, 288, 3639, 670, 23927, 645, 273, 394, 670, 23927, 12, 27408, 1769, 540, 368, 1760, 10292, 460, 628, 670, 23927, 938, 18, 2398, 1431, 1760, 15651, 620, 273, 645, 18, 24805, 5621, 5411, 368, 5469, 10292, 460, 628, 670, 23927, 938, 18, 2398, 1431, 5469, 15651, 620, 273, 645, 18, 24805, 5621, 5411, 368, 1760, 471, 5469, 10292, 22824, 628, 670, 23927, 938, 18, 2398, 1431, 1760, 15651, 15163, 872, 16, 5469, 15651, 15163, 872, 31, 13491, 368, 309, 15046, 5174, 1900, 1869, 12, 497, 27468, 13, 2727, 1404, 6920, 22824, 5411, 309, 261, 1293, 18, 588, 15163, 872, 1435, 422, 374, 13, 5411, 288, 7734, 1760, 15651, 15163, 872, 273, 5469, 15651, 15163, 872, 273, 5397, 645, 18, 588, 15163, 872, 5621, 7734, 368, 432, 866, 358, 2621, 4121, 14758, 18825, 395, 10929, 16, 397, 20, 18, 23, 578, 380, 21, 18, 23, 1171, 368, 471, 444, 1760, 15651, 620, 358, 716, 18, 7734, 1760, 15651, 620, 273, 645, 18, 24805, 1435, 15, 20, 18, 23, 74, 31, 7734, 309, 261, 1293, 18, 24805, 1435, 14, 21, 18, 23, 74, 405, 1760, 15651, 620, 13, 10792, 1760, 15651, 620, 273, 645, 18, 24805, 1435, 14, 21, 18, 23, 74, 31, 7734, 309, 261, 3669, 15651, 620, 34, 21, 13, 1760, 15651, 620, 273, 404, 31, 7734, 368, 1000, 5469, 15651, 620, 358, 18821, 9, 434, 15046, 460, 18, 7734, 5469, 15651, 620, 273, 645, 18, 24805, 1435, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 444, 15651, 914, 4390, 1435, 565, 288, 3639, 670, 23927, 645, 273, 394, 670, 23927, 12, 27408, 1769, 540, 368, 1760, 10292, 460, 628, 670, 23927, 938, 18, 2398, 1431, 1760, 15651, 620, 273, 645, 18, 24805, 5621, 5411, 368, 5469, 10292, 460, 628, 670, 23927, 938, 18, 2398, 1431, 5469, 15651, 620, 273, 645, 18, 24805, 5621, 5411, 368, 1760, 471, 5469, 10292, 22824, 628, 670, 23927, 938, 18, 2398, 1431, 1760, 15651, 15163, 872, 16, 5469, 15651, 15163, 872, 31, 13491, 368, 309, 15046, 5174, 1900, 1869, 12, 497, 27468, 13, 2727, 1404, 6920, 22824, 5411, 309, 261, 1293, 18, 588, 15163, 872, 1435, 422, 374, 13, 5411, 288, 7734, 1760, 15651, 15163, 872, 2 ]
int nr = getNrSubDirectories(id_directory); long retval[] = new long[nr]; String sql = "SELECT ID_DIRECTORY FROM R_DIRECTORY WHERE ID_DIRECTORY_PARENT = " + id_directory+" ORDER BY DIRECTORY_NAME"; ResultSet rs = database.openQuery(sql); Row r = database.getRow(rs); int i = 0; while (r != null) { retval[i] = r.getValue(0).getInteger(); r = database.getRow(rs); i++; } database.closeQuery(rs); return retval;
return getIDs("SELECT ID_DIRECTORY FROM R_DIRECTORY WHERE ID_DIRECTORY_PARENT = " + id_directory+" ORDER BY DIRECTORY_NAME");
public synchronized long[] getSubDirectoryIDs(long id_directory) throws KettleDatabaseException { int nr = getNrSubDirectories(id_directory); long retval[] = new long[nr]; String sql = "SELECT ID_DIRECTORY FROM R_DIRECTORY WHERE ID_DIRECTORY_PARENT = " + id_directory+" ORDER BY DIRECTORY_NAME"; ResultSet rs = database.openQuery(sql); Row r = database.getRow(rs); int i = 0; while (r != null) { retval[i] = r.getValue(0).getInteger(); r = database.getRow(rs); i++; } database.closeQuery(rs); return retval; }
58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/a0a5ddc981c0d2e800a05eae092f13e17ea8ef4c/Repository.java/clean/kettle/src/be/ibridge/kettle/repository/Repository.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3852, 1525, 8526, 7040, 2853, 5103, 12, 5748, 612, 67, 5149, 13, 1216, 1475, 278, 5929, 4254, 503, 202, 95, 202, 202, 474, 9884, 273, 11069, 86, 1676, 13071, 12, 350, 67, 5149, 1769, 202, 202, 5748, 5221, 8526, 273, 394, 1525, 63, 11611, 15533, 202, 202, 780, 1847, 273, 315, 4803, 1599, 67, 17229, 4571, 534, 67, 17229, 4852, 1599, 67, 17229, 67, 14943, 273, 315, 397, 612, 67, 5149, 9078, 10205, 6953, 5707, 67, 1985, 14432, 202, 202, 13198, 3597, 273, 2063, 18, 3190, 1138, 12, 4669, 1769, 202, 202, 1999, 436, 273, 2063, 18, 588, 1999, 12, 5453, 1769, 202, 202, 474, 277, 273, 374, 31, 202, 202, 17523, 261, 86, 480, 446, 13, 202, 202, 95, 1082, 202, 18341, 63, 77, 65, 273, 436, 18, 24805, 12, 20, 2934, 588, 4522, 5621, 1082, 202, 86, 273, 2063, 18, 588, 1999, 12, 5453, 1769, 1082, 202, 77, 9904, 31, 202, 202, 97, 202, 202, 6231, 18, 4412, 1138, 12, 5453, 1769, 202, 202, 2463, 5221, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3852, 1525, 8526, 7040, 2853, 5103, 12, 5748, 612, 67, 5149, 13, 1216, 1475, 278, 5929, 4254, 503, 202, 95, 202, 202, 474, 9884, 273, 11069, 86, 1676, 13071, 12, 350, 67, 5149, 1769, 202, 202, 5748, 5221, 8526, 273, 394, 1525, 63, 11611, 15533, 202, 202, 780, 1847, 273, 315, 4803, 1599, 67, 17229, 4571, 534, 67, 17229, 4852, 1599, 67, 17229, 67, 14943, 273, 315, 397, 612, 67, 5149, 9078, 10205, 6953, 5707, 67, 1985, 14432, 202, 202, 13198, 3597, 273, 2063, 18, 3190, 1138, 12, 4669, 1769, 202, 202, 1999, 436, 273, 2063, 18, 588, 1999, 12, 5453, 1769, 202, 202, 474, 277, 273, 374, 31, 202, 202, 17523, 261, 86, 480, 446, 2 ]
public static void setCachingEnabled(boolean cachingEnabled) { if (isCachingEnabled && !cachingEnabled) { JavaMembers.classTable = new Hashtable(); } isCachingEnabled = cachingEnabled; FunctionObject.setCachingEnabled(cachingEnabled);
public static void setCachingEnabled(boolean cachingEnabled) {
public static void setCachingEnabled(boolean cachingEnabled) { if (isCachingEnabled && !cachingEnabled) { // Caching is being turned off. Empty caches. JavaMembers.classTable = new Hashtable(); } isCachingEnabled = cachingEnabled; FunctionObject.setCachingEnabled(cachingEnabled); }
19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/c8d5c89bfbb0acf3fb9e6af971064dcacf1565d1/Context.java/clean/src/org/mozilla/javascript/Context.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 444, 17712, 1526, 12, 6494, 11393, 1526, 13, 288, 3639, 309, 261, 291, 17712, 1526, 597, 401, 17703, 310, 1526, 13, 288, 5411, 368, 23782, 310, 353, 3832, 21826, 3397, 18, 8953, 12535, 18, 5411, 5110, 6918, 18, 1106, 1388, 273, 394, 18559, 5621, 3639, 289, 3639, 353, 17712, 1526, 273, 11393, 1526, 31, 3639, 4284, 921, 18, 542, 17712, 1526, 12, 17703, 310, 1526, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 444, 17712, 1526, 12, 6494, 11393, 1526, 13, 288, 3639, 309, 261, 291, 17712, 1526, 597, 401, 17703, 310, 1526, 13, 288, 5411, 368, 23782, 310, 353, 3832, 21826, 3397, 18, 8953, 12535, 18, 5411, 5110, 6918, 18, 1106, 1388, 273, 394, 18559, 5621, 3639, 289, 3639, 353, 17712, 1526, 273, 11393, 1526, 31, 3639, 4284, 921, 18, 542, 17712, 1526, 12, 17703, 310, 1526, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
SearchUpdateReplyFoundJob reply = new SearchUpdateReplyFoundJob(_context, router, _state, _facade, this); SendTunnelMessageJob j = new SendTunnelMessageJob(_context, msg, outTunnelId, router.getIdentity().getHash(),
SearchUpdateReplyFoundJob reply = new SearchUpdateReplyFoundJob(getContext(), router, _state, _facade, this); SendTunnelMessageJob j = new SendTunnelMessageJob(getContext(), msg, outTunnelId, router.getIdentity().getHash(),
protected void sendLeaseSearch(RouterInfo router) { TunnelId inTunnelId = getInboundTunnelId(); if (inTunnelId == null) { _log.error("No tunnels to get search replies through! wtf!"); _context.jobQueue().addJob(new FailedJob(router)); return; } TunnelInfo inTunnel = _context.tunnelManager().getTunnelInfo(inTunnelId); RouterInfo inGateway = _context.netDb().lookupRouterInfoLocally(inTunnel.getThisHop()); if (inGateway == null) { _log.error("We can't find the gateway to our inbound tunnel?! wtf"); _context.jobQueue().addJob(new FailedJob(router)); return; } long expiration = _context.clock().now() + PER_PEER_TIMEOUT; // getTimeoutMs(); DatabaseLookupMessage msg = buildMessage(inTunnelId, inGateway, expiration); TunnelId outTunnelId = getOutboundTunnelId(); if (outTunnelId == null) { _log.error("No tunnels to send search out through! wtf!"); _context.jobQueue().addJob(new FailedJob(router)); return; } if (_log.shouldLog(Log.DEBUG)) _log.debug(getJobId() + ": Sending leaseSet search to " + router.getIdentity().getHash().toBase64() + " for " + msg.getSearchKey().toBase64() + " w/ replies through [" + msg.getFrom().getIdentity().getHash().toBase64() + "] via tunnel [" + msg.getReplyTunnel() + "]"); SearchMessageSelector sel = new SearchMessageSelector(_context, router, _expiration, _state); long timeoutMs = PER_PEER_TIMEOUT; // getTimeoutMs(); SearchUpdateReplyFoundJob reply = new SearchUpdateReplyFoundJob(_context, router, _state, _facade, this); SendTunnelMessageJob j = new SendTunnelMessageJob(_context, msg, outTunnelId, router.getIdentity().getHash(), null, null, reply, new FailedJob(router), sel, timeoutMs, SEARCH_PRIORITY); _context.jobQueue().addJob(j); }
27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/e737e5c9507ed0d463dc9e45a8f63657f466b177/SearchJob.java/buggy/router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1366, 17746, 2979, 12, 8259, 966, 4633, 13, 288, 3639, 399, 8564, 548, 316, 20329, 548, 273, 7854, 3653, 20329, 548, 5621, 540, 309, 261, 267, 20329, 548, 422, 446, 13, 288, 5411, 389, 1330, 18, 1636, 2932, 2279, 14825, 87, 358, 336, 1623, 22009, 3059, 5, 225, 341, 6632, 4442, 1769, 5411, 389, 2472, 18, 4688, 3183, 7675, 1289, 2278, 12, 2704, 11175, 2278, 12, 10717, 10019, 5411, 327, 31, 3639, 289, 202, 3639, 399, 8564, 966, 316, 20329, 273, 389, 2472, 18, 19878, 1318, 7675, 588, 20329, 966, 12, 267, 20329, 548, 1769, 3639, 9703, 966, 316, 5197, 273, 389, 2472, 18, 2758, 4331, 7675, 8664, 8259, 966, 1333, 1230, 12, 267, 20329, 18, 588, 2503, 27461, 10663, 3639, 309, 261, 267, 5197, 422, 446, 13, 288, 5411, 389, 1330, 18, 1636, 2932, 3218, 848, 1404, 1104, 326, 6878, 358, 3134, 13357, 14825, 35, 5, 341, 6632, 8863, 5411, 389, 2472, 18, 4688, 3183, 7675, 1289, 2278, 12, 2704, 11175, 2278, 12, 10717, 10019, 5411, 327, 31, 3639, 289, 202, 3639, 1525, 7686, 273, 389, 2472, 18, 18517, 7675, 3338, 1435, 397, 10950, 67, 1423, 654, 67, 9503, 31, 368, 29301, 6947, 5621, 3639, 5130, 6609, 1079, 1234, 273, 1361, 1079, 12, 267, 20329, 548, 16, 316, 5197, 16, 7686, 1769, 1082, 3639, 399, 8564, 548, 596, 20329, 548, 273, 336, 17873, 20329, 548, 5621, 3639, 309, 261, 659, 20329, 548, 422, 446, 13, 288, 5411, 389, 1330, 18, 1636, 2932, 2279, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1366, 17746, 2979, 12, 8259, 966, 4633, 13, 288, 3639, 399, 8564, 548, 316, 20329, 548, 273, 7854, 3653, 20329, 548, 5621, 540, 309, 261, 267, 20329, 548, 422, 446, 13, 288, 5411, 389, 1330, 18, 1636, 2932, 2279, 14825, 87, 358, 336, 1623, 22009, 3059, 5, 225, 341, 6632, 4442, 1769, 5411, 389, 2472, 18, 4688, 3183, 7675, 1289, 2278, 12, 2704, 11175, 2278, 12, 10717, 10019, 5411, 327, 31, 3639, 289, 202, 3639, 399, 8564, 966, 316, 20329, 273, 389, 2472, 18, 19878, 1318, 7675, 588, 20329, 966, 12, 267, 20329, 548, 1769, 3639, 9703, 966, 316, 5197, 273, 389, 2472, 18, 2758, 4331, 7675, 8664, 8259, 966, 1333, 1230, 12, 267, 20329, 18, 2 ]
} catch (Exception e) {
} catch (Exception e) {
public Object clone() { AtomContainer o = null; ElectronContainer ec = null; ElectronContainer newEC = null; Atom[] natoms; Atom[] newAtoms; try { o = (AtomContainer)super.clone(); } catch (Exception e) { e.printStackTrace(System.err); } o.removeAllElements(); for (int f = 0; f < getAtomCount(); f++) { o.addAtom((Atom) getAtomAt(f).clone()); } for (int f = 0; f < getElectronContainerCount(); f++) { ec = this.getElectronContainerAt(f); newEC = new ElectronContainer(); if (ec instanceof Bond) { Bond bond = (Bond)ec; newEC = new Bond(); natoms = bond.getAtoms(); newAtoms = new Atom[natoms.length]; for (int g = 0; g < natoms.length; g++) { try { newAtoms[g] = o.getAtomAt(getAtomNumber(natoms[g])); } catch (Exception exc) { System.out.println("natoms[g]: " + natoms[g]); exc.printStackTrace(); } } ((Bond)newEC).setAtoms(newAtoms); ((Bond)newEC).setOrder(bond.getOrder()); } else if (ec instanceof LonePair) { Atom a = ((LonePair)ec).getAtom(); } else { newEC = (ElectronContainer)ec.clone(); } o.addElectronContainer(newEC); } return o; }
45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/c8b7aeb7b034f27ff4ba3673bd77a90f5291d11e/AtomContainer.java/buggy/src/org/openscience/cdk/AtomContainer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 3236, 1435, 202, 95, 202, 202, 3641, 2170, 320, 273, 446, 31, 202, 202, 28621, 2170, 6557, 273, 446, 31, 202, 202, 28621, 2170, 394, 7228, 273, 446, 31, 202, 202, 3641, 8526, 290, 14937, 31, 202, 202, 3641, 8526, 394, 14280, 31, 202, 202, 698, 202, 202, 95, 1082, 202, 83, 273, 261, 3641, 2170, 13, 9565, 18, 14056, 5621, 202, 202, 97, 202, 202, 14683, 261, 503, 425, 13, 202, 202, 95, 1082, 202, 73, 18, 1188, 6332, 12, 3163, 18, 370, 1769, 202, 202, 97, 202, 202, 83, 18, 4479, 1595, 3471, 5621, 202, 202, 1884, 261, 474, 284, 273, 374, 31, 284, 411, 29593, 5621, 284, 27245, 202, 202, 95, 1082, 202, 83, 18, 1289, 3641, 12443, 3641, 13, 12358, 861, 12, 74, 2934, 14056, 10663, 202, 202, 97, 202, 202, 1884, 261, 474, 284, 273, 374, 31, 284, 411, 4774, 1582, 1949, 2170, 1380, 5621, 284, 27245, 288, 1082, 202, 557, 273, 333, 18, 588, 28621, 2170, 861, 12, 74, 1769, 1082, 202, 2704, 7228, 273, 394, 512, 1582, 1949, 2170, 5621, 1082, 202, 430, 261, 557, 1276, 605, 1434, 13, 288, 9506, 202, 9807, 8427, 273, 261, 9807, 13, 557, 31, 9506, 202, 2704, 7228, 273, 394, 605, 1434, 5621, 9506, 202, 82, 14937, 273, 8427, 18, 588, 14280, 5621, 9506, 202, 2704, 14280, 273, 394, 7149, 63, 82, 14937, 18, 2469, 15533, 9506, 202, 1884, 261, 474, 314, 273, 374, 31, 314, 411, 290, 14937, 18, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 3236, 1435, 202, 95, 202, 202, 3641, 2170, 320, 273, 446, 31, 202, 202, 28621, 2170, 6557, 273, 446, 31, 202, 202, 28621, 2170, 394, 7228, 273, 446, 31, 202, 202, 3641, 8526, 290, 14937, 31, 202, 202, 3641, 8526, 394, 14280, 31, 202, 202, 698, 202, 202, 95, 1082, 202, 83, 273, 261, 3641, 2170, 13, 9565, 18, 14056, 5621, 202, 202, 97, 202, 202, 14683, 261, 503, 425, 13, 202, 202, 95, 1082, 202, 73, 18, 1188, 6332, 12, 3163, 18, 370, 1769, 202, 202, 97, 202, 202, 83, 18, 4479, 1595, 3471, 5621, 202, 202, 1884, 261, 474, 284, 273, 374, 31, 284, 411, 29593, 5621, 284, 27245, 202, 202, 95, 1082, 2 ]
HashMap rendererOptions = new HashMap();
Map rendererOptions = new java.util.HashMap();
protected void runTest(Node testcase, Node test) { String id = test.getAttributes().getNamedItem("id").getNodeValue(); Node result = locateResult(testcase, id); boolean pass = false; if (result != null) { String agreement = result.getAttributes().getNamedItem("agreement").getNodeValue(); pass = agreement.equals("full"); } if (pass && failOnly) { return; } String xml = test.getAttributes().getNamedItem("xml").getNodeValue(); Node xslNode = test.getAttributes().getNamedItem("xsl"); String xsl = null; if (xslNode != null) { xsl = xslNode.getNodeValue(); } getLogger().debug("converting xml:" + xml + " and xsl:" + xsl + " to area tree"); try { File xmlFile = new File(baseDir + "/" + xml); String baseURL = null; try { baseURL = xmlFile.getParentFile().toURL().toExternalForm(); } catch (Exception e) { getLogger().error("Error setting base directory"); } InputHandler inputHandler = null; if (xsl == null) { inputHandler = new FOInputHandler(xmlFile); } else { inputHandler = new XSLTInputHandler(xmlFile, new File(baseDir + "/" + xsl)); } XMLReader parser = inputHandler.getParser(); setParserFeatures(parser); Driver driver = new Driver(); setupLogger(driver, "fop"); driver.initialize(); FOUserAgent userAgent = new FOUserAgent(); userAgent.setBaseURL(baseURL); driver.setUserAgent(userAgent); if (outputPDF) { driver.setRenderer(Driver.RENDER_PDF); } else { driver.setRenderer(Driver.RENDER_XML); } HashMap rendererOptions = new HashMap(); rendererOptions.put("fineDetail", new Boolean(false)); rendererOptions.put("consistentOutput", new Boolean(true)); driver.getRenderer().setOptions(rendererOptions); driver.getRenderer().setProducer("Testsuite Converter"); String outname = xmlFile.getName(); if (outname.endsWith(".xml")) { outname = outname.substring(0, outname.length() - 4); } driver.setOutputStream(new BufferedOutputStream( new FileOutputStream(new File(destdir, outname + (outputPDF ? ".pdf" : ".at.xml"))))); getLogger().debug("ddir:" + destdir + " on:" + outname + ".pdf"); driver.render(parser, inputHandler.getInputSource()); // check difference if (compare != null) { File f1 = new File(destdir, outname + ".at.xml"); File f2 = new File(compare, outname + ".at.xml"); if (!compareFiles(f1, f2)) { differ.put(outname + ".at.xml", new Boolean(pass)); } } } catch (Exception e) { getLogger().error("Error while running tests", e); } }
5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/b0e161758e010855acb9421e2b5150239e1d3d60/TestConverter.java/clean/src/org/apache/fop/tools/TestConverter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1086, 4709, 12, 907, 1842, 3593, 16, 2029, 1842, 13, 288, 3639, 514, 612, 273, 1842, 18, 588, 2498, 7675, 588, 7604, 1180, 2932, 350, 20387, 588, 907, 620, 5621, 3639, 2029, 563, 273, 10627, 1253, 12, 3813, 3593, 16, 612, 1769, 3639, 1250, 1342, 273, 629, 31, 3639, 309, 261, 2088, 480, 446, 13, 288, 5411, 514, 19602, 273, 7734, 563, 18, 588, 2498, 7675, 588, 7604, 1180, 2932, 31135, 20387, 588, 907, 620, 5621, 5411, 1342, 273, 19602, 18, 14963, 2932, 2854, 8863, 3639, 289, 3639, 309, 261, 5466, 597, 2321, 3386, 13, 288, 5411, 327, 31, 3639, 289, 3639, 514, 2025, 273, 1842, 18, 588, 2498, 7675, 588, 7604, 1180, 2932, 2902, 20387, 588, 907, 620, 5621, 3639, 2029, 20791, 907, 273, 1842, 18, 588, 2498, 7675, 588, 7604, 1180, 2932, 30903, 8863, 3639, 514, 20791, 273, 446, 31, 3639, 309, 261, 30903, 907, 480, 446, 13, 288, 5411, 20791, 273, 20791, 907, 18, 588, 907, 620, 5621, 3639, 289, 3639, 7156, 7675, 4148, 2932, 6283, 310, 2025, 2773, 397, 2025, 397, 315, 471, 20791, 2773, 397, 5375, 20791, 397, 315, 358, 5091, 2151, 8863, 3639, 775, 288, 5411, 1387, 2025, 812, 273, 394, 1387, 12, 1969, 1621, 397, 4016, 397, 2025, 1769, 5411, 514, 17480, 273, 446, 31, 5411, 775, 288, 7734, 17480, 273, 2025, 812, 18, 588, 3054, 812, 7675, 869, 1785, 7675, 869, 6841, 1204, 5621, 5411, 289, 1044, 261, 503, 425, 13, 288, 7734, 7156, 7675, 1636, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1086, 4709, 12, 907, 1842, 3593, 16, 2029, 1842, 13, 288, 3639, 514, 612, 273, 1842, 18, 588, 2498, 7675, 588, 7604, 1180, 2932, 350, 20387, 588, 907, 620, 5621, 3639, 2029, 563, 273, 10627, 1253, 12, 3813, 3593, 16, 612, 1769, 3639, 1250, 1342, 273, 629, 31, 3639, 309, 261, 2088, 480, 446, 13, 288, 5411, 514, 19602, 273, 7734, 563, 18, 588, 2498, 7675, 588, 7604, 1180, 2932, 31135, 20387, 588, 907, 620, 5621, 5411, 1342, 273, 19602, 18, 14963, 2932, 2854, 8863, 3639, 289, 3639, 309, 261, 5466, 597, 2321, 3386, 13, 288, 5411, 327, 31, 3639, 289, 3639, 514, 2025, 273, 1842, 18, 588, 2498, 7675, 588, 7604, 1180, 2932, 2902, 20387, 2 ]
byte opcode[] = { datagram[0], datagram[1], datagram[2], datagram[3] };
byte opcode[] = { datagram[3], datagram[2], datagram[1], datagram[0] };
public static int getFileIndex(byte [] datagram) { byte opcode[] = { datagram[0], datagram[1], datagram[2], datagram[3] }; ByteBuffer bb = ByteBuffer.wrap(opcode); return bb.getInt(); }
8424 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8424/b3261fde8ec19f39d82e427af785b24956f9bcd6/UDPDatagramHeader.java/clean/src/parser/UDPDatagramHeader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 509, 6034, 1016, 12, 7229, 5378, 1150, 17049, 13, 565, 288, 202, 7229, 11396, 8526, 273, 288, 1150, 17049, 63, 20, 6487, 1150, 17049, 63, 21, 6487, 1150, 17049, 63, 22, 6487, 1150, 17049, 63, 23, 65, 289, 31, 202, 12242, 7129, 273, 7400, 18, 4113, 12, 556, 710, 1769, 202, 2463, 7129, 18, 588, 1702, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 509, 6034, 1016, 12, 7229, 5378, 1150, 17049, 13, 565, 288, 202, 7229, 11396, 8526, 273, 288, 1150, 17049, 63, 20, 6487, 1150, 17049, 63, 21, 6487, 1150, 17049, 63, 22, 6487, 1150, 17049, 63, 23, 65, 289, 31, 202, 12242, 7129, 273, 7400, 18, 4113, 12, 556, 710, 1769, 202, 2463, 7129, 18, 588, 1702, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
String primaryId = ViewFactory.extractPrimaryId(id); IViewDescriptor desc = reg.find(primaryId);
IViewDescriptor desc = reg.find(ref.getId());
private float getFastViewWidthRatio(String id) { ViewLayoutRec rec = getViewLayoutRec(id, true); if (rec.fastViewWidthRatio == IPageLayout.INVALID_RATIO) { IViewRegistry reg = WorkbenchPlugin.getDefault().getViewRegistry(); String primaryId = ViewFactory.extractPrimaryId(id); IViewDescriptor desc = reg.find(primaryId); rec.fastViewWidthRatio = (desc != null ? desc.getFastViewWidthRatio() : IPageLayout.DEFAULT_FASTVIEW_RATIO); } return rec.fastViewWidthRatio; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/37d97c7024313a102e062c0c7d5ba067b0a2fcb8/Perspective.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1431, 2812, 689, 1767, 2384, 8541, 12, 780, 612, 13, 288, 3639, 4441, 3744, 5650, 1950, 273, 8893, 3744, 5650, 12, 350, 16, 638, 1769, 3639, 309, 261, 3927, 18, 8076, 1767, 2384, 8541, 422, 467, 1964, 3744, 18, 9347, 67, 54, 789, 4294, 13, 288, 5411, 467, 1767, 4243, 960, 273, 4147, 22144, 3773, 18, 588, 1868, 7675, 588, 1767, 4243, 5621, 5411, 514, 3354, 548, 273, 4441, 1733, 18, 8004, 6793, 548, 12, 350, 1769, 5411, 467, 1767, 3187, 3044, 273, 960, 18, 4720, 12, 8258, 548, 1769, 5411, 1950, 18, 8076, 1767, 2384, 8541, 273, 1171, 261, 5569, 480, 446, 5397, 692, 3044, 18, 588, 12305, 1767, 2384, 8541, 1435, 10792, 294, 467, 1964, 3744, 18, 5280, 67, 2046, 882, 12145, 67, 54, 789, 4294, 1769, 3639, 289, 3639, 327, 1950, 18, 8076, 1767, 2384, 8541, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1431, 2812, 689, 1767, 2384, 8541, 12, 780, 612, 13, 288, 3639, 4441, 3744, 5650, 1950, 273, 8893, 3744, 5650, 12, 350, 16, 638, 1769, 3639, 309, 261, 3927, 18, 8076, 1767, 2384, 8541, 422, 467, 1964, 3744, 18, 9347, 67, 54, 789, 4294, 13, 288, 5411, 467, 1767, 4243, 960, 273, 4147, 22144, 3773, 18, 588, 1868, 7675, 588, 1767, 4243, 5621, 5411, 514, 3354, 548, 273, 4441, 1733, 18, 8004, 6793, 548, 12, 350, 1769, 5411, 467, 1767, 3187, 3044, 273, 960, 18, 4720, 12, 8258, 548, 1769, 5411, 1950, 18, 8076, 1767, 2384, 8541, 273, 1171, 261, 5569, 480, 446, 5397, 692, 3044, 18, 588, 12305, 1767, 2384, 8541, 1435, 10792, 294, 467, 1964, 2 ]
return sds.isLong();
return ( qualifiers & IS_LONG) != 0;
public boolean isLong() { return sds.isLong(); }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/c885f752dad9daa1ee03dd2a57f8a759722c0252/CBasicType.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBasicType.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 3708, 1435, 288, 202, 202, 2463, 272, 2377, 18, 291, 3708, 5621, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 3708, 1435, 288, 202, 202, 2463, 272, 2377, 18, 291, 3708, 5621, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
public CellHandle getCellHandleCopy( CellHandle cellHandle ) throws SemanticException { if ( cellHandle == null ) { return null; } CellHandle cell = cellHandle.getElementFactory( ).newCell( ); Iterator iter = cellHandle.getPropertyIterator( ); while ( iter.hasNext( ) ) { PropertyHandle handle = (PropertyHandle) iter.next( ); String key = handle.getDefn( ).getName( ); if ( handle.isLocal( ) && ( !( CellHandle.COL_SPAN_PROP.equals( key ) || CellHandle.ROW_SPAN_PROP.equals( key ) ) ) ) { //cell.setProperty( key, cellHandle.getProperty( key ) ); cellHandle.copyPropertyTo( key, cell ); } } return cell; }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/f20dffa9abb940a955b0a18cf6914d4f48216b6c/TableHandleAdapter.java/clean/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/schematic/TableHandleAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8614, 3259, 16458, 3259, 2951, 12, 8614, 3259, 2484, 3259, 262, 1082, 202, 15069, 24747, 503, 202, 95, 202, 202, 430, 261, 2484, 3259, 422, 446, 262, 202, 202, 95, 1082, 202, 2463, 446, 31, 202, 202, 97, 202, 202, 4020, 3259, 2484, 273, 2484, 3259, 18, 21336, 1733, 12, 262, 18, 2704, 4020, 12, 11272, 202, 202, 3198, 1400, 273, 2484, 3259, 18, 588, 1396, 3198, 12, 11272, 202, 202, 17523, 261, 1400, 18, 5332, 2134, 12, 262, 262, 202, 202, 95, 1082, 202, 1396, 3259, 1640, 273, 261, 1396, 3259, 13, 1400, 18, 4285, 12, 11272, 1082, 202, 780, 498, 273, 1640, 18, 588, 3262, 82, 12, 262, 18, 17994, 12, 11272, 1082, 202, 430, 261, 1640, 18, 291, 2042, 12, 262, 6862, 202, 10, 10, 261, 401, 12, 8614, 3259, 18, 4935, 67, 3118, 1258, 67, 15811, 18, 14963, 12, 498, 262, 747, 8614, 3259, 18, 11226, 67, 3118, 1258, 67, 15811, 18, 14963, 12, 498, 262, 262, 262, 262, 1082, 202, 95, 9506, 202, 759, 3855, 18, 542, 1396, 12, 498, 16, 2484, 3259, 18, 588, 1396, 12, 498, 262, 11272, 9506, 202, 3855, 3259, 18, 3530, 1396, 774, 12, 498, 16, 2484, 11272, 1082, 202, 97, 202, 202, 97, 202, 202, 2463, 2484, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 225, 202, 482, 8614, 3259, 16458, 3259, 2951, 12, 8614, 3259, 2484, 3259, 262, 1082, 202, 15069, 24747, 503, 202, 95, 202, 202, 430, 261, 2484, 3259, 422, 446, 262, 202, 202, 95, 1082, 202, 2463, 446, 31, 202, 202, 97, 202, 202, 4020, 3259, 2484, 273, 2484, 3259, 18, 21336, 1733, 12, 262, 18, 2704, 4020, 12, 11272, 202, 202, 3198, 1400, 273, 2484, 3259, 18, 588, 1396, 3198, 12, 11272, 202, 202, 17523, 261, 1400, 18, 5332, 2134, 12, 262, 262, 202, 202, 95, 1082, 202, 1396, 3259, 1640, 273, 261, 1396, 3259, 13, 1400, 18, 4285, 12, 11272, 1082, 202, 780, 498, 273, 1640, 18, 588, 3262, 82, 12, 262, 18, 17994, 12, 11272, 1082, 202, 2 ]
return securityError; }
return securityError; }
public RubyClass getSecurityError() { return securityError; }
52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyExceptions.java/clean/org/jruby/runtime/RubyExceptions.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 19817, 797, 19288, 668, 1435, 288, 202, 202, 2463, 4373, 668, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 19817, 797, 19288, 668, 1435, 288, 202, 202, 2463, 4373, 668, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
closureEnv = new Declaration("closureEnv", parentFrame.getType()); scope.addVariable(closureEnv); closureEnv.setArtificial(true);
LambdaExp caller = getInlineOnly() ? getCaller() : null; if (parent == caller) closureEnv = parentFrame; else if (caller != null && parent == caller.outerLambdaNotInline()) closureEnv = caller.closureEnv; else { closureEnv = new Declaration("closureEnv", parentFrame.getType()); scope.addVariable(closureEnv); closureEnv.setArtificial(true); }
public Declaration declareClosureEnv() { if (closureEnv == null && (getImportsLexVars() || getNeedsStaticLink())) { LambdaExp parent = outerLambda(); if (parent instanceof ObjectExp) parent = parent.outerLambda(); Declaration parentFrame = parent.heapFrame != null ? parent.heapFrame : parent.closureEnv; if (getInlineOnly()) { closureEnv = parentFrame; } else if (parent.heapFrameLambda == this || isClassMethod()) closureEnv = thisVariable; else if (! isClassGenerated()) { if (parent.heapFrame == null) closureEnv = null; else if (! primMethod.getStaticFlag()) closureEnv = declareThis(primMethod.getDeclaringClass()); else { Type envType = primMethod.getParameterTypes()[0]; closureEnv = new Declaration("closureEnv", envType); scope.addVariableAfter(null, closureEnv); closureEnv.setArtificial(true); closureEnv.setParameter(true); } } else if (parent.heapFrame == null && ! parent.getNeedsStaticLink()) closureEnv = null; else { closureEnv = new Declaration("closureEnv", parentFrame.getType()); scope.addVariable(closureEnv); closureEnv.setArtificial(true); } } return closureEnv; }
41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/5da7935846cf88154d29cb8930e3b2b29c5387f5/LambdaExp.java/buggy/gnu/expr/LambdaExp.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 16110, 4302, 14196, 10573, 3491, 1435, 225, 288, 565, 309, 261, 20823, 3491, 422, 446, 597, 261, 588, 13347, 14756, 5555, 1435, 747, 336, 26419, 5788, 2098, 1435, 3719, 1377, 288, 202, 12025, 2966, 982, 273, 6390, 12025, 5621, 202, 430, 261, 2938, 1276, 1033, 2966, 13, 202, 225, 982, 273, 982, 18, 14068, 12025, 5621, 202, 6094, 982, 3219, 273, 982, 18, 25506, 3219, 480, 446, 692, 225, 982, 18, 25506, 3219, 202, 225, 294, 982, 18, 20823, 3491, 31, 202, 430, 261, 588, 10870, 3386, 10756, 202, 225, 288, 202, 565, 7213, 3491, 273, 982, 3219, 31, 202, 225, 289, 202, 12107, 309, 261, 2938, 18, 25506, 3219, 12025, 422, 333, 747, 25975, 1305, 10756, 202, 225, 7213, 3491, 273, 333, 3092, 31, 202, 12107, 309, 16051, 25975, 7823, 10756, 202, 225, 288, 202, 565, 309, 261, 2938, 18, 25506, 3219, 422, 446, 13, 202, 1377, 7213, 3491, 273, 446, 31, 202, 565, 469, 309, 16051, 15610, 1305, 18, 588, 5788, 4678, 10756, 202, 1377, 7213, 3491, 273, 14196, 2503, 12, 30438, 1305, 18, 588, 3456, 14682, 10663, 202, 565, 469, 202, 1377, 288, 202, 202, 559, 1550, 559, 273, 15610, 1305, 18, 588, 1662, 2016, 1435, 63, 20, 15533, 202, 202, 20823, 3491, 273, 394, 16110, 4302, 2932, 20823, 3491, 3113, 1550, 559, 1769, 202, 202, 4887, 18, 1289, 3092, 4436, 12, 2011, 16, 7213, 3491, 1769, 202, 202, 20823, 3491, 18, 542, 4411, 1507, 649, 12, 3767, 1769, 202, 202, 20823, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 16110, 4302, 14196, 10573, 3491, 1435, 225, 288, 565, 309, 261, 20823, 3491, 422, 446, 597, 261, 588, 13347, 14756, 5555, 1435, 747, 336, 26419, 5788, 2098, 1435, 3719, 1377, 288, 202, 12025, 2966, 982, 273, 6390, 12025, 5621, 202, 430, 261, 2938, 1276, 1033, 2966, 13, 202, 225, 982, 273, 982, 18, 14068, 12025, 5621, 202, 6094, 982, 3219, 273, 982, 18, 25506, 3219, 480, 446, 692, 225, 982, 18, 25506, 3219, 202, 225, 294, 982, 18, 20823, 3491, 31, 202, 430, 261, 588, 10870, 3386, 10756, 202, 225, 288, 202, 565, 7213, 3491, 273, 982, 3219, 31, 202, 225, 289, 202, 12107, 309, 261, 2938, 18, 25506, 3219, 12025, 422, 333, 747, 25975, 1305, 10756, 2 ]
public void append(long i) { long[] lastBuffer;
public void append(long[] long_array) { if (long_array == null) { throw new NullPointerException(); } int lastBufferIndex; long[] lastBuffer;
public void append(long i) { long[] lastBuffer; if (bufferArrayList.size() == 0) { lastBuffer = new long[pageSize]; bufferArrayList.add(lastBuffer); capacity = pageSize; } else { lastBuffer = (long[]) bufferArrayList.get(bufferArrayList.size() - 1); } if (this.size < this.capacity) { //get the last buffer from the bufferListArray //obtain the starting offset in that buffer to which the data is to be copied //update length //System.arraycopy(long_array, 0, lastBuffer, size % pageSize, long_array.length); //lastBuffer[size % pageSize] = i; lastBuffer[size & r] = i; size += 1; } else // new buffers needed { long[] newBuffer = new long[pageSize]; size++; capacity += pageSize; bufferArrayList.add(newBuffer); newBuffer[0] = i; }}
3680 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3680/0d442c35ad8418b072516454a5a9dfee862f4807/FastLongBuffer.java/buggy/com/ximpleware/FastLongBuffer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 714, 12, 5748, 277, 13, 288, 282, 1525, 8526, 1142, 1892, 31, 565, 309, 261, 4106, 19558, 18, 1467, 1435, 422, 374, 13, 288, 3639, 1142, 1892, 273, 394, 1525, 63, 26165, 15533, 3639, 1613, 19558, 18, 1289, 12, 2722, 1892, 1769, 3639, 7519, 273, 13387, 31, 565, 289, 469, 288, 3639, 1142, 1892, 273, 261, 5748, 63, 5717, 1613, 19558, 18, 588, 12, 4106, 19558, 18, 1467, 1435, 300, 404, 1769, 565, 289, 565, 309, 261, 2211, 18, 1467, 225, 411, 333, 18, 16017, 13, 288, 3639, 368, 588, 326, 1142, 1613, 628, 326, 1613, 682, 1076, 3639, 368, 947, 5977, 326, 5023, 1384, 316, 716, 1613, 358, 1492, 326, 501, 353, 358, 506, 9268, 3639, 368, 2725, 769, 3639, 368, 3163, 18, 1126, 3530, 12, 5748, 67, 1126, 16, 374, 16, 1142, 1892, 16, 963, 738, 13387, 16, 1525, 67, 1126, 18, 2469, 1769, 3639, 368, 2722, 1892, 63, 1467, 738, 13387, 65, 273, 277, 31, 3639, 1142, 1892, 63, 1467, 473, 436, 65, 273, 277, 31, 3639, 963, 1011, 404, 31, 565, 289, 469, 368, 394, 9664, 3577, 3639, 288, 3639, 1525, 8526, 394, 1892, 273, 394, 1525, 63, 26165, 15533, 3639, 963, 9904, 31, 3639, 7519, 1011, 13387, 31, 3639, 1613, 19558, 18, 1289, 12, 2704, 1892, 1769, 3639, 394, 1892, 63, 20, 65, 273, 277, 31, 565, 10523, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1071, 918, 714, 12, 5748, 277, 13, 288, 282, 1525, 8526, 1142, 1892, 31, 565, 309, 261, 4106, 19558, 18, 1467, 1435, 422, 374, 13, 288, 3639, 1142, 1892, 273, 394, 1525, 63, 26165, 15533, 3639, 1613, 19558, 18, 1289, 12, 2722, 1892, 1769, 3639, 7519, 273, 13387, 31, 565, 289, 469, 288, 3639, 1142, 1892, 273, 261, 5748, 63, 5717, 1613, 19558, 18, 588, 12, 4106, 19558, 18, 1467, 1435, 300, 404, 1769, 565, 289, 565, 309, 261, 2211, 18, 1467, 225, 411, 333, 18, 16017, 13, 288, 3639, 368, 588, 326, 1142, 1613, 628, 326, 1613, 682, 1076, 3639, 368, 947, 5977, 326, 5023, 1384, 316, 716, 1613, 358, 1492, 326, 501, 353, 358, 506, 9268, 3639, 2 ]
try { int res = makeCurrent(); if (res != CONTEXT_CURRENT) { throw new GLException("Unable to make context current to destroy tracked server-side OpenGL objects"); } try { tracker.unref(getGL()); } finally { release(); } } catch (GLException e) { if (DEBUG) { e.printStackTrace(); } }
tracker.unref(deletedObjectTracker);
public void destroy() { if (lock.isHeld()) { throw new GLException("Can not destroy context while it is current"); } if (tracker != null) { // Don't need to do anything for contexts that haven't been // created yet if (isCreated()) { // If we are tracking creation and destruction of server-side // OpenGL objects, we must decrement the reference count of the // GLObjectTracker upon context destruction. try { int res = makeCurrent(); if (res != CONTEXT_CURRENT) { // FIXME: we really need to behave better than this throw new GLException("Unable to make context current to destroy tracked server-side OpenGL objects"); } try { tracker.unref(getGL()); } finally { release(); } } catch (GLException e) { // FIXME: should probably do something more intelligent here if (DEBUG) { e.printStackTrace(); } } } } // Must hold the lock around the destroy operation to make sure we // don't destroy the context out from under another thread rendering to it lock.lock(); try { destroyImpl(); } finally { lock.unlock(); } }
47702 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47702/6b66ec1550a1f022db2dda2db3fe473cbebfec85/GLContextImpl.java/buggy/src/classes/com/sun/opengl/impl/GLContextImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 5546, 1435, 288, 565, 309, 261, 739, 18, 291, 44, 488, 10756, 288, 1377, 604, 394, 10252, 503, 2932, 2568, 486, 5546, 819, 1323, 518, 353, 783, 8863, 565, 289, 565, 309, 261, 16543, 480, 446, 13, 288, 1377, 368, 7615, 1404, 1608, 358, 741, 6967, 364, 5781, 716, 15032, 1404, 2118, 1377, 368, 2522, 4671, 1377, 309, 261, 291, 6119, 10756, 288, 3639, 368, 971, 732, 854, 11093, 6710, 471, 2832, 313, 4062, 434, 1438, 17, 5564, 3639, 368, 3502, 11261, 2184, 16, 732, 1297, 15267, 326, 2114, 1056, 434, 326, 3639, 368, 10252, 921, 8135, 12318, 819, 2832, 313, 4062, 18, 3639, 775, 288, 1850, 509, 400, 273, 1221, 3935, 5621, 1850, 309, 261, 455, 480, 13862, 67, 15487, 13, 288, 5411, 368, 9852, 30, 732, 8654, 1608, 358, 31085, 7844, 2353, 333, 5411, 604, 394, 10252, 503, 2932, 3370, 358, 1221, 819, 783, 358, 5546, 15200, 1438, 17, 5564, 3502, 11261, 2184, 8863, 1850, 289, 1850, 775, 288, 5411, 9745, 18, 318, 1734, 12, 588, 11261, 10663, 1850, 289, 3095, 288, 5411, 3992, 5621, 1850, 289, 3639, 289, 1044, 261, 11261, 503, 425, 13, 288, 1850, 368, 9852, 30, 1410, 8656, 741, 5943, 1898, 509, 1165, 360, 319, 2674, 1850, 309, 261, 9394, 13, 288, 5411, 425, 18, 1188, 6332, 5621, 1850, 289, 3639, 289, 1377, 289, 565, 289, 565, 368, 6753, 6887, 326, 2176, 6740, 326, 5546, 1674, 358, 1221, 3071, 732, 565, 368, 2727, 1404, 5546, 326, 819, 596, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 5546, 1435, 288, 565, 309, 261, 739, 18, 291, 44, 488, 10756, 288, 1377, 604, 394, 10252, 503, 2932, 2568, 486, 5546, 819, 1323, 518, 353, 783, 8863, 565, 289, 565, 309, 261, 16543, 480, 446, 13, 288, 1377, 368, 7615, 1404, 1608, 358, 741, 6967, 364, 5781, 716, 15032, 1404, 2118, 1377, 368, 2522, 4671, 1377, 309, 261, 291, 6119, 10756, 288, 3639, 368, 971, 732, 854, 11093, 6710, 471, 2832, 313, 4062, 434, 1438, 17, 5564, 3639, 368, 3502, 11261, 2184, 16, 732, 1297, 15267, 326, 2114, 1056, 434, 326, 3639, 368, 10252, 921, 8135, 12318, 819, 2832, 313, 4062, 18, 3639, 775, 288, 1850, 509, 400, 273, 1221, 3935, 5621, 1850, 309, 261, 2 ]
switch (alignment) {
switch (verticalAlignment) {
public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { MinOptMax ipd; curArea = get(context); LinkedList returnList = new LinkedList(); if (curArea == null) { setFinished(true); return null; } ipd = getAllocationIPD(context.getRefIPD()); int bpd = curArea.getBPD(); int lead = 0; int total = 0; int middle = 0; switch (alignment) { case VerticalAlign.MIDDLE : middle = bpd / 2 ; lead = bpd / 2 ; break; case VerticalAlign.TOP : total = bpd; break; case VerticalAlign.BOTTOM : total = bpd; break; case VerticalAlign.BASELINE: default: lead = bpd; break; } // create the AreaInfo object to store the computed values areaInfo = new AreaInfo((short) 0, ipd, false, lead, total, middle); // node is a fo:Leader returnList.add(new KnuthBox(0, areaInfo.lead, areaInfo.total, areaInfo.middle, new LeafPosition(this, -1), true)); returnList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, new LeafPosition(this, -1), true)); returnList.add (new KnuthGlue(areaInfo.ipdArea.opt, areaInfo.ipdArea.max - areaInfo.ipdArea.opt, areaInfo.ipdArea.opt - areaInfo.ipdArea.min, new LeafPosition(this, 0), false)); returnList.add(new KnuthBox(0, areaInfo.lead, areaInfo.total, areaInfo.middle, new LeafPosition(this, -1), true)); setFinished(true); return returnList; }
5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/609da8edaad8f2baf8f306e4d90d006b933ef30c/LeaderLayoutManager.java/buggy/src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 10688, 6927, 47, 82, 795, 3471, 12, 3744, 1042, 819, 16, 4766, 6647, 509, 8710, 13, 288, 3639, 5444, 6179, 2747, 2359, 72, 31, 3639, 662, 5484, 273, 336, 12, 2472, 1769, 3639, 10688, 327, 682, 273, 394, 10688, 5621, 3639, 309, 261, 1397, 5484, 422, 446, 13, 288, 5411, 444, 10577, 12, 3767, 1769, 5411, 327, 446, 31, 3639, 289, 3639, 2359, 72, 273, 336, 17353, 2579, 40, 12, 2472, 18, 588, 1957, 2579, 40, 10663, 3639, 509, 9107, 72, 273, 662, 5484, 18, 588, 38, 21527, 5621, 3639, 509, 5871, 273, 374, 31, 3639, 509, 2078, 273, 374, 31, 3639, 509, 7689, 273, 374, 31, 3639, 1620, 261, 17824, 11535, 13, 288, 5411, 648, 27394, 10044, 18, 49, 25578, 225, 294, 7689, 273, 9107, 72, 342, 576, 274, 29159, 5871, 273, 9107, 72, 342, 576, 274, 29159, 898, 31, 5411, 648, 27394, 10044, 18, 10462, 377, 294, 2078, 273, 9107, 72, 31, 29159, 898, 31, 5411, 648, 27394, 10044, 18, 28891, 225, 294, 2078, 273, 9107, 72, 31, 29159, 898, 31, 5411, 648, 27394, 10044, 18, 8369, 5997, 30, 5411, 805, 30, 5397, 5871, 273, 9107, 72, 31, 29159, 898, 31, 3639, 289, 3639, 368, 752, 326, 16668, 966, 733, 358, 1707, 326, 8470, 924, 3639, 5091, 966, 273, 394, 16668, 966, 12443, 6620, 13, 374, 16, 2359, 72, 16, 629, 16, 27573, 5871, 16, 2078, 16, 7689, 1769, 3639, 368, 756, 353, 279, 18261, 30, 15254, 3639, 327, 682, 18, 1289, 12, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10688, 6927, 47, 82, 795, 3471, 12, 3744, 1042, 819, 16, 4766, 6647, 509, 8710, 13, 288, 3639, 5444, 6179, 2747, 2359, 72, 31, 3639, 662, 5484, 273, 336, 12, 2472, 1769, 3639, 10688, 327, 682, 273, 394, 10688, 5621, 3639, 309, 261, 1397, 5484, 422, 446, 13, 288, 5411, 444, 10577, 12, 3767, 1769, 5411, 327, 446, 31, 3639, 289, 3639, 2359, 72, 273, 336, 17353, 2579, 40, 12, 2472, 18, 588, 1957, 2579, 40, 10663, 3639, 509, 9107, 72, 273, 662, 5484, 18, 588, 38, 21527, 5621, 3639, 509, 5871, 273, 374, 31, 3639, 509, 2078, 273, 374, 31, 3639, 509, 7689, 273, 374, 31, 3639, 1620, 261, 17824, 11535, 13, 288, 5411, 648, 27394, 2 ]
}else{ throw new RuntimeException("the node value for Date and Time patterns is null!!"); } } if(arr.first!=null){ return arr; }
} if(arr.first!=null){ return arr; } }
private ICUResourceWriter.Resource parseDTF(Node root, StringBuffer xpath){ // TODO change the ICU format to reflect LDML format /* * The prefered ICU format would be * timeFormats{ * default{} * full{} * long{} * medium{} * short{} * .... * } * dateFormats{ * default{} * full{} * long{} * medium{} * short{} * ..... * } * dateTimeFormats{ * standard{} * .... * } */ // here we dont add stuff to XPATH since we are querying the parent // with the hardcoded XPATHS! //TODO figure out what to do for alias Node parent = root.getParentNode(); ArrayList list = new ArrayList(); list.add(getVettedNode(parent, "timeFormats/timeFormatLength[@type='full']/timeFormat[@type='standard']/pattern", xpath)); list.add(getVettedNode(parent, "timeFormats/timeFormatLength[@type='long']/timeFormat[@type='standard']/pattern", xpath)); list.add(getVettedNode(parent, "timeFormats/timeFormatLength[@type='medium']/timeFormat[@type='standard']/pattern", xpath)); list.add(getVettedNode(parent, "timeFormats/timeFormatLength[@type='short']/timeFormat[@type='standard']/pattern", xpath)); list.add(getVettedNode(parent, "dateFormats/dateFormatLength[@type='full']/dateFormat[@type='standard']/pattern", xpath)); list.add(getVettedNode(parent, "dateFormats/dateFormatLength[@type='long']/dateFormat[@type='standard']/pattern", xpath)); list.add(getVettedNode(parent, "dateFormats/dateFormatLength[@type='medium']/dateFormat[@type='standard']/pattern", xpath)); list.add(getVettedNode(parent, "dateFormats/dateFormatLength[@type='short']/dateFormat[@type='standard']/pattern", xpath)); //TODO guard this against possible failure list.add(getVettedNode(parent, "dateTimeFormats/dateTimeFormatLength/dateTimeFormat[@type='standard']/pattern", xpath)); if(list.size()<9){ throw new RuntimeException("Did not get expected output for Date and Time patterns!!"); } ICUResourceWriter.ResourceArray arr = new ICUResourceWriter.ResourceArray(); arr.name = DTP; ICUResourceWriter.Resource current = null; for(int i= 0; i<list.size(); i++){ ICUResourceWriter.ResourceString str = new ICUResourceWriter.ResourceString(); Node temp = (Node)list.get(i); if(temp==null){ System.err.println("WARNING: Some elements of DateTimePatterns resource are marked draft producing this resource. "+xpath.toString()); arr.first=null; break; } str.val = LDMLUtilities.getNodeValue(temp); if(str.val!=null){ if(current==null){ current = arr.first = str; }else{ current.next = str; current = current.next; } }else{ throw new RuntimeException("the node value for Date and Time patterns is null!!"); } } if(arr.first!=null){ return arr; } return null; }
27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/b73b43a8a192dbdd3e6db664456e615b3b416a16/LDML2ICUConverter.java/buggy/tools/java/org/unicode/cldr/icu/LDML2ICUConverter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 28009, 1420, 2289, 18, 1420, 1109, 9081, 42, 12, 907, 1365, 16, 6674, 6748, 15329, 3639, 368, 2660, 2549, 326, 28009, 740, 358, 3037, 28083, 1495, 740, 3639, 1748, 540, 380, 1021, 13256, 329, 28009, 740, 4102, 506, 540, 380, 813, 8976, 95, 540, 380, 1377, 805, 2916, 540, 380, 1377, 1983, 2916, 540, 380, 1377, 1525, 2916, 540, 380, 1377, 16212, 2916, 540, 380, 1377, 3025, 2916, 540, 380, 1377, 1372, 18, 540, 380, 289, 540, 380, 1509, 8976, 95, 540, 380, 1377, 805, 2916, 540, 380, 1377, 1983, 2916, 540, 380, 1377, 1525, 2916, 540, 380, 1377, 16212, 2916, 540, 380, 1377, 3025, 2916, 540, 380, 1377, 1372, 838, 540, 380, 289, 540, 380, 9296, 8976, 95, 540, 380, 1377, 4529, 2916, 540, 380, 1377, 1372, 18, 540, 380, 289, 540, 1195, 3639, 368, 2674, 732, 14046, 527, 10769, 358, 1139, 4211, 3241, 732, 854, 23936, 326, 982, 3639, 368, 598, 326, 7877, 24808, 1139, 4211, 55, 5, 3639, 368, 6241, 7837, 596, 4121, 358, 741, 364, 2308, 3639, 2029, 982, 273, 1365, 18, 588, 3054, 907, 5621, 3639, 2407, 666, 273, 394, 2407, 5621, 3639, 666, 18, 1289, 12, 588, 58, 278, 2344, 907, 12, 2938, 16, 315, 957, 8976, 19, 957, 1630, 1782, 14782, 723, 2218, 2854, 3546, 19, 957, 1630, 14782, 723, 2218, 10005, 3546, 19, 4951, 3113, 225, 6748, 10019, 3639, 666, 18, 1289, 12, 588, 58, 278, 2344, 907, 12, 2938, 16, 315, 957, 8976, 19, 957, 1630, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 28009, 1420, 2289, 18, 1420, 1109, 9081, 42, 12, 907, 1365, 16, 6674, 6748, 15329, 3639, 368, 2660, 2549, 326, 28009, 740, 358, 3037, 28083, 1495, 740, 3639, 1748, 540, 380, 1021, 13256, 329, 28009, 740, 4102, 506, 540, 380, 813, 8976, 95, 540, 380, 1377, 805, 2916, 540, 380, 1377, 1983, 2916, 540, 380, 1377, 1525, 2916, 540, 380, 1377, 16212, 2916, 540, 380, 1377, 3025, 2916, 540, 380, 1377, 1372, 18, 540, 380, 289, 540, 380, 1509, 8976, 95, 540, 380, 1377, 805, 2916, 540, 380, 1377, 1983, 2916, 540, 380, 1377, 1525, 2916, 540, 380, 1377, 16212, 2916, 540, 380, 1377, 3025, 2916, 540, 380, 1377, 1372, 838, 540, 380, 289, 540, 380, 9296, 2 ]
return recipientJID == null || recipientJID.getHost() == null || "".equals(recipientJID.getHost()) || recipientJID.getResource() == null || "".equals(recipientJID.getResource());
return recipientJID == null || recipientJID.getHost() == null || "".equals(recipientJID.getHost()) || ((recipientJID.getName() == null || "".equals(recipientJID.getName())) && (recipientJID.getResource() == null || "".equals(recipientJID.getResource())));
private boolean isLocalServer(XMPPAddress recipientJID) { // ridiculously long check for local server target // It's local if jid is null or host is null or resource is null return recipientJID == null || recipientJID.getHost() == null || "".equals(recipientJID.getHost()) || recipientJID.getResource() == null || "".equals(recipientJID.getResource()); }
6312 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6312/e373bdd89a2b9d00b96667a0501162fcd01352da/IQRouterImpl.java/buggy/src/java/org/jivesoftware/messenger/spi/IQRouterImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 22873, 2081, 12, 60, 19388, 1887, 8027, 46, 734, 13, 288, 3639, 368, 10911, 335, 332, 1481, 715, 1525, 866, 364, 1191, 1438, 1018, 3639, 368, 2597, 1807, 1191, 309, 14201, 353, 446, 578, 1479, 353, 446, 578, 1058, 353, 446, 3639, 327, 8027, 46, 734, 422, 446, 747, 8027, 46, 734, 18, 588, 2594, 1435, 422, 446, 7734, 747, 1408, 18, 14963, 12, 20367, 46, 734, 18, 588, 2594, 10756, 747, 8027, 46, 734, 18, 588, 1420, 1435, 422, 446, 7734, 747, 1408, 18, 14963, 12, 20367, 46, 734, 18, 588, 1420, 10663, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 22873, 2081, 12, 60, 19388, 1887, 8027, 46, 734, 13, 288, 3639, 368, 10911, 335, 332, 1481, 715, 1525, 866, 364, 1191, 1438, 1018, 3639, 368, 2597, 1807, 1191, 309, 14201, 353, 446, 578, 1479, 353, 446, 578, 1058, 353, 446, 3639, 327, 8027, 46, 734, 422, 446, 747, 8027, 46, 734, 18, 588, 2594, 1435, 422, 446, 7734, 747, 1408, 18, 14963, 12, 20367, 46, 734, 18, 588, 2594, 10756, 747, 8027, 46, 734, 18, 588, 1420, 1435, 422, 446, 7734, 747, 1408, 18, 14963, 12, 20367, 46, 734, 18, 588, 1420, 10663, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ps = conn.prepareStatement(selectReferenceCount); ps.setString(1, (String)message.getMessageID()); int referenceCount = 0; ResultSet rs = ps.executeQuery(); if (rs.next()) { referenceCount = rs.getInt(1); } if (trace) { log.trace(JDBCUtil.statementToString(selectReferenceCount, message.getMessageID()) + " returned " + (referenceCount == 0 ? "no rows" : Integer.toString(referenceCount))); } if (referenceCount == 0) { if (trace) { log.trace("no message " + message.getMessageID() + " to delete in the database"); } return false; } else if (referenceCount == 1) { */
ps = conn.prepareStatement(selectReferenceCount); ps.setString(1, (String)message.getMessageID()); int referenceCount = 0; ResultSet rs = ps.executeQuery(); if (rs.next()) { referenceCount = rs.getInt(1); } if (trace) { log.trace(JDBCUtil.statementToString(selectReferenceCount, message.getMessageID()) + " returned " + (referenceCount == 0 ? "no rows" : Integer.toString(referenceCount))); } if (referenceCount == 0) { if (trace) { log.trace("no message " + message.getMessageID() + " to delete in the database"); } return false; } else if (referenceCount == 1) { */
protected void removeMessage(Message message, PreparedStatement ps) throws Exception { /* Reference counting code commented out until 1.2 // get the reference count from the database ps = conn.prepareStatement(selectReferenceCount); ps.setString(1, (String)message.getMessageID()); //TODO this can be combined into one query int referenceCount = 0; ResultSet rs = ps.executeQuery(); if (rs.next()) { referenceCount = rs.getInt(1); } if (trace) { log.trace(JDBCUtil.statementToString(selectReferenceCount, message.getMessageID()) + " returned " + (referenceCount == 0 ? "no rows" : Integer.toString(referenceCount))); } if (referenceCount == 0) { if (trace) { log.trace("no message " + message.getMessageID() + " to delete in the database"); } return false; } else if (referenceCount == 1) { */ // physically delete the row in the database ps.setLong(1, message.getMessageID()); /* Reference counting code commented out until 1.2 } else { // decrement the reference count ps = conn.prepareStatement(updateReferenceCount); ps.setInt(1, --referenceCount); ps.setString(2, (String)message.getMessageID()); ps.executeUpdate(); if (trace) { log.trace(JDBCUtil.statementToString(updateReferenceCount, new Integer(referenceCount), message.getMessageID()) + " executed successfully"); } return true; } */ }
3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/c7133c9662c41fb385b863c92214187907f2d1b0/JDBCPersistenceManager.java/buggy/src/main/org/jboss/messaging/core/plugin/JDBCPersistenceManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 4750, 918, 1206, 1079, 12, 1079, 883, 16, 16913, 4250, 13, 1216, 1185, 282, 288, 1377, 1748, 2868, 6268, 22075, 981, 31813, 596, 3180, 404, 18, 22, 2868, 368, 336, 326, 2114, 1056, 628, 326, 2063, 4202, 4250, 273, 1487, 18, 9366, 3406, 12, 4025, 2404, 1380, 1769, 4202, 4250, 18, 542, 780, 12, 21, 16, 261, 780, 13, 2150, 18, 24906, 734, 10663, 2868, 368, 6241, 333, 848, 506, 8224, 1368, 1245, 843, 4202, 509, 2114, 1380, 273, 374, 31, 4202, 10842, 3597, 273, 4250, 18, 8837, 1138, 5621, 4202, 309, 261, 5453, 18, 4285, 10756, 4202, 288, 4202, 2114, 1380, 273, 3597, 18, 588, 1702, 12, 21, 1769, 4202, 289, 2868, 309, 261, 5129, 13, 288, 613, 18, 5129, 12, 30499, 1304, 18, 11516, 5808, 12, 4025, 2404, 1380, 16, 883, 18, 24906, 734, 10756, 397, 315, 2106, 315, 397, 261, 6180, 1380, 422, 374, 692, 315, 2135, 2595, 6, 294, 2144, 18, 10492, 12, 6180, 1380, 3719, 1769, 289, 2868, 309, 261, 6180, 1380, 422, 374, 13, 4202, 288, 4202, 309, 261, 5129, 13, 288, 613, 18, 5129, 2932, 2135, 883, 315, 397, 883, 18, 24906, 734, 1435, 397, 315, 358, 1430, 316, 326, 2063, 8863, 289, 4202, 327, 629, 31, 4202, 289, 4202, 469, 309, 261, 6180, 1380, 422, 404, 13, 4202, 288, 2868, 1195, 1377, 368, 24758, 6478, 1430, 326, 1027, 316, 326, 2063, 1377, 4250, 18, 542, 3708, 12, 21, 16, 883, 18, 24906, 734, 10663, 1377, 1748, 1171, 6268, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 4750, 918, 1206, 1079, 12, 1079, 883, 16, 16913, 4250, 13, 1216, 1185, 282, 288, 1377, 1748, 2868, 6268, 22075, 981, 31813, 596, 3180, 404, 18, 22, 2868, 368, 336, 326, 2114, 1056, 628, 326, 2063, 4202, 4250, 273, 1487, 18, 9366, 3406, 12, 4025, 2404, 1380, 1769, 4202, 4250, 18, 542, 780, 12, 21, 16, 261, 780, 13, 2150, 18, 24906, 734, 10663, 2868, 368, 6241, 333, 848, 506, 8224, 1368, 1245, 843, 4202, 509, 2114, 1380, 273, 374, 31, 4202, 10842, 3597, 273, 4250, 18, 8837, 1138, 5621, 4202, 309, 261, 5453, 18, 4285, 10756, 4202, 288, 4202, 2114, 1380, 273, 3597, 18, 588, 1702, 12, 21, 1769, 4202, 289, 2868, 309, 261, 5129, 13, 288, 2 ]