rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
MPSProject project = getContext().getProject(); SModel targetModel = targetClass.getModel(); String fqName = targetModel.getFQName(); String name = targetClass.getName(); String className = fqName + '.' + name; SModel tmpModel = new SModel(); tmpModel.setLoading(true); SimpleModelDescriptor tmpModelDescriptor = new SimpleModelDescriptor(tmpModel); targetModel.addImportedModelDescriptor(tmpModelDescriptor); try { JavaClassMap javaClassMap = JavaClassMaps.getJavaClassMap(tmpModel); ClassConcept tmpClass = null; try { tmpClass = (ClassConcept) javaClassMap.get(className); } catch (Exception e1) { LOG.error(e1); } if (tmpClass == null) { JOptionPane.showMessageDialog(myContainer, "Class not found:\n" + className, "Class Not Found", JOptionPane.ERROR_MESSAGE); return; } targetClass.setExtendedClass(toModelClass(tmpClass.getExtendedClass(), targetModel, project)); Iterator<StaticFieldDeclaration> staticFields = tmpClass.staticFields(); while (staticFields.hasNext()) { StaticFieldDeclaration staticFieldDeclaration = staticFields.next(); StaticFieldDeclaration copy = (StaticFieldDeclaration) createValidCopy(staticFieldDeclaration, targetModel, project); targetClass.addStaticField(copy); } Iterator<FieldDeclaration> fields = tmpClass.fields(); while (fields.hasNext()) { FieldDeclaration fieldDeclaration = fields.next(); FieldDeclaration copy = (FieldDeclaration) createValidCopy(fieldDeclaration, targetModel, project); targetClass.addField(copy); } Iterator<ConstructorDeclaration> constructors = tmpClass.constructors(); while (constructors.hasNext()) { ConstructorDeclaration constructorDeclaration = constructors.next(); ConstructorDeclaration copy = (ConstructorDeclaration) createValidCopy(constructorDeclaration, targetModel, project); targetClass.addConstructor(copy); } Iterator<InstanceMethodDeclaration> methods = tmpClass.methods(); while (methods.hasNext()) { InstanceMethodDeclaration instanceMethodDeclaration = methods.next(); InstanceMethodDeclaration copy = (InstanceMethodDeclaration) createValidCopy(instanceMethodDeclaration, targetModel, project); targetClass.addMethod(copy); } Iterator<StaticMethodDeclaration> staticMethods = tmpClass.staticMethods(); while (staticMethods.hasNext()) { StaticMethodDeclaration staticMethodDeclaration = staticMethods.next(); StaticMethodDeclaration copy = (StaticMethodDeclaration) createValidCopy(staticMethodDeclaration, targetModel, project); targetClass.addStaticMethod(copy); } targetModel.fireModelChangedDramaticallyEvent(); JOptionPane.showMessageDialog(myContainer, "Added:\n" + tmpClass.getStaticFieldsCount() + " static fields\n" + tmpClass.getFieldsCount() + " fields\n" + tmpClass.getConstructorsCount() + " constructors\n" + tmpClass.getMethodsCount() + " methods\n" + tmpClass.getStaticMethodsCount() + " static methods", "Class Has Been Generated", JOptionPane.INFORMATION_MESSAGE); tmpClass.delete(); } finally { targetModel.deleteImportedModel(tmpModelDescriptor.getFQName()); } } | copy[0] = CopyUtil.copy(root); } | public void run() { MPSProject project = getContext().getProject(); SModel targetModel = targetClass.getModel(); String fqName = targetModel.getFQName(); String name = targetClass.getName(); String className = fqName + '.' + name; SModel tmpModel = new SModel(); tmpModel.setLoading(true); SimpleModelDescriptor tmpModelDescriptor = new SimpleModelDescriptor(tmpModel); targetModel.addImportedModelDescriptor(tmpModelDescriptor); try { JavaClassMap javaClassMap = JavaClassMaps.getJavaClassMap(tmpModel); ClassConcept tmpClass = null; try { tmpClass = (ClassConcept) javaClassMap.get(className); } catch (Exception e1) { LOG.error(e1); } if (tmpClass == null) { JOptionPane.showMessageDialog(myContainer, "Class not found:\n" + className, "Class Not Found", JOptionPane.ERROR_MESSAGE); return; } targetClass.setExtendedClass(toModelClass(tmpClass.getExtendedClass(), targetModel, project)); Iterator<StaticFieldDeclaration> staticFields = tmpClass.staticFields(); while (staticFields.hasNext()) { StaticFieldDeclaration staticFieldDeclaration = staticFields.next(); StaticFieldDeclaration copy = (StaticFieldDeclaration) createValidCopy(staticFieldDeclaration, targetModel, project); targetClass.addStaticField(copy); } Iterator<FieldDeclaration> fields = tmpClass.fields(); while (fields.hasNext()) { FieldDeclaration fieldDeclaration = fields.next(); FieldDeclaration copy = (FieldDeclaration) createValidCopy(fieldDeclaration, targetModel, project); targetClass.addField(copy); } Iterator<ConstructorDeclaration> constructors = tmpClass.constructors(); while (constructors.hasNext()) { ConstructorDeclaration constructorDeclaration = constructors.next(); ConstructorDeclaration copy = (ConstructorDeclaration) createValidCopy(constructorDeclaration, targetModel, project); targetClass.addConstructor(copy); } Iterator<InstanceMethodDeclaration> methods = tmpClass.methods(); while (methods.hasNext()) { InstanceMethodDeclaration instanceMethodDeclaration = methods.next(); InstanceMethodDeclaration copy = (InstanceMethodDeclaration) createValidCopy(instanceMethodDeclaration, targetModel, project); targetClass.addMethod(copy); } Iterator<StaticMethodDeclaration> staticMethods = tmpClass.staticMethods(); while (staticMethods.hasNext()) { StaticMethodDeclaration staticMethodDeclaration = staticMethods.next(); StaticMethodDeclaration copy = (StaticMethodDeclaration) createValidCopy(staticMethodDeclaration, targetModel, project); targetClass.addStaticMethod(copy); } targetModel.fireModelChangedDramaticallyEvent(); JOptionPane.showMessageDialog(myContainer, "Added:\n" + tmpClass.getStaticFieldsCount() + " static fields\n" + tmpClass.getFieldsCount() + " fields\n" + tmpClass.getConstructorsCount() + " constructors\n" + tmpClass.getMethodsCount() + " methods\n" + tmpClass.getStaticMethodsCount() + " static methods", "Class Has Been Generated", JOptionPane.INFORMATION_MESSAGE); tmpClass.delete(); } finally { targetModel.deleteImportedModel(tmpModelDescriptor.getFQName()); } } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/478c1e353f58d79d016cb8b2d214bc92557b2fa2/AbstractEditorComponent.java/clean/source/jetbrains/mps/nodeEditor/AbstractEditorComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
10402,
1071,
918,
1086,
1435,
288,
10792,
11132,
4109,
1984,
273,
6474,
7675,
588,
4109,
5621,
10792,
348,
1488,
1018,
1488,
273,
14563,
18,
588,
1488,
5621,
10792,
514,
8508,
461,
273,
1018,
1488,
18,
588,
42,
13688,
5621,
10792,
514,
508,
273,
14563,
18,
17994,
5621,
10792,
514,
2658,
273,
8508,
461,
397,
2611,
397,
508,
31,
10792,
348,
1488,
1853,
1488,
273,
394,
348,
1488,
5621,
10792,
1853,
1488,
18,
542,
10515,
12,
3767,
1769,
10792,
4477,
1488,
3187,
1853,
1488,
3187,
273,
394,
4477,
1488,
3187,
12,
5645,
1488,
1769,
10792,
1018,
1488,
18,
1289,
24934,
1488,
3187,
12,
5645,
1488,
3187,
1769,
10792,
775,
288,
8227,
29491,
863,
2252,
797,
863,
273,
29491,
8903,
18,
588,
5852,
797,
863,
12,
5645,
1488,
1769,
8227,
1659,
15433,
1853,
797,
273,
446,
31,
8227,
775,
288,
13491,
1853,
797,
273,
261,
797,
15433,
13,
2252,
797,
863,
18,
588,
12,
12434,
1769,
8227,
289,
1044,
261,
503,
425,
21,
13,
288,
13491,
2018,
18,
1636,
12,
73,
21,
1769,
8227,
289,
8227,
309,
261,
5645,
797,
422,
446,
13,
288,
13491,
804,
1895,
8485,
18,
4500,
1079,
6353,
12,
4811,
2170,
16,
315,
797,
486,
1392,
5581,
82,
6,
397,
2658,
16,
315,
797,
2288,
10750,
3113,
804,
1895,
8485,
18,
3589,
67,
8723,
1769,
13491,
327,
31,
8227,
289,
8227,
14563,
18,
542,
11456,
797,
12,
869,
1488,
797,
12,
5645,
797,
18,
588,
11456,
797,
9334,
1018,
1488,
16,
1984,
10019,
8227,
4498,
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,
10402,
1071,
918,
1086,
1435,
288,
10792,
11132,
4109,
1984,
273,
6474,
7675,
588,
4109,
5621,
10792,
348,
1488,
1018,
1488,
273,
14563,
18,
588,
1488,
5621,
10792,
514,
8508,
461,
273,
1018,
1488,
18,
588,
42,
13688,
5621,
10792,
514,
508,
273,
14563,
18,
17994,
5621,
10792,
514,
2658,
273,
8508,
461,
397,
2611,
397,
508,
31,
10792,
348,
1488,
1853,
1488,
273,
394,
348,
1488,
5621,
10792,
1853,
1488,
18,
542,
10515,
12,
3767,
1769,
10792,
4477,
1488,
3187,
1853,
1488,
3187,
273,
394,
4477,
1488,
3187,
12,
5645,
1488,
1769,
10792,
1018,
1488,
18,
1289,
24934,
1488,
3187,
12,
5645,
1488,
3187,
1769,
10792,
775,
288,
8227,
29491,
863,
2252,
797,
863,
273,
29491,
8903,
18,
2
] |
private boolean endsNotBalanced() { String line;// int row = area.getCaretLine(); int count = area.getLineCount(); int balancedCount = 0;// StringBuffer buffer = new StringBuffer(""); boolean isString = false; for (int i = 0; i < count; i++) { line = area.getLineText(i).trim(); if (hasEndKeyword(line)) {// buffer.append(balancedCount + "");// for (int j = 0; j < balancedCount; buffer.append(j++ > -1 ? " " : "")) ;// buffer.append(line + "\n"); balancedCount--; } if (line.indexOf("<<-EOF") != -1) { isString = true; } else if (line.indexOf("EOF") != -1) { isString = false; } if (!isString) { boolean isDoMatch = DoRegExp.instance.isMatch(line); boolean doInComment = isDoInComment(line);// if(line.indexOf("File.open") != -1) {// buffer.append("do: " + isDoMatch + ", in comment: " + doInComment + ',' + line + '\n');// } boolean isDoStatement = isDoMatch && !doInComment; boolean ignore = IgnoreRegExp.instance.isMatch(line); boolean conditionalAssignment = TrailingConditionRegExp.instance.isMatch(line); if (conditionalAssignment || (!ignore && (isDoStatement || MatchRegExp.instance.isMatch(line)))) { boolean openingBrace = line.indexOf("{") != -1 && line.indexOf("}") == -1; boolean elsif = line.indexOf("elsif") != -1; if (!openingBrace && !elsif) {// buffer.append(balancedCount + "");// for (int j = 0; j < balancedCount; buffer.append(j++ > -1 ? " " : "")) ;// buffer.append(line + "\n"); balancedCount++; int moduleIndex = line.indexOf("module"); while(moduleIndex != -1) { moduleIndex = line.indexOf("module", moduleIndex+5); if(moduleIndex != -1) { balancedCount++; } } } } } }// RubyPlugin.log(buffer.toString(), AutoIndentAndInsertEnd.class); boolean endsNotBalanced = balancedCount < 0; RubyPlugin.log("Ends " + (endsNotBalanced ? "not " : "") + "balanced", AutoIndentAndInsertEnd.class); return endsNotBalanced; } | 13291 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13291/615094576784f8eacf0891411a5b25d98778892b/AutoIndentAndInsertEnd.java/buggy/src/org/jedit/ruby/structure/AutoIndentAndInsertEnd.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6494,
5839,
1248,
13937,
72,
1435,
95,
780,
1369,
31,
759,
474,
492,
33,
5036,
18,
588,
39,
20731,
1670,
5621,
474,
1883,
33,
5036,
18,
588,
1670,
1380,
5621,
474,
12296,
72,
1380,
33,
20,
31,
759,
780,
1892,
4106,
33,
2704,
780,
1892,
2932,
8863,
6494,
291,
780,
33,
5743,
31,
1884,
12,
474,
77,
33,
20,
31,
77,
32,
1883,
31,
77,
27245,
95,
1369,
33,
5036,
18,
588,
1670,
1528,
12,
77,
2934,
5290,
5621,
430,
12,
5332,
1638,
8736,
12,
1369,
3719,
95,
759,
4106,
18,
6923,
12,
12296,
72,
1380,
15,
3660,
1769,
759,
1884,
12,
474,
78,
33,
20,
31,
78,
32,
12296,
72,
1380,
31,
4106,
18,
6923,
12,
78,
9904,
34,
17,
21,
35,
3660,
2773,
7923,
1769,
759,
4106,
18,
6923,
12,
1369,
9078,
64,
82,
8863,
12296,
72,
1380,
413,
31,
97,
430,
12,
1369,
18,
31806,
2932,
17685,
17,
12706,
7923,
5,
29711,
21,
15329,
291,
780,
33,
3767,
31,
97,
12107,
430,
12,
1369,
18,
31806,
2932,
12706,
7923,
5,
29711,
21,
15329,
291,
780,
33,
5743,
31,
97,
430,
12,
5,
291,
780,
15329,
6494,
291,
3244,
2060,
33,
3244,
13673,
18,
1336,
18,
291,
2060,
12,
1369,
1769,
1075,
790,
28630,
382,
4469,
33,
291,
3244,
382,
4469,
12,
1369,
1769,
759,
430,
12,
1369,
18,
31806,
2932,
812,
18,
3190,
7923,
5,
29711,
21,
15329,
759,
4106,
18,
6923,
2932,
2896,
2773,
15,
291,
3244,
2060,
15,
3113,
267,
3469,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6494,
5839,
1248,
13937,
72,
1435,
95,
780,
1369,
31,
759,
474,
492,
33,
5036,
18,
588,
39,
20731,
1670,
5621,
474,
1883,
33,
5036,
18,
588,
1670,
1380,
5621,
474,
12296,
72,
1380,
33,
20,
31,
759,
780,
1892,
4106,
33,
2704,
780,
1892,
2932,
8863,
6494,
291,
780,
33,
5743,
31,
1884,
12,
474,
77,
33,
20,
31,
77,
32,
1883,
31,
77,
27245,
95,
1369,
33,
5036,
18,
588,
1670,
1528,
12,
77,
2934,
5290,
5621,
430,
12,
5332,
1638,
8736,
12,
1369,
3719,
95,
759,
4106,
18,
6923,
12,
12296,
72,
1380,
15,
3660,
1769,
759,
1884,
12,
474,
78,
33,
20,
31,
78,
32,
12296,
72,
1380,
31,
4106,
18,
6923,
12,
78,
2
] | ||
final PsiFile[] psiRoots = file.getPsiRoots(); | final FileViewProvider viewProvider = file.getViewProvider(); | protected void findMatches(MatchResultSink sink, final MatchOptions options) throws MalformedPatternException, UnsupportedPatternException { PsiDocumentManager.getInstance(project).commitAllDocuments(); matchContext.clear(); matchContext.setSink( new MatchConstraintsSink( sink, options.getMaxMatchesCount(), options.isDistinct(), options.isCaseSensitiveMatch() ) ); matchContext.setOptions(options); matchContext.setMatcher(visitor); CompiledPattern compiledPattern = null; synchronized(getClass()) { if (options ==lastOptions) { compiledPattern = lastPattern; } lastOptions = null; lastPattern = null; } if (compiledPattern==null) { compiledPattern = PatternCompiler.compilePattern(project,options); } if (compiledPattern== null) { return; } matchContext.setPattern(compiledPattern); matchContext.getSink().setMatchingProcess( scheduler ); scheduler.init(); progress = matchContext.getSink().getProgressIndicator(); visitor.setMatchContext(matchContext); if(isTesting) { // testing mode; final PsiElement[] elements = ((LocalSearchScope)options.getScope()).getScope(); for (PsiElement element : elements) { match(element); } matchContext.getSink().matchingFinished(); return; } SearchScope searchScope = compiledPattern.getScope(); if (searchScope==null) searchScope = options.getScope(); if (searchScope instanceof GlobalSearchScope) { final GlobalSearchScope scope = (GlobalSearchScope)searchScope; final ContentIterator ci = new ContentIterator() { public boolean processFile(VirtualFile fileOrDir) { if (!fileOrDir.isDirectory()) { final PsiFile file = PsiManager.getInstance(project).findFile(fileOrDir); if ((options.getFileType() == StdFileTypes.JAVA && file instanceof PsiJavaFile) || (options.getFileType() != StdFileTypes.JAVA && file instanceof XmlFile) ) { final PsiFile[] psiRoots = file.getPsiRoots(); for(PsiFile root:psiRoots) { ++totalFilesToScan; scheduler.addOneTask( new MatchOneFile(root) ); } } } return true; } }; final ProjectRootManager instance = ProjectRootManager.getInstance(project); ProjectFileIndex projectFileIndex = instance.getFileIndex(); final VirtualFile[] rootFiles = ApplicationManager.getApplication().runReadAction(new Computable<VirtualFile[]>() { public VirtualFile[] compute() { return (options.getFileType() == StdFileTypes.JAVA)? instance.getRootFiles(ProjectRootType.SOURCE): instance.getContentRoots() ; } }); HashSet<VirtualFile> visited = new HashSet<VirtualFile>(rootFiles.length); final VirtualFileFilter filter = new VirtualFileFilter() { public boolean accept(VirtualFile file) { if(!file.isDirectory()) return scope.contains(file); return true; } }; for (final VirtualFile rootFile : rootFiles) { if (visited.contains(rootFile)) continue; if (projectFileIndex.isInLibrarySource(rootFile) && !scope.isSearchInLibraries()) { continue; } ApplicationManager.getApplication().runReadAction(new Runnable() { public void run() { FileIndexImplUtil.iterateRecursively( rootFile, filter, ci ); } }); visited.add(rootFile); } /* @ todo factor out handlers, etc*/ } else { final PsiElement[] elementsToScan = ((LocalSearchScope)searchScope).getScope(); totalFilesToScan = elementsToScan.length; for (int i = 0; i < elementsToScan.length; ++i) { scheduler.addOneTask(new MatchOneFile(elementsToScan[i])); elementsToScan[i] = null; // to prevent long PsiElement reference } } if (scheduler.getTaskQueueEndAction()==null) { scheduler.setTaskQueueEndAction( new Runnable() { public void run() { matchContext.getSink().matchingFinished(); } } ); } scheduler.executeNext(); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/ec68037169795bc8ce41f0691b1d578c6437d5a7/MatcherImpl.java/buggy/plugins/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/MatcherImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1104,
6869,
12,
2060,
1253,
11326,
9049,
16,
727,
4639,
1320,
702,
13,
1216,
13311,
3234,
503,
16,
7221,
3234,
503,
225,
288,
565,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
4406,
2934,
7371,
1595,
12922,
5621,
565,
845,
1042,
18,
8507,
5621,
565,
845,
1042,
18,
542,
11326,
12,
1377,
394,
4639,
4878,
11326,
12,
3639,
9049,
16,
3639,
702,
18,
588,
2747,
6869,
1380,
9334,
3639,
702,
18,
291,
23402,
9334,
3639,
702,
18,
291,
2449,
14220,
2060,
1435,
1377,
262,
565,
11272,
565,
845,
1042,
18,
542,
1320,
12,
2116,
1769,
565,
845,
1042,
18,
542,
6286,
12,
3516,
1811,
1769,
565,
25854,
3234,
7743,
3234,
273,
446,
31,
565,
3852,
12,
588,
797,
10756,
288,
1377,
309,
261,
2116,
422,
2722,
1320,
13,
288,
3639,
7743,
3234,
273,
1142,
3234,
31,
1377,
289,
1377,
1142,
1320,
273,
446,
31,
1377,
1142,
3234,
273,
446,
31,
565,
289,
565,
309,
261,
19397,
3234,
631,
2011,
13,
288,
1377,
7743,
3234,
273,
225,
6830,
9213,
18,
11100,
3234,
12,
4406,
16,
2116,
1769,
565,
289,
565,
309,
261,
19397,
3234,
631,
446,
13,
288,
1377,
327,
31,
565,
289,
565,
845,
1042,
18,
542,
3234,
12,
19397,
3234,
1769,
565,
845,
1042,
18,
588,
11326,
7675,
542,
9517,
2227,
12,
8129,
11272,
565,
8129,
18,
2738,
5621,
565,
4007,
273,
845,
1042,
18,
588,
11326,
7675,
588,
5491,
13140,
5621,
565,
8000,
18,
542,
2060,
1042,
12,
1916,
1042,
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,
4750,
918,
1104,
6869,
12,
2060,
1253,
11326,
9049,
16,
727,
4639,
1320,
702,
13,
1216,
13311,
3234,
503,
16,
7221,
3234,
503,
225,
288,
565,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
4406,
2934,
7371,
1595,
12922,
5621,
565,
845,
1042,
18,
8507,
5621,
565,
845,
1042,
18,
542,
11326,
12,
1377,
394,
4639,
4878,
11326,
12,
3639,
9049,
16,
3639,
702,
18,
588,
2747,
6869,
1380,
9334,
3639,
702,
18,
291,
23402,
9334,
3639,
702,
18,
291,
2449,
14220,
2060,
1435,
1377,
262,
565,
11272,
565,
845,
1042,
18,
542,
1320,
12,
2116,
1769,
565,
845,
1042,
18,
542,
6286,
12,
3516,
1811,
1769,
565,
25854,
3234,
7743,
3234,
273,
446,
31,
565,
3852,
12,
2
] |
return new XSLTEngineSupport(TransformerFactory.newInstance()).isCustomURIResolverSupported(); | return new XSLTEngineSupport().isCustomURIResolverSupported(); | public static boolean isCustomURIResolverSupported() { return new XSLTEngineSupport(TransformerFactory.newInstance()).isCustomURIResolverSupported(); } | 3174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3174/4378f8c89e4becd95fa37c3b152abca60e12d6a4/TestUtil.java/clean/tests/org/tigris/juxy/TestUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
353,
3802,
3098,
4301,
7223,
1435,
288,
565,
327,
394,
20751,
4410,
6289,
7675,
291,
3802,
3098,
4301,
7223,
5621,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
353,
3802,
3098,
4301,
7223,
1435,
288,
565,
327,
394,
20751,
4410,
6289,
7675,
291,
3802,
3098,
4301,
7223,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
private void setExplorerSettings(I_CmsSession session, Hashtable parameters, CmsRequestContext reqCont, CmsXmlWpTemplateFile xmlTemplateDocument) { //get the actual user settings // first try to read them from the session String explorerSettings = null; int explorerSettingsValue = 0; explorerSettings = (String)session.getValue(C_PARA_EXPLORERSETTINGS); // if this fails, get the settings from the user obeject if(explorerSettings == null) { explorerSettings = (String)reqCont.currentUser().getAdditionalInfo(C_ADDITIONAL_INFO_EXPLORERSETTINGS); } //check if the default button was selected. // if so, delete all user settings so that they are set to the defaults later. if(parameters.get(C_PARA_DEFAULT) != null) { explorerSettings = null; } // if the settings are still empty, set them to default if(explorerSettings != null) { explorerSettingsValue = new Integer(explorerSettings).intValue(); } else { explorerSettingsValue = C_FILELIST_TITLE + C_FILELIST_TYPE + C_FILELIST_CHANGED; } // now update the datablocks in the template if((explorerSettingsValue & C_FILELIST_TITLE) > 0) { xmlTemplateDocument.setData(C_CHECKTITLE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKTITLE, " "); } if((explorerSettingsValue & C_FILELIST_TYPE) > 0) { xmlTemplateDocument.setData(C_CHECKTYPE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKTYPE, " "); } if((explorerSettingsValue & C_FILELIST_CHANGED) > 0) { xmlTemplateDocument.setData(C_CHECKCHANGED, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKCHANGED, " "); } if((explorerSettingsValue & C_FILELIST_SIZE) > 0) { xmlTemplateDocument.setData(C_CHECKSIZE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKSIZE, " "); } if((explorerSettingsValue & C_FILELIST_STATE) > 0) { xmlTemplateDocument.setData(C_CHECKSTATE, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKSTATE, " "); } if((explorerSettingsValue & C_FILELIST_OWNER) > 0) { xmlTemplateDocument.setData(C_CHECKOWNER, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKOWNER, " "); } if((explorerSettingsValue & C_FILELIST_GROUP) > 0) { xmlTemplateDocument.setData(C_CHECKGROUP, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKGROUP, " "); } if((explorerSettingsValue & C_FILELIST_ACCESS) > 0) { xmlTemplateDocument.setData(C_CHECKACCESS, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKACCESS, " "); } if((explorerSettingsValue & C_FILELIST_LOCKED) > 0) { xmlTemplateDocument.setData(C_CHECKLOCKEDBY, C_CHECKED); } else { xmlTemplateDocument.setData(C_CHECKLOCKEDBY, " "); } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/e4f91e520eaf4e85154410f66713717665141a5b/CmsPreferencesPanels.java/clean/src/com/opencms/workplace/CmsPreferencesPanels.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
444,
20938,
2628,
12,
45,
67,
4747,
2157,
1339,
16,
18559,
1472,
16,
2868,
2149,
21426,
1111,
660,
16,
16084,
59,
84,
2283,
812,
2025,
2283,
2519,
13,
288,
7734,
368,
588,
326,
3214,
729,
1947,
5375,
368,
1122,
775,
358,
855,
2182,
628,
326,
1339,
3639,
514,
22147,
2628,
273,
446,
31,
3639,
509,
22147,
2628,
620,
273,
374,
31,
3639,
22147,
2628,
273,
261,
780,
13,
3184,
18,
24805,
12,
39,
67,
2778,
37,
67,
2294,
6253,
916,
654,
19428,
1769,
7734,
368,
309,
333,
6684,
16,
336,
326,
1947,
628,
326,
729,
320,
2196,
937,
3639,
309,
12,
338,
11766,
2628,
422,
446,
13,
288,
5411,
22147,
2628,
273,
261,
780,
13,
3658,
660,
18,
2972,
1299,
7675,
588,
10552,
966,
12,
39,
67,
8355,
30525,
67,
5923,
67,
2294,
6253,
916,
654,
19428,
1769,
3639,
289,
7734,
368,
1893,
309,
326,
805,
3568,
1703,
3170,
18,
7734,
368,
309,
1427,
16,
1430,
777,
729,
1947,
1427,
716,
2898,
854,
444,
358,
326,
3467,
5137,
18,
3639,
309,
12,
3977,
18,
588,
12,
39,
67,
2778,
37,
67,
5280,
13,
480,
446,
13,
288,
5411,
22147,
2628,
273,
446,
31,
3639,
289,
7734,
368,
309,
326,
1947,
854,
4859,
1008,
16,
444,
2182,
358,
805,
3639,
309,
12,
338,
11766,
2628,
480,
446,
13,
288,
5411,
22147,
2628,
620,
273,
394,
2144,
12,
338,
11766,
2628,
2934,
474,
620,
5621,
3639,
289,
3639,
469,
288,
5411,
22147,
2628,
620,
273,
385,
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,
20938,
2628,
12,
45,
67,
4747,
2157,
1339,
16,
18559,
1472,
16,
2868,
2149,
21426,
1111,
660,
16,
16084,
59,
84,
2283,
812,
2025,
2283,
2519,
13,
288,
7734,
368,
588,
326,
3214,
729,
1947,
5375,
368,
1122,
775,
358,
855,
2182,
628,
326,
1339,
3639,
514,
22147,
2628,
273,
446,
31,
3639,
509,
22147,
2628,
620,
273,
374,
31,
3639,
22147,
2628,
273,
261,
780,
13,
3184,
18,
24805,
12,
39,
67,
2778,
37,
67,
2294,
6253,
916,
654,
19428,
1769,
7734,
368,
309,
333,
6684,
16,
336,
326,
1947,
628,
326,
729,
320,
2196,
937,
3639,
309,
12,
338,
11766,
2628,
422,
446,
13,
288,
5411,
22147,
2628,
273,
261,
780,
13,
3658,
2
] | ||
return this.implementation_vendor; | return this.implementationVendor; | public String getImplementationVendor() { return this.implementation_vendor; }; | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/0a7f0ac7459a9f9ba3f69e907ae5192937b6f0bd/DescriptorSpecification.java/buggy/src/org/openscience/cdk/qsar/DescriptorSpecification.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
13621,
14786,
1435,
288,
3639,
327,
333,
18,
30810,
14786,
31,
565,
289,
31,
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
] | [
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
13621,
14786,
1435,
288,
3639,
327,
333,
18,
30810,
14786,
31,
565,
289,
31,
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
] |
long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { longs[j] = DataTools.read4UnsignedBytes(in, littleEndian); | long pointer = in.readInt(); in.seek((int) (globalOffset + pointer)); } for (int j=0; j<count; j++) { longs[j] = in.readInt(); | public static Hashtable getIFD(RandomAccessStream in, long ifdNum, long globalOffset, long offset, boolean littleEndian) throws IOException { Hashtable ifd = new Hashtable(); // save little-endian flag to internal LITTLE_ENDIAN tag ifd.put(new Integer(LITTLE_ENDIAN), new Boolean(littleEndian)); // read in directory entries for this IFD if (DEBUG) { debug("getIFDs: seeking IFD #" + ifdNum + " at " + (globalOffset != 0 ? (globalOffset + "+" + offset) : ("" + offset))); } in.seek(globalOffset + offset); int numEntries = DataTools.read2UnsignedBytes(in, littleEndian); if (DEBUG) debug("getIFDs: " + numEntries + " directory entries to read"); if (numEntries == 0 || numEntries == 1) return ifd; for (int i=0; i<numEntries; i++) { in.seek(globalOffset + offset + 2 + 12 * i); int tag = DataTools.read2UnsignedBytes(in, littleEndian); int type = DataTools.read2UnsignedBytes(in, littleEndian); int count = (int) DataTools.read4UnsignedBytes(in, littleEndian); if (DEBUG) { debug("getIFDs: read " + getIFDTagName(tag) + " (type=" + getIFDTypeName(type) + "; count=" + count + ")"); } if (count < 0) return null; // invalid data Object value = null; if (type == BYTE) { // 8-bit unsigned integer short[] bytes = new short[count]; if (count > 4) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { bytes[j] = DataTools.readUnsignedByte(in); } if (bytes.length == 1) value = new Short(bytes[0]); else value = bytes; } else if (type == ASCII) { // 8-bit byte that contain a 7-bit ASCII code; // the last byte must be NUL (binary zero) byte[] ascii = new byte[count]; if (count > 4) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } in.readFully(ascii); // count number of null terminators int nullCount = 0; for (int j=0; j<count; j++) { if (ascii[j] == 0 || j == count - 1) nullCount++; } // convert character array to array of strings String[] strings = new String[nullCount]; int c = 0, ndx = -1; for (int j=0; j<count; j++) { if (ascii[j] == 0) { strings[c++] = new String(ascii, ndx + 1, j - ndx - 1); ndx = j; } else if (j == count - 1) { // handle non-null-terminated strings strings[c++] = new String(ascii, ndx + 1, j - ndx); } } if (strings.length == 1) value = strings[0]; else value = strings; } else if (type == SHORT) { // 16-bit (2-byte) unsigned integer int[] shorts = new int[count]; if (count > 2) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { shorts[j] = DataTools.read2UnsignedBytes(in, littleEndian); } if (shorts.length == 1) value = new Integer(shorts[0]); else value = shorts; } else if (type == LONG) { // 32-bit (4-byte) unsigned integer long[] longs = new long[count]; if (count > 1) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { longs[j] = DataTools.read4UnsignedBytes(in, littleEndian); } if (longs.length == 1) value = new Long(longs[0]); else value = longs; } else if (type == RATIONAL) { // Two LONGs: the first represents the numerator of a fraction; // the second, the denominator TiffRational[] rationals = new TiffRational[count]; long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); for (int j=0; j<count; j++) { long numer = DataTools.read4UnsignedBytes(in, littleEndian); long denom = DataTools.read4UnsignedBytes(in, littleEndian); rationals[j] = new TiffRational(numer, denom); } if (rationals.length == 1) value = rationals[0]; else value = rationals; } else if (type == SBYTE || type == UNDEFINED) { // SBYTE: An 8-bit signed (twos-complement) integer // UNDEFINED: An 8-bit byte that may contain anything, // depending on the definition of the field byte[] sbytes = new byte[count]; if (count > 4) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } in.readFully(sbytes); if (sbytes.length == 1) value = new Byte(sbytes[0]); else value = sbytes; } else if (type == SSHORT) { // A 16-bit (2-byte) signed (twos-complement) integer short[] sshorts = new short[count]; if (count > 2) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { sshorts[j] = DataTools.read2SignedBytes(in, littleEndian); } if (sshorts.length == 1) value = new Short(sshorts[0]); else value = sshorts; } else if (type == SLONG) { // A 32-bit (4-byte) signed (twos-complement) integer int[] slongs = new int[count]; if (count > 1) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { slongs[j] = DataTools.read4SignedBytes(in, littleEndian); } if (slongs.length == 1) value = new Integer(slongs[0]); else value = slongs; } else if (type == SRATIONAL) { // Two SLONG's: the first represents the numerator of a fraction, // the second the denominator TiffRational[] srationals = new TiffRational[count]; long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); for (int j=0; j<count; j++) { int numer = DataTools.read4SignedBytes(in, littleEndian); int denom = DataTools.read4SignedBytes(in, littleEndian); srationals[j] = new TiffRational(numer, denom); } if (srationals.length == 1) value = srationals[0]; else value = srationals; } else if (type == FLOAT) { // Single precision (4-byte) IEEE format float[] floats = new float[count]; if (count > 1) { long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); } for (int j=0; j<count; j++) { floats[j] = DataTools.readFloat(in, littleEndian); } if (floats.length == 1) value = new Float(floats[0]); else value = floats; } else if (type == DOUBLE) { // Double precision (8-byte) IEEE format double[] doubles = new double[count]; long pointer = DataTools.read4UnsignedBytes(in, littleEndian); in.seek(globalOffset + pointer); for (int j=0; j<count; j++) { doubles[j] = DataTools.readDouble(in, littleEndian); } if (doubles.length == 1) value = new Double(doubles[0]); else value = doubles; } if (value != null) ifd.put(new Integer(tag), value); } in.seek(globalOffset + offset + 2 + 12 * numEntries); return ifd; } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/2df09d33bfdc966378aae0cc09cb503afb983bc2/TiffTools.java/clean/loci/formats/TiffTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
18559,
336,
5501,
40,
12,
8529,
1862,
1228,
316,
16,
565,
1525,
309,
72,
2578,
16,
1525,
2552,
2335,
16,
1525,
1384,
16,
1250,
328,
10609,
13,
565,
1216,
1860,
225,
288,
565,
18559,
309,
72,
273,
394,
18559,
5621,
565,
368,
1923,
12720,
17,
22910,
2982,
358,
2713,
511,
30972,
900,
67,
30597,
1047,
565,
309,
72,
18,
458,
12,
2704,
2144,
12,
15716,
56,
900,
67,
30597,
3631,
394,
3411,
12,
80,
10609,
10019,
565,
368,
855,
316,
1867,
3222,
364,
333,
11083,
40,
565,
309,
261,
9394,
13,
288,
1377,
1198,
2932,
588,
5501,
22831,
30,
6520,
310,
11083,
40,
31526,
397,
309,
72,
2578,
397,
315,
622,
315,
397,
3639,
261,
6347,
2335,
480,
374,
692,
261,
6347,
2335,
397,
17487,
397,
1384,
13,
294,
261,
3660,
397,
1384,
3719,
1769,
565,
289,
565,
316,
18,
16508,
12,
6347,
2335,
397,
1384,
1769,
565,
509,
818,
5400,
273,
1910,
10348,
18,
896,
22,
13290,
2160,
12,
267,
16,
328,
10609,
1769,
565,
309,
261,
9394,
13,
1198,
2932,
588,
5501,
22831,
30,
315,
397,
818,
5400,
397,
315,
1867,
3222,
358,
855,
8863,
565,
309,
261,
2107,
5400,
422,
374,
747,
818,
5400,
422,
404,
13,
327,
309,
72,
31,
565,
364,
261,
474,
277,
33,
20,
31,
277,
32,
2107,
5400,
31,
277,
27245,
288,
1377,
316,
18,
16508,
12,
6347,
2335,
397,
1384,
397,
576,
397,
2593,
380,
277,
1769,
1377,
509,
1047,
273,
1910,
10348,
18,
896,
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,
760,
18559,
336,
5501,
40,
12,
8529,
1862,
1228,
316,
16,
565,
1525,
309,
72,
2578,
16,
1525,
2552,
2335,
16,
1525,
1384,
16,
1250,
328,
10609,
13,
565,
1216,
1860,
225,
288,
565,
18559,
309,
72,
273,
394,
18559,
5621,
565,
368,
1923,
12720,
17,
22910,
2982,
358,
2713,
511,
30972,
900,
67,
30597,
1047,
565,
309,
72,
18,
458,
12,
2704,
2144,
12,
15716,
56,
900,
67,
30597,
3631,
394,
3411,
12,
80,
10609,
10019,
565,
368,
855,
316,
1867,
3222,
364,
333,
11083,
40,
565,
309,
261,
9394,
13,
288,
1377,
1198,
2932,
588,
5501,
22831,
30,
6520,
310,
11083,
40,
31526,
397,
309,
72,
2578,
397,
315,
622,
315,
397,
3639,
261,
6347,
2
] |
public void addSource(IFile resource, IPath indexedContainer){ | public void addSource(IFile resource, IPath indexedContainers, boolean checkEncounteredHeaders){ | public void addSource(IFile resource, IPath indexedContainer){ IProject project = resource.getProject(); boolean indexEnabled = false; if (project != null) indexEnabled = isIndexEnabled(project); else org.eclipse.cdt.internal.core.model.Util.log(null, "IndexManager addSource: File has no project associated : " + resource.getName(), ICLogConstants.CDT); //$NON-NLS-1$ if (CCorePlugin.getDefault() == null) return; if (indexEnabled){ AddCompilationUnitToIndex job = new AddCompilationUnitToIndex(resource, indexedContainer, this); //If we are in WAITING mode, we need to kick ourselves into enablement if (!jobSet.add(job.resource.getLocation()) && enabledState()==ENABLED) return; if (this.awaitingJobsCount() < MAX_FILES_IN_MEMORY) { // reduces the chance that the file is open later on, preventing it from being deleted if (!job.initializeContents()) return; } request(job); } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/92d190f0ab1c3db65bb37b50929e0604e86e87b4/IndexManager.java/buggy/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
1830,
12,
45,
812,
1058,
16,
467,
743,
8808,
2170,
15329,
9506,
202,
45,
4109,
1984,
273,
1058,
18,
588,
4109,
5621,
9506,
202,
6494,
770,
1526,
273,
629,
31,
202,
202,
430,
261,
4406,
480,
446,
13,
1082,
202,
1615,
1526,
273,
353,
1016,
1526,
12,
4406,
1769,
202,
202,
12107,
1082,
202,
3341,
18,
20416,
18,
4315,
88,
18,
7236,
18,
3644,
18,
2284,
18,
1304,
18,
1330,
12,
2011,
16,
315,
1016,
1318,
527,
1830,
30,
1387,
711,
1158,
1984,
3627,
294,
315,
397,
1058,
18,
17994,
9334,
26899,
1343,
2918,
18,
39,
9081,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
4405,
202,
430,
261,
39,
4670,
3773,
18,
588,
1868,
1435,
422,
446,
13,
327,
31,
6862,
202,
430,
261,
1615,
1526,
15329,
1082,
202,
986,
19184,
2802,
19418,
1719,
273,
394,
1436,
19184,
2802,
19418,
12,
3146,
16,
8808,
2170,
16,
333,
1769,
25083,
202,
759,
2047,
732,
854,
316,
26859,
1360,
1965,
16,
732,
1608,
358,
23228,
19801,
1368,
4237,
475,
1082,
202,
430,
16051,
4688,
694,
18,
1289,
12,
4688,
18,
3146,
18,
588,
2735,
10756,
597,
9506,
202,
5745,
1119,
1435,
631,
13560,
13,
9506,
202,
2463,
31,
6862,
6862,
202,
430,
261,
2211,
18,
30515,
310,
7276,
1380,
1435,
411,
4552,
67,
12669,
67,
706,
67,
24329,
13,
288,
9506,
202,
759,
30568,
326,
17920,
716,
326,
585,
353,
1696,
5137,
603,
16,
5309,
310,
518,
628,
3832,
4282,
9506,
202,
430,
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,
527,
1830,
12,
45,
812,
1058,
16,
467,
743,
8808,
2170,
15329,
9506,
202,
45,
4109,
1984,
273,
1058,
18,
588,
4109,
5621,
9506,
202,
6494,
770,
1526,
273,
629,
31,
202,
202,
430,
261,
4406,
480,
446,
13,
1082,
202,
1615,
1526,
273,
353,
1016,
1526,
12,
4406,
1769,
202,
202,
12107,
1082,
202,
3341,
18,
20416,
18,
4315,
88,
18,
7236,
18,
3644,
18,
2284,
18,
1304,
18,
1330,
12,
2011,
16,
315,
1016,
1318,
527,
1830,
30,
1387,
711,
1158,
1984,
3627,
294,
315,
397,
1058,
18,
17994,
9334,
26899,
1343,
2918,
18,
39,
9081,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
4405,
202,
430,
261,
39,
4670,
3773,
18,
588,
2
] |
Account copy = receivables.copy(); | Account copy = myReceivables.copy(); | public void testCopyMakesCopiesOfEntriesInNewAccount() { Account copy = receivables.copy(); assertEquals(Money.dollars(400), copy.balance()); copy.addEntry(Money.dollars(200), MfDate.today()); assertEquals(Money.dollars(600), copy.balance()); assertEquals(Money.dollars(400), receivables.balance()); assertTrue(copy.isValid()); } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/ac369c451a39e55d2f75faa3035d179bd40b6349/AccountTester.java/buggy/projects/agreement/framework/java/test/postingrules/AccountTester.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2951,
14534,
15670,
951,
5400,
382,
1908,
3032,
1435,
288,
3639,
6590,
1610,
273,
3399,
4779,
427,
1538,
18,
3530,
5621,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
12,
16010,
3631,
1610,
18,
12296,
10663,
3639,
1610,
18,
1289,
1622,
12,
23091,
18,
72,
22382,
5913,
12,
6976,
3631,
490,
74,
1626,
18,
30064,
10663,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
12,
28133,
3631,
1610,
18,
12296,
10663,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
12,
16010,
3631,
2637,
427,
1538,
18,
12296,
10663,
3639,
1815,
5510,
12,
3530,
18,
26810,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2951,
14534,
15670,
951,
5400,
382,
1908,
3032,
1435,
288,
3639,
6590,
1610,
273,
3399,
4779,
427,
1538,
18,
3530,
5621,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
12,
16010,
3631,
1610,
18,
12296,
10663,
3639,
1610,
18,
1289,
1622,
12,
23091,
18,
72,
22382,
5913,
12,
6976,
3631,
490,
74,
1626,
18,
30064,
10663,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
12,
28133,
3631,
1610,
18,
12296,
10663,
3639,
1815,
8867,
12,
23091,
18,
72,
22382,
5913,
12,
16010,
3631,
2637,
427,
1538,
18,
12296,
10663,
3639,
1815,
5510,
12,
3530,
18,
26810,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
protected void genStorePrologue(Context ctx, Tree tree) { | protected void genStorePrologue(Context ctx, Tree tree) throws JCode.OffsetTooBigException { | protected void genStorePrologue(Context ctx, Tree tree) { Symbol sym = tree.symbol(); switch (tree) { case Ident(_): if (sym.owner().isClass()) ctx.code.emitALOAD_0(); break; case Select(Tree qualifier, _): if (!isStaticMember(sym)) genLoadQualifier(ctx, tree, true); break; default: throw global.fail("unexpected left-hand side", tree); } } | 55146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55146/c77d194dd13b0993bfe9967759f9164c47156bc8/GenJVM.java/buggy/sources/scalac/backend/jvm/GenJVM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3157,
2257,
626,
1330,
344,
12,
1042,
1103,
16,
4902,
2151,
13,
1216,
804,
1085,
18,
2335,
10703,
9901,
503,
288,
3639,
8565,
5382,
273,
2151,
18,
7175,
5621,
3639,
1620,
261,
3413,
13,
288,
3639,
648,
13128,
24899,
4672,
5411,
309,
261,
8117,
18,
8443,
7675,
291,
797,
10756,
7734,
1103,
18,
710,
18,
18356,
1013,
51,
1880,
67,
20,
5621,
5411,
898,
31,
3639,
648,
6766,
12,
2471,
12327,
16,
389,
4672,
5411,
309,
16051,
291,
5788,
4419,
12,
8117,
3719,
7734,
3157,
2563,
16185,
12,
5900,
16,
2151,
16,
638,
1769,
5411,
898,
31,
3639,
805,
30,
5411,
604,
2552,
18,
6870,
2932,
21248,
2002,
17,
2349,
4889,
3113,
2151,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3157,
2257,
626,
1330,
344,
12,
1042,
1103,
16,
4902,
2151,
13,
1216,
804,
1085,
18,
2335,
10703,
9901,
503,
288,
3639,
8565,
5382,
273,
2151,
18,
7175,
5621,
3639,
1620,
261,
3413,
13,
288,
3639,
648,
13128,
24899,
4672,
5411,
309,
261,
8117,
18,
8443,
7675,
291,
797,
10756,
7734,
1103,
18,
710,
18,
18356,
1013,
51,
1880,
67,
20,
5621,
5411,
898,
31,
3639,
648,
6766,
12,
2471,
12327,
16,
389,
4672,
5411,
309,
16051,
291,
5788,
4419,
12,
8117,
3719,
7734,
3157,
2563,
16185,
12,
5900,
16,
2151,
16,
638,
1769,
5411,
898,
31,
3639,
805,
30,
5411,
604,
2552,
18,
6870,
2932,
21248,
2002,
17,
2349,
4889,
3113,
2151,
1769,
3639,
289,
2
] |
if(result==null&&createMBeanServer){ result=createMBeanServer(); | if (result == null && createMBeanServer) { result = createMBeanServer(); | protected synchronized MBeanServer findMBeanServer(){ MBeanServer result=null; // create the mbean server try{ if(useMBeanServer){ if (findTigerMbeanServer) { result = findTigerMBeanServer(); } if (result == null) { // lets piggy back on another MBeanServer - // we could be in an appserver! List list=MBeanServerFactory.findMBeanServer(null); if(list!=null&&list.size()>0){ result=(MBeanServer) list.get(0); } } } if(result==null&&createMBeanServer){ result=createMBeanServer(); } }catch(NoClassDefFoundError e){ log.error("Couldnot load MBeanServer",e); }catch(Throwable e){ // probably don't have access to system properties log.error("Failed to initialize MBeanServer",e); } return result; } | 17032 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17032/1ad52f420959e7b55cf301f0f8f61c8d4f4aef98/ManagementContext.java/clean/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3852,
16622,
2081,
1104,
18089,
2081,
1435,
95,
3639,
16622,
2081,
563,
33,
2011,
31,
3639,
368,
752,
326,
29114,
1438,
3639,
775,
95,
5411,
309,
12,
1202,
18089,
2081,
15329,
7734,
309,
261,
4720,
56,
360,
264,
49,
14496,
2081,
13,
288,
10792,
563,
273,
1104,
56,
360,
264,
18089,
2081,
5621,
7734,
289,
7734,
309,
261,
2088,
422,
446,
13,
288,
10792,
368,
14557,
293,
360,
7797,
1473,
603,
4042,
16622,
2081,
300,
10792,
368,
732,
3377,
506,
316,
392,
595,
3567,
5,
10792,
987,
666,
33,
18089,
2081,
1733,
18,
4720,
18089,
2081,
12,
2011,
1769,
10792,
309,
12,
1098,
5,
33,
2011,
10,
10,
1098,
18,
1467,
1435,
34,
20,
15329,
13491,
563,
28657,
18089,
2081,
13,
666,
18,
588,
12,
20,
1769,
10792,
289,
7734,
289,
5411,
289,
5411,
309,
12,
2088,
631,
2011,
10,
10,
2640,
18089,
2081,
15329,
7734,
563,
33,
2640,
18089,
2081,
5621,
5411,
289,
3639,
289,
14683,
12,
2279,
797,
3262,
2043,
668,
425,
15329,
5411,
613,
18,
1636,
2932,
4445,
902,
1262,
16622,
2081,
3113,
73,
1769,
3639,
289,
14683,
12,
15155,
425,
15329,
5411,
368,
8656,
2727,
1404,
1240,
2006,
358,
2619,
1790,
5411,
613,
18,
1636,
2932,
2925,
358,
4046,
16622,
2081,
3113,
73,
1769,
3639,
289,
3639,
327,
563,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3852,
16622,
2081,
1104,
18089,
2081,
1435,
95,
3639,
16622,
2081,
563,
33,
2011,
31,
3639,
368,
752,
326,
29114,
1438,
3639,
775,
95,
5411,
309,
12,
1202,
18089,
2081,
15329,
7734,
309,
261,
4720,
56,
360,
264,
49,
14496,
2081,
13,
288,
10792,
563,
273,
1104,
56,
360,
264,
18089,
2081,
5621,
7734,
289,
7734,
309,
261,
2088,
422,
446,
13,
288,
10792,
368,
14557,
293,
360,
7797,
1473,
603,
4042,
16622,
2081,
300,
10792,
368,
732,
3377,
506,
316,
392,
595,
3567,
5,
10792,
987,
666,
33,
18089,
2081,
1733,
18,
4720,
18089,
2081,
12,
2011,
1769,
10792,
309,
12,
1098,
5,
33,
2011,
10,
10,
1098,
18,
1467,
1435,
34,
20,
15329,
13491,
563,
2
] |
ICSourceLocator sl = getSourceLocator(); if ( sl != null ) return ( sl.findSourceElement( handle ) != null ); | ISourceLocator sl = getSourceLocator(); if ( sl instanceof ICSourceLocator ) return ( ((ICSourceLocator)sl).findSourceElement( handle ) != null ); else if ( sl instanceof CSourceLookupDirector ) { return true; } | public boolean isTargetBreakpoint( ICBreakpoint breakpoint ) { // Problem: gdb doesn't accept breakpoint if the file is specified by full path (depends on the current directory). // This prevents us from using gdb as a breakpoint filter. The case when two unrelated projects contain files // with the same name will cause problems. // Current solution: the source locator is used as a breakpoint filter. IResource resource = breakpoint.getMarker().getResource(); if ( breakpoint instanceof ICAddressBreakpoint ) return supportsAddressBreakpoint( (ICAddressBreakpoint)breakpoint ); if ( breakpoint instanceof ICLineBreakpoint ) { try { String handle = breakpoint.getSourceHandle(); ICSourceLocator sl = getSourceLocator(); if ( sl != null ) return ( sl.findSourceElement( handle ) != null ); } catch( CoreException e ) { return false; } } else { IProject project = resource.getProject(); if ( project != null && project.exists() ) { ICSourceLocator sl = getSourceLocator(); if ( sl != null ) return sl.contains( project ); if ( project.equals( getProject() ) ) return true; return CDebugUtils.isReferencedProject( getProject(), project ); } } return true; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/af37524c7ae90496885c26ddfc66724b26d89db9/CBreakpointManager.java/clean/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
2326,
20552,
12,
26899,
20552,
18820,
262,
288,
202,
202,
759,
21685,
30,
314,
1966,
3302,
1404,
2791,
18820,
309,
326,
585,
353,
1269,
635,
1983,
589,
261,
27360,
603,
326,
783,
1867,
2934,
202,
202,
759,
1220,
17793,
584,
628,
1450,
314,
1966,
487,
279,
18820,
1034,
18,
1021,
648,
1347,
2795,
640,
9243,
10137,
912,
1390,
3196,
202,
759,
598,
326,
1967,
508,
903,
4620,
9688,
18,
202,
202,
759,
6562,
6959,
30,
326,
1084,
8871,
353,
1399,
487,
279,
18820,
1034,
18,
202,
202,
45,
1420,
1058,
273,
18820,
18,
588,
7078,
7675,
588,
1420,
5621,
202,
202,
430,
261,
18820,
1276,
26899,
1887,
20552,
262,
1082,
202,
2463,
6146,
1887,
20552,
12,
261,
2871,
1887,
20552,
13,
8820,
1153,
11272,
202,
202,
430,
261,
18820,
1276,
26899,
1670,
20552,
262,
288,
1082,
202,
698,
288,
9506,
202,
780,
1640,
273,
18820,
18,
588,
1830,
3259,
5621,
9506,
202,
2871,
1830,
5786,
2020,
273,
7889,
5786,
5621,
9506,
202,
430,
261,
2020,
480,
446,
262,
6862,
202,
2463,
261,
2020,
18,
4720,
1830,
1046,
12,
1640,
262,
480,
446,
11272,
1082,
202,
97,
1082,
202,
14683,
12,
30015,
425,
262,
288,
9506,
202,
2463,
629,
31,
1082,
202,
97,
202,
202,
97,
202,
202,
12107,
288,
1082,
202,
45,
4109,
1984,
273,
1058,
18,
588,
4109,
5621,
1082,
202,
430,
261,
1984,
480,
446,
597,
1984,
18,
1808,
1435,
262,
288,
9506,
202,
2871,
1830,
5786,
2020,
273,
7889,
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,
1250,
353,
2326,
20552,
12,
26899,
20552,
18820,
262,
288,
202,
202,
759,
21685,
30,
314,
1966,
3302,
1404,
2791,
18820,
309,
326,
585,
353,
1269,
635,
1983,
589,
261,
27360,
603,
326,
783,
1867,
2934,
202,
202,
759,
1220,
17793,
584,
628,
1450,
314,
1966,
487,
279,
18820,
1034,
18,
1021,
648,
1347,
2795,
640,
9243,
10137,
912,
1390,
3196,
202,
759,
598,
326,
1967,
508,
903,
4620,
9688,
18,
202,
202,
759,
6562,
6959,
30,
326,
1084,
8871,
353,
1399,
487,
279,
18820,
1034,
18,
202,
202,
45,
1420,
1058,
273,
18820,
18,
588,
7078,
7675,
588,
1420,
5621,
202,
202,
430,
261,
18820,
1276,
26899,
1887,
20552,
262,
1082,
202,
2463,
6146,
1887,
2
] |
return filename.endsWith(".h") || filename.endsWith(".c") || filename.endsWith(".cpp") || filename.endsWith(".cxx") || (new File(dir.getAbsolutePath() + System.getProperty("file.separator") + filename).isDirectory()); | return filename.endsWith(".h") || filename.endsWith(".c") || filename.endsWith(".cpp") || filename.endsWith(".cxx") || filename.endsWith(".cc") || (new File(dir.getAbsolutePath() + System.getProperty("file.separator") + filename).isDirectory()); | public boolean accept(File dir, String filename) { return filename.endsWith(".h") || filename.endsWith(".c") || filename.endsWith(".cpp") || filename.endsWith(".cxx") || (new File(dir.getAbsolutePath() + System.getProperty("file.separator") + filename).isDirectory()); } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/d80b5895a8f2b0c7e5b075d6eba4f7f652fd40a1/CPPLanguage.java/buggy/pmd/src/net/sourceforge/pmd/cpd/CPPLanguage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1250,
2791,
12,
812,
1577,
16,
514,
1544,
13,
288,
5411,
327,
1544,
18,
5839,
1190,
2932,
18,
76,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
71,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
4057,
84,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
71,
5279,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
952,
7923,
747,
261,
2704,
1387,
12,
1214,
18,
588,
10368,
743,
1435,
397,
2332,
18,
588,
1396,
2932,
768,
18,
11287,
7923,
397,
1544,
2934,
291,
2853,
10663,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1250,
2791,
12,
812,
1577,
16,
514,
1544,
13,
288,
5411,
327,
1544,
18,
5839,
1190,
2932,
18,
76,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
71,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
4057,
84,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
71,
5279,
7923,
747,
1544,
18,
5839,
1190,
2932,
18,
952,
7923,
747,
261,
2704,
1387,
12,
1214,
18,
588,
10368,
743,
1435,
397,
2332,
18,
588,
1396,
2932,
768,
18,
11287,
7923,
397,
1544,
2934,
291,
2853,
10663,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
return engine.isPropertySetted(Properties.ROW_NUMBER); } | return engine.isPropertySetted(Properties.ROW_NUMBER); } | public final boolean isRowNumberSetted() { return engine.isPropertySetted(Properties.ROW_NUMBER); } | 6232 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6232/1f1850be471d4b8bfd2f3c50aa61bc39bf91259a/ListComponent.java/buggy/org.rcfaces.core/src/org/rcfaces/core/component/ListComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
1250,
353,
1999,
1854,
694,
2344,
1435,
288,
3639,
327,
4073,
18,
291,
1396,
694,
2344,
12,
2297,
18,
11226,
67,
9931,
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,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
1250,
353,
1999,
1854,
694,
2344,
1435,
288,
3639,
327,
4073,
18,
291,
1396,
694,
2344,
12,
2297,
18,
11226,
67,
9931,
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,
-100,
-100
] |
ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 10, image); | LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, context.getCompilationUnit(), rewrite, 10, image); proposal.markAsSelection(rewrite, child); | private boolean getAddBlockProposals(IInvocationContext context, ASTNode node, Collection resultingCollections) throws CoreException { Statement statement= ASTResolving.findParentStatement(node); if (statement == null) { return false; } if (!isControlStatementWithBlock(statement)) { if (!isControlStatementWithBlock(statement.getParent())) { return false; } int statementStart= statement.getStartPosition(); int statementEnd= statementStart + statement.getLength(); int offset= context.getSelectionOffset(); int length= context.getSelectionLength(); if (length == 0) { if (offset != statementEnd) { // cursor at end return false; } } else { if (offset > statementStart || offset + length < statementEnd) { // statement selected return false; } } statement= (Statement) statement.getParent(); } int childProperty= -1; ASTNode child= null; switch (statement.getNodeType()) { case ASTNode.IF_STATEMENT: int selectionStart= context.getSelectionOffset(); int selectionEnd= context.getSelectionOffset() + context.getSelectionLength(); ASTNode then= ((IfStatement) statement).getThenStatement(); if (selectionEnd <= then.getStartPosition() + then.getLength()) { if (!(then instanceof Block)) { childProperty= ASTNodeConstants.THEN_STATEMENT; child= then; } } else if (selectionStart >= then.getStartPosition() + then.getLength()) { ASTNode elseStatement= ((IfStatement) statement).getElseStatement(); if (!(elseStatement instanceof Block)) { childProperty= ASTNodeConstants.ELSE_STATEMENT; child= elseStatement; } } break; case ASTNode.WHILE_STATEMENT: ASTNode whileBody= ((WhileStatement) statement).getBody(); if (!(whileBody instanceof Block)) { childProperty= ASTNodeConstants.BODY; child= whileBody; } break; case ASTNode.FOR_STATEMENT: ASTNode forBody= ((ForStatement) statement).getBody(); if (!(forBody instanceof Block)) { childProperty= ASTNodeConstants.BODY; child= forBody; } break; case ASTNode.DO_STATEMENT: ASTNode doBody= ((DoStatement) statement).getBody(); if (!(doBody instanceof Block)) { childProperty= ASTNodeConstants.BODY; child= doBody; } break; default: } if (child == null) { return false; } if (resultingCollections == null) { return true; } AST ast= statement.getAST(); ASTRewrite rewrite= new ASTRewrite(statement); ASTNode childPlaceholder= rewrite.createMove(child); Block replacingBody= ast.newBlock(); replacingBody.statements().add(childPlaceholder); rewrite.markAsInsert(statement, childProperty, replacingBody, null); String label; if (childProperty == ASTNodeConstants.THEN_STATEMENT) { label = CorrectionMessages.getString("QuickAssistProcessor.replacethenwithblock.description");//$NON-NLS-1$ } else if (childProperty == ASTNodeConstants.ELSE_STATEMENT) { label = CorrectionMessages.getString("QuickAssistProcessor.replaceelsewithblock.description");//$NON-NLS-1$ } else { label = CorrectionMessages.getString("QuickAssistProcessor.replacebodywithblock.description");//$NON-NLS-1$ } Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE); ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 10, image); proposal.ensureNoModifications(); resultingCollections.add(proposal); return true; } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/759ec5819894f610708249db1070b3af8574c605/QuickAssistProcessor.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
336,
986,
1768,
626,
22536,
12,
45,
9267,
1042,
819,
16,
9183,
907,
756,
16,
2200,
8156,
15150,
13,
1216,
30015,
288,
202,
202,
3406,
3021,
33,
9183,
2903,
6282,
18,
4720,
3054,
3406,
12,
2159,
1769,
202,
202,
430,
261,
11516,
422,
446,
13,
288,
1082,
202,
2463,
629,
31,
202,
202,
97,
202,
202,
430,
16051,
291,
3367,
3406,
1190,
1768,
12,
11516,
3719,
288,
1082,
202,
430,
16051,
291,
3367,
3406,
1190,
1768,
12,
11516,
18,
588,
3054,
1435,
3719,
288,
9506,
202,
2463,
629,
31,
1082,
202,
97,
1082,
202,
474,
3021,
1685,
33,
3021,
18,
588,
23785,
5621,
1082,
202,
474,
3021,
1638,
33,
3021,
1685,
397,
3021,
18,
588,
1782,
5621,
25083,
202,
474,
1384,
33,
819,
18,
588,
6233,
2335,
5621,
1082,
202,
474,
769,
33,
819,
18,
588,
6233,
1782,
5621,
1082,
202,
430,
261,
2469,
422,
374,
13,
288,
9506,
202,
430,
261,
3348,
480,
3021,
1638,
13,
288,
368,
3347,
622,
679,
6862,
202,
2463,
629,
31,
9506,
202,
97,
1082,
202,
97,
469,
288,
9506,
202,
430,
261,
3348,
405,
3021,
1685,
747,
1384,
397,
769,
411,
3021,
1638,
13,
288,
368,
3021,
3170,
6862,
202,
2463,
629,
31,
9506,
202,
97,
1082,
202,
97,
1082,
202,
11516,
33,
261,
3406,
13,
3021,
18,
588,
3054,
5621,
202,
202,
97,
9506,
202,
474,
1151,
1396,
33,
300,
21,
31,
202,
202,
9053,
907,
1151,
33,
446,
31,
202,
202,
9610,
261,
11516,
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,
1250,
336,
986,
1768,
626,
22536,
12,
45,
9267,
1042,
819,
16,
9183,
907,
756,
16,
2200,
8156,
15150,
13,
1216,
30015,
288,
202,
202,
3406,
3021,
33,
9183,
2903,
6282,
18,
4720,
3054,
3406,
12,
2159,
1769,
202,
202,
430,
261,
11516,
422,
446,
13,
288,
1082,
202,
2463,
629,
31,
202,
202,
97,
202,
202,
430,
16051,
291,
3367,
3406,
1190,
1768,
12,
11516,
3719,
288,
1082,
202,
430,
16051,
291,
3367,
3406,
1190,
1768,
12,
11516,
18,
588,
3054,
1435,
3719,
288,
9506,
202,
2463,
629,
31,
1082,
202,
97,
1082,
202,
474,
3021,
1685,
33,
3021,
18,
588,
23785,
5621,
1082,
202,
474,
3021,
1638,
33,
3021,
1685,
397,
3021,
18,
588,
2
] |
void setBorderBottomStyle(String borderstyle); | void setBorderBottomStyle( String borderstyle ); | void setBorderBottomStyle(String borderstyle); | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/418b538dedc46927b62e9d884dd3fc2419ed5e34/IScriptStyle.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/instance/IScriptStyle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
25715,
10393,
2885,
12,
780,
5795,
4060,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
25715,
10393,
2885,
12,
780,
5795,
4060,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
selectedItem = getElementAt(selected); | selectedItem = getElementAt(selected + 1); | public void removeElementAt(int index) { int selected = getIndexOf(selectedItem); list.remove(index); if (selected == index) // choose a new selected item { if (selected > 0) selectedItem = getElementAt(selected - 1); else selectedItem = getElementAt(selected); } fireIntervalRemoved(this, index, index); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/8a78b0a127a68dcc6823fee2b8bdb1cbb7ec268d/DefaultComboBoxModel.java/clean/core/src/classpath/javax/javax/swing/DefaultComboBoxModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
22015,
861,
12,
474,
770,
13,
225,
288,
565,
509,
3170,
273,
8088,
951,
12,
8109,
1180,
1769,
565,
666,
18,
4479,
12,
1615,
1769,
565,
309,
261,
8109,
422,
770,
13,
368,
9876,
279,
394,
3170,
761,
1377,
288,
3639,
309,
261,
8109,
405,
374,
13,
1850,
3170,
1180,
273,
7426,
861,
12,
8109,
300,
404,
1769,
3639,
469,
6647,
3170,
1180,
273,
7426,
861,
12,
8109,
397,
404,
1769,
1377,
289,
565,
4452,
4006,
10026,
12,
2211,
16,
770,
16,
770,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
22015,
861,
12,
474,
770,
13,
225,
288,
565,
509,
3170,
273,
8088,
951,
12,
8109,
1180,
1769,
565,
666,
18,
4479,
12,
1615,
1769,
565,
309,
261,
8109,
422,
770,
13,
368,
9876,
279,
394,
3170,
761,
1377,
288,
3639,
309,
261,
8109,
405,
374,
13,
1850,
3170,
1180,
273,
7426,
861,
12,
8109,
300,
404,
1769,
3639,
469,
6647,
3170,
1180,
273,
7426,
861,
12,
8109,
397,
404,
1769,
1377,
289,
565,
4452,
4006,
10026,
12,
2211,
16,
770,
16,
770,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public int totalRightPadding( CalculatedStyle style ) { calcBorders( style ); | public int totalRightPadding(CalculatedStyle style) { calcBorders(style); | public int totalRightPadding( CalculatedStyle style ) { calcBorders( style ); return totalRightPadding(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/8f81e5fe9f6f8593d3c596d30a3f100cb87dbf27/Box.java/buggy/src/java/org/xhtmlrenderer/render/Box.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
2078,
4726,
9485,
12,
15994,
690,
2885,
2154,
262,
288,
3639,
7029,
21621,
12,
2154,
11272,
3639,
327,
2078,
4726,
9485,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
2078,
4726,
9485,
12,
15994,
690,
2885,
2154,
262,
288,
3639,
7029,
21621,
12,
2154,
11272,
3639,
327,
2078,
4726,
9485,
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
] |
"[Product].[All Products]"; test.assertEquals(expected, test.toString(axis.positions)); | "[Product].[All Products]"); | protected void defineFunctions() { // 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"); test.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"); test.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"); test.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"); test.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); } Cube cube = evaluator.getCube(); boolean fail = false; OlapElement o = Util.lookupCompound(cube, s, cube, fail); if (o == null) { throw newEvalException( this, "Dimensions '" + s + "' not found"); } else if (o instanceof Dimension) { return (Dimension) o; } else { throw newEvalException( this, "Dimensions(" + s + ") found " + o); } } public void testDimensionsString(FoodMartTestCase test) { String s = test.executeExpr( "Dimensions(\"Store\").UniqueName"); test.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"); test.assertEquals("[Time]", s); } public void testBasic9(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].[F].Hierarchy"); test.assertEquals("[Gender]", s); } public void testFirstInLevel9(FoodMartTestCase test) { String s = test.executeExpr( "[Education Level].[All Education Levels].[Bachelors Degree].Hierarchy"); test.assertEquals("[Education Level]", s); } public void testHierarchyAll(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Hierarchy"); test.assertEquals("[Gender]", s); } public void testHierarchyNull(FoodMartTestCase test) { String s = test.executeExpr( "[Gender].[All Gender].Parent.Hierarchy"); test.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"); test.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"); test.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(); boolean fail = false; OlapElement o = null; if (s.startsWith("[")) { o = Util.lookupCompound(cube, s, cube, fail); } else { // lookupCompound barfs if "s" doesn't have matching // brackets, so don't even try o = null; } if (o == null) { throw newEvalException( this, "could not find level '" + s + "'"); } else if (o instanceof Level) { return (Level) o; } else { throw newEvalException( this, "found '" + o.getDescription() + "', not a level"); } } public void testLevelsString(FoodMartTestCase test) { String s = test.executeExpr( "Levels(\"[Time].[Year]\").UniqueName"); test.assertEquals("[Time].[Year]", s); } public void testLevelsStringFail(FoodMartTestCase test) { test.assertExprThrows( "Levels(\"nonexistent\").UniqueName", "could not find level 'nonexistent'"); } }); // // LOGICAL FUNCTIONS define(new FunDefBase("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", "fbS")); define(new FunDefBase("IsEmpty", "IsEmpty(<Value Expression>)", "Determines if an expression evaluates to the empty cell value.", "fbn")); // // MEMBER FUNCTIONS // if (false) define(new FunDefBase("Ancestor", "Ancestor(<Member>, <Level>)", "Returns the ancestor of a member at a specified level.", "fm*"); 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])"); test.assertEquals("USA", member.getName()); } public void testAncestorHigher(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[USA],[Store].[Store City])"); test.assertNull(member); // MSOLAP returns null } public void testAncestorSameLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Ancestor([Store].[Canada],[Store].[Store Country])"); test.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))"); test.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(this, member, level); } public void testClosingPeriodNoArgs(FoodMartTestCase test) { // MSOLAP returns [1997].[Q4], because [Time].CurrentMember = // [1997]. Member member = test.executeAxis("ClosingPeriod()"); test.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(this, member, level); } public void testClosingPeriodLevel(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month])"); test.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(this, member, level); } public void testClosingPeriodMember(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([USA])"); test.assertEquals("WA", member.getName()); } }); 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(this, member, level); } public void testClosingPeriod(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Month],[1997])"); test.assertEquals("[Time].[1997].[Q4].[12]", member.getUniqueName()); } public void testClosingPeriodBelow(FoodMartTestCase test) { Member member = test.executeAxis( "ClosingPeriod([Quarter],[1997].[Q3].[8])"); test.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(member1, member2); if (cousin == null) { cousin = member1.getHierarchy().getNullMember(); } return cousin; } private Member cousin(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(member1, member2); } private Member cousin2(Member member1, Member member2) { if (member1.getLevel() == member2.getLevel()) { return member2; } Member uncle = cousin2(member1.getParentMember(), member2); if (uncle == null) { return null; } int ordinal = getOrdinalInParent(member1); Member[] cousins = uncle.getMemberChildren(); if (cousins.length < ordinal) { return null; } return cousins[ordinal]; } private int getOrdinalInParent(Member member) { Member parent = member.getParentMember(); Member[] siblings; if (parent == null) { siblings = member.getHierarchy().getRootMembers(); } else { siblings = parent.getMemberChildren(); } for (int i = 0; i < siblings.length; i++) { if (siblings[i] == member) { return i; } } throw Util.newInternal( "could not find member " + member + " amongst its siblings"); } public void testCousin1(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4],[1998])"); test.assertEquals("[Time].[1998].[Q4]", member.getUniqueName()); } public void testCousin2(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([1997].[Q4].[12],[1998].[Q1])"); test.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 test.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 test.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])"); test.assertEquals("F", member.getName()); } public void testCousinHigherLevel(FoodMartTestCase test) { Member member = test.executeAxis( "Cousin([Time].[1997], [Time].[1998].[Q1])"); test.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])"); test.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"); test.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"); test.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"); test.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 dimension.getHierarchy().getDefaultMember(); } public void testDimensionDefaultMember(FoodMartTestCase test) { Member member = test.executeAxis( "[Measures].DefaultMember"); test.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 = member.getMemberChildren(); 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"); test.assertEquals("10", member.getName()); } public void testFirstChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstChild"); test.assertEquals("F", member.getName()); } public void testFirstChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].[F].FirstChild"); test.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 = member.getHierarchy().getRootMembers(); } else { children = parent.getMemberChildren(); } return children[0]; } public void testFirstSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstSibling"); test.assertEquals("F", member.getName()); } public void testFirstSiblingLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].FirstSibling"); test.assertEquals("Q1", member.getName()); } public void testFirstSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].FirstSibling"); test.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"); test.assertEquals("Unit Sales", member.getName()); } public void testFirstSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.FirstSibling"); test.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 member.getLeadMember(-n); } public void testLag(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].[12].Lag(4)"); test.assertEquals("8", member.getName()); } public void testLagFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].Lag(1)"); test.assertNull(member); } public void testLagAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].DefaultMember.Lag(2)"); test.assertNull(member); } public void testLagRoot(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1998].Lag(1)"); test.assertEquals("1997", member.getName()); } public void testLagRootTooFar(FoodMartTestCase test) { Member member = test.executeAxis("[Time].[1998].Lag(2)"); test.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 = member.getMemberChildren(); 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"); test.assertEquals("M", member.getName()); } public void testLastChildLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q4].LastChild"); test.assertEquals("12", member.getName()); } public void testLastChildAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastChild"); test.assertEquals("M", member.getName()); } public void testLastChildOfChildless(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].LastChild"); test.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 = member.getHierarchy().getRootMembers(); } else { children = parent.getMemberChildren(); } return children[children.length - 1]; } public void testLastSibling(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].LastSibling"); test.assertEquals("M", member.getName()); } public void testLastSiblingFirstInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q1].LastSibling"); test.assertEquals("Q4", member.getName()); } public void testLastSiblingAll(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[All Gender].LastSibling"); test.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"); test.assertEquals("1998", member.getName()); } public void testLastSiblingNull(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[F].FirstChild.LastSibling"); test.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 member.getLeadMember(n); } public void testLead(FoodMartTestCase test) { Member member = test.executeAxis( "[Time].[1997].[Q2].[4].Lead(4)"); test.assertEquals("8", member.getName()); } public void testLeadNegative(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(-1)"); test.assertEquals("F", member.getName()); } public void testLeadLastInLevel(FoodMartTestCase test) { Member member = test.executeAxis( "[Gender].[M].Lead(3)"); test.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 member.getLeadMember(+1); } public void testBasic2(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[F].NextMember} ON COLUMNS from Sales"); test.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"); test.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 test.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) { 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"); test.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"); test.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 test.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 member.getLeadMember(-1); } public void testBasic(FoodMartTestCase test) { Result result = test.runQuery( "select {[Gender].[M].PrevMember} ON COLUMNS from Sales"); test.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"); test.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 test.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 if (false) define(new FunDefBase("Aggregate", "Aggregate(<Set>[, <Numeric Expression>])", "Returns a calculated value using the appropriate aggregate function, based on the context of the query.", "fn*")); 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); return avg(evaluator.push(), members, exp); } public void testAvg(FoodMartTestCase test) { String result = test.executeExpr( "AVG({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); test.assertEquals("188412.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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp1 = (ExpBase) getArg(evaluator, args, 1); ExpBase exp2 = (ExpBase) getArg(evaluator, args, 2); 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])"); test.assertEquals("0.9999063938016924", result); } })); 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) { Vector members = (Vector) getArg(evaluator, args, 0); String empties = (String) getArg(evaluator, args, 1, "INCLUDEEMPTY"); if (empties.equals("INCLUDEEMPTY")) { return new Double(members.size()); } else { int retval = 0; for (int i = 0; i < members.size(); i++) { if ((members.elementAt(i) != Util.nullValue) && (members.elementAt(i) != null)) { retval++; } } return new Double(retval); } } public void testCount(FoodMartTestCase test) { String result = test.executeExpr( "count({[Promotion Media].[Media Type].members})"); test.assertEquals("14.0", result); } //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) { Vector members = (Vector) 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])"); test.assertEquals("1.3557618990466664E9", 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) { Vector members = (Vector) 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, false); } public void testCovarianceN(FoodMartTestCase test) { String result = test.executeExpr("CovarianceN({[Store].[All Stores].[USA].children}, [Measures].[Unit Sales], [Measures].[Store Sales])"); test.assertEquals("2.0336428485699995E9", result); } })); define(new FunDefBase("IIf", "IIf(<Logical Expression>, <Numeric Expression1>, <Numeric Expression2>)", "Returns one of two numeric values determined by a logical test.", "fnbnn")); 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); return max(evaluator.push(), members, exp); } public void testMax(FoodMartTestCase test) { String result = test.executeExpr( "MAX({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); test.assertEquals("263793.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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); //todo: ignore nulls, do we need to ignore the vector? return median(evaluator.push(), members, exp); } public void testMedian(FoodMartTestCase test) { String result = test.executeExpr( "MEDIAN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); test.assertEquals("159167.84", result); } })); 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); return min(evaluator.push(), members, exp); } public void testMin(FoodMartTestCase test) { String result = test.executeExpr( "MIN({[Store].[All Stores].[USA].children},[Measures].[Store Sales])"); test.assertEquals("142277.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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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])"); test.assertEquals("65825.4547549297", 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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])"); test.assertEquals("53746.25874541283", 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); return sum(evaluator.push(), members, exp); } public void testSumNoExp(FoodMartTestCase test) { String result = test.executeExpr( "SUM({[Promotion Media].[Media Type].members})"); test.assertEquals("266773.0", 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.", "fvt") { public Object evaluate(Evaluator evaluator, Exp[] args) { Member[] members = getTupleArg(evaluator, args, 0); Evaluator evaluator2 = evaluator.push(members); return evaluator2.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, FunDef.TypeParentheses) { public FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length == 1 && args[0].getType() == FunCall.CatTuple) { return new ValueFunDef(new int[] {FunCall.CatTuple}); } for (int i = 0; i < args.length; i++) { Exp arg = args[i]; if (!canConvert(arg, FunCall.CatMember, conversionCount)) { return null; } } int[] argTypes = new int[args.length]; for (int i = 0; i < argTypes.length; i++) { argTypes[i] = FunCall.CatMember; } 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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])"); test.assertEquals("4.332990493693297E9", 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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) { Vector members = (Vector) getArg(evaluator, args, 0); ExpBase exp = (ExpBase) getArg(evaluator, args, 1); 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])"); test.assertEquals("2.888660329128865E9", result); } })); // // SET FUNCTIONS if (false) define(new FunDefBase("AddCalculatedMembers", "AddCalculatedMembers(<Set>)", "Adds calculated members to a set.", "fx*")); 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) { Vector set = (Vector) 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, set, exp, desc, brk); } if (n < set.size()) { set.setSize(n); } return set; } public void testBottomCount(FoodMartTestCase test) { Axis axis = test.executeAxis2( "BottomCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])"); String expected = "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"; test.assertEquals(expected, test.toString(axis.positions)); } //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) { Vector members = (Vector) 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) { Axis axis = test.executeAxis2( "BottomPercent({[Promotion Media].[Media Type].members}, 1, [Measures].[Unit Sales])"); String expected = "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"; test.assertEquals(expected, test.toString(axis.positions)); } //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) { Vector members = (Vector) 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) { Axis axis = test.executeAxis2( "BottomSum({[Promotion Media].[Media Type].members}, 5000, [Measures].[Unit Sales])"); String expected = "[Promotion Media].[All Media].[Radio]" + nl + "[Promotion Media].[All Media].[Sunday Paper, Radio, TV]"; test.assertEquals(expected, test.toString(axis.positions)); } })); 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 = member.getMemberChildren(); return toVector(children); } }); define(new FunDefBase("Crossjoin", "Crossjoin(<Set1>, <Set2>)", "Returns the cross product of two sets.", "fxxx") { public Hierarchy getHierarchy(Exp[] args) { // CROSSJOIN(<Set1>,<Set2>) has Hierarchy [Hie1] x [Hie2], which we // can't represent, so we return null. return null; } public Object evaluate(Evaluator evaluator, Exp[] args) { Vector set0 = (Vector) getArg(evaluator, args, 0), set1 = (Vector) getArg(evaluator, args, 1); if (set0.isEmpty() || set1.isEmpty()) { return emptyVector; } int arity0 = 1, arity1 = 1; if (set0.elementAt(0) instanceof Member[]) { arity0 = ((Member[]) set0.elementAt(0)).length; } if (set1.elementAt(0) instanceof Member[]) { arity1 = ((Member[]) set1.elementAt(0)).length; } Vector result = new Vector(); if (arity0 == 1 && arity1 == 1) { // Simpler routine if we know neither side is an array. for (int i = 0, m = set0.size(); i < m; i++) { Member o0 = (Member) set0.elementAt(i); for (int j = 0, n = set1.size(); j < n; j++) { Member o1 = (Member) set1.elementAt(j); result.addElement(new Member[]{o0, o1}); } } } else { // More complex routine if one or both sides are arrays // (probably the product of nested CrossJoins). Member[] row = new Member[arity0 + arity1]; for (int i = 0, m = set0.size(); i < m; i++) { int x = 0; Object o0 = set0.elementAt(i); if (o0 instanceof Member) { row[x++] = (Member) o0; } else { assertTrue(o0 instanceof Member[]); final Member[] members = (Member[]) o0; for (int k = 0; k < members.length; k++) { row[x++] = members[k]; } } for (int j = 0, n = set1.size(); j < n; j++) { Object o1 = set1.elementAt(j); if (o1 instanceof Member) { row[x++] = (Member) o1; } else { assertTrue(o1 instanceof Member[]); final Member[] members = (Member[]) o1; for (int k = 0; k < members.length; k++) { row[x++] = members[k]; } } result.addElement(row.clone()); x = arity0; } } } return result; } public void testCrossjoinNested(FoodMartTestCase test) { final Axis axis = test.executeAxis2( " CrossJoin(" + nl + " CrossJoin(" + nl + " [Gender].members," + nl + " [Marital Status].members)," + nl + " {[Store], [Store].children})"); test.assertEquals( "{[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]}", test.toString(axis.positions)); } }); 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[]{"fxml", "fxmls"}) { protected FunDef createFunDef(Exp[] args, FunDef dummyFunDef) { String descFlag = getLiteralArg(args, 2, "SELF", new String[] {"SELF","AFTER","BEFORE","BEFORE_AND_AFTER","SELF_AND_AFTER","SELF_AND_BEFORE","SELF_BEFORE_AFTER","LEAVES"}, dummyFunDef); if (!descFlag.equals("SELF")) { throw newEvalException(null, "SELF is the only value of Desc_flag currently supported"); } return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Member member = getMemberArg(evaluator, args, 0, true); Level level = getLevelArg(evaluator, args, 1, true); if (member.getLevel().getDepth() > level.getDepth()) { return new Member[0]; } // Expand member to its children, until we get to the right // level. We assume that all children are in the same // level. final Hierarchy hierarchy = member.getHierarchy(); Member[] children = {member}; while (children.length > 0 && children[0].getLevel().getDepth() < level.getDepth()) { children = hierarchy.getChildMembers(children); } return toVector(children); } }; }}); 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 Vector set0 = (Vector) getArg(evaluator, args, 0); int[] depthArray = new int[set0.size()]; Vector drilledSet = new Vector(); for (int i = 0, m = set0.size(); i < m; i++) { Member member = (Member) set0.elementAt(i); depthArray[i] = member.getDepth(); // Object o0 = set0.elementAt(i); // depthVector.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.elementAt(i); drilledSet.addElement(member); if (member.getDepth() == maxDepth) { Member[] childMembers = member.getMemberChildren(); for (int j = 0; j < childMembers.length; j++) { drilledSet.addElement(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 set2 = toHashSet((Vector) getArg(evaluator, args, 1)); Vector set1 = (Vector) getArg(evaluator, args, 0); Vector result = new Vector(); for (int i = 0, count = set1.size(); i < count; i++) { Object o = set1.elementAt(i); if (!set2.contains(o)) { result.addElement(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) { Vector members = (Vector) getArg(evaluator, args, 0); Exp exp = args[1]; Vector result = new Vector(); Evaluator evaluator2 = evaluator.push(); for (int i = 0, count = members.size(); i < count; i++) { Object o = members.elementAt(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 test.assertEquals(1, rows.positions.length); Cell cell = result.getCell(new int[] {0,0}); test.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; test.assertTrue(rows.length == 3); test.assertEquals("F", rows[0].members[0].getName()); test.assertEquals("WA", rows[0].members[1].getName()); test.assertEquals("M", rows[1].members[0].getName()); test.assertEquals("OR", rows[1].members[1].getName()); test.assertEquals("M", rows[2].members[0].getName()); test.assertEquals("WA", rows[2].members[1].getName()); } }); if (false) define(new FunDefBase("Generate", "Generate(<Set1>, <Set2>[, ALL])", "Applies a set to each member of another set and joins the resulting sets by union.", "fx*")); if (false) define(new FunDefBase("Head", "Head(<Set>[, < Numeric Expression >])", "Returns the first specified number of elements in a set.", "fx*")); 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) { Vector members = (Vector) getArg(evaluator, args, 0); hierarchize(members, post); return members; } }; } public void testHierarchize(FoodMartTestCase test) { final Axis axis = test.executeAxis2( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Drink]," + nl + " [Product].[Non-Consumable]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]})"); final String expected = "[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]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testHierarchizePost(FoodMartTestCase test) { final Axis axis = test.executeAxis2( "Hierarchize(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " POST)"); final String expected = "[Product].[All Products].[Drink].[Dairy]" + nl + "[Product].[All Products].[Food].[Eggs]" + nl + "[Product].[All Products].[Food]" + nl + "[Product].[All Products]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testHierarchizeCrossJoinPre(FoodMartTestCase test) { final Axis axis = test.executeAxis2( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " PRE)"); final String expected = "{[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]}"; test.assertEquals(expected, test.toString(axis.positions)); } public void testHierarchizeCrossJoinPost(FoodMartTestCase test) { final Axis axis = test.executeAxis2( "Hierarchize(" + nl + " CrossJoin(" + nl + " {[Product].[All Products], " + " [Product].[Food]," + nl + " [Product].[Food].[Eggs]," + nl + " [Product].[Drink].[Dairy]}," + nl + " [Gender].MEMBERS)," + nl + " POST)"); final String expected = "{[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]}"; test.assertEquals(expected, test.toString(axis.positions)); } }); if (false) define(new FunDefBase("Intersect", "Intersect(<Set1>, <Set2>[, ALL])", "Returns the intersection of two input sets, optionally retaining duplicates.", "fx*")); 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(new Vector(), 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(new Vector(), 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 toVector(level.getMembers()); } }); 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 new Vector(periodsToDate( evaluator, evaluator.getCube().getMonthLevel(), getMemberArg(evaluator, args, 0, false))); } })); 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) { String order = getLiteralArg(args, 2, "ASC", new String[] {"ASC","DESC","BASC","BDESC"}, dummyFunDef); final boolean desc = order.equals("DESC") || order.equals("BDESC"); final boolean brk = order.equals("BASC") || order.equals("BDESC"); return new FunDefBase(dummyFunDef) { public Object evaluate(Evaluator evaluator, Exp[] args) { Vector members = (Vector) 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].[F], [Marital Status].[All Marital Status].[M]}" + nl + "{[Gender].[All Gender].[M], [Marital Status].[All Marital Status].[S]}" + 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,097" + nl + "Row #1: 16,845" + nl + "Row #2: 16,536" + nl + "Row #3: 15,813" + 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) { final Axis axis = test.executeAxis2( "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)"); final String expected = "[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]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testOrderCrossJoinDesc(FoodMartTestCase test) { final Axis axis = test.executeAxis2( "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)"); final String expected = "{[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]}"; test.assertEquals(expected, test.toString(axis.positions)); } 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); } }); 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 new Vector(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 new Vector(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*")); define(new FunDefBase("StrToSet", "StrToSet(<String Expression>)", "Constructs a set from a string expression.", "fxS") { public void unparse(Exp[] args, PrintWriter pw, ElementCallback callback) { if (callback.isPlatoMdx()) { // omit extra args (they're for us, not Plato) super.unparse(new Exp[]{args[0]}, pw, callback); } else { super.unparse(args, pw, callback); } } 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; } }); if (false) define(new FunDefBase("Subset", "Subset(<Set>, <Start>[, <Count>])", "Returns a subset of elements from a set.", "fx*")); if (false) define(new FunDefBase("Tail", "Tail(<Set>[, <Count>])", "Returns a subset from the end of a set.", "fx*")); 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) { Vector v0 = (Vector) getArg(evaluator, args, 0), v1 = (Vector) 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 set1 = toHashSet(v1); Vector result = new Vector(); int i = 0, n = v0.size(); while (i < n) { Object o = v0.elementAt(i++); result.addElement(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.elementAt(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.elementAt(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 = m.getMemberChildren(); for (int j = 0; j < children.length; j++) { if (k < 0) { result.addElement(children[j]); } else { Member[] members = (Member[]) ((Member[]) o).clone(); members[k] = children[j]; result.addElement(members); } } } } return result; } public void testToggleDrillState(FoodMartTestCase test) { Axis axis = test.executeAxis2( "ToggleDrillState({[Customers].[USA],[Customers].[Canada]},{[Customers].[USA],[Customers].[USA].[CA]})"); String expected = "[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]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testToggleDrillState2(FoodMartTestCase test) { Axis axis = test.executeAxis2( "ToggleDrillState([Product].[Product Department].members, {[Product].[All Products].[Food].[Snack Foods]})"); String expected = "[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]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testToggleDrillState3(FoodMartTestCase test) { Axis axis = test.executeAxis2( "ToggleDrillState(" + "{[Time].[1997].[Q1]," + " [Time].[1997].[Q2]," + " [Time].[1997].[Q2].[4]," + " [Time].[1997].[Q2].[6]," + " [Time].[1997].[Q3]}," + "{[Time].[1997].[Q2]})"); String expected = "[Time].[1997].[Q1]" + nl + "[Time].[1997].[Q2]" + nl + "[Time].[1997].[Q3]"; test.assertEquals(expected, test.toString(axis.positions)); } // bug 634860 public void testToggleDrillStateTuple(FoodMartTestCase test) { Axis axis = test.executeAxis2( "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]})"); String expected = "{[Store].[All Stores].[USA].[CA], [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]}"; test.assertEquals(expected, test.toString(axis.positions)); } })); 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) { Vector set = (Vector) 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, set, exp, desc, brk); } if (n < set.size()) { set.setSize(n); } return set; } public void testTopCount(FoodMartTestCase test) { Axis axis = test.executeAxis2( "TopCount({[Promotion Media].[Media Type].members}, 2, [Measures].[Unit Sales])"); String expected = "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"; test.assertEquals(expected, test.toString(axis.positions)); } })); 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) { Vector members = (Vector) 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) { Axis axis = test.executeAxis2( "TopPercent({[Promotion Media].[Media Type].members}, 70, [Measures].[Unit Sales])"); String expected = "[Promotion Media].[All Media].[No Media]"; test.assertEquals(expected, test.toString(axis.positions)); } //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) { Vector members = (Vector) 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) { Axis axis = test.executeAxis2( "TopSum({[Promotion Media].[Media Type].members}, 200000, [Measures].[Unit Sales])"); String expected = "[Promotion Media].[All Media].[No Media]" + nl + "[Promotion Media].[All Media].[Daily Paper, Radio, TV]"; test.assertEquals(expected, test.toString(axis.positions)); } })); 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) { Vector left = (Vector) getArg(evaluator, args, 0), right = (Vector) getArg(evaluator, args, 1); if (all) { if (left == null || left.isEmpty()) { return right; } add(left, right); return left; } else { HashSet added = new HashSet(); Vector result = new Vector(); addUnique(result, left, added); addUnique(result, right, added); return result; } } }; } public void testUnionAll(FoodMartTestCase test) { final Axis axis = test.executeAxis2("Union({[Gender].[M]}, {[Gender].[F]}, ALL)"); String expected = "[Gender].[All Gender].[M]" + nl + "[Gender].[All Gender].[F]"; // order is preserved test.assertEquals(expected, test.toString(axis.positions)); } public void testUnion(FoodMartTestCase test) { final Axis axis = test.executeAxis2("Union({[Store].[USA], [Store].[USA], [Store].[USA].[OR]}, {[Store].[USA].[CA], [Store].[USA]})"); String expected = "[Store].[All Stores].[USA]" + nl + "[Store].[All Stores].[USA].[OR]" + nl + "[Store].[All Stores].[USA].[CA]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testUnionEmptyBoth(FoodMartTestCase test) { final Axis axis = test.executeAxis2("Union({}, {})"); String expected = ""; test.assertEquals(expected, test.toString(axis.positions)); } public void testUnionEmptyRight(FoodMartTestCase test) { final Axis axis = test.executeAxis2("Union({[Gender].[M]}, {})"); String expected = "[Gender].[All Gender].[M]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testUnionTuple(FoodMartTestCase test) { final Axis axis = test.executeAxis2( "Union({" + " ([Gender].[M], [Marital Status].[S])," + " ([Gender].[F], [Marital Status].[S])" + "}, {" + " ([Gender].[M], [Marital Status].[M])," + " ([Gender].[M], [Marital Status].[S])" + "})"); String expected = "{[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]}"; test.assertEquals(expected, test.toString(axis.positions)); } 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]; test.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 new Vector(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 new Vector(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 emptyVector; } if (member0.getLevel() != member1.getLevel()) { throw newEvalException(this, "Members must belong to the same level"); } return new Vector(FunUtil.memberRange(member0, member1)); } public void testRange(FoodMartTestCase test) { final Axis axis = test.executeAxis2("[Time].[1997].[Q1].[2] : [Time].[1997].[Q2].[5]"); String expected = "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]" + nl + "[Time].[1997].[Q2].[4]" + nl + "[Time].[1997].[Q2].[5]"; // not parents test.assertEquals(expected, test.toString(axis.positions)); } public void _testRangeLarge(FoodMartTestCase test) { final Axis axis = test.executeAxis2("[Customers].[USA].[CA].[San Francisco] : [Customers].[USA].[WA].[Seattle]"); String expected = "[Time].[1997].[Q1].[2]" + nl + "[Time].[1997].[Q1].[3]" + nl + "[Time].[1997].[Q2].[4]" + nl + "[Time].[1997].[Q2].[5]"; // not parents test.assertEquals(expected, test.toString(axis.positions)); } public void testRangeStartEqualsEnd(FoodMartTestCase test) { final Axis axis = test.executeAxis2("[Time].[1997].[Q3].[7] : [Time].[1997].[Q3].[7]"); String expected = "[Time].[1997].[Q3].[7]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testRangeEndBeforeStart(FoodMartTestCase test) { final Axis axis = test.executeAxis2("[Time].[1997].[Q3].[7] : [Time].[1997].[Q2].[5]"); String expected = "[Time].[1997].[Q2].[5]" + nl + "[Time].[1997].[Q2].[6]" + nl + "[Time].[1997].[Q3].[7]"; // same as if reversed test.assertEquals(expected, test.toString(axis.positions)); } 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) { final Axis axis = test.executeAxis2("[Gender] : [Gender]"); String expected = "[Gender].[All Gender]"; test.assertEquals(expected, test.toString(axis.positions)); } public void testRangeBoundedByNull(FoodMartTestCase test) { final Axis axis = test.executeAxis2("[Gender].[F] : [Gender].[M].NextMember"); test.assertTrue(axis.positions.length == 0); } }); // special resolver for the "{...}" operator define(new ResolverBase( "{}", "{<Member> [, <Member>]...}", "Brace operator constructs a set.", FunDef.TypeBraces) { protected FunDef resolve(Exp[] args, int[] conversionCount) { int[] parameterTypes = new int[args.length]; for (int i = 0; i < args.length; i++) { if (canConvert( args[i], Exp.CatMember, conversionCount)) { parameterTypes[i] = Exp.CatMember; continue; } if (canConvert( args[i], Exp.CatSet, conversionCount)) { parameterTypes[i] = Exp.CatSet; continue; } if (canConvert( args[i], Exp.CatTuple, conversionCount)) { parameterTypes[i] = Exp.CatTuple; continue; } return null; } return new SetFunDef(this, syntacticType, parameterTypes); } public void testSetContainingLevelFails(FoodMartTestCase test) { test.assertAxisThrows( "[Store].[Store City]", "no function matches signature '{<Level>}'"); } }); // // STRING FUNCTIONS 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\")"); test.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"); test.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"); test.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"); test.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"); test.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"); test.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"); test.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"); test.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"); test.assertEquals("[Gender].[All Gender]", s); } public void testMemberUniqueNameOfNull(FoodMartTestCase test) { String s = test.executeExpr( "[Measures].[Unit Sales].FirstChild.UniqueName"); test.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 void unparse(Exp[] args, PrintWriter pw, ElementCallback callback) { if (callback.isPlatoMdx()) { // omit extra args (they're for us, not Plato) super.unparse(new Exp[]{args[0]}, pw, callback); } else { super.unparse(args, pw, callback); } } 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, FunDef.TypeParentheses) { 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).", FunDef.TypeFunction) { protected FunDef resolve(Exp[] args, int[] conversionCount) { if (args.length < 1) { return null; } final int[] types = {Exp.CatNumeric, Exp.CatString}; 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, FunDef.TypeFunction, type, ExpBase.getTypes(args)); } } return null; } }); 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.", FunDef.TypeCase) { protected 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++], Exp.CatLogical, 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, FunDef.TypeFunction, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseTest(evaluator, args); } }; } else { return null; } } 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"); test.assertEquals("second", s); } public void testCaseTestMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" ELSE \"fourth\" END"); test.assertEquals("fourth", s); } public void testCaseTestMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE WHEN 1=0 THEN \"first\" END"); test.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.", FunDef.TypeCase) { protected 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, FunDef.TypeFunction, returnType, ExpBase.getTypes(args)) { // implement FunDef public Object evaluate(Evaluator evaluator, Exp[] args) { return evaluateCaseMatch(evaluator, args); } }; } else { return null; } } 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"); test.assertEquals("second", s); } public void testCaseMatchElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 7 WHEN 1 THEN \"first\" ELSE \"fourth\" END"); test.assertEquals("fourth", s); } public void testCaseMatchNoElse(FoodMartTestCase test) { String s = test.executeExpr( "CASE 8 WHEN 0 THEN \"first\" END"); test.assertEquals("(null)", s); } }); define(new ResolverBase( "Properties", "<Member>.Properties(<String Expression>)", "Returns the value of a member property.", FunDef.TypeMethod) { public FunDef resolve(Exp[] args, int[] conversionCount) { final int[] argTypes = new int[]{Exp.CatMember, Exp.CatString}; if (args.length != 2 || args[0].getType() != Exp.CatMember || args[1].getType() != Exp.CatString) { 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 = Exp.CatValue; } else { switch (property.getType()) { case Property.TYPE_BOOLEAN: returnType = Exp.CatLogical; break; case Property.TYPE_NUMERIC: returnType = Exp.CatNumeric; break; case Property.TYPE_STRING: returnType = Exp.CatString; break; default: throw Util.newInternal("Unknown property type " + property.getType()); } } } else { returnType = Exp.CatValue; } return new PropertiesFunDef(name, signature, description, syntacticType, returnType, argTypes); } public void testPropertiesExpr(FoodMartTestCase test) { String s = test.executeExpr( "[Store].[USA].[CA].[Beverly Hills].[Store 6].Properties(\"Store Type\")"); test.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]"); test.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[17].members[0]; test.assertEquals("[Store].[All Stores].[USA].[WA].[Bellingham].[Store 2]", member.getUniqueName()); cell = result.getCell(new int[] {0,17}); test.assertEquals("2,237", cell.getFormattedValue()); cell = result.getCell(new int[] {1,17}); test.assertEquals("0.16802205204566403", cell.getFormattedValue()); member = result.getAxes()[1].positions[3].members[0]; test.assertEquals("[Store].[All Stores].[Mexico].[DF].[San Andres].[Store 21]", member.getUniqueName()); cell = result.getCell(new int[] {0,3}); test.assertEquals("(null)", cell.getFormattedValue()); cell = result.getCell(new int[] {1,3}); test.assertEquals("NaN", cell.getFormattedValue()); } }); // // PARAMETER FUNCTIONS 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() == Exp.CatString) { 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 Exp.CatHierarchy: case Exp.CatDimension: hierarchy = typeArg.getHierarchy(); if (hierarchy == null || !isConstantHierarchy(typeArg)) { throw newEvalException(dummyFunDef, "Invalid hierarchy for parameter '" + parameterName + "'"); } type = Exp.CatMember; break; case Exp.CatSymbol: hierarchy = null; String s = (String) ((Literal) typeArg).getValue(); if (s.equalsIgnoreCase("NUMERIC")) { type = Exp.CatNumeric; break; } else if (s.equalsIgnoreCase("STRING")) { type = Exp.CatString; 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 = Exp.catEnum.getName(type).toUpperCase(); throw newEvalException(dummyFunDef, "Default value of parameter '" + parameterName + "' is inconsistent with its type, " + typeName); } if (type == Exp.CatMember) { 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() == Exp.CatString) { 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() == Exp.CatString) { parameterName = (String) ((Literal) args[0]).getValue(); } else { throw newEvalException(dummyFunDef, "Parameter name must be a string constant"); } return new ParameterFunDef(dummyFunDef, parameterName, null, Exp.CatUnknown, 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"); test.assertEquals("3.0", 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"); test.assertEquals("-2.0", s); } public void testMinusAssociativity(FoodMartTestCase test) { String s = test.executeExpr("11-7-5"); // right-associative would give 11-(7-5) = 9, which is wrong test.assertEquals("-1.0", 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"); test.assertEquals("28.0", s); } public void testMultiplyPrecedence(FoodMartTestCase test) { String s = test.executeExpr("3 + 4 * 5 + 6"); test.assertEquals("29.0", s); } }); 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"); test.assertEquals("2.0", s); } public void testDivideByZero(FoodMartTestCase test) { String s = test.executeExpr("-3 / (2 - 2)"); test.assertEquals("-Infinity", s); } public void testDividePrecedence(FoodMartTestCase test) { String s = test.executeExpr("24 / 4 / 2 * 10 - -1"); test.assertEquals("31.0", 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"); test.assertEquals("-3.0", s); } public void testUnaryMinusMember(FoodMartTestCase test) { String s = test.executeExpr("- ([Measures].[Unit Sales],[Gender].[F])"); test.assertEquals("-131558.0", s); } public void testUnaryMinusPrecedence(FoodMartTestCase test) { String s = test.executeExpr("1 - -10.5 * 2 -3"); test.assertEquals("19.0", 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\" "); test.assertEquals("foobar", s); } public void testStringConcat2(FoodMartTestCase test) { String s = test.executeExpr(" \"foo\" || [Gender].[M].Name || \"\" "); test.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 "); test.assertEquals("true", s); } public void testAnd2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=1 AND 2=0 "); test.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 "); test.assertEquals("false", s); } public void testOr2(FoodMartTestCase test) { String s = test.executeBooleanExpr(" 1=0 OR 0=0 "); test.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!) test.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!) test.assertEquals("true", s); } public void testOrAssociativity3(FoodMartTestCase test) { String s = test.executeBooleanExpr(" (1=0 OR 1=1) AND 1=1 "); test.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 "); test.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 "); test.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 "); test.assertEquals("false", s); } public void testNotNot(FoodMartTestCase test) { String s = test.executeBooleanExpr(" NOT NOT 1=1 "); test.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 "); test.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\" "); test.assertEquals("false", s); } public void testStringEqualsAssociativity(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"foo\" = \"fo\" || \"o\" "); test.assertEquals("true", s); } public void testStringEqualsEmpty(FoodMartTestCase test) { String s = test.executeBooleanExpr(" \"\" = \"\" "); test.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 "); test.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\" "); test.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 "); test.assertEquals("false", s); } public void testNeInfinity(FoodMartTestCase test) { String s = test.executeBooleanExpr("(1 / 0) <> (1 / 0)"); // Infinity does not equal itself test.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 "); test.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 "); test.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 "); test.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 "); test.assertEquals("false", s); } }); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/70c4270c1bff30f538d792913a6023b7dd613649/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4426,
7503,
1435,
288,
202,
202,
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,
279,
1269,
9360,
1199,
16,
315,
84,
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,
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,
2
] |
for(int i=0;i<checkBlockStatus.length;i++) { Bucket data = buckets[i+k]; if(data == null) throw new NullPointerException(); | for (int i = 0; i < checkBlockStatus.length; i++) { Bucket data = buckets[i + k]; if (data == null) throw new NullPointerException(); | private void realEncode(SplitfileBlock[] dataBlockStatus, SplitfileBlock[] checkBlockStatus, int blockLength, BucketFactory bf) throws IOException { System.err.println("************* Encoding "+dataBlockStatus.length+" -> "+checkBlockStatus.length+" *************"); Logger.minor(this, "Doing encode: "+dataBlockStatus.length+" data blocks, "+checkBlockStatus.length+" check blocks, block length "+blockLength+" with "+this); if(dataBlockStatus.length + checkBlockStatus.length != n) throw new IllegalArgumentException(); if(dataBlockStatus.length != k) throw new IllegalArgumentException(); Buffer[] dataPackets = new Buffer[k]; Buffer[] checkPackets = new Buffer[n-k]; Bucket[] buckets = new Bucket[n]; DataInputStream[] readers = new DataInputStream[k]; OutputStream[] writers = new OutputStream[n-k]; int[] toEncode = new int[n-k]; int numberToEncode = 0; // can be less than n-k byte[] realBuffer = new byte[n * STRIPE_SIZE]; for(int i=0;i<k;i++) dataPackets[i] = new Buffer(realBuffer, i*STRIPE_SIZE, STRIPE_SIZE); for(int i=0;i<n-k;i++) checkPackets[i] = new Buffer(realBuffer, (i+k)*STRIPE_SIZE, STRIPE_SIZE); for(int i=0;i<dataBlockStatus.length;i++) { buckets[i] = dataBlockStatus[i].getData(); long sz = buckets[i].size(); if(sz < blockLength) { if(i != dataBlockStatus.length-1) throw new IllegalArgumentException("All buckets except the last must be the full size"); if(sz < blockLength) buckets[i] = pad(buckets[i], blockLength, bf, (int) sz); else throw new IllegalArgumentException("Too big: "+sz+" bigger than "+blockLength); } readers[i] = new DataInputStream(buckets[i].getInputStream()); } for(int i=0;i<checkBlockStatus.length;i++) { buckets[i+k] = checkBlockStatus[i].getData(); if(buckets[i+k] == null) { buckets[i+k] = bf.makeBucket(blockLength); writers[i] = buckets[i+k].getOutputStream(); toEncode[numberToEncode++] = i+k; } else { writers[i] = null; } } if(numberToEncode > 0) { // Do the (striped) decode for(int offset=0;offset<blockLength;offset+=STRIPE_SIZE) { // Read the data in first for(int i=0;i<k;i++) { readers[i].readFully(realBuffer, i*STRIPE_SIZE, STRIPE_SIZE); } // Do the encode // Not shuffled long startTime = System.currentTimeMillis(); code.encode(dataPackets, checkPackets, toEncode); long endTime = System.currentTimeMillis(); Logger.minor(this, "Stripe encode took "+(endTime-startTime)+" ms for k="+k+", n="+n+", stripeSize="+STRIPE_SIZE); // packets now contains an array of decoded blocks, in order // Write the data out for(int i=k;i<n;i++) { if(writers[i-k] != null) writers[i-k].write(realBuffer, i*STRIPE_SIZE, STRIPE_SIZE); } } } for(int i=0;i<k;i++) if(readers[i] != null) readers[i].close(); for(int i=0;i<n-k;i++) if(writers[i] != null) writers[i].close(); // Set new buckets only after have a successful decode. for(int i=0;i<checkBlockStatus.length;i++) { Bucket data = buckets[i+k]; if(data == null) throw new NullPointerException(); checkBlockStatus[i].setData(data); } System.err.println("************* Encoded "+dataBlockStatus.length+" -> "+checkBlockStatus.length+" *************"); } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/fbdde7654afdefd24ae4365520a38c1c680248a7/StandardOnionFECCodec.java/clean/src/freenet/client/StandardOnionFECCodec.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2863,
5509,
12,
5521,
768,
1768,
8526,
501,
1768,
1482,
16,
5385,
768,
1768,
8526,
866,
1768,
1482,
16,
509,
25367,
16,
7408,
1733,
16222,
13,
1216,
1860,
288,
202,
202,
3163,
18,
370,
18,
8222,
2932,
1644,
23490,
13400,
13773,
892,
1768,
1482,
18,
2469,
9078,
317,
13773,
1893,
1768,
1482,
18,
2469,
9078,
380,
1644,
1007,
8863,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
3244,
310,
2017,
30,
13773,
892,
1768,
1482,
18,
2469,
9078,
501,
4398,
16,
13773,
1893,
1768,
1482,
18,
2469,
9078,
866,
4398,
16,
1203,
769,
13773,
2629,
1782,
9078,
598,
13773,
2211,
1769,
202,
202,
430,
12,
892,
1768,
1482,
18,
2469,
397,
866,
1768,
1482,
18,
2469,
480,
290,
13,
1082,
202,
12849,
394,
2754,
5621,
202,
202,
430,
12,
892,
1768,
1482,
18,
2469,
480,
417,
13,
1082,
202,
12849,
394,
2754,
5621,
202,
202,
1892,
8526,
501,
27328,
273,
394,
3525,
63,
79,
15533,
202,
202,
1892,
8526,
866,
27328,
273,
394,
3525,
63,
82,
17,
79,
15533,
202,
202,
4103,
8526,
9169,
273,
394,
7408,
63,
82,
15533,
202,
202,
751,
4348,
8526,
16527,
273,
394,
29382,
63,
79,
15533,
202,
202,
4632,
8526,
18656,
273,
394,
8962,
63,
82,
17,
79,
15533,
202,
202,
474,
8526,
358,
5509,
273,
394,
509,
63,
82,
17,
79,
15533,
202,
202,
474,
1300,
774,
5509,
273,
374,
31,
368,
848,
506,
5242,
2353,
290,
17,
79,
9506,
202,
7229,
8526,
2863,
1892,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2863,
5509,
12,
5521,
768,
1768,
8526,
501,
1768,
1482,
16,
5385,
768,
1768,
8526,
866,
1768,
1482,
16,
509,
25367,
16,
7408,
1733,
16222,
13,
1216,
1860,
288,
202,
202,
3163,
18,
370,
18,
8222,
2932,
1644,
23490,
13400,
13773,
892,
1768,
1482,
18,
2469,
9078,
317,
13773,
1893,
1768,
1482,
18,
2469,
9078,
380,
1644,
1007,
8863,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
3244,
310,
2017,
30,
13773,
892,
1768,
1482,
18,
2469,
9078,
501,
4398,
16,
13773,
1893,
1768,
1482,
18,
2469,
9078,
866,
4398,
16,
1203,
769,
13773,
2629,
1782,
9078,
598,
13773,
2211,
1769,
202,
202,
430,
12,
892,
1768,
1482,
18,
2469,
397,
866,
1768,
1482,
2
] |
createDataSource1( ); | createDataSource( ); | public void testCreateDataSource( ) { SlotHandle parent = getReportDesignHandle( ).getDataSources( ); assertEquals( 0, parent.getCount( ) ); createDataSource1( ); assertEquals( 1, parent.getCount( ) ); assertEquals( dataSource1, parent.get( 0 ) ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/b9f84cd07cb7f30deba7d065768baa7f57d2487d/CreateCommandTest.java/buggy/UI/org.eclipse.birt.report.designer.tests/test/org/eclipse/birt/report/designer/core/commands/CreateCommandTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1684,
8597,
12,
262,
202,
95,
202,
202,
8764,
3259,
982,
273,
22452,
15478,
3259,
12,
262,
18,
588,
751,
8628,
12,
11272,
202,
202,
11231,
8867,
12,
374,
16,
982,
18,
588,
1380,
12,
262,
11272,
202,
202,
2640,
8597,
21,
12,
11272,
202,
202,
11231,
8867,
12,
404,
16,
982,
18,
588,
1380,
12,
262,
11272,
202,
202,
11231,
8867,
12,
10233,
21,
16,
982,
18,
588,
12,
374,
262,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1684,
8597,
12,
262,
202,
95,
202,
202,
8764,
3259,
982,
273,
22452,
15478,
3259,
12,
262,
18,
588,
751,
8628,
12,
11272,
202,
202,
11231,
8867,
12,
374,
16,
982,
18,
588,
1380,
12,
262,
11272,
202,
202,
2640,
8597,
21,
12,
11272,
202,
202,
11231,
8867,
12,
404,
16,
982,
18,
588,
1380,
12,
262,
11272,
202,
202,
11231,
8867,
12,
10233,
21,
16,
982,
18,
588,
12,
374,
262,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
addCategoriesFromDatabaseToDocument(document); | addCategoriesFromDatabaseToDocument( document ); | public void initLazilyLoadedDocumentCategories(DocumentDomainObject document) { addCategoriesFromDatabaseToDocument(document); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/f203f6fc91c9ae8d2fcd69e28ea9f0981a4ee690/DocumentMapper.java/buggy/server/src/imcode/server/document/DocumentMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
48,
20811,
8835,
2519,
10487,
12,
2519,
3748,
921,
1668,
13,
288,
3639,
527,
10487,
1265,
4254,
774,
2519,
12,
1668,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
48,
20811,
8835,
2519,
10487,
12,
2519,
3748,
921,
1668,
13,
288,
3639,
527,
10487,
1265,
4254,
774,
2519,
12,
1668,
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,
-100,
-100,
-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 Connection.TRANSACTION_READ_UNCOMMITTED: sql.append("READ UNCOMMITTED"); break; | case Connection.TRANSACTION_READ_UNCOMMITTED: sql.append("READ UNCOMMITTED"); break; | private void sqlStatementToSetTransactionIsolationLevel(StringBuffer sql) throws SQLException { sql.append("SET TRANSACTION ISOLATION LEVEL "); switch (transactionIsolationLevel) { case Connection.TRANSACTION_READ_UNCOMMITTED: sql.append("READ UNCOMMITTED"); break; case Connection.TRANSACTION_READ_COMMITTED: sql.append("READ COMMITTED"); break; case Connection.TRANSACTION_REPEATABLE_READ: sql.append("REPEATABLE READ"); break; case Connection.TRANSACTION_SERIALIZABLE: sql.append("SERIALIZABLE"); break; case Connection.TRANSACTION_NONE: default: throw new SQLException("Bad transaction level"); } } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/082f6b97f424e9550bf490d66efbe1c288b8df9b/Tds.java/clean/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/Tds.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1847,
3406,
25208,
3342,
22982,
2355,
12,
780,
1892,
1847,
13,
565,
1216,
6483,
288,
3639,
1847,
18,
6923,
2932,
4043,
24896,
4437,
1741,
2689,
15080,
315,
1769,
3639,
1620,
261,
7958,
22982,
2355,
13,
288,
5411,
648,
4050,
18,
22364,
67,
6949,
67,
2124,
18658,
6404,
30,
7734,
1847,
18,
6923,
2932,
6949,
5019,
18658,
6404,
8863,
7734,
898,
31,
5411,
648,
4050,
18,
22364,
67,
6949,
67,
18658,
6404,
30,
7734,
1847,
18,
6923,
2932,
6949,
5423,
6068,
6404,
8863,
7734,
898,
31,
5411,
648,
4050,
18,
22364,
67,
862,
31804,
2782,
67,
6949,
30,
7734,
1847,
18,
6923,
2932,
862,
31804,
2782,
10746,
8863,
7734,
898,
31,
5411,
648,
4050,
18,
22364,
67,
2123,
15154,
2782,
30,
7734,
1847,
18,
6923,
2932,
2123,
15154,
2782,
8863,
7734,
898,
31,
5411,
648,
4050,
18,
22364,
67,
9826,
30,
5411,
805,
30,
7734,
604,
394,
6483,
2932,
6434,
2492,
1801,
8863,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1847,
3406,
25208,
3342,
22982,
2355,
12,
780,
1892,
1847,
13,
565,
1216,
6483,
288,
3639,
1847,
18,
6923,
2932,
4043,
24896,
4437,
1741,
2689,
15080,
315,
1769,
3639,
1620,
261,
7958,
22982,
2355,
13,
288,
5411,
648,
4050,
18,
22364,
67,
6949,
67,
2124,
18658,
6404,
30,
7734,
1847,
18,
6923,
2932,
6949,
5019,
18658,
6404,
8863,
7734,
898,
31,
5411,
648,
4050,
18,
22364,
67,
6949,
67,
18658,
6404,
30,
7734,
1847,
18,
6923,
2932,
6949,
5423,
6068,
6404,
8863,
7734,
898,
31,
5411,
648,
4050,
18,
22364,
67,
862,
31804,
2782,
67,
6949,
30,
7734,
1847,
18,
6923,
2932,
862,
31804,
2782,
10746,
8863,
7734,
898,
31,
5411,
648,
4050,
18,
22364,
67,
2
] |
Expression expression = (Expression) entry.getValue(); | Expression expression = ((ExpressionAttribute) entry.getValue()).exp; | public void run(JellyContext context, XMLOutput output) throws JellyTagException { URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try { Tag tag = getTag(context); if ( tag == null ) { return; } tag.setContext(context); setContextURLs(context); if ( tag instanceof DynaTag ) { DynaTag dynaTag = (DynaTag) tag; // ### probably compiling this to 2 arrays might be quicker and smaller for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = (Expression) entry.getValue(); Class type = dynaTag.getAttributeType(name); Object value = null; if (type != null && type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) { value = expression; } else { value = expression.evaluateRecurse(context); } dynaTag.setAttribute(name, value); } } else { // treat the tag as a bean DynaBean dynaBean = new ConvertingWrapDynaBean( tag ); for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = (Expression) entry.getValue(); DynaProperty property = dynaBean.getDynaClass().getDynaProperty(name); if (property == null) { throw new JellyException("This tag does not understand the '" + name + "' attribute" ); } Class type = property.getType(); Object value = null; if (type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) { value = expression; } else { value = expression.evaluateRecurse(context); } dynaBean.set(name, value); } } tag.doTag(output); if (output != null) { output.flush(); } } catch (JellyTagException e) { handleException(e); } catch (JellyException e) { handleException(e); } catch (IOException e) { handleException(e); } catch (RuntimeException e) { handleException(e); } catch (Error e) { /* * Not sure if we should be converting errors to exceptions, * but not trivial to remove because JUnit tags throw * Errors in the normal course of operation. Hmm... */ handleException(e); } finally { context.setRootURL(rootURL); context.setCurrentURL(currentURL); } } | 51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/357282dec062f82da2a86ddbe7b32607814e4e5d/TagScript.java/clean/src/java/org/apache/commons/jelly/impl/TagScript.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
46,
292,
715,
1042,
819,
16,
3167,
1447,
876,
13,
1216,
804,
292,
715,
1805,
503,
288,
3639,
1976,
1365,
1785,
273,
819,
18,
588,
2375,
1785,
5621,
3639,
1976,
783,
1785,
273,
819,
18,
588,
3935,
1785,
5621,
3639,
775,
288,
5411,
4034,
1047,
273,
11362,
12,
2472,
1769,
5411,
309,
261,
1047,
422,
446,
262,
288,
7734,
327,
31,
5411,
289,
5411,
1047,
18,
542,
1042,
12,
2472,
1769,
5411,
16615,
15749,
12,
2472,
1769,
5411,
309,
261,
1047,
1276,
463,
23041,
1805,
262,
288,
7734,
463,
23041,
1805,
19417,
69,
1805,
273,
261,
10419,
69,
1805,
13,
1047,
31,
7734,
368,
11849,
8656,
1161,
4973,
333,
358,
576,
5352,
4825,
506,
719,
5448,
471,
10648,
7734,
364,
261,
3198,
1400,
273,
1677,
18,
4099,
694,
7675,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
10792,
1635,
18,
1622,
1241,
273,
261,
863,
18,
1622,
13,
1400,
18,
4285,
5621,
10792,
514,
508,
273,
261,
780,
13,
1241,
18,
588,
653,
5621,
10792,
5371,
2652,
273,
14015,
2300,
1499,
13,
1241,
18,
24805,
1435,
2934,
2749,
31,
10792,
1659,
618,
273,
19417,
69,
1805,
18,
588,
19529,
12,
529,
1769,
10792,
1033,
460,
273,
446,
31,
10792,
309,
261,
723,
480,
446,
597,
618,
18,
291,
7961,
1265,
12,
2300,
18,
1106,
13,
597,
401,
723,
18,
291,
7961,
1265,
12,
921,
18,
1106,
3719,
288,
13491,
460,
273,
2652,
31,
10792,
289,
10792,
469,
288,
13491,
460,
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,
1086,
12,
46,
292,
715,
1042,
819,
16,
3167,
1447,
876,
13,
1216,
804,
292,
715,
1805,
503,
288,
3639,
1976,
1365,
1785,
273,
819,
18,
588,
2375,
1785,
5621,
3639,
1976,
783,
1785,
273,
819,
18,
588,
3935,
1785,
5621,
3639,
775,
288,
5411,
4034,
1047,
273,
11362,
12,
2472,
1769,
5411,
309,
261,
1047,
422,
446,
262,
288,
7734,
327,
31,
5411,
289,
5411,
1047,
18,
542,
1042,
12,
2472,
1769,
5411,
16615,
15749,
12,
2472,
1769,
5411,
309,
261,
1047,
1276,
463,
23041,
1805,
262,
288,
7734,
463,
23041,
1805,
19417,
69,
1805,
273,
261,
10419,
69,
1805,
13,
1047,
31,
7734,
368,
11849,
8656,
1161,
4973,
333,
358,
576,
5352,
4825,
506,
2
] |
_message = receivedMessage; _from = from; _fromHash = fromHash; _replyBlock = replyBlock; | _message = receivedMessage; _from = from; _fromHash = fromHash; _replyBlock = replyBlock; | HandleTunnelCreateMessageJob(TunnelCreateMessage receivedMessage, RouterIdentity from, Hash fromHash, SourceRouteBlock replyBlock) { _message = receivedMessage; _from = from; _fromHash = fromHash; _replyBlock = replyBlock; } | 27493 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27493/86759d2f9c63d203488c7e8b34e64be162a16ce9/HandleTunnelCreateMessageJob.java/buggy/router/java/src/net/i2p/router/tunnelmanager/HandleTunnelCreateMessageJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
5004,
20329,
1684,
1079,
2278,
12,
20329,
1684,
1079,
5079,
1079,
16,
9703,
4334,
628,
16,
2474,
628,
2310,
16,
4998,
3255,
1768,
4332,
1768,
13,
288,
202,
67,
2150,
273,
5079,
1079,
31,
202,
67,
2080,
273,
628,
31,
202,
67,
2080,
2310,
273,
628,
2310,
31,
202,
67,
10629,
1768,
273,
4332,
1768,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
5004,
20329,
1684,
1079,
2278,
12,
20329,
1684,
1079,
5079,
1079,
16,
9703,
4334,
628,
16,
2474,
628,
2310,
16,
4998,
3255,
1768,
4332,
1768,
13,
288,
202,
67,
2150,
273,
5079,
1079,
31,
202,
67,
2080,
273,
628,
31,
202,
67,
2080,
2310,
273,
628,
2310,
31,
202,
67,
10629,
1768,
273,
4332,
1768,
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
] |
appendStatus(status.getContentsStatus(), sb); | if (!status.isIncomplete()) { appendStatus(status.getContentsStatus(), sb); } else { sb.append("!"); } | private void printStatus(String path, SVNStatus status, PrintStream out) { if (getCommandLine().hasArgument(SVNArgument.QUIET) && (!status.isManaged() || status.getContentsStatus() == SVNStatus.EXTERNAL)) { return; } boolean remoteMode = getCommandLine().hasArgument(SVNArgument.SHOW_UPDATES); StringBuffer sb = new StringBuffer(); appendStatus(status.getContentsStatus(), sb); appendStatus(status.getPropertiesStatus(), sb); sb.append(" "); if (status.isAddedWithHistory()) { sb.append("+"); } else { sb.append(" "); } if (status.isSwitched()) { sb.append("S"); } else { sb.append(" "); } boolean detailed = getCommandLine().hasArgument(SVNArgument.SHOW_UPDATES) || getCommandLine().hasArgument(SVNArgument.VERBOSE); boolean displayLastCommited = getCommandLine().hasArgument(SVNArgument.VERBOSE); String lockStatus = " "; if (remoteMode) { if (status.getRemoteLockToken() != null) { if (status.getLock() != null) { if (status.getRemoteLockToken().equals(status.getLock().getID())) { lockStatus = "K"; } else { lockStatus = "T"; } } else { lockStatus = "O"; } } else if (status.getLock() != null){ lockStatus = "B"; } } else if (status.getLock() != null) { lockStatus = "K"; } if (!detailed) { sb.append(lockStatus); if (remoteMode) { if (status.getRepositoryContentsStatus() != SVNStatus.NOT_MODIFIED || status.getRepositoryPropertiesStatus() != SVNStatus.NOT_MODIFIED) { sb.append('*'); } else { sb.append(' '); } } sb.append(" "); } else { char remote = ' '; if (status.getRepositoryContentsStatus() != SVNStatus.NOT_MODIFIED || status.getRepositoryPropertiesStatus() != SVNStatus.NOT_MODIFIED) { remote = '*'; } sb.append(lockStatus); sb.append(" "); sb.append(remote); String wcRevision = ""; if (!status.isManaged()) { wcRevision = ""; } else if (status.getWorkingCopyRevision() < 0 && remote != '*') { wcRevision = " ? "; } else if (status.isAddedWithHistory()) { wcRevision = "-"; } else if (status.getWorkingCopyRevision() >= 0) { wcRevision = status.getWorkingCopyRevision() + ""; } else if (status.getContentsStatus() == SVNStatus.MISSING) { wcRevision = " ? "; } if (status.isManaged() && status.getContentsStatus() == SVNStatus.EXTERNAL) { wcRevision = ""; } wcRevision = formatString(wcRevision, 6, false); sb.append(" "); sb.append(wcRevision); DebugLog.log("WC REVISION: " + wcRevision); DebugLog.log("MANAGED: " + status.isManaged()); if (displayLastCommited) { String commitedRevsion; if (status.isManaged() && status.getRevision() >= 0) { commitedRevsion = status.getRevision() + ""; } else if ((status.isManaged() && remote != '*') || status.getContentsStatus() == SVNStatus.MISSING) { commitedRevsion = " ? "; } else { commitedRevsion = ""; } if (status.isManaged() && status.getContentsStatus() == SVNStatus.EXTERNAL) { commitedRevsion = ""; } commitedRevsion = formatString(commitedRevsion, 6, false); sb.append(" "); sb.append(commitedRevsion); String author; if (status.isManaged() && status.getAuthor() != null) { author = status.getAuthor(); } else if ((status.isManaged() && remote != '*') || status.getAuthor() == null) { author = " ? "; } else { author = ""; } author = formatString(author.trim(), 12, true); sb.append(" "); sb.append(author); sb.append(" "); } else { sb.append(" "); } } sb.append(path); if (out != null) { out.println(sb.toString()); } DebugLog.log(sb.toString()); } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/ab9cf39dbd68d009f9176057d6b24f71d6e54e5d/StatusCommand.java/clean/javasvn/src/org/tmatesoft/svn/cli/command/StatusCommand.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
1482,
12,
780,
589,
16,
29537,
50,
1482,
1267,
16,
21677,
596,
13,
288,
3639,
309,
261,
588,
21391,
7675,
5332,
1379,
12,
23927,
50,
1379,
18,
8627,
1584,
13,
597,
16051,
2327,
18,
291,
10055,
1435,
747,
1267,
18,
588,
6323,
1482,
1435,
422,
29537,
50,
1482,
18,
2294,
11702,
3719,
288,
5411,
327,
31,
3639,
289,
3639,
1250,
2632,
2309,
273,
12856,
1670,
7675,
5332,
1379,
12,
23927,
50,
1379,
18,
16677,
67,
8217,
55,
1769,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
309,
16051,
2327,
18,
291,
27531,
10756,
288,
714,
1482,
12,
2327,
18,
588,
6323,
1482,
9334,
2393,
1769,
289,
469,
288,
2393,
18,
6923,
2932,
4442,
1769,
289,
3639,
714,
1482,
12,
2327,
18,
588,
2297,
1482,
9334,
2393,
1769,
3639,
2393,
18,
6923,
2932,
315,
1769,
3639,
309,
261,
2327,
18,
291,
8602,
1190,
5623,
10756,
288,
5411,
2393,
18,
6923,
2932,
15,
8863,
3639,
289,
469,
288,
5411,
2393,
18,
6923,
2932,
315,
1769,
3639,
289,
3639,
309,
261,
2327,
18,
291,
10200,
329,
10756,
288,
5411,
2393,
18,
6923,
2932,
55,
8863,
3639,
289,
469,
288,
5411,
2393,
18,
6923,
2932,
315,
1769,
3639,
289,
3639,
1250,
6864,
273,
12856,
1670,
7675,
5332,
1379,
12,
23927,
50,
1379,
18,
16677,
67,
8217,
55,
13,
747,
12856,
1670,
7675,
5332,
1379,
12,
23927,
50,
1379,
18,
21900,
1769,
3639,
1250,
2562,
3024,
5580,
329,
273,
12856,
1670,
7675,
5332,
1379,
12,
23927,
50,
1379,
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,
1172,
1482,
12,
780,
589,
16,
29537,
50,
1482,
1267,
16,
21677,
596,
13,
288,
3639,
309,
261,
588,
21391,
7675,
5332,
1379,
12,
23927,
50,
1379,
18,
8627,
1584,
13,
597,
16051,
2327,
18,
291,
10055,
1435,
747,
1267,
18,
588,
6323,
1482,
1435,
422,
29537,
50,
1482,
18,
2294,
11702,
3719,
288,
5411,
327,
31,
3639,
289,
3639,
1250,
2632,
2309,
273,
12856,
1670,
7675,
5332,
1379,
12,
23927,
50,
1379,
18,
16677,
67,
8217,
55,
1769,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
309,
16051,
2327,
18,
291,
27531,
10756,
288,
714,
1482,
12,
2327,
18,
588,
6323,
1482,
9334,
2393,
1769,
289,
469,
288,
2393,
18,
6923,
2932,
4442,
1769,
289,
2
] |
protected void fireLabelProviderChanged(LabelProviderChangedEvent event) { | protected void fireLabelProviderChanged(final LabelProviderChangedEvent event) { | protected void fireLabelProviderChanged(LabelProviderChangedEvent event) { Object[] listeners = this.listeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { ((ILabelProviderListener) listeners[i]).labelProviderChanged(event); }} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/75cf57f2af2f39e062e4b2d7f104f731ee34bcf7/LabelProvider.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/LabelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
4452,
2224,
2249,
5033,
12,
2224,
2249,
27553,
871,
13,
288,
202,
921,
8526,
4679,
273,
333,
18,
16072,
18,
588,
5583,
5621,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
4679,
18,
2469,
31,
965,
77,
13,
288,
202,
202,
12443,
45,
2224,
2249,
2223,
13,
4679,
63,
77,
65,
2934,
1925,
2249,
5033,
12,
2575,
1769,
202,
9090,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
4452,
2224,
2249,
5033,
12,
2224,
2249,
27553,
871,
13,
288,
202,
921,
8526,
4679,
273,
333,
18,
16072,
18,
588,
5583,
5621,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
4679,
18,
2469,
31,
965,
77,
13,
288,
202,
202,
12443,
45,
2224,
2249,
2223,
13,
4679,
63,
77,
65,
2934,
1925,
2249,
5033,
12,
2575,
1769,
202,
9090,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (mid >= count) { | if (mid >= currentSize) { | protected int indexForElement(Widget parent, Object element) { ViewerSorter sorter = getSorter(); int count; if(parent instanceof Control) count = getItemCount((Control) parent); else{ if(parent instanceof Item) count = getItemCount((Item) parent); else count = getChildren(parent).length; } if (sorter == null) return count; int min = 0, max = count - 1; while (min <= max) { int mid = (min + max) / 2; Object data = getChild (parent, mid).getData(); int compare = sorter.compare(this, data, element); if (compare == 0) { // find first item > element while (compare == 0) { ++mid; if (mid >= count) { break; } data = getChild (parent, mid).getData(); compare = sorter.compare(this, data, element); } return mid; } if (compare < 0) min = mid + 1; else max = mid - 1; } return min; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/9478b2302b40aea9f345ff08d19d15cb33c39e52/AbstractTreeViewer.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
770,
1290,
1046,
12,
4609,
982,
16,
1033,
930,
13,
288,
3639,
4441,
264,
24952,
19867,
273,
1322,
4975,
5621,
9506,
202,
474,
1056,
31,
202,
202,
430,
12,
2938,
1276,
8888,
13,
1082,
202,
1883,
273,
8143,
1380,
12443,
3367,
13,
982,
1769,
202,
202,
12107,
95,
1082,
202,
430,
12,
2938,
1276,
4342,
13,
9506,
202,
1883,
273,
8143,
1380,
12443,
1180,
13,
982,
1769,
1082,
202,
12107,
9506,
202,
1883,
273,
10268,
12,
2938,
2934,
2469,
31,
202,
202,
97,
3639,
309,
261,
2467,
387,
422,
446,
13,
5411,
327,
1056,
31,
3639,
509,
1131,
273,
374,
16,
943,
273,
1056,
300,
404,
31,
3639,
1323,
261,
1154,
1648,
943,
13,
288,
5411,
509,
7501,
273,
261,
1154,
397,
943,
13,
342,
576,
31,
5411,
1033,
501,
273,
8154,
261,
2938,
16,
7501,
2934,
588,
751,
5621,
5411,
509,
3400,
273,
19867,
18,
9877,
12,
2211,
16,
501,
16,
930,
1769,
5411,
309,
261,
9877,
422,
374,
13,
288,
7734,
368,
1104,
1122,
761,
405,
930,
7734,
1323,
261,
9877,
422,
374,
13,
288,
10792,
965,
13138,
31,
10792,
309,
261,
13138,
1545,
783,
1225,
13,
288,
13491,
898,
31,
10792,
289,
10792,
501,
273,
8154,
261,
2938,
16,
7501,
2934,
588,
751,
5621,
10792,
3400,
273,
19867,
18,
9877,
12,
2211,
16,
501,
16,
930,
1769,
7734,
289,
7734,
327,
7501,
31,
5411,
289,
5411,
309,
261,
9877,
411,
374,
13,
7734,
1131,
273,
7501,
397,
404,
31,
5411,
469,
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,
509,
770,
1290,
1046,
12,
4609,
982,
16,
1033,
930,
13,
288,
3639,
4441,
264,
24952,
19867,
273,
1322,
4975,
5621,
9506,
202,
474,
1056,
31,
202,
202,
430,
12,
2938,
1276,
8888,
13,
1082,
202,
1883,
273,
8143,
1380,
12443,
3367,
13,
982,
1769,
202,
202,
12107,
95,
1082,
202,
430,
12,
2938,
1276,
4342,
13,
9506,
202,
1883,
273,
8143,
1380,
12443,
1180,
13,
982,
1769,
1082,
202,
12107,
9506,
202,
1883,
273,
10268,
12,
2938,
2934,
2469,
31,
202,
202,
97,
3639,
309,
261,
2467,
387,
422,
446,
13,
5411,
327,
1056,
31,
3639,
509,
1131,
273,
374,
16,
943,
273,
1056,
300,
404,
31,
3639,
1323,
261,
1154,
1648,
943,
13,
288,
5411,
2
] |
newReportFileWizardPage.setFileName( getUniqueReportName( ) ); | newReportFileWizardPage.setFileName( getUniqueReportName( ) + "." + fileExtension ); | public void addPages( ) { newReportFileWizardPage = new WizardNewReportCreationPage( WIZARDPAGE, selection ); addPage( newReportFileWizardPage ); // Temporary remark the choice page for that feature is not supported in // R1 // choicePage = new WizardChoicePage( TEMPLATECHOICEPAGE ); // addPage( choicePage ); // customTemplatePage = new WizardCustomTemplatePage( TEMPLATECHOICEPAGE // ); // addPage( customTemplatePage ); templateChoicePage = new WizardTemplateChoicePage( TEMPLATECHOICEPAGE ); addPage( templateChoicePage ); // set titles newReportFileWizardPage.setTitle( REPORT ); newReportFileWizardPage.setDescription( CREATE_A_NEW_REPORT ); templateChoicePage.setTitle( REPORT ); templateChoicePage.setDescription( SELECT_A_REPORT_TEMPLATE ); // Temporary remark the choice page for that feature is not supported in // R1 // customTemplatePage.setTitle( REPORT ); // customTemplatePage.setDescription( SELECT_A_REPORT_TEMPLATE ); // choicePage.setTitle( REPORT ); // choicePage.setDescription( CHOOSE_FROM_TEMPLATE ); resetUniqueCount( ); newReportFileWizardPage.setFileName( getUniqueReportName( ) ); newReportFileWizardPage.setContainerFullPath( getDefaultContainerPath( ) ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/c22efc94d5781b8af580a7e4ff478999ea7b0fb6/NewReportWizard.java/clean/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/wizards/NewReportWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
5716,
12,
262,
202,
95,
202,
202,
2704,
4820,
812,
27130,
1964,
273,
394,
678,
13412,
1908,
4820,
9906,
1964,
12,
678,
6867,
8085,
11219,
16,
9506,
202,
10705,
11272,
202,
202,
1289,
1964,
12,
394,
4820,
812,
27130,
1964,
11272,
202,
202,
759,
202,
202,
11685,
849,
1313,
326,
6023,
1363,
364,
716,
2572,
353,
486,
3260,
316,
202,
202,
759,
534,
21,
202,
202,
759,
202,
202,
11569,
1964,
273,
394,
678,
13412,
10538,
1964,
12,
20835,
22213,
11774,
11219,
11272,
202,
202,
759,
202,
202,
1289,
1964,
12,
6023,
1964,
11272,
202,
202,
759,
202,
202,
3662,
2283,
1964,
273,
394,
678,
13412,
3802,
2283,
1964,
12,
20835,
22213,
11774,
11219,
202,
202,
759,
11272,
202,
202,
759,
202,
202,
1289,
1964,
12,
1679,
2283,
1964,
11272,
202,
202,
3202,
10538,
1964,
273,
394,
678,
13412,
2283,
10538,
1964,
12,
20835,
22213,
11774,
11219,
11272,
202,
202,
1289,
1964,
12,
1542,
10538,
1964,
11272,
202,
202,
759,
444,
14693,
202,
202,
2704,
4820,
812,
27130,
1964,
18,
542,
4247,
12,
27711,
11272,
202,
202,
2704,
4820,
812,
27130,
1964,
18,
542,
3291,
12,
13278,
67,
37,
67,
12917,
67,
22710,
11272,
202,
202,
3202,
10538,
1964,
18,
542,
4247,
12,
27711,
11272,
202,
202,
3202,
10538,
1964,
18,
542,
3291,
12,
9111,
67,
37,
67,
22710,
67,
12205,
11272,
202,
202,
759,
202,
202,
11685,
849,
1313,
326,
6023,
1363,
364,
716,
2572,
353,
486,
3260,
316,
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,
527,
5716,
12,
262,
202,
95,
202,
202,
2704,
4820,
812,
27130,
1964,
273,
394,
678,
13412,
1908,
4820,
9906,
1964,
12,
678,
6867,
8085,
11219,
16,
9506,
202,
10705,
11272,
202,
202,
1289,
1964,
12,
394,
4820,
812,
27130,
1964,
11272,
202,
202,
759,
202,
202,
11685,
849,
1313,
326,
6023,
1363,
364,
716,
2572,
353,
486,
3260,
316,
202,
202,
759,
534,
21,
202,
202,
759,
202,
202,
11569,
1964,
273,
394,
678,
13412,
10538,
1964,
12,
20835,
22213,
11774,
11219,
11272,
202,
202,
759,
202,
202,
1289,
1964,
12,
6023,
1964,
11272,
202,
202,
759,
202,
202,
3662,
2283,
1964,
273,
394,
678,
13412,
3802,
2283,
1964,
12,
20835,
22213,
11774,
11219,
2
] |
if ( container.getDataSet( ) == null ) | DataSetHandle containerDataSet = DEUtil.getFirstDataSet( container ); container = DEUtil.getListingContainer( container ); if ( containerDataSet == null && container != null ) | protected static DataItemHandle performInsertDataSetColumn( ResultSetColumnHandle model, Object target, Object targetParent ) throws SemanticException { /* * search the target container, if container has the same dataset, add * the column binding if it does not exist in the container. If the * container's dataset is not the dragged dataset column's dataset, * column binding will be added to the new dataitem, and set dataitem's * dataset with the dragged dataset column's dataset. */ DataItemHandle dataHandle = DesignElementFactory.getInstance( ) .newDataItem( null ); DataSetHandle dataSet = (DataSetHandle) model.getElementHandle( ); dataHandle.setResultSetColumn( model.getColumnName( ) ); boolean bindingExist = true; if ( targetParent instanceof ReportItemHandle ) { ReportItemHandle container = (ReportItemHandle) targetParent; ComputedColumn bindingColumn = StructureFactory.newComputedColumn( dataHandle, model.getColumnName( ) ); bindingColumn.setDataType( model.getDataType( ) ); bindingColumn.setExpression( DEUtil.getExpression( model ) ); if ( container.getDataSet( ) == null ) { container.setDataSet( dataSet ); } if ( DEUtil.getDataSetList( container ).contains( dataSet ) ) { container.addColumnBinding( bindingColumn, false ); } else { dataHandle.setDataSet( dataSet ); dataHandle.addColumnBinding( bindingColumn, false ); } // GroupHandle groupHandle = getGroupHandle( target ); // if ( groupHandle != null ) // { // ComputedColumn bindingColumn = // StructureFactory.newComputedColumn( groupHandle, // model.getColumnName( ) ); // // bindingColumn.setColumnName( model.getColumnName( ) ); // bindingColumn.setDataType( model.getDataType( ) ); // bindingColumn.setExpression( DEUtil.getExpression( model ) ); // // groupHandle.addColumnBinding( bindingColumn, false ); // } // else // { // ComputedColumn bindingColumn = // StructureFactory.newComputedColumn( container, // model.getColumnName( ) ); // bindingColumn.setDataType( model.getDataType( ) ); // bindingColumn.setExpression( DEUtil.getExpression( model ) ); // container.addColumnBinding( bindingColumn, false ); // } // ComputedColumn bindingColumn = // StructureFactory.createComputedColumn( ); // bindingColumn.setName( model.getColumnName( ) ); // bindingColumn.setDataType( model.getDataType( ) ); // bindingColumn.setExpression( DEUtil.getExpression( model ) ); // GroupHandle groupHandle = getGroupHandle( target ); // // if ( groupHandle != null ) // { // for ( Iterator iter = groupHandle.getColumnBindings( ) // .iterator( ); iter.hasNext( ); ) // { // ComputedColumnHandle element = (ComputedColumnHandle) iter.next( // ); // if ( element.getStructure( ).equals( bindingColumn ) ) // { // bindingExist = true; // break; // } // } // } // else // { // for ( Iterator iter = container.getColumnBindings( ).iterator( ); // iter.hasNext( ); ) // { // ComputedColumnHandle element = (ComputedColumnHandle) iter.next( // ); // if ( element.getStructure( ).equals( bindingColumn ) ) // { // bindingExist = true; // break; // } // } // // } } else { ComputedColumn bindingColumn = StructureFactory.newComputedColumn( dataHandle, model.getColumnName( ) ); bindingColumn.setDataType( model.getDataType( ) ); bindingColumn.setExpression( DEUtil.getExpression( model ) ); dataHandle.addColumnBinding( bindingColumn, false ); dataHandle.setDataSet( dataSet ); } // if ( !bindingExist ) // { // ComputedColumn bindingColumn = StructureFactory.newComputedColumn( // dataHandle, // model.getColumnName( ) ); // bindingColumn.setDataType( model.getDataType( ) ); // bindingColumn.setExpression( DEUtil.getExpression( model ) ); // dataHandle.addColumnBinding( bindingColumn, false ); // dataHandle.setDataSet( dataSet ); // } InsertInLayoutRule rule = new LabelAddRule( target ); if ( rule.canInsert( ) ) { // LabelHandle label = SessionHandleAdapter.getInstance( ) // .getReportDesignHandle( ) // .getElementFactory( ) // .newLabel( null ); LabelHandle label = DesignElementFactory.getInstance( ) .newLabel( null ); label.setText( ResultSetColumnProvider.getDisplayName( model ) ); rule.insert( label ); } rule = new GroupKeySetRule( target, model ); if ( rule.canInsert( ) ) { rule.insert( model ); } return dataHandle; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/854188015e2f84d22fbb8be65119fbc50ebdd918/InsertInLayoutUtil.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dnd/InsertInLayoutUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
1910,
1180,
3259,
3073,
4600,
13676,
1494,
12,
1082,
202,
13198,
1494,
3259,
938,
16,
1033,
1018,
16,
1033,
1018,
3054,
262,
1082,
202,
15069,
24747,
503,
202,
95,
202,
202,
20308,
1082,
380,
1623,
326,
1018,
1478,
16,
309,
1478,
711,
326,
1967,
3709,
16,
527,
1082,
380,
326,
1057,
5085,
309,
518,
1552,
486,
1005,
316,
326,
1478,
18,
971,
326,
1082,
380,
1478,
1807,
3709,
353,
486,
326,
8823,
2423,
3709,
1057,
1807,
3709,
16,
1082,
380,
1057,
5085,
903,
506,
3096,
358,
326,
394,
501,
1726,
16,
471,
444,
501,
1726,
1807,
1082,
380,
3709,
598,
326,
8823,
2423,
3709,
1057,
1807,
3709,
18,
1082,
1195,
202,
202,
29903,
3259,
501,
3259,
273,
29703,
1046,
1733,
18,
588,
1442,
12,
262,
9506,
202,
18,
2704,
29903,
12,
446,
11272,
202,
202,
13676,
3259,
14837,
273,
261,
13676,
3259,
13,
938,
18,
21336,
3259,
12,
11272,
202,
202,
892,
3259,
18,
542,
13198,
1494,
12,
938,
18,
588,
8516,
12,
262,
11272,
202,
202,
6494,
5085,
4786,
273,
638,
31,
202,
202,
430,
261,
1018,
3054,
1276,
8706,
1180,
3259,
262,
202,
202,
95,
1082,
202,
4820,
1180,
3259,
1478,
273,
261,
4820,
1180,
3259,
13,
1018,
3054,
31,
1082,
202,
17934,
1494,
5085,
1494,
273,
13348,
1733,
18,
2704,
17934,
1494,
12,
501,
3259,
16,
6862,
202,
2284,
18,
588,
8516,
12,
262,
11272,
1082,
202,
7374,
1494,
18,
542,
6273,
12,
938,
18,
588,
6273,
12,
262,
11272,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
1910,
1180,
3259,
3073,
4600,
13676,
1494,
12,
1082,
202,
13198,
1494,
3259,
938,
16,
1033,
1018,
16,
1033,
1018,
3054,
262,
1082,
202,
15069,
24747,
503,
202,
95,
202,
202,
20308,
1082,
380,
1623,
326,
1018,
1478,
16,
309,
1478,
711,
326,
1967,
3709,
16,
527,
1082,
380,
326,
1057,
5085,
309,
518,
1552,
486,
1005,
316,
326,
1478,
18,
971,
326,
1082,
380,
1478,
1807,
3709,
353,
486,
326,
8823,
2423,
3709,
1057,
1807,
3709,
16,
1082,
380,
1057,
5085,
903,
506,
3096,
358,
326,
394,
501,
1726,
16,
471,
444,
501,
1726,
1807,
1082,
380,
3709,
598,
326,
8823,
2423,
3709,
1057,
1807,
3709,
18,
1082,
1195,
202,
202,
29903,
3259,
501,
2
] |
if(this.pubKey != null && this.pubKey != pubKey && !this.pubKey.equals(pubKey)) | if((this.pubKey != null) && (this.pubKey != pubKey) && !this.pubKey.equals(pubKey)) | public void setPublicKey(DSAPublicKey pubKey) { if(this.pubKey != null && this.pubKey != pubKey && !this.pubKey.equals(pubKey)) throw new IllegalArgumentException("Cannot reassign: was "+this.pubKey+" now "+pubKey); this.pubKey = pubKey; } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/ClientSSK.java/buggy/src/freenet/keys/ClientSSK.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
9632,
12,
3948,
2203,
24312,
18659,
13,
288,
202,
202,
430,
12,
2211,
18,
10174,
653,
480,
446,
597,
333,
18,
10174,
653,
480,
18659,
597,
401,
2211,
18,
10174,
653,
18,
14963,
12,
10174,
653,
3719,
1082,
202,
12849,
394,
2754,
2932,
4515,
283,
6145,
30,
1703,
13773,
2211,
18,
10174,
653,
9078,
2037,
13773,
10174,
653,
1769,
202,
202,
2211,
18,
10174,
653,
273,
18659,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
9632,
12,
3948,
2203,
24312,
18659,
13,
288,
202,
202,
430,
12,
2211,
18,
10174,
653,
480,
446,
597,
333,
18,
10174,
653,
480,
18659,
597,
401,
2211,
18,
10174,
653,
18,
14963,
12,
10174,
653,
3719,
1082,
202,
12849,
394,
2754,
2932,
4515,
283,
6145,
30,
1703,
13773,
2211,
18,
10174,
653,
9078,
2037,
13773,
10174,
653,
1769,
202,
202,
2211,
18,
10174,
653,
273,
18659,
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
] |
java.io.File[] files = dir.listFiles(); if (files != null) { for(int i=0 ; i < files.length ; i++) { delDirectory(files[i]); } } System.out.println("deleting "+dir.getPath()+" ..."); dir.delete(); if (dir.exists()) { System.out.println("We cannot delete this file : "+dir.getPath()); System.out.println("... You should delete it before running a new ServiceLocator ..."); | java.io.File[] files = dir.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { delDirectory(files[i]); | protected static void delDirectory(java.io.File dir) { java.io.File[] files = dir.listFiles(); if (files != null) { for(int i=0 ; i < files.length ; i++) { delDirectory(files[i]); } } System.out.println("deleting "+dir.getPath()+" ..."); dir.delete(); if (dir.exists()) { System.out.println("We cannot delete this file : "+dir.getPath()); System.out.println("... You should delete it before running a new ServiceLocator ..."); } } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/587595d3d238a839759fc80780989cf7b46a7398/ServiceLocatorHelper.java/clean/src/org/objectweb/proactive/core/jini/ServiceLocatorHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
918,
1464,
2853,
12,
6290,
18,
1594,
18,
812,
1577,
13,
288,
1377,
2252,
18,
1594,
18,
812,
8526,
1390,
273,
1577,
18,
1098,
2697,
5621,
1850,
309,
261,
2354,
480,
446,
13,
288,
202,
1377,
364,
12,
474,
277,
33,
20,
274,
277,
411,
1390,
18,
2469,
274,
277,
27245,
288,
202,
3639,
1464,
2853,
12,
2354,
63,
77,
19226,
202,
1377,
289,
1377,
289,
1377,
2332,
18,
659,
18,
8222,
2932,
19003,
310,
13773,
1214,
18,
588,
743,
1435,
9078,
1372,
8863,
1377,
1577,
18,
3733,
5621,
1377,
309,
261,
1214,
18,
1808,
10756,
288,
202,
1377,
2332,
18,
659,
18,
8222,
2932,
3218,
2780,
1430,
333,
585,
294,
13773,
1214,
18,
588,
743,
10663,
202,
1377,
2332,
18,
659,
18,
8222,
2932,
2777,
4554,
1410,
1430,
518,
1865,
3549,
279,
394,
21443,
1372,
8863,
1377,
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,
4750,
760,
918,
1464,
2853,
12,
6290,
18,
1594,
18,
812,
1577,
13,
288,
1377,
2252,
18,
1594,
18,
812,
8526,
1390,
273,
1577,
18,
1098,
2697,
5621,
1850,
309,
261,
2354,
480,
446,
13,
288,
202,
1377,
364,
12,
474,
277,
33,
20,
274,
277,
411,
1390,
18,
2469,
274,
277,
27245,
288,
202,
3639,
1464,
2853,
12,
2354,
63,
77,
19226,
202,
1377,
289,
1377,
289,
1377,
2332,
18,
659,
18,
8222,
2932,
19003,
310,
13773,
1214,
18,
588,
743,
1435,
9078,
1372,
8863,
1377,
1577,
18,
3733,
5621,
1377,
309,
261,
1214,
18,
1808,
10756,
288,
202,
1377,
2332,
18,
659,
18,
8222,
2932,
3218,
2780,
1430,
333,
585,
294,
13773,
1214,
18,
588,
743,
2
] |
rebind( orb.object_to_string( fwd.forward ) ); | rebind(fwd.forward); | public void invokeInterceptors( ClientRequestInfoImpl info, short op ) throws RemarshalException { ClientInterceptorIterator intercept_iter = orb.getInterceptorManager().getClientIterator(); try { intercept_iter.iterate( info, op ); } catch ( org.omg.PortableInterceptor.ForwardRequest fwd ) { rebind( orb.object_to_string( fwd.forward ) ); throw new RemarshalException(); } catch ( org.omg.CORBA.UserException ue ) { if (logger.isErrorEnabled()) logger.error( ue.getMessage() ); } } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/978c5f9101c798b686e712fe878f1543d0d849ee/Delegate.java/clean/src/org/jacorb/orb/Delegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4356,
20540,
12,
2445,
23113,
2828,
1123,
16,
3025,
1061,
262,
3639,
1216,
2663,
2237,
503,
565,
288,
3639,
2445,
10281,
3198,
10883,
67,
2165,
273,
5411,
16823,
18,
588,
10281,
1318,
7675,
588,
1227,
3198,
5621,
3639,
775,
3639,
288,
5411,
10883,
67,
2165,
18,
18793,
12,
1123,
16,
1061,
11272,
3639,
289,
3639,
1044,
261,
2358,
18,
362,
75,
18,
2617,
429,
10281,
18,
8514,
691,
18943,
262,
3639,
288,
5411,
283,
4376,
12,
27131,
18,
11565,
1769,
5411,
604,
394,
2663,
2237,
503,
5621,
3639,
289,
3639,
1044,
261,
2358,
18,
362,
75,
18,
9428,
12536,
18,
1299,
503,
17869,
262,
3639,
288,
5411,
309,
261,
4901,
18,
291,
668,
1526,
10756,
7734,
1194,
18,
1636,
12,
17869,
18,
24906,
1435,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4356,
20540,
12,
2445,
23113,
2828,
1123,
16,
3025,
1061,
262,
3639,
1216,
2663,
2237,
503,
565,
288,
3639,
2445,
10281,
3198,
10883,
67,
2165,
273,
5411,
16823,
18,
588,
10281,
1318,
7675,
588,
1227,
3198,
5621,
3639,
775,
3639,
288,
5411,
10883,
67,
2165,
18,
18793,
12,
1123,
16,
1061,
11272,
3639,
289,
3639,
1044,
261,
2358,
18,
362,
75,
18,
2617,
429,
10281,
18,
8514,
691,
18943,
262,
3639,
288,
5411,
283,
4376,
12,
27131,
18,
11565,
1769,
5411,
604,
394,
2663,
2237,
503,
5621,
3639,
289,
3639,
1044,
261,
2358,
18,
362,
75,
18,
9428,
12536,
18,
1299,
503,
17869,
262,
3639,
288,
5411,
309,
261,
4901,
18,
291,
668,
1526,
10756,
7734,
2
] |
new DefaultBindSpec().setValidator(validator)); | new DefaultBindSpec().setTargetValidator(validator)); | public void testScenario07() { // Binding the price property of an Adventure to a Text control. Price // is a double and Text accepts String so conversion will have to occur. // Validation ensure that the value is positive Text text = new Text(getComposite(), SWT.BORDER); adventure.setPrice(5.0); final String cannotBeNegativeMessage = "Price cannot be negative."; final String mustBeCurrencyMessage = "Price must be a currency."; IValidator validator = new IValidator() { public IStatus validate(Object value) { String stringValue = (String) value; try { double doubleValue = new Double(stringValue).doubleValue(); if (doubleValue < 0.0) { return ValidationStatus.error(cannotBeNegativeMessage); } return Status.OK_STATUS; } catch (NumberFormatException ex) { return ValidationStatus.error(mustBeCurrencyMessage); } } }; getDbc().bindValue(SWTObservables.observeText(text, SWT.Modify), BeansObservables.observeValue(adventure, "price"), new DefaultBindSpec().setValidator(validator)); assertEquals("5.0", text.getText()); assertTrue(((IStatus)getDbc().getValidationStatus().getValue()).isOK()); enterText(text, "0.65"); assertTrue(((IStatus)getDbc().getValidationStatus().getValue()).isOK()); assertEquals(0.65, adventure.getPrice(), 0.0001); adventure.setPrice(42.24); assertEquals("42.24", text.getText()); assertTrue(((IStatus)getDbc().getValidationStatus().getValue()).isOK()); enterText(text, "jygt"); assertEquals(mustBeCurrencyMessage, ((IStatus) getDbc().getValidationStatus().getValue()).getMessage()); enterText(text, "-23.9"); assertEquals(cannotBeNegativeMessage, ((IStatus) getDbc().getValidationStatus().getValue()).getMessage()); assertEquals(42.24, adventure.getPrice(), 0.0001); adventure.setPrice(0.0); assertTrue(((IStatus)getDbc().getValidationStatus().getValue()).isOK()); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/746d711da082dfe9c1252ed16a48aab57f9d9b94/PropertyScenarios.java/buggy/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
21390,
8642,
1435,
288,
3639,
368,
15689,
326,
6205,
1272,
434,
392,
4052,
616,
594,
358,
279,
3867,
3325,
18,
20137,
3639,
368,
353,
279,
1645,
471,
3867,
8104,
514,
1427,
4105,
903,
1240,
358,
3334,
18,
3639,
368,
5684,
3387,
716,
326,
460,
353,
6895,
3639,
3867,
977,
273,
394,
3867,
12,
588,
9400,
9334,
348,
8588,
18,
38,
7954,
1769,
3639,
1261,
616,
594,
18,
542,
5147,
12,
25,
18,
20,
1769,
3639,
727,
514,
2780,
1919,
14959,
1079,
273,
315,
5147,
2780,
506,
6092,
1199,
31,
3639,
727,
514,
1297,
1919,
7623,
1079,
273,
315,
5147,
1297,
506,
279,
5462,
1199,
31,
3639,
467,
5126,
4213,
273,
394,
467,
5126,
1435,
288,
5411,
1071,
467,
1482,
1954,
12,
921,
460,
13,
288,
7734,
514,
19721,
273,
261,
780,
13,
460,
31,
7734,
775,
288,
10792,
1645,
11868,
273,
394,
3698,
12,
1080,
620,
2934,
9056,
620,
5621,
10792,
309,
261,
9056,
620,
411,
374,
18,
20,
13,
288,
13491,
327,
5684,
1482,
18,
1636,
12,
12892,
1919,
14959,
1079,
1769,
10792,
289,
10792,
327,
2685,
18,
3141,
67,
8608,
31,
7734,
289,
1044,
261,
1854,
9291,
431,
13,
288,
10792,
327,
5684,
1482,
18,
1636,
12,
11926,
1919,
7623,
1079,
1769,
7734,
289,
5411,
289,
3639,
289,
31,
3639,
11188,
71,
7675,
4376,
620,
12,
18746,
4296,
3147,
1538,
18,
12199,
537,
1528,
12,
955,
16,
348,
8588,
18,
11047,
3631,
7734,
4823,
634,
26199,
1538,
18,
12199,
537,
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,
377,
1071,
918,
1842,
21390,
8642,
1435,
288,
3639,
368,
15689,
326,
6205,
1272,
434,
392,
4052,
616,
594,
358,
279,
3867,
3325,
18,
20137,
3639,
368,
353,
279,
1645,
471,
3867,
8104,
514,
1427,
4105,
903,
1240,
358,
3334,
18,
3639,
368,
5684,
3387,
716,
326,
460,
353,
6895,
3639,
3867,
977,
273,
394,
3867,
12,
588,
9400,
9334,
348,
8588,
18,
38,
7954,
1769,
3639,
1261,
616,
594,
18,
542,
5147,
12,
25,
18,
20,
1769,
3639,
727,
514,
2780,
1919,
14959,
1079,
273,
315,
5147,
2780,
506,
6092,
1199,
31,
3639,
727,
514,
1297,
1919,
7623,
1079,
273,
315,
5147,
1297,
506,
279,
5462,
1199,
31,
3639,
467,
5126,
4213,
273,
394,
467,
5126,
1435,
288,
2
] |
return position == 0; } | return position == 0; } | public boolean isFirst() throws OLAPException { return position == 0; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/ArrayNavigator.java/buggy/src/main/mondrian/jolap/ArrayNavigator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
17447,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
2463,
1754,
422,
374,
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
] | [
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
17447,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
2463,
1754,
422,
374,
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
] |
extractZipFile(srcZip.getLocation().toFile(), dest.getFullPath(), monitor); | extractZipFile(srcZip.getLocation().toFile(), dest.getFullPath(), new SubProgressMonitor(monitor, 1)); | private void importAsSource(IProject project, IPluginModelBase model, SubProgressMonitor monitor) throws CoreException { monitor.beginTask("", 3); //$NON-NLS-1$ importAsBinary(project, model, false, new SubProgressMonitor(monitor, 2)); WorkspaceBuildModel buildModel = new WorkspaceBuildModel(project.getFile("build.properties")); //$NON-NLS-1$ if (!isJARd(model) || containsCode(new File(model.getInstallLocation()))) { String[] libraries = getLibraryNames(model, false); for (int i = 0; i < libraries.length; i++) { if (ClasspathUtilCore.containsVariables(libraries[i])) continue; String name = ClasspathUtilCore.expandLibraryName(libraries[i]); IPath libraryPath = (name.equals(".") && isJARd(model)) //$NON-NLS-1$ ? new Path(new File(model.getInstallLocation()).getName()) : new Path(name); IResource jarFile = project.findMember(libraryPath); if (jarFile != null) { IResource srcZip = jarFile.getProject().findMember(ClasspathUtilCore.getSourceZipName(jarFile.getName())); if (srcZip != null) { String jarName = libraries[i].equals(".") ? "" : libraryPath.removeFileExtension().lastSegment(); //$NON-NLS-1$ //$NON-NLS-2$ String folder = addBuildEntry(buildModel, "source." + libraries[i], "src" + (jarName.length() == 0 ? "/" : "-" + jarName + "/")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ IFolder dest = jarFile.getProject().getFolder(folder); if (!dest.exists()) { dest.create(true, true, null); } extractZipFile(srcZip.getLocation().toFile(), dest.getFullPath(), monitor); if (isJARd(model)) { extractJavaResources(jarFile.getLocation().toFile(), dest, monitor); } else { extractResources(jarFile.getLocation().toFile(), dest, monitor); } srcZip.delete(true, null); jarFile.delete(true, null); } } else if (name.equals(".") && project.getFolder("src").exists()) { //$NON-NLS-1$ //$NON-NLS-2$ addBuildEntry(buildModel, "source..", "src/"); //$NON-NLS-1$ //$NON-NLS-2$ } } } configureBinIncludes(buildModel, model); buildModel.save(); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/4472217a291214221a3c1ce7f17bd4d60cd105a6/PluginImportOperation.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1930,
1463,
1830,
12,
45,
4109,
1984,
16,
467,
3773,
1488,
2171,
938,
16,
2592,
5491,
7187,
6438,
13,
1216,
30015,
288,
202,
202,
10259,
18,
10086,
2174,
2932,
3113,
890,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
5666,
1463,
5905,
12,
4406,
16,
938,
16,
629,
16,
394,
2592,
5491,
7187,
12,
10259,
16,
576,
10019,
9506,
202,
8241,
3116,
1488,
1361,
1488,
273,
394,
14396,
3116,
1488,
12,
4406,
18,
29925,
2932,
3510,
18,
4738,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
430,
16051,
291,
46,
985,
72,
12,
2284,
13,
747,
1914,
1085,
12,
2704,
1387,
12,
2284,
18,
588,
6410,
2735,
1435,
20349,
288,
1082,
202,
780,
8526,
14732,
273,
336,
9313,
1557,
12,
2284,
16,
629,
1769,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
14732,
18,
2469,
31,
277,
27245,
288,
9506,
202,
430,
261,
17461,
1304,
4670,
18,
12298,
6158,
12,
31417,
63,
77,
22643,
6862,
202,
17143,
31,
9506,
202,
780,
508,
273,
1659,
803,
1304,
4670,
18,
12320,
9313,
461,
12,
31417,
63,
77,
19226,
9506,
202,
45,
743,
5313,
743,
273,
261,
529,
18,
14963,
2932,
1199,
13,
597,
353,
46,
985,
72,
12,
2284,
3719,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
25083,
202,
35,
394,
2666,
12,
2704,
1387,
12,
2284,
18,
588,
6410,
2735,
1435,
2934,
17994,
10756,
6862,
25083,
202,
30,
394,
2666,
12,
529,
1769,
9506,
202,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1930,
1463,
1830,
12,
45,
4109,
1984,
16,
467,
3773,
1488,
2171,
938,
16,
2592,
5491,
7187,
6438,
13,
1216,
30015,
288,
202,
202,
10259,
18,
10086,
2174,
2932,
3113,
890,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
5666,
1463,
5905,
12,
4406,
16,
938,
16,
629,
16,
394,
2592,
5491,
7187,
12,
10259,
16,
576,
10019,
9506,
202,
8241,
3116,
1488,
1361,
1488,
273,
394,
14396,
3116,
1488,
12,
4406,
18,
29925,
2932,
3510,
18,
4738,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
430,
16051,
291,
46,
985,
72,
12,
2284,
13,
747,
1914,
1085,
12,
2704,
1387,
12,
2284,
18,
588,
6410,
2735,
1435,
20349,
288,
2
] |
double ten = Math.log(10); | public void paint( Graphics2D g, SequenceRenderContext src, RangeLocation pos ) { int min = pos.getMin(); int max = pos.getMax(); double minX = src.sequenceToGraphics(min); double maxX = src.sequenceToGraphics(max); double scale = src.getScale(); double halfScale = scale * 0.5; Line2D line; if(src.getDirection() == src.HORIZONTAL) { line = new Line2D.Double(minX + halfScale, 0.0, maxX + halfScale, 0.0); } else { line = new Line2D.Double(0.0, minX + halfScale, 0.0, maxX + halfScale); } g.draw(line); // we want ticks no closer than 40 pixles appart int realSymsPerGap = src.graphicsToSequence(40.0); //System.out.println("Real syms: " + realSymsPerGap); double ten = Math.log(10); int snapSymsPerGap = (int) Math.exp( Math.ceil(Math.log(realSymsPerGap) / ten) * ten ); //System.out.println("Snapped syms: " + snapSymsPerGap); int minP = min + (snapSymsPerGap - min) % snapSymsPerGap; for(int indx = minP; indx <= max; indx += snapSymsPerGap) { double offset = src.sequenceToGraphics(indx); if(src.getDirection() == src.HORIZONTAL) { line.setLine(offset + halfScale, 0.0, offset + halfScale, 5.0); g.drawString(String.valueOf(indx), (float) (offset + halfScale), 20.0f); } else { line.setLine(0.0, offset + halfScale, 5.0, offset + halfScale); } g.draw(line); } } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/2a2b36dbfb7f07e77fb728d185ebe5003e654a81/RulerRenderer.java/clean/src/org/biojava/bio/gui/sequence/RulerRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
12574,
12,
565,
16830,
22,
40,
314,
16,
8370,
3420,
1042,
1705,
16,
565,
8086,
2735,
949,
225,
262,
288,
565,
509,
1131,
273,
949,
18,
588,
2930,
5621,
565,
509,
943,
273,
949,
18,
588,
2747,
5621,
565,
1645,
21586,
273,
1705,
18,
6178,
774,
17558,
12,
1154,
1769,
565,
1645,
21482,
273,
1705,
18,
6178,
774,
17558,
12,
1896,
1769,
565,
1645,
3159,
273,
1705,
18,
588,
5587,
5621,
565,
1645,
8816,
5587,
273,
3159,
380,
374,
18,
25,
31,
565,
5377,
22,
40,
980,
31,
3639,
309,
12,
4816,
18,
588,
8212,
1435,
422,
1705,
18,
44,
20344,
13,
288,
1377,
980,
273,
394,
5377,
22,
40,
18,
5265,
12,
1154,
60,
397,
8816,
5587,
16,
374,
18,
20,
16,
21482,
397,
8816,
5587,
16,
374,
18,
20,
1769,
565,
289,
469,
288,
1377,
980,
273,
394,
5377,
22,
40,
18,
5265,
12,
20,
18,
20,
16,
21586,
397,
8816,
5587,
16,
374,
18,
20,
16,
21482,
397,
8816,
5587,
1769,
565,
289,
3639,
314,
18,
9446,
12,
1369,
1769,
3639,
368,
732,
2545,
13003,
1158,
13306,
2353,
8063,
11871,
1040,
595,
485,
565,
509,
2863,
10876,
959,
2173,
14001,
273,
1705,
18,
31586,
774,
4021,
12,
7132,
18,
20,
1769,
565,
368,
3163,
18,
659,
18,
8222,
2932,
6955,
24367,
30,
315,
397,
2863,
10876,
959,
2173,
14001,
1769,
4202,
509,
10915,
10876,
959,
2173,
14001,
273,
261,
474,
13,
2361,
18,
2749,
12,
1377,
2361,
18,
311,
330,
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,
282,
1071,
918,
12574,
12,
565,
16830,
22,
40,
314,
16,
8370,
3420,
1042,
1705,
16,
565,
8086,
2735,
949,
225,
262,
288,
565,
509,
1131,
273,
949,
18,
588,
2930,
5621,
565,
509,
943,
273,
949,
18,
588,
2747,
5621,
565,
1645,
21586,
273,
1705,
18,
6178,
774,
17558,
12,
1154,
1769,
565,
1645,
21482,
273,
1705,
18,
6178,
774,
17558,
12,
1896,
1769,
565,
1645,
3159,
273,
1705,
18,
588,
5587,
5621,
565,
1645,
8816,
5587,
273,
3159,
380,
374,
18,
25,
31,
565,
5377,
22,
40,
980,
31,
3639,
309,
12,
4816,
18,
588,
8212,
1435,
422,
1705,
18,
44,
20344,
13,
288,
1377,
980,
273,
394,
5377,
22,
40,
18,
5265,
12,
1154,
60,
397,
2
] | |
loop47: | loop48: | public ArrayList argument_list() throws RecognitionException { ArrayList args; ArgumentValueDescr param = null; args = new ArrayList(); try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:763:17: ( (param= argument_value ( opt_eol ',' opt_eol param= argument_value )* )? ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:763:17: (param= argument_value ( opt_eol ',' opt_eol param= argument_value )* )? { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:763:17: (param= argument_value ( opt_eol ',' opt_eol param= argument_value )* )? int alt48=2; int LA48_0 = input.LA(1); if ( (LA48_0>=ID && LA48_0<=FLOAT)||LA48_0==43 ) { alt48=1; } else if ( LA48_0==EOL||LA48_0==15||LA48_0==25 ) { alt48=2; } else { NoViableAltException nvae = new NoViableAltException("763:17: (param= argument_value ( opt_eol \',\' opt_eol param= argument_value )* )?", 48, 0, input); throw nvae; } switch (alt48) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:763:18: param= argument_value ( opt_eol ',' opt_eol param= argument_value )* { following.push(FOLLOW_argument_value_in_argument_list1782); param=argument_value(); following.pop(); if (param != null) { args.add(param); } // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:769:17: ( opt_eol ',' opt_eol param= argument_value )* loop47: do { int alt47=2; alt47 = dfa47.predict(input); switch (alt47) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:770:25: opt_eol ',' opt_eol param= argument_value { following.push(FOLLOW_opt_eol_in_argument_list1798); opt_eol(); following.pop(); match(input,24,FOLLOW_24_in_argument_list1800); following.push(FOLLOW_opt_eol_in_argument_list1802); opt_eol(); following.pop(); following.push(FOLLOW_argument_value_in_argument_list1806); param=argument_value(); following.pop(); if (param != null) { args.add(param); } } break; default : break loop47; } } while (true); } break; } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return args; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/12c8feffd968f958100f654d836fa3c2ee21ded8/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2407,
1237,
67,
1098,
1435,
1216,
9539,
288,
6647,
2407,
833,
31,
3639,
5067,
620,
16198,
579,
273,
446,
31,
540,
202,
202,
1968,
273,
394,
2407,
5621,
540,
202,
3639,
775,
288,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
10649,
8464,
17,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,
19,
12215,
19,
4936,
19,
72,
1321,
18,
75,
30,
27,
4449,
30,
4033,
30,
261,
261,
891,
33,
1237,
67,
1132,
261,
2153,
67,
30951,
3316,
2153,
67,
30951,
579,
33,
1237,
67,
1132,
8618,
7851,
262,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
10649,
8464,
17,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,
19,
12215,
19,
4936,
19,
72,
1321,
18,
75,
30,
27,
4449,
30,
4033,
30,
261,
891,
33,
1237,
67,
1132,
261,
2153,
67,
30951,
3316,
2153,
67,
30951,
579,
33,
1237,
67,
1132,
8618,
7851,
5411,
288,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
10649,
8464,
17,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,
19,
12215,
19,
4936,
19,
72,
1321,
18,
75,
30,
27,
4449,
30,
4033,
30,
261,
891,
33,
1237,
67,
1132,
261,
2153,
67,
30951,
3316,
2153,
67,
30951,
579,
33,
1237,
67,
1132,
8618,
7851,
5411,
509,
3770,
8875,
33,
22,
31,
5411,
509,
2928,
8875,
67,
20,
273,
810,
18,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2407,
1237,
67,
1098,
1435,
1216,
9539,
288,
6647,
2407,
833,
31,
3639,
5067,
620,
16198,
579,
273,
446,
31,
540,
202,
202,
1968,
273,
394,
2407,
5621,
540,
202,
3639,
775,
288,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
10649,
8464,
17,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,
19,
12215,
19,
4936,
19,
72,
1321,
18,
75,
30,
27,
4449,
30,
4033,
30,
261,
261,
891,
33,
1237,
67,
1132,
261,
2153,
67,
30951,
3316,
2153,
67,
30951,
579,
33,
1237,
67,
1132,
8618,
7851,
262,
5411,
368,
342,
8712,
19,
81,
1354,
69,
292,
19,
13582,
19,
10649,
8464,
17,
7482,
19,
12215,
2
] |
if (inClassContext && sym.owner().isPrimaryConstructor()) | if (inClassContext && name.isTermName() && sym.owner().isPrimaryConstructor()) | public Tree transform(Tree tree) { switch (tree) { case ClassDef(int mods, // : Name name, Tree.TypeDef[] tparams, Tree.ValDef[][] vparams, Tree tpe, Tree.Template impl): { Symbol clsSym = tree.symbol(); Symbol constrSym = clsSym.constructor(); LinkedList/*<Tree>*/ newBody = new LinkedList(Arrays.asList(transform(impl.body))); // Add value definitions and accessors for all constructor // arguments which were found in the body of the class. assert vparams.length == 1; Tree.ValDef[] params = vparams[0]; Scope newMembers = new Scope(clsSym.members()); for (int i = 0; i < params.length; ++i) { Symbol paramSym = params[i].symbol(); if (accessorMap.containsKey(paramSym)) { Symbol accessorSym = (Symbol)accessorMap.get(paramSym); Symbol valSym = new TermSymbol(paramSym.pos, valName(paramSym), clsSym, Modifiers.PRIVATE); valSym.setType(paramSym.type()); newBody.addFirst(gen.DefDef(accessorSym, gen.Ident(valSym))); newMembers.enter(accessorSym); newBody.addFirst(gen.ValDef(valSym, gen.Ident(paramSym))); newMembers.enter(valSym); } } // Update class type with new values/accessors. switch (clsSym.info()) { case CompoundType(Type[] basetypes, Scope members): clsSym.updateInfo(Type.compoundType(basetypes, newMembers, clsSym)); break; default: Debug.abort("unexpected type", clsSym.info()); } assert inClassContext; inClassContext = false; Tree[] newParents = transform(impl.parents); inClassContext = true; Tree[] newBodyA = (Tree[])newBody.toArray(new Tree[newBody.size()]); return copy.ClassDef(tree, mods, name, transform(tparams), transform(vparams), transform(tpe), copy.Template(impl, newParents, newBodyA)); } case Select(Tree qualifier, Name selector): { Symbol sym = tree.symbol(); if (sym.owner().isPrimaryConstructor()) return gen.Apply(gen.Select(transform(qualifier), accessor(sym)), Tree.EMPTY_ARRAY); else return copy.Select(tree, transform(qualifier), selector); } case Ident(Name name): { Symbol sym = tree.symbol(); if (inClassContext && sym.owner().isPrimaryConstructor()) return gen.Apply(gen.Ident(accessor(sym)), Tree.EMPTY_ARRAY); else return copy.Ident(tree, name); } default: return super.transform(tree); } } | 9617 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9617/144fa12bf87abeba2736c149f83064c08af9e4a6/AddAccessors.java/clean/sources/scalac/transformer/AddAccessors.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4902,
2510,
12,
2471,
2151,
13,
288,
3639,
1620,
261,
3413,
13,
288,
3639,
648,
1659,
3262,
12,
474,
15546,
16,
368,
294,
8227,
1770,
508,
16,
8227,
4902,
18,
559,
3262,
8526,
268,
2010,
16,
8227,
4902,
18,
3053,
3262,
63,
6362,
65,
331,
2010,
16,
8227,
4902,
268,
347,
16,
8227,
4902,
18,
2283,
9380,
4672,
288,
5411,
8565,
2028,
11901,
273,
2151,
18,
7175,
5621,
5411,
8565,
14472,
11901,
273,
2028,
11901,
18,
12316,
5621,
5411,
10688,
20308,
32,
2471,
34,
5549,
394,
2250,
273,
7734,
394,
10688,
12,
12726,
18,
345,
682,
12,
6547,
12,
11299,
18,
3432,
3719,
1769,
5411,
368,
1436,
460,
6377,
471,
28088,
364,
777,
3885,
5411,
368,
1775,
1492,
4591,
1392,
316,
326,
1417,
434,
326,
667,
18,
5411,
1815,
331,
2010,
18,
2469,
422,
404,
31,
5411,
4902,
18,
3053,
3262,
8526,
859,
273,
331,
2010,
63,
20,
15533,
5411,
5468,
394,
6918,
273,
394,
5468,
12,
6429,
11901,
18,
7640,
10663,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
859,
18,
2469,
31,
965,
77,
13,
288,
7734,
8565,
579,
11901,
273,
859,
63,
77,
8009,
7175,
5621,
7734,
309,
261,
3860,
280,
863,
18,
12298,
653,
12,
891,
11901,
3719,
288,
10792,
8565,
9789,
11901,
273,
261,
5335,
13,
3860,
280,
863,
18,
588,
12,
891,
11901,
1769,
10792,
8565,
1244,
11901,
273,
394,
6820,
5335,
12,
891,
11901,
18,
917,
16,
4766,
10402,
1244,
461,
12,
891,
11901,
3631,
4766,
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,
4902,
2510,
12,
2471,
2151,
13,
288,
3639,
1620,
261,
3413,
13,
288,
3639,
648,
1659,
3262,
12,
474,
15546,
16,
368,
294,
8227,
1770,
508,
16,
8227,
4902,
18,
559,
3262,
8526,
268,
2010,
16,
8227,
4902,
18,
3053,
3262,
63,
6362,
65,
331,
2010,
16,
8227,
4902,
268,
347,
16,
8227,
4902,
18,
2283,
9380,
4672,
288,
5411,
8565,
2028,
11901,
273,
2151,
18,
7175,
5621,
5411,
8565,
14472,
11901,
273,
2028,
11901,
18,
12316,
5621,
5411,
10688,
20308,
32,
2471,
34,
5549,
394,
2250,
273,
7734,
394,
10688,
12,
12726,
18,
345,
682,
12,
6547,
12,
11299,
18,
3432,
3719,
1769,
5411,
368,
1436,
460,
6377,
471,
28088,
364,
777,
3885,
5411,
368,
1775,
2
] |
verbose, rmiHost, rmiPort, tempPath, appProps); if (verbose) { System.out.println(serverName); | serverConfig.isVerbose(), serverConfig.getRMIHost(), serverConfig.getRMIPort(), serverConfig.getTempPath(), serverConfig.getLoadDefaultProps(), args); if (serverConfig.isVerbose()) { System.out.println(serverConfig.getServerName()); | public void start() throws Exception { if (verbose) { if (appProps != null) { appProps.list(System.err); } } // start an RMIRegistry - exit on failure if (verbose) { System.err.print("Creating Registry: "); } registry = LocateRegistry.createRegistry(rmiPort); if (verbose) { System.err.println(registry.toString()); } // create and register a server instance if (verbose) { System.err.print("Creating Server: "); } server = new ServerHostControllerImpl( verbose, rmiHost, rmiPort, tempPath, appProps); if (verbose) { System.out.println(serverName); } registry.rebind(serverName, server); if (verbose) { System.err.println(server.toString()); } System.out.println("Server running"); } | 7982 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7982/c59b9ef0b875b8d0e473d002533adf2a9fe71f00/ServerDaemon.java/buggy/server/src/org/cougaar/tools/server/rmi/ServerDaemon.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
787,
1435,
1216,
1185,
288,
565,
309,
261,
11369,
13,
288,
1377,
309,
261,
2910,
5047,
480,
446,
13,
288,
3639,
595,
5047,
18,
1098,
12,
3163,
18,
370,
1769,
1377,
289,
565,
289,
565,
368,
787,
392,
534,
7492,
4243,
300,
2427,
603,
5166,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
370,
18,
1188,
2932,
11092,
5438,
30,
315,
1769,
565,
289,
565,
4023,
273,
2851,
340,
4243,
18,
2640,
4243,
12,
8864,
77,
2617,
1769,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
370,
18,
8222,
12,
9893,
18,
10492,
10663,
565,
289,
565,
368,
752,
471,
1744,
279,
1438,
791,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
370,
18,
1188,
2932,
11092,
3224,
30,
315,
1769,
565,
289,
565,
1438,
273,
1377,
394,
3224,
2594,
2933,
2828,
12,
1850,
3988,
16,
1850,
6692,
77,
2594,
16,
1850,
6692,
77,
2617,
16,
1850,
1906,
743,
16,
1850,
595,
5047,
1769,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
659,
18,
8222,
12,
3567,
461,
1769,
565,
289,
565,
4023,
18,
266,
4376,
12,
3567,
461,
16,
1438,
1769,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
370,
18,
8222,
12,
3567,
18,
10492,
10663,
565,
289,
565,
2332,
18,
659,
18,
8222,
2932,
2081,
3549,
8863,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
787,
1435,
1216,
1185,
288,
565,
309,
261,
11369,
13,
288,
1377,
309,
261,
2910,
5047,
480,
446,
13,
288,
3639,
595,
5047,
18,
1098,
12,
3163,
18,
370,
1769,
1377,
289,
565,
289,
565,
368,
787,
392,
534,
7492,
4243,
300,
2427,
603,
5166,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
370,
18,
1188,
2932,
11092,
5438,
30,
315,
1769,
565,
289,
565,
4023,
273,
2851,
340,
4243,
18,
2640,
4243,
12,
8864,
77,
2617,
1769,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
370,
18,
8222,
12,
9893,
18,
10492,
10663,
565,
289,
565,
368,
752,
471,
1744,
279,
1438,
791,
565,
309,
261,
11369,
13,
288,
1377,
2332,
18,
370,
2
] |
if (c.getBackground()!=null) | if (c.getBackground()!=null){ | public static void printTableCellColors(Device s, SComponent c) throws IOException { // if (c.getForeground()!=null) // s.print(" COLOR=#"). // print(toColorString(c.getForeground())); if (c.getBackground()!=null) s.print(" bgcolor=\"#") .print(toColorString(c.getBackground())) .print("\""); } | 3911 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3911/3ad53c7100c4146af7849a303bdde5937eea56f6/Utils.java/clean/wings/src/org/wings/plaf/xhtml/Utils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1172,
1388,
4020,
12570,
12,
3654,
272,
16,
348,
1841,
276,
13,
540,
1216,
1860,
288,
3639,
368,
309,
261,
71,
18,
588,
23206,
1435,
5,
33,
2011,
13,
3639,
368,
377,
272,
18,
1188,
2932,
15590,
33,
17133,
2934,
3639,
368,
540,
1172,
12,
869,
2957,
780,
12,
71,
18,
588,
23206,
1435,
10019,
3639,
309,
261,
71,
18,
588,
8199,
1435,
5,
33,
2011,
15329,
5411,
272,
18,
1188,
2932,
31509,
5189,
7,
7923,
7734,
263,
1188,
12,
869,
2957,
780,
12,
71,
18,
588,
8199,
1435,
3719,
7734,
263,
1188,
2932,
8530,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1172,
1388,
4020,
12570,
12,
3654,
272,
16,
348,
1841,
276,
13,
540,
1216,
1860,
288,
3639,
368,
309,
261,
71,
18,
588,
23206,
1435,
5,
33,
2011,
13,
3639,
368,
377,
272,
18,
1188,
2932,
15590,
33,
17133,
2934,
3639,
368,
540,
1172,
12,
869,
2957,
780,
12,
71,
18,
588,
23206,
1435,
10019,
3639,
309,
261,
71,
18,
588,
8199,
1435,
5,
33,
2011,
15329,
5411,
272,
18,
1188,
2932,
31509,
5189,
7,
7923,
7734,
263,
1188,
12,
869,
2957,
780,
12,
71,
18,
588,
8199,
1435,
3719,
7734,
263,
1188,
2932,
8530,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
} if (t == LA(1)) break; | } if (t == LA(1)) break; } IASTPointerOperator po = null; if (nameDuple != null) { IASTName name = createName(nameDuple); ICPPASTPointerToMember p2m = createPointerToMember(isRestrict); ((ASTNode) p2m).setOffsetAndLength(nameDuple .getFirstToken().getOffset(), last.getEndOffset() - nameDuple.getFirstToken().getOffset()); p2m.setConst(isConst); p2m.setVolatile(isVolatile); p2m.setName(name); name.setParent(p2m); name.setPropertyInParent(ICPPASTPointerToMember.NAME); if (isRestrict) { IGPPASTPointerToMember newPo = (IGPPASTPointerToMember) p2m; newPo.setRestrict(isRestrict); p2m = newPo; } po = p2m; } else { po = createPointer(isRestrict); ((ASTNode) po).setOffsetAndLength(starOffset, last .getEndOffset() - starOffset); ((IASTPointer) po).setConst(isConst); ((IASTPointer) po).setVolatile(isVolatile); if (isRestrict) { IGPPASTPointer newPo = (IGPPASTPointer) po; newPo.setRestrict(isRestrict); po = newPo; } } if (po != null) collection.add(po); continue; | protected void consumePointerOperators(List collection) throws EndOfFileException, BacktrackException { for (;;) { if (LT(1) == IToken.tAMPER) { int length = LA(1).getEndOffset() - LA(1).getOffset(); int o = consume(IToken.tAMPER).getOffset(); ICPPASTReferenceOperator refOp = createReferenceOperator(); ((ASTNode) refOp).setOffsetAndLength(o, length); collection.add(refOp); return; } IToken last = null; IToken mark = mark(); ITokenDuple nameDuple = null; boolean isConst = false, isVolatile = false, isRestrict = false; if (LT(1) == IToken.tIDENTIFIER || LT(1) == IToken.tCOLONCOLON) { try { nameDuple = name(); last = nameDuple.getLastToken(); } catch (BacktrackException bt) { backup(mark); return; } } if (LT(1) == IToken.tSTAR) { last = consume(IToken.tSTAR); int starOffset = last.getOffset(); for (;;) { IToken t = LA(1); int startingOffset = LA(1).getOffset(); switch (LT(1)) { case IToken.t_const: last = consume(IToken.t_const); isConst = true; break; case IToken.t_volatile: last = consume(IToken.t_volatile); isVolatile = true; break; case IToken.t_restrict: if (allowCPPRestrict) { last = consume(IToken.t_restrict); isRestrict = true; break; } IToken la = LA(1); throwBacktrack(startingOffset, la.getEndOffset() - startingOffset); } if (t == LA(1)) break; } IASTPointerOperator po = null; if (nameDuple != null) { IASTName name = createName(nameDuple); ICPPASTPointerToMember p2m = createPointerToMember(isRestrict); ((ASTNode) p2m).setOffsetAndLength(nameDuple.getFirstToken() .getOffset(), last.getEndOffset() - nameDuple.getFirstToken().getOffset()); p2m.setConst(isConst); p2m.setVolatile(isVolatile); p2m.setName(name); name.setParent(p2m); name.setPropertyInParent(ICPPASTPointerToMember.NAME); if (isRestrict) { IGPPASTPointerToMember newPo = (IGPPASTPointerToMember) p2m; newPo.setRestrict(isRestrict); p2m = newPo; } po = p2m; } else { po = createPointer(isRestrict); ((ASTNode) po).setOffsetAndLength(starOffset, last .getEndOffset() - starOffset); ((IASTPointer) po).setConst(isConst); ((IASTPointer) po).setVolatile(isVolatile); if (isRestrict) { IGPPASTPointer newPo = (IGPPASTPointer) po; newPo.setRestrict(isRestrict); po = newPo; } } if (po != null) collection.add(po); continue; } backup(mark); return; } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/8b59056395eb6c26e898030e7e1cd1b78d4db999/GNUCPPSourceParser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
7865,
4926,
24473,
12,
682,
1849,
13,
540,
1216,
4403,
951,
812,
503,
16,
4297,
4101,
503,
288,
1377,
364,
261,
25708,
13,
288,
540,
309,
261,
12050,
12,
21,
13,
422,
467,
1345,
18,
88,
2192,
3194,
13,
288,
5411,
509,
769,
273,
2928,
12,
21,
2934,
588,
1638,
2335,
1435,
300,
2928,
12,
21,
2934,
588,
2335,
5621,
5411,
509,
320,
273,
7865,
12,
1285,
969,
18,
88,
2192,
3194,
2934,
588,
2335,
5621,
5411,
467,
4258,
4066,
882,
2404,
5592,
1278,
3817,
273,
752,
2404,
5592,
5621,
5411,
14015,
9053,
907,
13,
1278,
3817,
2934,
542,
2335,
1876,
1782,
12,
83,
16,
769,
1769,
5411,
1849,
18,
1289,
12,
1734,
3817,
1769,
5411,
327,
31,
540,
289,
540,
467,
1345,
1142,
273,
446,
31,
540,
467,
1345,
2267,
273,
2267,
5621,
540,
467,
1345,
40,
2268,
508,
40,
2268,
273,
446,
31,
540,
1250,
353,
9661,
273,
629,
16,
353,
17431,
20295,
273,
629,
16,
353,
29371,
273,
629,
31,
540,
309,
261,
12050,
12,
21,
13,
422,
467,
1345,
18,
88,
16606,
747,
11807,
12,
21,
13,
422,
467,
1345,
18,
88,
4935,
673,
4935,
673,
13,
288,
5411,
775,
288,
9079,
508,
40,
2268,
273,
508,
5621,
9079,
1142,
273,
508,
40,
2268,
18,
588,
3024,
1345,
5621,
5411,
289,
1044,
261,
2711,
4101,
503,
10921,
13,
288,
9079,
5114,
12,
3355,
1769,
9079,
327,
31,
5411,
289,
540,
289,
540,
309,
261,
12050,
12,
21,
13,
422,
467,
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,
7865,
4926,
24473,
12,
682,
1849,
13,
540,
1216,
4403,
951,
812,
503,
16,
4297,
4101,
503,
288,
1377,
364,
261,
25708,
13,
288,
540,
309,
261,
12050,
12,
21,
13,
422,
467,
1345,
18,
88,
2192,
3194,
13,
288,
5411,
509,
769,
273,
2928,
12,
21,
2934,
588,
1638,
2335,
1435,
300,
2928,
12,
21,
2934,
588,
2335,
5621,
5411,
509,
320,
273,
7865,
12,
1285,
969,
18,
88,
2192,
3194,
2934,
588,
2335,
5621,
5411,
467,
4258,
4066,
882,
2404,
5592,
1278,
3817,
273,
752,
2404,
5592,
5621,
5411,
14015,
9053,
907,
13,
1278,
3817,
2934,
542,
2335,
1876,
1782,
12,
83,
16,
769,
1769,
5411,
1849,
18,
1289,
12,
1734,
3817,
1769,
5411,
2
] |
return Collections.EMPTY_LIST; | return EMPTY_LIST; | public List childNodes() { return Collections.EMPTY_LIST; } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/b1293eda8454686e846e2a9837b348e2983bb423/ZArrayNode.java/buggy/src/org/jruby/ast/ZArrayNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
10582,
1435,
288,
3639,
327,
8984,
67,
7085,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
10582,
1435,
288,
3639,
327,
8984,
67,
7085,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public static EOEnterpriseObject editableInstanceOfObject( EOEnterpriseObject eo, boolean createNestedContext) { if (eo == null) throw new IllegalArgumentException("EO can't be null"); EOEditingContext ec = eo.editingContext(); if (ec == null) throw new IllegalArgumentException("EO must live in an EC"); | public static EOEnterpriseObject editableInstanceOfObject(EOEnterpriseObject eo, boolean createNestedContext) { if(eo == null) throw new IllegalArgumentException("EO can't be null"); EOEditingContext ec = eo.editingContext(); if(ec == null) throw new IllegalArgumentException("EO must live in an EC"); | public static EOEnterpriseObject editableInstanceOfObject( EOEnterpriseObject eo, boolean createNestedContext) { if (eo == null) throw new IllegalArgumentException("EO can't be null"); EOEditingContext ec = eo.editingContext(); if (ec == null) throw new IllegalArgumentException("EO must live in an EC"); boolean isNewObject = ERXExtensions.isNewObject(eo); // Check for old EOF bug and do nothing as we can't localInstance // anything here if (ERXProperties.webObjectsVersionAsDouble() < 5.21d && isNewObject) { return eo; } EOEnterpriseObject localObject = eo; // Either we have an already saved object or a new one and create a nested context. // Otherwise (new object and a peer) we should probably raise, but simple return the EO if((isNewObject && createNestedContext) || !isNewObject) { // create either peer or nested context EOEditingContext newEc = ERXEC .newEditingContext(createNestedContext ? ec : ec .parentObjectStore()); ec.lock(); try { newEc.lock(); try { if (ec instanceof EOSharedEditingContext || ec.sharedEditingContext() == null) { newEc.setSharedEditingContext(null); } localObject = EOUtilities.localInstanceOfObject(newEc, eo); localObject.willRead(); } finally { newEc.unlock(); } } finally { ec.unlock(); } } return localObject; } | 50512 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50512/34bd76e4415f130e75e7bb5959a34935299de2cf/ERXEOControlUtilities.java/clean/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXEOControlUtilities.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
512,
51,
30699,
921,
13754,
1442,
951,
921,
12,
5411,
512,
51,
30699,
921,
425,
83,
16,
1250,
752,
8649,
1042,
13,
288,
3639,
309,
261,
4361,
422,
446,
13,
604,
394,
2754,
2932,
41,
51,
848,
1404,
506,
446,
8863,
3639,
512,
51,
28029,
1042,
6557,
273,
425,
83,
18,
4619,
310,
1042,
5621,
3639,
309,
261,
557,
422,
446,
13,
604,
394,
2754,
2932,
41,
51,
1297,
8429,
316,
392,
7773,
8863,
7734,
1250,
10783,
921,
273,
4232,
60,
7513,
18,
291,
1908,
921,
12,
4361,
1769,
7734,
368,
2073,
364,
1592,
6431,
7934,
471,
741,
5083,
487,
732,
848,
1404,
1191,
1442,
3639,
368,
6967,
2674,
3639,
309,
261,
654,
60,
2297,
18,
4875,
4710,
1444,
1463,
5265,
1435,
411,
1381,
18,
5340,
72,
597,
10783,
921,
13,
288,
5411,
327,
425,
83,
31,
3639,
289,
3639,
512,
51,
30699,
921,
1191,
921,
273,
425,
83,
31,
7734,
368,
14635,
732,
1240,
392,
1818,
5198,
733,
578,
279,
394,
1245,
471,
752,
279,
4764,
819,
18,
3639,
368,
5272,
261,
2704,
733,
471,
279,
4261,
13,
732,
1410,
8656,
1002,
16,
1496,
4143,
327,
326,
512,
51,
3639,
309,
12443,
291,
1908,
921,
597,
752,
8649,
1042,
13,
747,
401,
291,
1908,
921,
13,
288,
5411,
368,
752,
3344,
4261,
578,
4764,
819,
5411,
512,
51,
28029,
1042,
394,
23057,
273,
4232,
60,
7228,
10792,
263,
2704,
28029,
1042,
12,
2640,
8649,
1042,
692,
6557,
294,
6557,
18701,
263,
2938,
921,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
512,
51,
30699,
921,
13754,
1442,
951,
921,
12,
5411,
512,
51,
30699,
921,
425,
83,
16,
1250,
752,
8649,
1042,
13,
288,
3639,
309,
261,
4361,
422,
446,
13,
604,
394,
2754,
2932,
41,
51,
848,
1404,
506,
446,
8863,
3639,
512,
51,
28029,
1042,
6557,
273,
425,
83,
18,
4619,
310,
1042,
5621,
3639,
309,
261,
557,
422,
446,
13,
604,
394,
2754,
2932,
41,
51,
1297,
8429,
316,
392,
7773,
8863,
7734,
1250,
10783,
921,
273,
4232,
60,
7513,
18,
291,
1908,
921,
12,
4361,
1769,
7734,
368,
2073,
364,
1592,
6431,
7934,
471,
741,
5083,
487,
732,
848,
1404,
1191,
1442,
3639,
368,
6967,
2674,
3639,
309,
261,
654,
60,
2297,
18,
2
] |
try | */ try | protected String handleImage(IImage image, Object context, String prefix, boolean needMap) { String mapID = null; if(needMap) { mapID = getImageMapID(image); if(map.containsKey(mapID)) { return (String)map.get(mapID); } } String ret = null; boolean returnRelativePath = true; if (context != null && (context instanceof HTMLRenderContext)) { HTMLRenderContext myContext = (HTMLRenderContext) context; String imageURL = myContext.getBaseImageURL(); String imageDir = myContext.getImageDirectory(); String reportName = (String)image.getRenderOption().getOutputSetting().get(RenderOptionBase.OUTPUT_FILE_NAME); String reportBase = null; if(reportName != null) { reportBase = new File(new File(reportName).getAbsolutePath()).getParent(); } else { reportBase = new File(".").getAbsolutePath(); } String imageAbsoluteDir = null; if (imageDir == null) { imageAbsoluteDir = reportBase; imageURL = null;//return file path imageDir = "."; //$NON-NLS-1$ } else { if(!FileUtil.isRelativePath(imageDir)) { returnRelativePath = false; imageAbsoluteDir = imageDir; } else { imageAbsoluteDir = reportBase + "/" + imageDir; //$NON-NLS-1$ } } String fileName; File file; synchronized (HTMLCompleteImageHandler.class) { String extension = image.getExtension(); if(extension!=null && extension.length()>0) { fileName = createUniqueFileName(imageAbsoluteDir, prefix, extension); //$NON-NLS-1$ } else { fileName = createUniqueFileName(imageAbsoluteDir, prefix); } file = new File(imageAbsoluteDir, fileName); //$NON-NLS-1$ try { image.writeImage(file); } catch (IOException e) { log.log(Level.SEVERE,e.getMessage(),e); } } if (imageURL != null) { ret = imageURL + "/" + fileName; //$NON-NLS-1$ } else { if(returnRelativePath) { ret = imageDir + "/" + fileName; //$NON-NLS-1$ } else { ret = file.getAbsolutePath(); //$NON-NLS-1$ } } if(needMap) { map.put(mapID, ret); } } return ret; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/32c6275f2d1ede54e1de6e010ac62d0ff752eb3e/HTMLCompleteImageHandler.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/HTMLCompleteImageHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
1640,
2040,
12,
45,
2040,
1316,
16,
1033,
819,
16,
514,
1633,
16,
1250,
1608,
863,
13,
202,
95,
202,
202,
780,
852,
734,
273,
446,
31,
202,
202,
430,
12,
14891,
863,
13,
202,
202,
95,
1082,
202,
1458,
734,
273,
10567,
863,
734,
12,
2730,
1769,
1082,
202,
430,
12,
1458,
18,
12298,
653,
12,
1458,
734,
3719,
1082,
202,
95,
9506,
202,
2463,
261,
780,
13,
1458,
18,
588,
12,
1458,
734,
1769,
1082,
202,
97,
202,
202,
97,
202,
202,
780,
325,
273,
446,
31,
202,
202,
6494,
327,
16519,
273,
638,
31,
3196,
202,
430,
261,
2472,
480,
446,
9506,
202,
10,
10,
261,
2472,
1276,
3982,
3420,
1042,
3719,
202,
202,
95,
1082,
202,
4870,
3420,
1042,
3399,
1042,
273,
261,
4870,
3420,
1042,
13,
819,
31,
1082,
202,
780,
1316,
1785,
273,
3399,
1042,
18,
588,
2171,
2040,
1785,
5621,
1082,
202,
780,
1316,
1621,
273,
3399,
1042,
18,
588,
2040,
2853,
5621,
1082,
202,
780,
2605,
461,
273,
261,
780,
13,
2730,
18,
588,
3420,
1895,
7675,
588,
1447,
5568,
7675,
588,
12,
3420,
1895,
2171,
18,
15527,
67,
3776,
67,
1985,
1769,
1082,
202,
780,
2605,
2171,
273,
446,
31,
1082,
202,
430,
12,
6006,
461,
480,
446,
13,
1082,
202,
95,
9506,
202,
6006,
2171,
273,
394,
1387,
12,
2704,
1387,
12,
6006,
461,
2934,
588,
10368,
743,
1435,
2934,
588,
3054,
5621,
1082,
202,
97,
1082,
202,
12107,
1082,
202,
95,
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,
1117,
514,
1640,
2040,
12,
45,
2040,
1316,
16,
1033,
819,
16,
514,
1633,
16,
1250,
1608,
863,
13,
202,
95,
202,
202,
780,
852,
734,
273,
446,
31,
202,
202,
430,
12,
14891,
863,
13,
202,
202,
95,
1082,
202,
1458,
734,
273,
10567,
863,
734,
12,
2730,
1769,
1082,
202,
430,
12,
1458,
18,
12298,
653,
12,
1458,
734,
3719,
1082,
202,
95,
9506,
202,
2463,
261,
780,
13,
1458,
18,
588,
12,
1458,
734,
1769,
1082,
202,
97,
202,
202,
97,
202,
202,
780,
325,
273,
446,
31,
202,
202,
6494,
327,
16519,
273,
638,
31,
3196,
202,
430,
261,
2472,
480,
446,
9506,
202,
10,
10,
261,
2472,
1276,
3982,
3420,
1042,
3719,
2
] |
Patch myPatch=((Patch)myModel.PatchList.get (table.getSelectedRow ())); PatchEdit.getDriver (myPatch.deviceNum,myPatch.driverNum).calculateChecksum (myPatch); PatchEdit.getDriver (myPatch.deviceNum,myPatch.driverNum).choosePatch (myPatch); | Patch myPatch=((Patch)myModel.PatchList.get(table.getSelectedRow())); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).calculateChecksum(myPatch); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).choosePatch(myPatch); | public void StoreSelectedPatch () { Patch myPatch=((Patch)myModel.PatchList.get (table.getSelectedRow ())); PatchEdit.getDriver (myPatch.deviceNum,myPatch.driverNum).calculateChecksum (myPatch); PatchEdit.getDriver (myPatch.deviceNum,myPatch.driverNum).choosePatch (myPatch); } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/62b315e8a465a26dabe894fe915eab34f48f17f0/LibraryFrame.java/clean/JSynthLib/core/LibraryFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4994,
7416,
7332,
1832,
565,
288,
3639,
12042,
3399,
7332,
33,
12443,
7332,
13,
4811,
1488,
18,
7332,
682,
18,
588,
261,
2121,
18,
588,
7416,
1999,
1832,
10019,
3639,
12042,
4666,
18,
588,
4668,
261,
4811,
7332,
18,
5964,
2578,
16,
4811,
7332,
18,
7407,
2578,
2934,
11162,
10723,
261,
4811,
7332,
1769,
3639,
12042,
4666,
18,
588,
4668,
261,
4811,
7332,
18,
5964,
2578,
16,
4811,
7332,
18,
7407,
2578,
2934,
25777,
7332,
261,
4811,
7332,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4994,
7416,
7332,
1832,
565,
288,
3639,
12042,
3399,
7332,
33,
12443,
7332,
13,
4811,
1488,
18,
7332,
682,
18,
588,
261,
2121,
18,
588,
7416,
1999,
1832,
10019,
3639,
12042,
4666,
18,
588,
4668,
261,
4811,
7332,
18,
5964,
2578,
16,
4811,
7332,
18,
7407,
2578,
2934,
11162,
10723,
261,
4811,
7332,
1769,
3639,
12042,
4666,
18,
588,
4668,
261,
4811,
7332,
18,
5964,
2578,
16,
4811,
7332,
18,
7407,
2578,
2934,
25777,
7332,
261,
4811,
7332,
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
] |
ShadowProxyFactory.UPDATE_PROXY, Type.getMethodDescriptor( Type.VOID_TYPE, new Type[]{} ), null, null ); | ShadowProxyFactory.UPDATE_PROXY, Type.getMethodDescriptor( Type.VOID_TYPE, new Type[]{} ), null, null ); | protected static void buildUpdateProxyMethod(final Map fieldTypes, final String className, final ClassWriter cw) { final MethodVisitor mv = cw.visitMethod( Opcodes.ACC_PUBLIC, ShadowProxyFactory.UPDATE_PROXY, Type.getMethodDescriptor( Type.VOID_TYPE, new Type[]{} ), null, null ); mv.visitCode(); final Label l0 = new Label(); mv.visitLabel( l0 ); for ( final Iterator it = fieldTypes.entrySet().iterator(); it.hasNext(); ) { final Map.Entry entry = (Map.Entry) it.next(); final String fieldName = (String) entry.getKey(); final String fieldFlag = fieldName + ShadowProxyFactory.FIELD_SET_FLAG; final Class fieldType = (Class) entry.getValue(); final Label l1 = new Label(); mv.visitLabel( l1 ); mv.visitVarInsn( Opcodes.ALOAD, 0 ); if ( fieldType.isPrimitive() ) { if ( fieldType.equals( Long.TYPE ) ) { mv.visitInsn( Opcodes.LCONST_0 ); } else if ( fieldType.equals( Double.TYPE ) ) { mv.visitInsn( Opcodes.DCONST_0 ); } else if ( fieldType.equals( Float.TYPE ) ) { mv.visitInsn( Opcodes.FCONST_0 ); } else { mv.visitInsn( Opcodes.ICONST_0 ); } } else { mv.visitInsn( Opcodes.ACONST_NULL ); } mv.visitFieldInsn( Opcodes.PUTFIELD, className, fieldName, Type.getDescriptor( fieldType ) ); final Label l2 = new Label(); mv.visitLabel( l2 ); mv.visitVarInsn( Opcodes.ALOAD, 0 ); mv.visitInsn( Opcodes.ICONST_0 ); mv.visitFieldInsn( Opcodes.PUTFIELD, className, fieldFlag, Type.BOOLEAN_TYPE.getDescriptor() ); } final Label l4 = new Label(); mv.visitLabel( l4 ); mv.visitInsn( Opcodes.RETURN ); final Label l5 = new Label(); mv.visitLabel( l5 ); mv.visitLocalVariable( "this", "L" + className + ";", null, l0, l5, 0 ); mv.visitMaxs( 0, 0 ); mv.visitEnd(); } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/8a995b973ca7b7806073dba61752af32011a4945/ShadowProxyFactory.java/buggy/drools-core/src/main/java/org/drools/base/ShadowProxyFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
918,
1361,
1891,
3886,
1305,
12,
6385,
1635,
652,
2016,
16,
4766,
1171,
727,
514,
2658,
16,
4766,
1171,
727,
31807,
14098,
13,
288,
3639,
727,
2985,
7413,
7701,
273,
14098,
18,
11658,
1305,
12,
18996,
18,
31414,
67,
14939,
16,
4766,
6647,
24915,
3886,
1733,
18,
8217,
67,
16085,
16,
4766,
6647,
1412,
18,
588,
1305,
3187,
12,
1412,
18,
58,
12945,
67,
2399,
16,
4766,
19694,
394,
1412,
8526,
2916,
262,
16,
4766,
6647,
446,
16,
4766,
6647,
446,
11272,
3639,
7701,
18,
11658,
1085,
5621,
3639,
727,
5287,
328,
20,
273,
394,
5287,
5621,
3639,
7701,
18,
11658,
2224,
12,
328,
20,
11272,
3639,
364,
261,
727,
4498,
518,
273,
652,
2016,
18,
4099,
694,
7675,
9838,
5621,
518,
18,
5332,
2134,
5621,
262,
288,
5411,
727,
1635,
18,
1622,
1241,
273,
261,
863,
18,
1622,
13,
518,
18,
4285,
5621,
5411,
727,
514,
4289,
273,
261,
780,
13,
1241,
18,
588,
653,
5621,
5411,
727,
514,
652,
4678,
273,
4289,
397,
24915,
3886,
1733,
18,
6776,
67,
4043,
67,
9651,
31,
5411,
727,
1659,
9596,
273,
261,
797,
13,
1241,
18,
24805,
5621,
5411,
727,
5287,
328,
21,
273,
394,
5287,
5621,
5411,
7701,
18,
11658,
2224,
12,
328,
21,
11272,
5411,
7701,
18,
11658,
1537,
11796,
12,
18996,
18,
1013,
51,
1880,
16,
11794,
374,
11272,
5411,
309,
261,
9596,
18,
291,
9840,
1435,
262,
288,
7734,
309,
261,
9596,
18,
14963,
12,
3407,
18,
2399,
262,
262,
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,
377,
4750,
760,
918,
1361,
1891,
3886,
1305,
12,
6385,
1635,
652,
2016,
16,
4766,
1171,
727,
514,
2658,
16,
4766,
1171,
727,
31807,
14098,
13,
288,
3639,
727,
2985,
7413,
7701,
273,
14098,
18,
11658,
1305,
12,
18996,
18,
31414,
67,
14939,
16,
4766,
6647,
24915,
3886,
1733,
18,
8217,
67,
16085,
16,
4766,
6647,
1412,
18,
588,
1305,
3187,
12,
1412,
18,
58,
12945,
67,
2399,
16,
4766,
19694,
394,
1412,
8526,
2916,
262,
16,
4766,
6647,
446,
16,
4766,
6647,
446,
11272,
3639,
7701,
18,
11658,
1085,
5621,
3639,
727,
5287,
328,
20,
273,
394,
5287,
5621,
3639,
7701,
18,
11658,
2224,
12,
328,
20,
11272,
3639,
364,
261,
727,
4498,
518,
273,
652,
2016,
18,
2
] |
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); if (window == null) return; | public void run() { // Ask the user to select a feature AboutInfo[] features = ((Workbench)workbench).getFeaturesInfo(); ArrayList welcomeFeatures = new ArrayList(); for (int i = 0; i < features.length; i++) { if (features[i].getWelcomePageURL() != null) welcomeFeatures.add(features[i]); } Shell shell = workbench.getActiveWorkbenchWindow().getShell(); if (welcomeFeatures.size() == 0) { MessageDialog.openInformation( shell, WorkbenchMessages.getString("QuickStartMessageDialog.title"), WorkbenchMessages.getString("QuickStartMessageDialog.message")); return; } features = new AboutInfo[welcomeFeatures.size()]; welcomeFeatures.toArray(features); // Sort ascending Arrays.sort(features, new Comparator() { Collator coll = Collator.getInstance(Locale.getDefault()); public int compare(Object a, Object b) { AboutInfo i1, i2; String name1, name2; i1 = (AboutInfo)a; name1 = i1.getFeatureLabel(); i2 = (AboutInfo)b; name2 = i2.getFeatureLabel(); if (name1 == null) name1 = ""; if (name2 == null) name2 = ""; return coll.compare(name1, name2); } }); // Find primary feature AboutInfo primaryFeature = ((Workbench)workbench).getAboutInfo(); int index = -1; if (primaryFeature != null) { for (int i = 0; i < features.length; i++) { if (features[i].getFeatureId().equals(primaryFeature.getFeatureId())) { index = i; break; } } } WelcomePageSelectionDialog d = new WelcomePageSelectionDialog( workbench.getActiveWorkbenchWindow().getShell(), features, index); if(d.open() != d.OK || d.getResult().length != 1) return; AboutInfo feature = (AboutInfo)d.getResult()[0]; IWorkbenchPage page = null; IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); if (window == null) return; // See if the feature wants a specific perspective String perspectiveId = feature.getWelcomePerspective(); if (perspectiveId == null) { // Just use the current perspective unless one is not open // in which case use the default page = window.getActivePage(); if (page == null || page.getPerspective() == null) { perspectiveId = WorkbenchPlugin.getDefault().getPerspectiveRegistry().getDefaultPerspective(); } } if (perspectiveId != null) { try { page = (WorkbenchPage) workbench.showPerspective( perspectiveId, window); } catch (WorkbenchException e) { return; } } page.setEditorAreaVisible(true); // create input WelcomeEditorInput input = new WelcomeEditorInput(feature); // see if we already have a welcome editor IEditorPart editor = page.findEditor(input); if(editor != null) { page.activate(editor); return; } try { page.openEditor(input, EDITOR_ID); } catch (PartInitException e) { IStatus status = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, 1, WorkbenchMessages.getString("QuickStartAction.openEditorException"), e); //$NON-NLS-1$ ErrorDialog.openError( workbench.getActiveWorkbenchWindow().getShell(), WorkbenchMessages.getString("QuickStartAction.errorDialogTitle"), //$NON-NLS-1$ WorkbenchMessages.getString("QuickStartAction.errorDialogMessage"), //$NON-NLS-1$ status); }} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/adfa186e83e30f859940748767780497dced32bc/QuickStartAction.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/QuickStartAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1086,
1435,
288,
202,
759,
25747,
326,
729,
358,
2027,
279,
2572,
202,
24813,
966,
8526,
4467,
273,
14015,
2421,
22144,
13,
1252,
22144,
2934,
588,
8696,
966,
5621,
202,
19558,
28329,
8696,
273,
394,
2407,
5621,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
4467,
18,
2469,
31,
277,
27245,
288,
202,
202,
430,
261,
7139,
63,
77,
8009,
588,
59,
16312,
1964,
1785,
1435,
480,
446,
13,
1875,
202,
91,
16312,
8696,
18,
1289,
12,
7139,
63,
77,
19226,
202,
97,
202,
13220,
5972,
273,
1440,
22144,
18,
588,
3896,
2421,
22144,
3829,
7675,
588,
13220,
5621,
202,
202,
430,
261,
91,
16312,
8696,
18,
1467,
1435,
422,
374,
13,
288,
202,
202,
1079,
6353,
18,
3190,
5369,
12,
1082,
202,
10304,
16,
1875,
202,
2421,
22144,
5058,
18,
588,
780,
2932,
13663,
1685,
1079,
6353,
18,
2649,
6,
3631,
1082,
202,
2421,
22144,
5058,
18,
588,
780,
2932,
13663,
1685,
1079,
6353,
18,
2150,
7923,
1769,
202,
202,
2463,
31,
202,
97,
6862,
202,
7139,
273,
394,
9771,
659,
966,
63,
91,
16312,
8696,
18,
1467,
1435,
15533,
202,
91,
16312,
8696,
18,
31447,
12,
7139,
1769,
202,
202,
759,
5928,
13976,
202,
12726,
18,
3804,
12,
7139,
16,
394,
13359,
1435,
288,
202,
202,
13535,
639,
4508,
273,
17596,
639,
18,
588,
1442,
12,
3916,
18,
588,
1868,
10663,
1082,
202,
482,
509,
3400,
12,
921,
279,
16,
1033,
324,
13,
288,
9506,
202,
24813,
966,
277,
21,
16,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1086,
1435,
288,
202,
759,
25747,
326,
729,
358,
2027,
279,
2572,
202,
24813,
966,
8526,
4467,
273,
14015,
2421,
22144,
13,
1252,
22144,
2934,
588,
8696,
966,
5621,
202,
19558,
28329,
8696,
273,
394,
2407,
5621,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
4467,
18,
2469,
31,
277,
27245,
288,
202,
202,
430,
261,
7139,
63,
77,
8009,
588,
59,
16312,
1964,
1785,
1435,
480,
446,
13,
1875,
202,
91,
16312,
8696,
18,
1289,
12,
7139,
63,
77,
19226,
202,
97,
202,
13220,
5972,
273,
1440,
22144,
18,
588,
3896,
2421,
22144,
3829,
7675,
588,
13220,
5621,
202,
202,
430,
261,
91,
16312,
8696,
18,
1467,
1435,
422,
374,
13,
288,
202,
202,
2
] | |
handleUnexpectedToken(st, "Expected syntax is : " + "principal [class_name] \"principal_name\""); | handleUnexpectedToken(st, Messages.getString("security.8D")); | protected PrincipalEntry readPrincipalEntry(StreamTokenizer st) throws IOException, InvalidFormatException { PrincipalEntry pe = new PrincipalEntry(); if (st.nextToken() == StreamTokenizer.TT_WORD) { pe.klass = st.sval; st.nextToken(); } else if (st.ttype == '*') { pe.klass = PrincipalEntry.WILDCARD; st.nextToken(); } if (st.ttype == '"') { pe.name = st.sval; } else if (st.ttype == '*') { pe.name = PrincipalEntry.WILDCARD; } else { handleUnexpectedToken(st, "Expected syntax is : " + "principal [class_name] \"principal_name\""); } return pe; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/c7fdc88348ff6da63262b6309c2810876f42c6d8/DefaultPolicyScanner.java/clean/modules/security/src/main/java/common/org/apache/harmony/security/DefaultPolicyScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
17010,
1622,
855,
9155,
1622,
12,
1228,
10524,
384,
13,
5411,
1216,
1860,
16,
1962,
9291,
288,
3639,
17010,
1622,
2804,
273,
394,
17010,
1622,
5621,
3639,
309,
261,
334,
18,
4285,
1345,
1435,
422,
3961,
10524,
18,
1470,
67,
7952,
13,
288,
5411,
2804,
18,
22626,
273,
384,
18,
87,
1125,
31,
5411,
384,
18,
4285,
1345,
5621,
3639,
289,
469,
309,
261,
334,
18,
88,
723,
422,
5306,
13,
288,
5411,
2804,
18,
22626,
273,
17010,
1622,
18,
59,
29067,
31,
5411,
384,
18,
4285,
1345,
5621,
3639,
289,
3639,
309,
261,
334,
18,
88,
723,
422,
4754,
13,
288,
5411,
2804,
18,
529,
273,
384,
18,
87,
1125,
31,
3639,
289,
469,
309,
261,
334,
18,
88,
723,
422,
5306,
13,
288,
5411,
2804,
18,
529,
273,
17010,
1622,
18,
59,
29067,
31,
3639,
289,
469,
288,
5411,
1640,
7762,
1345,
12,
334,
16,
315,
6861,
6279,
353,
294,
315,
10792,
397,
315,
26138,
306,
1106,
67,
529,
65,
1239,
26138,
67,
529,
8530,
1769,
3639,
289,
3639,
327,
2804,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
17010,
1622,
855,
9155,
1622,
12,
1228,
10524,
384,
13,
5411,
1216,
1860,
16,
1962,
9291,
288,
3639,
17010,
1622,
2804,
273,
394,
17010,
1622,
5621,
3639,
309,
261,
334,
18,
4285,
1345,
1435,
422,
3961,
10524,
18,
1470,
67,
7952,
13,
288,
5411,
2804,
18,
22626,
273,
384,
18,
87,
1125,
31,
5411,
384,
18,
4285,
1345,
5621,
3639,
289,
469,
309,
261,
334,
18,
88,
723,
422,
5306,
13,
288,
5411,
2804,
18,
22626,
273,
17010,
1622,
18,
59,
29067,
31,
5411,
384,
18,
4285,
1345,
5621,
3639,
289,
3639,
309,
261,
334,
18,
88,
723,
422,
4754,
13,
288,
5411,
2804,
18,
529,
273,
384,
18,
87,
1125,
31,
3639,
289,
469,
309,
261,
2
] |
getServletContext().addMimeMapping(extension,type); | getServletContext().addMimeMapping(extension, type); | public synchronized void sfStart() throws SmartFrogException, RemoteException { super.sfStart(); extension = sfResolve(ATTR_EXTENSION, extension, true); type = sfResolve(ATTR_TYPE, type, true); getServletContext().addMimeMapping(extension,type); } | 4987 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4987/bd84493b318ded314c6b8f689fb68a51db82e2e7/MimeTypeImpl.java/buggy/core/components/www/src/org/smartfrog/services/www/context/MimeTypeImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
9033,
1685,
1435,
1216,
19656,
42,
303,
75,
503,
16,
5411,
18361,
288,
3639,
2240,
18,
21668,
1685,
5621,
3639,
2710,
273,
9033,
8460,
12,
12043,
67,
12796,
16,
2710,
16,
638,
1769,
3639,
618,
273,
9033,
8460,
12,
12043,
67,
2399,
16,
618,
16,
638,
1769,
3639,
29015,
7675,
1289,
13320,
3233,
12,
6447,
16,
618,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
9033,
1685,
1435,
1216,
19656,
42,
303,
75,
503,
16,
5411,
18361,
288,
3639,
2240,
18,
21668,
1685,
5621,
3639,
2710,
273,
9033,
8460,
12,
12043,
67,
12796,
16,
2710,
16,
638,
1769,
3639,
618,
273,
9033,
8460,
12,
12043,
67,
2399,
16,
618,
16,
638,
1769,
3639,
29015,
7675,
1289,
13320,
3233,
12,
6447,
16,
618,
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
] |
"TablePageGenerator.List.Section", | public ICategoryProvider getCategoryProvider( String elementName ) { if ( ReportDesignConstants.CELL_ELEMENT.equals( elementName ) ) { return new CategoryProvider( new String[]{ "CellPageGenerator.List.General", //$NON-NLS-1$ "CellPageGenerator.List.CellPadding", //$NON-NLS-1$ "CellPageGenerator.List.Font", //$NON-NLS-1$ "CellPageGenerator.List.Borders", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ CellPage.class, CellPaddingPage.class, FontPage.class, BordersPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.DATA_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "DataPageGenerator.List.General", //$NON-NLS-1$ "DataPageGenerator.List.Expression", //$NON-NLS-1$ "DataPageGenerator.List.Padding", //$NON-NLS-1$ "DataPageGenerator.List.Borders", //$NON-NLS-1$ "DataPageGenerator.List.Margin", //$NON-NLS-1$ "DataPageGenerator.List.formatNumber", //$NON-NLS-1$ "DataPageGenerator.List.formatDateTime", //$NON-NLS-1$ "DataPageGenerator.List.formatString", //$NON-NLS-1$ "DataPageGenerator.List.HyperLink", //$NON-NLS-1$ "DataPageGenerator.List.Section", //$NON-NLS-1$ "DataPageGenerator.List.Visibility",//$NON-NLS-1$ "DataPageGenerator.List.TOC",//$NON-NLS-1$ "DataPageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler" //$NON-NLS-1$ }, new Class[]{ DataPage.class, ExpressionPage.class, CellPaddingPage.class, BordersPage.class, ItemMarginPage.class, FormatNumberAttributePage.class, FormatDateTimeAttributePage.class, FormatStringAttributePage.class, HyperLinkPage.class, SectionPage.class, VisibilityPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.GRID_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "GridPageGenerator.List.General", //$NON-NLS-1$ "GridPageGenerator.List.Margin", //$NON-NLS-1$ "GridPageGenerator.List.Font", //$NON-NLS-1$ "GridPageGenerator.List.Borders", //$NON-NLS-1$ "GridPageGenerator.List.Section", //$NON-NLS-1$ "GridPageGenerator.List.Visibility", //$NON-NLS-1$ "GridPageGenerator.List.TOC", //$NON-NLS-1$ "GridPageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ GridPage.class, ItemMarginPage.class, FontPage.class, BordersPage.class, SectionPage.class, VisibilityPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.IMAGE_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "ImagePageGenerator.List.General", //$NON-NLS-1$ "ImagePageGenerator.List.Reference", //$NON-NLS-1$ "ImagePageGenerator.List.HyperLink", //$NON-NLS-1$ "ImagePageGenerator.List.AltText", //$NON-NLS-1$ "ImagePageGenerator.List.Borders", //$NON-NLS-1$ "ImagePageGenerator.List.Section", //$NON-NLS-1$ "ImagePageGenerator.List.Visibility", //$NON-NLS-1$ "ImagePageGenerator.List.TOC", //$NON-NLS-1$ "ImagePageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ ImagePage.class, ReferencePage.class, HyperLinkPage.class, AlterPage.class, BordersPage.class, SectionPage.class, VisibilityPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.LABEL_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "LabelPageGenerator.List.General", //$NON-NLS-1$ "LabelPageGenerator.List.Padding", //$NON-NLS-1$ "LabelPageGenerator.List.Borders", //$NON-NLS-1$ "LabelPageGenerator.List.Margin", //$NON-NLS-1$ "LabelPageGenerator.List.HyperLink", //$NON-NLS-1$ "LabelPageGenerator.List.Section", //$NON-NLS-1$ "LabelPageGenerator.List.Visibility", //$NON-NLS-1$ "LabelPageGenerator.List.I18n", //$NON-NLS-1$ "LabelPageGenerator.List.TOC", //$NON-NLS-1$ "LabelPageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ LabelPage.class, CellPaddingPage.class, BordersPage.class, ItemMarginPage.class, HyperLinkPage.class, SectionPage.class, VisibilityPage.class, LabelI18nPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.LIBRARY_ELEMENT.equals( elementName ) ) { return new CategoryProvider( new String[]{ "ReportPageGenerator.List.General", //$NON-NLS-1$ "ReportPageGenerator.List.Description", //$NON-NLS-1$ "ReportPageGenerator.List.Comments", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ LibraryPage.class, DescriptionPage.class, CommentsPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class, } ); } if ( ReportDesignConstants.LIST_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "ListPageGenerator.List.General", //$NON-NLS-1$ "ListPageGenerator.List.Font", //$NON-NLS-1$ "ListPageGenerator.List.Borders", //$NON-NLS-1$ "ListPageGenerator.List.Section", //$NON-NLS-1$ "ListPageGenerator.List.Visibility", //$NON-NLS-1$ "ListPageGenerator.List.TOC", //$NON-NLS-1$ "ListPageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ ListPage.class, FontPage.class, BordersPage.class, ListingSectionPage.class, VisibilityPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.REPORT_DESIGN_ELEMENT.equals( elementName ) ) { return new CategoryProvider( new String[]{ "ReportPageGenerator.List.General", //$NON-NLS-1$ "ReportPageGenerator.List.Description", //$NON-NLS-1$ "ReportPageGenerator.List.Comments", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ ReportPage.class, DescriptionPage.class, CommentsPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class, } ); } if ( ReportDesignConstants.ROW_ELEMENT.equals( elementName ) ) { return new CategoryProvider( new String[]{ "RowPageGenerator.List.General", //$NON-NLS-1$ // "RowPageGenerator.List.CellPadding" //$NON-NLS-1$ "RowPageGenerator.List.Font", //$NON-NLS-1$ // "RowPageGenerator.List.Borders", //$NON-NLS-1$ "TablePageGenerator.List.Section", //$NON-NLS-1$ "RowPageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ RowPage.class, // CellPaddingPage.class, FontPage.class, // BordersPage.class, SectionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.TABLE_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "TablePageGenerator.List.General", //$NON-NLS-1$ "TablePageGenerator.List.Marign", //$NON-NLS-1$ "TablePageGenerator.List.Font", //$NON-NLS-1$ "TablePageGenerator.List.Borders", //$NON-NLS-1$ "TablePageGenerator.List.Section", //$NON-NLS-1$ "TablePageGenerator.List.Visibility", //$NON-NLS-1$ "TablePageGenerator.List.TOC", //$NON-NLS-1$ "TablePageGenerator.List.Bookmark",//$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ TablePage.class, ItemMarginPage.class, FontPage.class, BordersPage.class, ListingSectionPage.class, VisibilityPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.TEXT_DATA_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "TextPageGenerator.List.General", //$NON-NLS-1$ "DataPageGenerator.List.Expression", //$NON-NLS-1$ "TextPageGenerator.List.Padding", //$NON-NLS-1$ "TextPageGenerator.List.Borders", //$NON-NLS-1$ "TextPageGenerator.List.Margin", //$NON-NLS-1$ "TextPageGenerator.List.Section", //$NON-NLS-1$ "TextPageGenerator.List.Visibility", //$NON-NLS-1$ "TextPageGenerator.List.TOC", //$NON-NLS-1$ "TextPageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ TextPage.class, ExpressionPage.class, CellPaddingPage.class, BordersPage.class, ItemMarginPage.class, SectionPage.class, VisibilityPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } if ( ReportDesignConstants.TEXT_ITEM.equals( elementName ) ) { return new CategoryProvider( new String[]{ "TextPageGenerator.List.General", //$NON-NLS-1$ "TextPageGenerator.List.Padding", //$NON-NLS-1$ "TextPageGenerator.List.Borders", //$NON-NLS-1$ "TextPageGenerator.List.Margin", //$NON-NLS-1$ "TextPageGenerator.List.Section", //$NON-NLS-1$ "TextPageGenerator.List.Visibility", //$NON-NLS-1$ "TextPageGenerator.List.I18n", //$NON-NLS-1$ "TextPageGenerator.List.TOC", //$NON-NLS-1$ "TextPageGenerator.List.Bookmark", //$NON-NLS-1$ "ReportPageGenerator.List.UserProperties", //$NON-NLS-1$ "ReportPageGenerator.List.NamedExpressions", //$NON-NLS-1$ "ReportPageGenerator.List.EventHandler", //$NON-NLS-1$ }, new Class[]{ TextPage.class, CellPaddingPage.class, BordersPage.class, ItemMarginPage.class, SectionPage.class, VisibilityPage.class, TextI18nPage.class, TOCExpressionPage.class, BookMarkExpressionPage.class, UserPropertiesPage.class, NamedExpressionsPage.class, HandlerPage.class } ); } return super.getCategoryProvider( elementName ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/5d5cf7d0a9de5446592b0cec98f7acbcd7098675/IDECategoryProviderFactory.java/buggy/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/internal/ui/ide/propertyeditor/IDECategoryProviderFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
4457,
2249,
19110,
2249,
12,
514,
14453,
262,
202,
95,
202,
202,
430,
261,
8706,
15478,
2918,
18,
27752,
67,
10976,
18,
14963,
12,
14453,
262,
262,
202,
202,
95,
1082,
202,
2463,
394,
9856,
2249,
12,
394,
514,
63,
7073,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
12580,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
4020,
9485,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
5711,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
21621,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4820,
1964,
3908,
18,
682,
18,
1299,
2297,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4820,
1964,
3908,
18,
682,
18,
7604,
8927,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4820,
1964,
3908,
18,
682,
18,
16402,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
1082,
202,
5779,
394,
1659,
63,
7073,
6862,
202,
4020,
1964,
18,
1106,
16,
6862,
202,
4020,
9485,
1964,
18,
1106,
16,
6862,
202,
5711,
1964,
18,
1106,
16,
6862,
202,
21621,
1964,
18,
1106,
16,
6862,
202,
1299,
2297,
1964,
18,
1106,
16,
6862,
202,
7604,
8927,
1964,
18,
1106,
16,
6862,
202,
1503,
1964,
18,
1106,
1082,
202,
97,
11272,
202,
202,
97,
202,
202,
430,
261,
8706,
15478,
2918,
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,
467,
4457,
2249,
19110,
2249,
12,
514,
14453,
262,
202,
95,
202,
202,
430,
261,
8706,
15478,
2918,
18,
27752,
67,
10976,
18,
14963,
12,
14453,
262,
262,
202,
202,
95,
1082,
202,
2463,
394,
9856,
2249,
12,
394,
514,
63,
7073,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
12580,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
4020,
9485,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
5711,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
202,
6,
4020,
1964,
3908,
18,
682,
18,
21621,
3113,
4329,
3993,
17,
5106,
17,
21,
8,
6862,
2
] | |
if (meta == null && mustExist) throw new MetaDataException(_loc.get("no-named-query", cls, name)); | if (meta == null) { resolveAll(envLoader); meta = getQueryMetaDataInternal(cls, name, envLoader); } if (meta == null && mustExist) { if (cls == null) { throw new MetaDataException(_loc.get ("no-named-query-null-class", getPersistentTypeNames(false, envLoader), name)); } else { throw new MetaDataException(_loc.get("no-named-query", cls, name)); } } | public synchronized QueryMetaData getQueryMetaData(Class cls, String name, ClassLoader envLoader, boolean mustExist) { QueryMetaData meta = getQueryMetaDataInternal(cls, name, envLoader); if (meta == null && mustExist) throw new MetaDataException(_loc.get("no-named-query", cls, name)); return meta; } | 47053 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47053/b4077bd6a64f73fd28c210f265d5ef8b089199dd/MetaDataRepository.java/buggy/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
2770,
6998,
6041,
6998,
12,
797,
2028,
16,
514,
508,
16,
3639,
9403,
1550,
2886,
16,
1250,
1297,
4786,
13,
288,
3639,
2770,
6998,
2191,
273,
6041,
6998,
3061,
12,
6429,
16,
508,
16,
1550,
2886,
1769,
3639,
309,
261,
3901,
422,
446,
597,
1297,
4786,
13,
5411,
604,
394,
6565,
22480,
24899,
1829,
18,
588,
2932,
2135,
17,
13188,
17,
2271,
3113,
2028,
16,
508,
10019,
3639,
327,
2191,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
2770,
6998,
6041,
6998,
12,
797,
2028,
16,
514,
508,
16,
3639,
9403,
1550,
2886,
16,
1250,
1297,
4786,
13,
288,
3639,
2770,
6998,
2191,
273,
6041,
6998,
3061,
12,
6429,
16,
508,
16,
1550,
2886,
1769,
3639,
309,
261,
3901,
422,
446,
597,
1297,
4786,
13,
5411,
604,
394,
6565,
22480,
24899,
1829,
18,
588,
2932,
2135,
17,
13188,
17,
2271,
3113,
2028,
16,
508,
10019,
3639,
327,
2191,
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
] |
int numNameConflicts = ((Integer)session.iterate( "select count(go) from GradableObject as go where go.name = ? and go.gradebook = ? and go.removed=false", new Object[] {name, gb}, new Type[] {Hibernate.STRING, Hibernate.entity(Gradebook.class)} ).next()).intValue(); | q = session.createQuery( "select count(go) from GradableObject as go where go.name = ? and go.gradebook = ? and go.removed=false"); q.setParameters(new Object[] {name, gb}, new Type[] {Hibernate.STRING, Hibernate.entity(Gradebook.class)}); int numNameConflicts = ((Integer) q.iterate().next()).intValue(); | public Long createAssignment(final Long gradebookId, final String name, final Double points, final Date dueDate, final Boolean isNotCounted) throws ConflictingAssignmentNameException, StaleObjectModificationException { HibernateCallback hc = new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { Gradebook gb = (Gradebook)(session.find( "from Gradebook as gb where gb.id=?", gradebookId, Hibernate.LONG).get(0)); int numNameConflicts = ((Integer)session.iterate( "select count(go) from GradableObject as go where go.name = ? and go.gradebook = ? and go.removed=false", new Object[] {name, gb}, new Type[] {Hibernate.STRING, Hibernate.entity(Gradebook.class)} ).next()).intValue(); if(numNameConflicts > 0) { throw new ConflictingAssignmentNameException("You can not save multiple assignments in a gradebook with the same name"); } Assignment asn = new Assignment(); asn.setGradebook(gb); asn.setName(name); asn.setPointsPossible(points); asn.setDueDate(dueDate); if (isNotCounted != null) { asn.setNotCounted(isNotCounted.booleanValue()); } // Save the new assignment Long id = (Long)session.save(asn); // Recalculate the course grades recalculateCourseGradeRecords(asn.getGradebook(), session); return id; } }; return (Long)getHibernateTemplate().execute(hc); } | 48975 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48975/dbcb9fb55ff4d2cadba8989ae4acae0f773ff373/GradebookManagerHibernateImpl.java/buggy/app/business/src/java/org/sakaiproject/tool/gradebook/business/impl/GradebookManagerHibernateImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3407,
752,
7729,
12,
6385,
3407,
28073,
548,
16,
727,
514,
508,
16,
727,
3698,
3143,
16,
727,
2167,
6541,
1626,
16,
727,
3411,
8827,
1380,
329,
13,
3639,
1216,
23460,
310,
7729,
26771,
16,
934,
5349,
921,
13467,
503,
288,
3639,
670,
24360,
2428,
11684,
273,
394,
670,
24360,
2428,
1435,
288,
5411,
1071,
1033,
741,
382,
44,
24360,
12,
2157,
1339,
13,
1216,
670,
24360,
503,
288,
7734,
10812,
323,
3618,
21649,
273,
261,
14571,
323,
3618,
21433,
3184,
18,
4720,
12,
13491,
315,
2080,
10812,
323,
3618,
487,
21649,
1625,
21649,
18,
350,
17282,
3113,
13491,
28073,
548,
16,
670,
24360,
18,
14639,
2934,
588,
12,
20,
10019,
7734,
509,
818,
461,
30897,
273,
14015,
4522,
13,
3184,
18,
18793,
12,
13491,
315,
4025,
1056,
12,
3240,
13,
628,
611,
6012,
429,
921,
487,
1960,
1625,
1960,
18,
529,
273,
692,
471,
1960,
18,
3994,
3618,
273,
692,
471,
1960,
18,
14923,
33,
5743,
3113,
13491,
394,
1033,
8526,
288,
529,
16,
21649,
5779,
13491,
394,
1412,
8526,
288,
44,
24360,
18,
5804,
16,
670,
24360,
18,
1096,
12,
14571,
323,
3618,
18,
1106,
16869,
7734,
262,
18,
4285,
1435,
2934,
474,
620,
5621,
7734,
309,
12,
2107,
461,
30897,
405,
374,
13,
288,
10792,
604,
394,
23460,
310,
7729,
26771,
2932,
6225,
848,
486,
1923,
3229,
13610,
316,
279,
28073,
598,
326,
1967,
508,
8863,
7734,
289,
7734,
15499,
12211,
273,
394,
15499,
5621,
7734,
12211,
18,
542,
14571,
323,
3618,
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,
3407,
752,
7729,
12,
6385,
3407,
28073,
548,
16,
727,
514,
508,
16,
727,
3698,
3143,
16,
727,
2167,
6541,
1626,
16,
727,
3411,
8827,
1380,
329,
13,
3639,
1216,
23460,
310,
7729,
26771,
16,
934,
5349,
921,
13467,
503,
288,
3639,
670,
24360,
2428,
11684,
273,
394,
670,
24360,
2428,
1435,
288,
5411,
1071,
1033,
741,
382,
44,
24360,
12,
2157,
1339,
13,
1216,
670,
24360,
503,
288,
7734,
10812,
323,
3618,
21649,
273,
261,
14571,
323,
3618,
21433,
3184,
18,
4720,
12,
13491,
315,
2080,
10812,
323,
3618,
487,
21649,
1625,
21649,
18,
350,
17282,
3113,
13491,
28073,
548,
16,
670,
24360,
18,
14639,
2934,
588,
12,
20,
10019,
7734,
509,
818,
461,
30897,
273,
2
] |
expected.addElement(new StateBlock(0, 6, | expected.addElement(new StateBlock(2, 4, | public void testStateChangeOnRemove() { try { Vector<StateBlock> actual; Vector<StateBlock> expected = new Vector<StateBlock>(); defModel.insertString(0,"/*bc */ //ad}()",null); defModel.remove(13,2); // assertEquals("#0.1",false, defModel.hasHighlightChanged()); defModel.remove(4,1); // /*bc*/ //ad} actual = defModel.getHighLightInformation(); expected.addElement(new StateBlock(0, 6, StateBlock.BLOCK_COMMENT_COLOR)); expected.addElement(new StateBlock(6, 1, StateBlock.DEFAULT_COLOR)); expected.addElement(new StateBlock(7, 5, StateBlock.LINE_COMMENT_COLOR)); assertEquals("#0.2",3,actual.size()); assertEquals("#0.3",expected.elementAt(0),actual.elementAt(0)); assertEquals("#0.4",expected.elementAt(1),actual.elementAt(1)); assertEquals("#0.5",expected.elementAt(2),actual.elementAt(2)); } catch (BadLocationException e) { throw new RuntimeException(e.toString()); } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/28c4be6b04d5867405916840b451c47e4acad060/DefinitionsDocumentTest.java/clean/drjava/src/edu/rice/cs/drjava/DefinitionsDocumentTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
22505,
1398,
3288,
1435,
202,
202,
95,
1082,
202,
698,
288,
9506,
202,
5018,
32,
1119,
1768,
34,
3214,
31,
9506,
202,
5018,
32,
1119,
1768,
34,
2665,
273,
394,
5589,
32,
1119,
1768,
34,
5621,
9506,
202,
536,
1488,
18,
6387,
780,
12,
20,
10837,
20308,
13459,
1195,
368,
361,
97,
1435,
3113,
2011,
1769,
9506,
202,
536,
1488,
18,
4479,
12,
3437,
16,
22,
1769,
9506,
202,
759,
1082,
202,
11231,
8867,
2932,
7,
20,
18,
21,
3113,
5743,
16,
1652,
1488,
18,
5332,
16205,
5033,
10663,
9506,
202,
536,
1488,
18,
4479,
12,
24,
16,
21,
1769,
9506,
202,
759,
1748,
13459,
5549,
368,
361,
97,
9506,
202,
18672,
273,
1652,
1488,
18,
588,
8573,
12128,
5369,
5621,
9506,
202,
3825,
18,
1289,
1046,
12,
2704,
3287,
1768,
12,
20,
16,
1666,
16,
6862,
6862,
6862,
6862,
25083,
3287,
1768,
18,
11403,
67,
12200,
67,
10989,
10019,
9506,
202,
3825,
18,
1289,
1046,
12,
2704,
3287,
1768,
12,
26,
16,
404,
16,
6862,
6862,
6862,
6862,
25083,
3287,
1768,
18,
5280,
67,
10989,
10019,
9506,
202,
3825,
18,
1289,
1046,
12,
2704,
3287,
1768,
12,
27,
16,
1381,
16,
6862,
6862,
6862,
6862,
25083,
3287,
1768,
18,
5997,
67,
12200,
67,
10989,
10019,
6862,
9506,
202,
11231,
8867,
2932,
7,
20,
18,
22,
3113,
23,
16,
18672,
18,
1467,
10663,
9506,
202,
11231,
8867,
2932,
7,
20,
18,
23,
3113,
3825,
18,
2956,
861,
12,
20,
3631,
18672,
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,
918,
1842,
22505,
1398,
3288,
1435,
202,
202,
95,
1082,
202,
698,
288,
9506,
202,
5018,
32,
1119,
1768,
34,
3214,
31,
9506,
202,
5018,
32,
1119,
1768,
34,
2665,
273,
394,
5589,
32,
1119,
1768,
34,
5621,
9506,
202,
536,
1488,
18,
6387,
780,
12,
20,
10837,
20308,
13459,
1195,
368,
361,
97,
1435,
3113,
2011,
1769,
9506,
202,
536,
1488,
18,
4479,
12,
3437,
16,
22,
1769,
9506,
202,
759,
1082,
202,
11231,
8867,
2932,
7,
20,
18,
21,
3113,
5743,
16,
1652,
1488,
18,
5332,
16205,
5033,
10663,
9506,
202,
536,
1488,
18,
4479,
12,
24,
16,
21,
1769,
9506,
202,
759,
1748,
13459,
5549,
368,
361,
97,
9506,
202,
18672,
273,
1652,
2
] |
byte decrypted[] = _context.AESEngine().safeDecrypt(encryptedInstructions, key, iv); | byte decrypted[] = getContext().AESEngine().safeDecrypt(encryptedInstructions, key, iv); | private DeliveryInstructions getInstructions(byte encryptedInstructions[], SessionKey key) { try { byte iv[] = new byte[16]; Hash h = _context.sha().calculateHash(key.getData()); System.arraycopy(h.getData(), 0, iv, 0, iv.length); byte decrypted[] = _context.AESEngine().safeDecrypt(encryptedInstructions, key, iv); if (decrypted == null) { if (_log.shouldLog(Log.ERROR)) _log.error("Error decrypting the instructions", getAddedBy()); return null; } DeliveryInstructions instructions = new DeliveryInstructions(); instructions.readBytes(new ByteArrayInputStream(decrypted)); return instructions; } catch (DataFormatException dfe) { if (_log.shouldLog(Log.ERROR)) _log.error("Error parsing the decrypted instructions", dfe); } catch (IOException ioe) { if (_log.shouldLog(Log.ERROR)) _log.error("Error reading the decrypted instructions", ioe); } return null; } | 27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/e737e5c9507ed0d463dc9e45a8f63657f466b177/HandleTunnelMessageJob.java/clean/router/java/src/net/i2p/router/message/HandleTunnelMessageJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
17390,
26712,
7854,
4549,
87,
12,
7229,
6901,
26712,
63,
6487,
3877,
653,
498,
13,
288,
3639,
775,
288,
5411,
1160,
4674,
8526,
273,
394,
1160,
63,
2313,
15533,
5411,
2474,
366,
273,
389,
2472,
18,
7819,
7675,
11162,
2310,
12,
856,
18,
588,
751,
10663,
5411,
2332,
18,
1126,
3530,
12,
76,
18,
588,
751,
9334,
374,
16,
4674,
16,
374,
16,
4674,
18,
2469,
1769,
5411,
1160,
13794,
8526,
273,
6474,
7675,
18436,
4410,
7675,
4626,
17306,
12,
18702,
26712,
16,
498,
16,
4674,
1769,
5411,
309,
261,
4924,
4567,
422,
446,
13,
288,
7734,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
3589,
3719,
10792,
389,
1330,
18,
1636,
2932,
668,
8420,
310,
326,
12509,
3113,
336,
8602,
858,
10663,
7734,
327,
446,
31,
5411,
289,
5411,
17390,
26712,
12509,
273,
394,
17390,
26712,
5621,
5411,
12509,
18,
896,
2160,
12,
2704,
16180,
12,
4924,
4567,
10019,
5411,
327,
12509,
31,
3639,
289,
1044,
261,
751,
9291,
3013,
73,
13,
288,
5411,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
3589,
3719,
7734,
389,
1330,
18,
1636,
2932,
668,
5811,
326,
13794,
12509,
3113,
3013,
73,
1769,
3639,
289,
1044,
261,
14106,
10847,
13,
288,
5411,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
3589,
3719,
7734,
389,
1330,
18,
1636,
2932,
668,
6453,
326,
13794,
12509,
3113,
10847,
1769,
3639,
289,
3639,
327,
446,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
17390,
26712,
7854,
4549,
87,
12,
7229,
6901,
26712,
63,
6487,
3877,
653,
498,
13,
288,
3639,
775,
288,
5411,
1160,
4674,
8526,
273,
394,
1160,
63,
2313,
15533,
5411,
2474,
366,
273,
389,
2472,
18,
7819,
7675,
11162,
2310,
12,
856,
18,
588,
751,
10663,
5411,
2332,
18,
1126,
3530,
12,
76,
18,
588,
751,
9334,
374,
16,
4674,
16,
374,
16,
4674,
18,
2469,
1769,
5411,
1160,
13794,
8526,
273,
6474,
7675,
18436,
4410,
7675,
4626,
17306,
12,
18702,
26712,
16,
498,
16,
4674,
1769,
5411,
309,
261,
4924,
4567,
422,
446,
13,
288,
7734,
309,
261,
67,
1330,
18,
13139,
1343,
12,
1343,
18,
3589,
3719,
10792,
389,
1330,
18,
1636,
2932,
668,
8420,
2
] |
StringBuffer sb = new StringBuffer(indent + "u_int8_t[" + numBytes + "] " + bitArrayName + " = {0};" + | StringBuffer sb = new StringBuffer(indent + "u_int8_t " + bitArrayName + "[" + numBytes + "] = {0};" + | protected String generateBitEncodeMethodContents(ArrayList<String> bitFieldList, int ordinal, int indentSize) { int numBytes = ((bitFieldList.size() - 1) / 8) + 1; String indent = Utils.createSpaces(indentSize); String bitArrayName = "flags_" + ordinal; StringBuffer sb = new StringBuffer(indent + "u_int8_t[" + numBytes + "] " + bitArrayName + " = {0};" + (numBytes != 1 ? " /* All array elements will be initialized to 0 */" : "") + cr); for (int i=0; i<bitFieldList.size(); i++) { int bitIndex = i%8; int byteIndex = i/8; sb.append(indent + bitArrayName + "[" + byteIndex + "] |= " + bitFieldList.get(i) + " << " + bitIndex + "; /* " + bitFieldList.get(i) + ": bit */" + cr); } for (int i=0; i<numBytes; i++) { sb.append(indent + "buffer.putOctet(" + bitArrayName + "[" + i + "]);" + cr); } bitFieldList.clear(); return sb.toString(); } | 45585 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45585/cad0be15609314c87a3f3793c1cefa4cfe3ee88e/CppGenerator.java/clean/qpid/gentools/org/apache/qpid/gentools/CppGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
2103,
5775,
5509,
1305,
6323,
12,
19558,
32,
780,
34,
2831,
974,
682,
16,
509,
12675,
16,
202,
202,
474,
3504,
1225,
13,
202,
95,
202,
202,
474,
18633,
273,
14015,
3682,
974,
682,
18,
1467,
1435,
300,
404,
13,
342,
1725,
13,
397,
404,
31,
202,
202,
780,
3504,
273,
6091,
18,
2640,
12077,
12,
9355,
1225,
1769,
202,
202,
780,
2831,
1076,
461,
273,
315,
7133,
9548,
397,
12675,
31,
202,
202,
780,
1892,
2393,
273,
394,
6674,
12,
9355,
397,
315,
89,
67,
474,
28,
67,
88,
9614,
397,
18633,
397,
9850,
315,
397,
1082,
202,
3682,
1076,
461,
397,
315,
273,
288,
20,
97,
4868,
397,
1082,
202,
12,
2107,
2160,
480,
404,
692,
315,
1748,
4826,
526,
2186,
903,
506,
6454,
358,
374,
1195,
6,
294,
1408,
13,
397,
1082,
202,
3353,
1769,
202,
202,
1884,
261,
474,
277,
33,
20,
31,
277,
32,
3682,
974,
682,
18,
1467,
5621,
277,
27245,
202,
202,
95,
1082,
202,
474,
2831,
1016,
273,
277,
9,
28,
31,
1082,
202,
474,
1160,
1016,
273,
277,
19,
28,
31,
1082,
202,
18366,
18,
6923,
12,
9355,
397,
2831,
1076,
461,
397,
13626,
397,
1160,
1016,
397,
9850,
5626,
315,
397,
2831,
974,
682,
18,
588,
12,
77,
13,
397,
9506,
202,
6,
2296,
315,
397,
2831,
1016,
397,
13636,
1748,
315,
397,
2831,
974,
682,
18,
588,
12,
77,
13,
397,
6398,
2831,
1195,
6,
397,
4422,
1769,
202,
202,
97,
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,
1117,
514,
2103,
5775,
5509,
1305,
6323,
12,
19558,
32,
780,
34,
2831,
974,
682,
16,
509,
12675,
16,
202,
202,
474,
3504,
1225,
13,
202,
95,
202,
202,
474,
18633,
273,
14015,
3682,
974,
682,
18,
1467,
1435,
300,
404,
13,
342,
1725,
13,
397,
404,
31,
202,
202,
780,
3504,
273,
6091,
18,
2640,
12077,
12,
9355,
1225,
1769,
202,
202,
780,
2831,
1076,
461,
273,
315,
7133,
9548,
397,
12675,
31,
202,
202,
780,
1892,
2393,
273,
394,
6674,
12,
9355,
397,
315,
89,
67,
474,
28,
67,
88,
9614,
397,
18633,
397,
9850,
315,
397,
1082,
202,
3682,
1076,
461,
397,
315,
273,
288,
20,
97,
4868,
397,
1082,
202,
12,
2107,
2160,
2
] |
} | } | fFacetInfo traverseFacets(Element content, Object[] contentAttrs, String simpleTypeName, DatatypeValidator baseValidator, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { fFacetInfo fi = new fFacetInfo(); Hashtable fFacetData = new Hashtable(10); short flags = 0; // flag facets that have fixed="true" int numEnumerationLiterals = 0; Vector enumData = new Vector(); content = checkContent(content , contentAttrs, schemaDoc); String facet; int numFacets=0; while (content != null) { // General Attribute Checking Object[] attrs = fAttrChecker.checkAttributes(content, false, schemaDoc); numFacets++; facet = DOMUtil.getLocalName(content); if (facet.equals(SchemaSymbols.ELT_ENUMERATION)) { numEnumerationLiterals++; String enumVal = DOMUtil.getAttrValue(content, SchemaSymbols.ATT_VALUE); String localName; if (baseValidator instanceof NOTATIONDatatypeValidator) { fAttrChecker.checkAttributes(content, false, schemaDoc); String prefix = fSchemaHandler.EMPTY_STRING; String localpart = enumVal; int colonptr = enumVal.indexOf(":"); if (colonptr > 0) { prefix = enumVal.substring(0,colonptr); localpart = enumVal.substring(colonptr+1); } String uriStr = schemaDoc.fNamespaceSupport.getURI(prefix); fQName.setValues(prefix, localpart, null, uriStr ); XSNotationDecl notation = (XSNotationDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.NOTATION_TYPE , fQName); if (notation == null) { reportGenericSchemaError("Notation '" + localpart + "' not found in the grammar "+ uriStr); } enumVal=simpleTypeName; } enumData.addElement(enumVal); checkContent(DOMUtil.getFirstChildElement( content ), attrs, schemaDoc); } else if (facet.equals(SchemaSymbols.ELT_ANNOTATION) || facet.equals(SchemaSymbols.ELT_SIMPLETYPE)) { //REVISIT: Object[] args = {simpleTypeName}; fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "ListUnionRestrictionError", args, XMLErrorReporter.SEVERITY_ERROR); } else if (facet.equals(SchemaSymbols.ELT_PATTERN)) { if (fPattern == null) { //REVISIT: size of buffer fPattern = new StringBuffer (DOMUtil.getAttrValue( content, SchemaSymbols.ATT_VALUE )); } else { // --------------------------------------------- //datatypes: 5.2.4 pattern: src-multiple-pattern // --------------------------------------------- fPattern.append("|"); fPattern.append(DOMUtil.getAttrValue(content, SchemaSymbols.ATT_VALUE )); checkContent(DOMUtil.getFirstChildElement( content ), attrs, schemaDoc); } } else { if (fFacetData.containsKey(facet)) fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "DatatypeError", new Object[]{"The facet '" + facet + "' is defined more than once."}, XMLErrorReporter.SEVERITY_ERROR); int facetType = 0; if (facet.equals(SchemaSymbols.ELT_MINLENGTH)) { facetType= DatatypeValidator.FACET_MINLENGTH; } else if (facet.equals(SchemaSymbols.ELT_MAXLENGTH)) { facetType= DatatypeValidator.FACET_MAXLENGTH; } else if (facet.equals(SchemaSymbols.ELT_MAXEXCLUSIVE)) { facetType= DatatypeValidator.FACET_MAXEXCLUSIVE; } else if (facet.equals(SchemaSymbols.ELT_MAXINCLUSIVE)) { facetType= DatatypeValidator.FACET_MAXINCLUSIVE; } else if (facet.equals(SchemaSymbols.ELT_MINEXCLUSIVE)) { facetType= DatatypeValidator.FACET_MINEXCLUSIVE; } else if (facet.equals(SchemaSymbols.ELT_MININCLUSIVE)) { facetType= DatatypeValidator.FACET_MININCLUSIVE; } else if (facet.equals(SchemaSymbols.ELT_TOTALDIGITS)) { facetType= DatatypeValidator.FACET_TOTALDIGITS; } else if (facet.equals(SchemaSymbols.ELT_FRACTIONDIGITS)) { facetType = DatatypeValidator.FACET_FRACTIONDIGITS; } else if (facet.equals(SchemaSymbols.ELT_WHITESPACE)) { if (baseValidator instanceof StringDatatypeValidator) facetType= DatatypeValidator.FACET_WHITESPACE; } else if (facet.equals(SchemaSymbols.ELT_LENGTH)) { } else { break; // a non-facet } if (content.getAttribute( SchemaSymbols.ATT_FIXED).equals(SchemaSymbols.ATTVAL_TRUE) || content.getAttribute( SchemaSymbols.ATT_FIXED).equals(SchemaSymbols.ATTVAL_TRUE_1)) { flags |= facetType; } fFacetData.put(facet,content.getAttribute( SchemaSymbols.ATT_VALUE )); checkContent(DOMUtil.getFirstChildElement( content ), attrs, schemaDoc); } // REVISIT: when to return the array fAttrChecker.returnAttrArray (attrs, schemaDoc); content = DOMUtil.getNextSiblingElement(content); } if (numEnumerationLiterals > 0) { fFacetData.put(SchemaSymbols.ELT_ENUMERATION, enumData); } if (fPattern !=null) { fFacetData.put(SchemaSymbols.ELT_PATTERN, fPattern.toString()); } if (flags != 0) { fFacetData.put(DatatypeValidator.FACET_FIXED, new Short(flags)); } fPattern = null; fi.facetdata = fFacetData; fi.nodeAfterFacets = content; return fi; } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/7d23b0f822620b832b611e0946e73bb880886a98/XSDAbstractTraverser.java/buggy/src/org/apache/xerces/impl/v2/XSDAbstractTraverser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
284,
11137,
966,
10080,
6645,
2413,
12,
1046,
913,
16,
1033,
8526,
913,
8262,
16,
514,
4143,
7947,
16,
1171,
9079,
21168,
5126,
1026,
5126,
16,
1139,
55,
2519,
966,
1963,
1759,
16,
1171,
9079,
4611,
18576,
6473,
13,
288,
3639,
284,
11137,
966,
7314,
273,
394,
284,
11137,
966,
5621,
3639,
18559,
284,
11137,
751,
273,
394,
18559,
12,
2163,
1769,
540,
3025,
2943,
273,
374,
31,
368,
2982,
21681,
716,
1240,
5499,
1546,
3767,
6,
3639,
509,
818,
21847,
48,
11235,
273,
374,
31,
3639,
5589,
2792,
751,
225,
273,
394,
5589,
5621,
3639,
913,
273,
866,
1350,
12,
1745,
269,
913,
8262,
16,
1963,
1759,
1769,
3639,
514,
11082,
31,
3639,
509,
818,
6645,
2413,
33,
20,
31,
3639,
1323,
261,
1745,
480,
446,
13,
288,
5411,
368,
9544,
3601,
24471,
5411,
1033,
8526,
3422,
273,
284,
3843,
8847,
18,
1893,
2498,
12,
1745,
16,
629,
16,
1963,
1759,
1769,
5411,
818,
6645,
2413,
9904,
31,
5411,
11082,
273,
4703,
1304,
18,
588,
29583,
12,
1745,
1769,
5411,
309,
261,
21568,
18,
14963,
12,
3078,
14821,
18,
2247,
56,
67,
16509,
654,
2689,
3719,
288,
7734,
818,
21847,
48,
11235,
9904,
31,
7734,
514,
2792,
3053,
273,
225,
4703,
1304,
18,
588,
3843,
620,
12,
1745,
16,
4611,
14821,
18,
789,
56,
67,
4051,
1769,
7734,
514,
11927,
31,
7734,
309,
261,
1969,
5126,
1276,
4269,
2689,
20228,
5126,
13,
288,
10792,
284,
3843,
8847,
18,
1893,
2498,
12,
1745,
16,
629,
16,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
284,
11137,
966,
10080,
6645,
2413,
12,
1046,
913,
16,
1033,
8526,
913,
8262,
16,
514,
4143,
7947,
16,
1171,
9079,
21168,
5126,
1026,
5126,
16,
1139,
55,
2519,
966,
1963,
1759,
16,
1171,
9079,
4611,
18576,
6473,
13,
288,
3639,
284,
11137,
966,
7314,
273,
394,
284,
11137,
966,
5621,
3639,
18559,
284,
11137,
751,
273,
394,
18559,
12,
2163,
1769,
540,
3025,
2943,
273,
374,
31,
368,
2982,
21681,
716,
1240,
5499,
1546,
3767,
6,
3639,
509,
818,
21847,
48,
11235,
273,
374,
31,
3639,
5589,
2792,
751,
225,
273,
394,
5589,
5621,
3639,
913,
273,
866,
1350,
12,
1745,
269,
913,
8262,
16,
1963,
1759,
1769,
3639,
514,
11082,
31,
3639,
509,
818,
6645,
2413,
2
] |
case NOT_EQUALS: { match( NOT_EQUALS ); relationalExpr(); operator = Operator.NOT_EQUALS; break; } | la = LA(1); | private void equalityExpr() throws SAXPathException { getXPathHandler().startEqualityExpr(); getXPathHandler().startEqualityExpr(); relationalExpr(); int operator = Operator.NO_OP; switch ( LA(1) ) { case EQUALS: { match( EQUALS ); relationalExpr(); operator = Operator.EQUALS; break; } case NOT_EQUALS: { match( NOT_EQUALS ); relationalExpr(); operator = Operator.NOT_EQUALS; break; } } getXPathHandler().endEqualityExpr( operator ); operator = Operator.NO_OP; switch ( LA(1) ) { case EQUALS: { match( EQUALS ); equalityExpr(); operator = Operator.EQUALS; break; } case NOT_EQUALS: { match( NOT_EQUALS ); equalityExpr(); operator = Operator.NOT_EQUALS; break; } } getXPathHandler().endEqualityExpr( operator ); } | 5646 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5646/55e74079a4b0bd729beeecc021a21776d8bfcdd1/XPathReader.java/clean/src/java/main/org/jaxen/saxpath/base/XPathReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
14958,
4742,
1435,
1216,
10168,
743,
503,
565,
288,
3639,
6538,
743,
1503,
7675,
1937,
20273,
4742,
5621,
3639,
6538,
743,
1503,
7675,
1937,
20273,
4742,
5621,
3639,
25302,
4742,
5621,
3639,
509,
3726,
273,
11097,
18,
3417,
67,
3665,
31,
3639,
1620,
261,
2928,
12,
21,
13,
262,
3639,
288,
5411,
648,
27557,
30,
5411,
288,
7734,
845,
12,
27557,
11272,
7734,
25302,
4742,
5621,
7734,
3726,
273,
11097,
18,
12853,
55,
31,
7734,
898,
31,
5411,
289,
5411,
648,
4269,
67,
12853,
55,
30,
5411,
288,
7734,
845,
12,
4269,
67,
12853,
55,
11272,
7734,
25302,
4742,
5621,
7734,
3726,
273,
11097,
18,
4400,
67,
12853,
55,
31,
7734,
898,
31,
5411,
289,
3639,
289,
3639,
6538,
743,
1503,
7675,
409,
20273,
4742,
12,
3726,
11272,
3639,
3726,
273,
11097,
18,
3417,
67,
3665,
31,
3639,
1620,
261,
2928,
12,
21,
13,
262,
3639,
288,
5411,
648,
27557,
30,
5411,
288,
7734,
845,
12,
27557,
11272,
7734,
14958,
4742,
5621,
7734,
3726,
273,
11097,
18,
12853,
55,
31,
7734,
898,
31,
5411,
289,
5411,
648,
4269,
67,
12853,
55,
30,
5411,
288,
7734,
845,
12,
4269,
67,
12853,
55,
11272,
7734,
14958,
4742,
5621,
7734,
3726,
273,
11097,
18,
4400,
67,
12853,
55,
31,
7734,
898,
31,
5411,
289,
3639,
289,
3639,
6538,
743,
1503,
7675,
409,
20273,
4742,
12,
3726,
11272,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
14958,
4742,
1435,
1216,
10168,
743,
503,
565,
288,
3639,
6538,
743,
1503,
7675,
1937,
20273,
4742,
5621,
3639,
6538,
743,
1503,
7675,
1937,
20273,
4742,
5621,
3639,
25302,
4742,
5621,
3639,
509,
3726,
273,
11097,
18,
3417,
67,
3665,
31,
3639,
1620,
261,
2928,
12,
21,
13,
262,
3639,
288,
5411,
648,
27557,
30,
5411,
288,
7734,
845,
12,
27557,
11272,
7734,
25302,
4742,
5621,
7734,
3726,
273,
11097,
18,
12853,
55,
31,
7734,
898,
31,
5411,
289,
5411,
648,
4269,
67,
12853,
55,
30,
5411,
288,
7734,
845,
12,
4269,
67,
12853,
55,
11272,
7734,
25302,
4742,
5621,
7734,
3726,
273,
11097,
18,
4400,
67,
12853,
55,
31,
7734,
898,
31,
5411,
289,
3639,
2
] |
return file.isDirectory() ? Boolean.TRUE : Boolean.FALSE; | return new Long(file.length()); | public Object run() { return file.isDirectory() ? Boolean.TRUE : Boolean.FALSE; } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/8dc8f02aab3c0365988625943861dc45226d4ba8/SecureAction.java/clean/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
1033,
1086,
1435,
288,
9506,
202,
2463,
585,
18,
291,
2853,
1435,
692,
3411,
18,
18724,
294,
3411,
18,
21053,
31,
1082,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
1033,
1086,
1435,
288,
9506,
202,
2463,
585,
18,
291,
2853,
1435,
692,
3411,
18,
18724,
294,
3411,
18,
21053,
31,
1082,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
final int stripLeadingDirectories) { | final int stripLeadingDirectories, final boolean createDirectories) { | public static ApplyPatchStatus applyPatch(final Project project, final List<FilePatch> patches, final VirtualFile baseDirectory, final int stripLeadingDirectories) { List<VirtualFile> filesToMakeWritable = new ArrayList<VirtualFile>(); for(FilePatch patch: patches) { VirtualFile fileToPatch = patch.findFileToPatch(baseDirectory, stripLeadingDirectories); if (fileToPatch != null && !fileToPatch.isDirectory()) { filesToMakeWritable.add(fileToPatch); FileType fileType = fileToPatch.getFileType(); if (fileType == StdFileTypes.UNKNOWN) { fileType = FileTypeChooser.associateFileType(fileToPatch.getPresentableName()); if (fileType == null) { return ApplyPatchStatus.FAILURE; } } } } final VirtualFile[] fileArray = filesToMakeWritable.toArray(new VirtualFile[filesToMakeWritable.size()]); final ReadonlyStatusHandler.OperationStatus readonlyStatus = ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(fileArray); if (readonlyStatus.hasReadonlyFiles()) { return ApplyPatchStatus.FAILURE; } final Ref<ApplyPatchStatus> statusRef = new Ref<ApplyPatchStatus>(); ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { CommandProcessor.getInstance().executeCommand(project, new Runnable() { public void run() { ApplyPatchStatus status = null; for(FilePatch patch: patches) { final ApplyPatchStatus patchStatus = applySinglePatch(project, patch, baseDirectory, stripLeadingDirectories); status = ApplyPatchStatus.and(status, patchStatus); } if (status == ApplyPatchStatus.ALREADY_APPLIED) { Messages.showInfoMessage(project, VcsBundle.message("patch.apply.already.applied"), VcsBundle.message("patch.apply.dialog.title")); } else if (status == ApplyPatchStatus.PARTIAL) { Messages.showInfoMessage(project, VcsBundle.message("patch.apply.partially.applied"), VcsBundle.message("patch.apply.dialog.title")); } statusRef.set(status); } }, VcsBundle.message("patch.apply.command"), null); } }); return statusRef.get(); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/f2c28ff8b4fc125bc5eb12c7d384dee7ebb39797/ApplyPatchAction.java/clean/source/com/intellij/openapi/vcs/changes/patch/ApplyPatchAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
5534,
7332,
1482,
2230,
7332,
12,
6385,
5420,
1984,
16,
727,
987,
32,
812,
7332,
34,
16482,
16,
727,
7269,
812,
1026,
2853,
16,
4766,
5411,
727,
509,
2569,
19112,
13071,
16,
727,
1250,
752,
13071,
13,
288,
565,
987,
32,
6466,
812,
34,
1390,
774,
6464,
12061,
273,
394,
2407,
32,
6466,
812,
34,
5621,
565,
364,
12,
812,
7332,
4729,
30,
16482,
13,
288,
1377,
7269,
812,
31044,
7332,
273,
4729,
18,
4720,
812,
774,
7332,
12,
1969,
2853,
16,
2569,
19112,
13071,
1769,
1377,
309,
261,
768,
774,
7332,
480,
446,
597,
401,
768,
774,
7332,
18,
291,
2853,
10756,
288,
3639,
1390,
774,
6464,
12061,
18,
1289,
12,
768,
774,
7332,
1769,
3639,
29449,
21939,
273,
31044,
7332,
18,
588,
28941,
5621,
3639,
309,
261,
768,
559,
422,
6276,
812,
2016,
18,
14737,
13,
288,
1850,
21939,
273,
29449,
17324,
18,
11577,
28941,
12,
768,
774,
7332,
18,
588,
6351,
429,
461,
10663,
1850,
309,
261,
768,
559,
422,
446,
13,
288,
5411,
327,
5534,
7332,
1482,
18,
17623,
31,
1850,
289,
3639,
289,
1377,
289,
565,
289,
565,
727,
7269,
812,
8526,
585,
1076,
273,
1390,
774,
6464,
12061,
18,
31447,
12,
2704,
7269,
812,
63,
2354,
774,
6464,
12061,
18,
1467,
1435,
19226,
565,
727,
2720,
3700,
1482,
1503,
18,
2988,
1482,
17102,
1482,
273,
2720,
3700,
1482,
1503,
18,
588,
1442,
12,
4406,
2934,
15735,
2697,
12061,
12,
768,
1076,
1769,
565,
309,
261,
16365,
1482,
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,
282,
1071,
760,
5534,
7332,
1482,
2230,
7332,
12,
6385,
5420,
1984,
16,
727,
987,
32,
812,
7332,
34,
16482,
16,
727,
7269,
812,
1026,
2853,
16,
4766,
5411,
727,
509,
2569,
19112,
13071,
16,
727,
1250,
752,
13071,
13,
288,
565,
987,
32,
6466,
812,
34,
1390,
774,
6464,
12061,
273,
394,
2407,
32,
6466,
812,
34,
5621,
565,
364,
12,
812,
7332,
4729,
30,
16482,
13,
288,
1377,
7269,
812,
31044,
7332,
273,
4729,
18,
4720,
812,
774,
7332,
12,
1969,
2853,
16,
2569,
19112,
13071,
1769,
1377,
309,
261,
768,
774,
7332,
480,
446,
597,
401,
768,
774,
7332,
18,
291,
2853,
10756,
288,
3639,
1390,
774,
6464,
12061,
18,
1289,
12,
768,
774,
7332,
1769,
2
] |
public void testIgnoreMarker() throws NullPointerException, EvaluationException { | public void testIgnoreMarker() throws NullPointerException, EvaluationException, JoranException { | public void testIgnoreMarker() throws NullPointerException, EvaluationException { JoranConfigurator jc = new JoranConfigurator(); LoggerContext loggerContext = new LoggerContext(); jc.setContext(loggerContext); jc.doConfigure(Constants.TEST_DIR_PREFIX + "input/joran/ignore.xml"); Map evalMap = (Map) loggerContext.getObject(CoreGlobal.EVALUATOR_MAP); assertNotNull(evalMap); StatusPrinter.print(loggerContext.getStatusManager()); Logger logger = loggerContext.getLogger("xx"); JaninoEventEvaluator evaluator = (JaninoEventEvaluator) evalMap.get("IGNORE_EVAL"); LoggingEvent event = new LoggingEvent("foo", logger, Level.DEBUG, "Hello world",null, null); StatusPrinter.print(loggerContext.getStatusManager()); Marker ignoreMarker = MarkerFactory.getMarker("IGNORE"); event.setMarker(ignoreMarker); assertTrue(evaluator.evaluate(event)); logger.debug("hello", new Exception("test")); logger.debug(ignoreMarker, "hello ignore", new Exception("test")); //logger.debug("hello", new Exception("test")); StatusPrinter.print(loggerContext.getStatusManager()); } | 51675 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51675/7177ff8f31734f293185997e0a81156f64bc26a6/EvaluatorJoranTest.java/clean/logback-classic/src/test/java/ch/qos/logback/classic/joran/EvaluatorJoranTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
3777,
7078,
1435,
1216,
10108,
16,
17340,
503,
16,
804,
280,
304,
503,
288,
565,
804,
280,
304,
17182,
19807,
273,
394,
804,
280,
304,
17182,
5621,
565,
4242,
1042,
1194,
1042,
273,
394,
4242,
1042,
5621,
565,
19807,
18,
542,
1042,
12,
4901,
1042,
1769,
565,
19807,
18,
2896,
11207,
12,
2918,
18,
16961,
67,
4537,
67,
6307,
397,
315,
2630,
19,
78,
280,
304,
19,
6185,
18,
2902,
8863,
7734,
1635,
5302,
863,
273,
261,
863,
13,
1194,
1042,
18,
588,
921,
12,
4670,
5160,
18,
41,
2669,
57,
3575,
67,
8352,
1769,
565,
25395,
12,
8622,
863,
1769,
565,
2685,
12149,
18,
1188,
12,
4901,
1042,
18,
588,
1482,
1318,
10663,
3639,
4242,
1194,
273,
1194,
1042,
18,
588,
3328,
2932,
5279,
8863,
3639,
23214,
15020,
1133,
15876,
18256,
273,
261,
46,
304,
15020,
1133,
15876,
13,
5302,
863,
18,
588,
2932,
20118,
67,
41,
2669,
8863,
565,
10253,
1133,
871,
273,
394,
10253,
1133,
2932,
11351,
3113,
1194,
16,
4557,
18,
9394,
16,
315,
18601,
9117,
3113,
2011,
16,
446,
1769,
565,
2685,
12149,
18,
1188,
12,
4901,
1042,
18,
588,
1482,
1318,
10663,
3639,
14742,
2305,
7078,
273,
14742,
1733,
18,
588,
7078,
2932,
20118,
8863,
565,
871,
18,
542,
7078,
12,
6185,
7078,
1769,
565,
1815,
5510,
12,
14168,
639,
18,
21024,
12,
2575,
10019,
3639,
1194,
18,
4148,
2932,
23711,
3113,
394,
1185,
2932,
3813,
7923,
1769,
565,
1194,
18,
4148,
12,
6185,
7078,
16,
315,
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,
1842,
3777,
7078,
1435,
1216,
10108,
16,
17340,
503,
16,
804,
280,
304,
503,
288,
565,
804,
280,
304,
17182,
19807,
273,
394,
804,
280,
304,
17182,
5621,
565,
4242,
1042,
1194,
1042,
273,
394,
4242,
1042,
5621,
565,
19807,
18,
542,
1042,
12,
4901,
1042,
1769,
565,
19807,
18,
2896,
11207,
12,
2918,
18,
16961,
67,
4537,
67,
6307,
397,
315,
2630,
19,
78,
280,
304,
19,
6185,
18,
2902,
8863,
7734,
1635,
5302,
863,
273,
261,
863,
13,
1194,
1042,
18,
588,
921,
12,
4670,
5160,
18,
41,
2669,
57,
3575,
67,
8352,
1769,
565,
25395,
12,
8622,
863,
1769,
565,
2685,
12149,
18,
1188,
12,
4901,
1042,
18,
588,
1482,
1318,
10663,
3639,
2
] |
case 2: try { to = Long.decode(sub).longValue(); } catch (NumberFormatException e) { } | case 2 : try { to = Long.decode(sub).longValue(); } catch (NumberFormatException e) { } | void parseUnixShared(String str, List aList) { if (str.length() > 0) { // Pass the header if (Character.isDigit(str.charAt(0))) { int index = -1; long from = 0; long to = 0; boolean syms = false; String name = ""; for (int i = 0; (index = str.lastIndexOf(' ')) != -1 || i <= 3; i++) { if (index == -1) { index = 0; } String sub = str.substring(index).trim(); // move to previous column str = str.substring(0, index).trim(); switch(i) { case 0: name = sub; break; case 1: if (sub.equalsIgnoreCase("Yes")) { syms = true; } break; case 2: // second column is "To" try { to = Long.decode(sub).longValue(); } catch (NumberFormatException e) { } break; case 3: // first column is "From" try { from = Long.decode(sub).longValue(); } catch (NumberFormatException e) { } break; } } MIShared s = new MIShared(from, to, syms, name); aList.add(s); } } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/0f58242ba8f6657165a1b0332adabdda64b1d6c2/MIInfoSharedLibraryInfo.java/clean/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIInfoSharedLibraryInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
1109,
18729,
7887,
12,
780,
609,
16,
987,
279,
682,
13,
288,
202,
202,
430,
261,
701,
18,
2469,
1435,
405,
374,
13,
288,
1082,
202,
759,
10311,
326,
1446,
1082,
202,
430,
261,
7069,
18,
291,
10907,
12,
701,
18,
3001,
861,
12,
20,
20349,
288,
9506,
202,
474,
770,
273,
300,
21,
31,
9506,
202,
5748,
628,
273,
374,
31,
9506,
202,
5748,
358,
273,
374,
31,
9506,
202,
6494,
24367,
273,
629,
31,
9506,
202,
780,
508,
273,
1408,
31,
9506,
202,
1884,
261,
474,
277,
273,
374,
31,
261,
1615,
273,
609,
18,
2722,
31985,
2668,
296,
3719,
480,
300,
21,
747,
277,
1648,
890,
31,
277,
27245,
288,
6862,
202,
430,
261,
1615,
422,
300,
21,
13,
288,
25083,
202,
1615,
273,
374,
31,
6862,
202,
97,
6862,
202,
780,
720,
273,
609,
18,
28023,
12,
1615,
2934,
5290,
5621,
6862,
202,
759,
3635,
358,
2416,
1057,
6862,
202,
701,
273,
609,
18,
28023,
12,
20,
16,
770,
2934,
5290,
5621,
6862,
202,
9610,
12,
77,
13,
288,
25083,
202,
3593,
374,
30,
6862,
1082,
202,
529,
273,
720,
31,
25083,
202,
8820,
31,
25083,
202,
3593,
404,
30,
6862,
1082,
202,
430,
261,
1717,
18,
14963,
5556,
2932,
22352,
6,
3719,
288,
6862,
9506,
202,
9009,
959,
273,
638,
31,
6862,
1082,
202,
97,
25083,
202,
8820,
31,
25083,
202,
3593,
576,
30,
368,
2205,
1057,
353,
315,
774,
6,
6862,
1082,
202,
698,
288,
6862,
9506,
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,
6459,
1109,
18729,
7887,
12,
780,
609,
16,
987,
279,
682,
13,
288,
202,
202,
430,
261,
701,
18,
2469,
1435,
405,
374,
13,
288,
1082,
202,
759,
10311,
326,
1446,
1082,
202,
430,
261,
7069,
18,
291,
10907,
12,
701,
18,
3001,
861,
12,
20,
20349,
288,
9506,
202,
474,
770,
273,
300,
21,
31,
9506,
202,
5748,
628,
273,
374,
31,
9506,
202,
5748,
358,
273,
374,
31,
9506,
202,
6494,
24367,
273,
629,
31,
9506,
202,
780,
508,
273,
1408,
31,
9506,
202,
1884,
261,
474,
277,
273,
374,
31,
261,
1615,
273,
609,
18,
2722,
31985,
2668,
296,
3719,
480,
300,
21,
747,
277,
1648,
890,
31,
277,
27245,
288,
6862,
202,
430,
2
] |
header = value; | header = value; | public void setHeader(boolean value) { header = value; } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/ed86dfb474e6fa22e1797452482e751a297a7e1f/Cell.java/clean/itext/src/com/lowagie/text/Cell.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10859,
12,
6494,
460,
13,
288,
3639,
1446,
273,
460,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
10859,
12,
6494,
460,
13,
288,
3639,
1446,
273,
460,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
Repository result = new Repository(); Iterator it = fileBuilders.values().iterator(); while (it.hasNext()) { FileBuilder fileBuilder = (FileBuilder) it.next(); VersionedFile file = fileBuilder.createFile(startDate); if (file == null) { continue; } result.addFile(file); logger.finer("adding " + file.getFilenameWithPath() + " (" + file.getRevisions().size() + " revisions)"); } | Repository result = new Repository(); Iterator it = fileBuilders.values().iterator(); while (it.hasNext()) { FileBuilder fileBuilder = (FileBuilder) it.next(); VersionedFile file = fileBuilder.createFile(startDate); if (file == null) { continue; } result.addFile(file); logger.finer("adding " + file.getFilenameWithPath() + " (" + file.getRevisions().size() + " revisions)"); } | public Repository createRepository() throws EmptyRepositoryException { // if (currentFileBuilder != null) { // fileBuilders.add(currentFileBuilder); // currentFileBuilder = null; // } if (startDate == null) { throw new EmptyRepositoryException(); } Repository result = new Repository(); Iterator it = fileBuilders.values().iterator(); while (it.hasNext()) { FileBuilder fileBuilder = (FileBuilder) it.next(); VersionedFile file = fileBuilder.createFile(startDate); if (file == null) { continue; } result.addFile(file); logger.finer("adding " + file.getFilenameWithPath() + " (" + file.getRevisions().size() + " revisions)"); } if (result.isEmpty()) { throw new EmptyRepositoryException(); } // Uh oh... SortedSet revisions = result.getRevisions(); List commits = new CommitListBuilder(revisions).createCommitList(); result.setCommits(commits); result.setSymbolicNames(new TreeSet(symbolicNames.values())); return result; } | 48585 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48585/78ae837b6e73bb382262a2f8f0b1f8e404431797/Builder.java/buggy/statsvn/src/net/sf/statcvs/input/Builder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6281,
752,
3305,
1435,
1216,
8953,
3305,
503,
288,
3639,
368,
309,
261,
2972,
812,
1263,
480,
446,
13,
288,
3639,
368,
585,
20460,
18,
1289,
12,
2972,
812,
1263,
1769,
3639,
368,
22650,
1263,
273,
446,
31,
3639,
368,
289,
3639,
309,
261,
1937,
1626,
422,
446,
13,
288,
5411,
604,
394,
8953,
3305,
503,
5621,
3639,
289,
3639,
6281,
563,
273,
394,
6281,
5621,
3639,
4498,
518,
273,
585,
20460,
18,
2372,
7675,
9838,
5621,
3639,
1323,
261,
305,
18,
5332,
2134,
10756,
288,
5411,
1387,
1263,
585,
1263,
273,
261,
812,
1263,
13,
518,
18,
4285,
5621,
5411,
18607,
812,
585,
273,
585,
1263,
18,
2640,
812,
12,
1937,
1626,
1769,
5411,
309,
261,
768,
422,
446,
13,
288,
7734,
1324,
31,
5411,
289,
5411,
563,
18,
1289,
812,
12,
768,
1769,
5411,
1194,
18,
926,
264,
2932,
3439,
315,
397,
585,
18,
588,
5359,
1190,
743,
1435,
397,
315,
7566,
397,
585,
18,
588,
21208,
7675,
1467,
1435,
397,
315,
18325,
2225,
1769,
3639,
289,
3639,
309,
261,
2088,
18,
291,
1921,
10756,
288,
5411,
604,
394,
8953,
3305,
503,
5621,
3639,
289,
3639,
368,
587,
76,
29797,
2777,
3639,
22123,
18325,
273,
563,
18,
588,
21208,
5621,
3639,
987,
14335,
273,
394,
10269,
682,
1263,
12,
29892,
2934,
2640,
5580,
682,
5621,
3639,
563,
18,
542,
23072,
12,
27000,
1769,
3639,
563,
18,
542,
10876,
12164,
1557,
12,
2704,
19461,
12,
9009,
12164,
1557,
18,
2372,
1435,
10019,
3639,
327,
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,
6281,
752,
3305,
1435,
1216,
8953,
3305,
503,
288,
3639,
368,
309,
261,
2972,
812,
1263,
480,
446,
13,
288,
3639,
368,
585,
20460,
18,
1289,
12,
2972,
812,
1263,
1769,
3639,
368,
22650,
1263,
273,
446,
31,
3639,
368,
289,
3639,
309,
261,
1937,
1626,
422,
446,
13,
288,
5411,
604,
394,
8953,
3305,
503,
5621,
3639,
289,
3639,
6281,
563,
273,
394,
6281,
5621,
3639,
4498,
518,
273,
585,
20460,
18,
2372,
7675,
9838,
5621,
3639,
1323,
261,
305,
18,
5332,
2134,
10756,
288,
5411,
1387,
1263,
585,
1263,
273,
261,
812,
1263,
13,
518,
18,
4285,
5621,
5411,
18607,
812,
585,
273,
585,
1263,
18,
2640,
812,
12,
1937,
1626,
1769,
5411,
309,
261,
2
] |
if (ast == null) return; System.out.println(path.toOSString()); index.acquireWriteLock(0); try { IIndexFragmentFile file = (IIndexFragmentFile) index.getFile(path); if (file != null) index.clearFile(file); IASTPreprocessorIncludeStatement[] includes = ast.getIncludeDirectives(); for (int i = 0; i < includes.length; ++i) { String incname = includes[i].getPath(); IIndexFragmentFile incfile = (IIndexFragmentFile) index.getFile(new Path(incname)); if (incfile != null) { index.clearFile(incfile); } } addSymbols(ast); } finally { index.releaseWriteLock(0); } | if (ast != null) addSymbols(ast, pm); | protected void doParseTU(ITranslationUnit tu) throws CoreException, InterruptedException { IPath path = tu.getLocation(); if (path == null) { return; } int options= 0; if (!getIndexAllFiles()) { options |= ITranslationUnit.AST_SKIP_IF_NO_BUILD_INFO; } IASTTranslationUnit ast= tu.getAST(null, options); if (ast == null) return; System.out.println(path.toOSString()); index.acquireWriteLock(0); try { // Remove the old symbols in the tu IIndexFragmentFile file = (IIndexFragmentFile) index.getFile(path); if (file != null) index.clearFile(file); // Clear out the symbols in the includes IASTPreprocessorIncludeStatement[] includes = ast.getIncludeDirectives(); for (int i = 0; i < includes.length; ++i) { String incname = includes[i].getPath(); IIndexFragmentFile incfile = (IIndexFragmentFile) index.getFile(new Path(incname)); if (incfile != null) { index.clearFile(incfile); } } addSymbols(ast); } finally { index.releaseWriteLock(0); } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/2d8f966f3b06d96391a0bfd91b2bae084e95bcda/PDOMFullIndexerJob.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
3201,
56,
57,
12,
45,
6717,
2802,
28325,
13,
1216,
30015,
16,
7558,
288,
202,
202,
45,
743,
589,
273,
28325,
18,
588,
2735,
5621,
202,
202,
430,
261,
803,
422,
446,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
474,
702,
33,
374,
31,
202,
202,
430,
16051,
588,
1016,
1595,
2697,
10756,
288,
1082,
202,
2116,
5626,
467,
6717,
2802,
18,
9053,
67,
22589,
67,
5501,
67,
3417,
67,
20215,
67,
5923,
31,
202,
202,
97,
202,
202,
45,
9053,
6717,
2802,
3364,
33,
28325,
18,
588,
9053,
12,
2011,
16,
702,
1769,
202,
202,
430,
261,
689,
422,
446,
13,
1082,
202,
2463,
31,
202,
202,
3163,
18,
659,
18,
8222,
12,
803,
18,
869,
4618,
780,
10663,
202,
202,
1615,
18,
1077,
1039,
3067,
2531,
12,
20,
1769,
9506,
202,
698,
288,
1082,
202,
759,
3581,
326,
1592,
7963,
316,
326,
28325,
1082,
202,
45,
1016,
7456,
812,
585,
273,
261,
45,
1016,
7456,
812,
13,
770,
18,
29925,
12,
803,
1769,
1082,
202,
430,
261,
768,
480,
446,
13,
9506,
202,
1615,
18,
8507,
812,
12,
768,
1769,
1082,
202,
759,
10121,
596,
326,
7963,
316,
326,
6104,
1082,
202,
45,
9053,
1386,
8700,
8752,
3406,
8526,
6104,
273,
3364,
18,
588,
8752,
25343,
5621,
1082,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
6104,
18,
2469,
31,
965,
77,
13,
288,
9506,
202,
780,
7290,
529,
273,
6104,
63,
77,
8009,
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,
741,
3201,
56,
57,
12,
45,
6717,
2802,
28325,
13,
1216,
30015,
16,
7558,
288,
202,
202,
45,
743,
589,
273,
28325,
18,
588,
2735,
5621,
202,
202,
430,
261,
803,
422,
446,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
474,
702,
33,
374,
31,
202,
202,
430,
16051,
588,
1016,
1595,
2697,
10756,
288,
1082,
202,
2116,
5626,
467,
6717,
2802,
18,
9053,
67,
22589,
67,
5501,
67,
3417,
67,
20215,
67,
5923,
31,
202,
202,
97,
202,
202,
45,
9053,
6717,
2802,
3364,
33,
28325,
18,
588,
9053,
12,
2011,
16,
702,
1769,
202,
202,
430,
261,
689,
422,
446,
13,
1082,
202,
2463,
31,
202,
202,
3163,
18,
2
] |
wizardCategories = elements; | wizardCategories = root; | public NewWizardSelectionPage(IWorkbench aWorkbench, IStructuredSelection currentSelection, WizardCollectionElement elements, WorkbenchWizardElement[] primary) { // override what superclass does with elements super("newWizardSelectionPage", aWorkbench, currentSelection, null);//$NON-NLS-1$ setTitle(WorkbenchMessages .getString("NewWizardSelectionPage.description")); //$NON-NLS-1$ wizardCategories = elements; primaryWizards = primary; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/3d694fa5580f66413fa910c2e54a03aaef1cec34/NewWizardSelectionPage.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1166,
27130,
6233,
1964,
12,
45,
2421,
22144,
279,
2421,
22144,
16,
5411,
467,
30733,
6233,
783,
6233,
16,
5411,
678,
13412,
2532,
1046,
2186,
16,
4147,
22144,
27130,
1046,
8526,
3354,
13,
288,
3639,
368,
3849,
4121,
12098,
1552,
598,
2186,
3639,
2240,
2932,
2704,
27130,
6233,
1964,
3113,
279,
2421,
22144,
16,
783,
6233,
16,
446,
1769,
759,
8,
3993,
17,
5106,
17,
21,
8,
3639,
14109,
12,
2421,
22144,
5058,
7734,
263,
588,
780,
2932,
1908,
27130,
6233,
1964,
18,
3384,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
3639,
24204,
10487,
273,
1365,
31,
3639,
3354,
27130,
87,
273,
3354,
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,
1071,
1166,
27130,
6233,
1964,
12,
45,
2421,
22144,
279,
2421,
22144,
16,
5411,
467,
30733,
6233,
783,
6233,
16,
5411,
678,
13412,
2532,
1046,
2186,
16,
4147,
22144,
27130,
1046,
8526,
3354,
13,
288,
3639,
368,
3849,
4121,
12098,
1552,
598,
2186,
3639,
2240,
2932,
2704,
27130,
6233,
1964,
3113,
279,
2421,
22144,
16,
783,
6233,
16,
446,
1769,
759,
8,
3993,
17,
5106,
17,
21,
8,
3639,
14109,
12,
2421,
22144,
5058,
7734,
263,
588,
780,
2932,
1908,
27130,
6233,
1964,
18,
3384,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
3639,
24204,
10487,
273,
1365,
31,
3639,
3354,
27130,
87,
273,
3354,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
public static Theme getTheme(String companyId, String themeId) { | public static Theme getTheme(String companyId, String themeId) throws PortalException, SystemException { | public static Theme getTheme(String companyId, String themeId) { themeId = GetterUtil.getString(themeId); Theme theme = (Theme)_getThemes(companyId).get(themeId); if (theme == null) { theme = (Theme)_themes.get( CompanyPropsUtil.get(companyId, PropsUtil.DEFAULT_THEME_ID)); } return theme; } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/58a5501f2dec858b085420e7613b08c0cdc7f24d/ThemeLocalUtil.java/buggy/portal-ejb/src/com/liferay/portal/service/impl/ThemeLocalUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
19745,
27077,
12,
780,
14346,
16,
514,
5006,
548,
13,
288,
202,
202,
7997,
548,
273,
968,
387,
1304,
18,
588,
780,
12,
7997,
548,
1769,
202,
202,
8335,
5006,
273,
261,
8335,
13,
67,
588,
30224,
12,
16840,
548,
2934,
588,
12,
7997,
548,
1769,
202,
202,
430,
261,
7997,
422,
446,
13,
288,
1082,
202,
7997,
273,
261,
8335,
13,
67,
17328,
18,
588,
12,
9506,
202,
12627,
5047,
1304,
18,
588,
12,
16840,
548,
16,
1186,
1121,
1304,
18,
5280,
67,
24644,
958,
67,
734,
10019,
202,
202,
97,
202,
202,
2463,
5006,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
19745,
27077,
12,
780,
14346,
16,
514,
5006,
548,
13,
288,
202,
202,
7997,
548,
273,
968,
387,
1304,
18,
588,
780,
12,
7997,
548,
1769,
202,
202,
8335,
5006,
273,
261,
8335,
13,
67,
588,
30224,
12,
16840,
548,
2934,
588,
12,
7997,
548,
1769,
202,
202,
430,
261,
7997,
422,
446,
13,
288,
1082,
202,
7997,
273,
261,
8335,
13,
67,
17328,
18,
588,
12,
9506,
202,
12627,
5047,
1304,
18,
588,
12,
16840,
548,
16,
1186,
1121,
1304,
18,
5280,
67,
24644,
958,
67,
734,
10019,
202,
202,
97,
202,
202,
2463,
5006,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
if (jj_3R_35()) jj_scanpos = xsp; | if (jj_3R_37()) jj_scanpos = xsp; | final private boolean jj_3_14() { Token xsp; xsp = jj_scanpos; if (jj_3R_34()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(OP_AND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; xsp = jj_scanpos; if (jj_3R_35()) jj_scanpos = xsp; else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_36()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/c9a4de4264062f93d661ef3eb940e728297306c8/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
67,
3461,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
54,
67,
5026,
10756,
10684,
67,
9871,
917,
273,
619,
1752,
31,
565,
469,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
10684,
67,
9871,
917,
422,
10684,
67,
2722,
917,
13,
327,
629,
31,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
3665,
67,
4307,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
10684,
67,
9871,
917,
422,
10684,
67,
2722,
917,
13,
327,
629,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
54,
67,
6418,
10756,
10684,
67,
9871,
917,
273,
619,
1752,
31,
565,
469,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
10684,
67,
9871,
917,
422,
10684,
67,
2722,
917,
13,
327,
629,
31,
565,
309,
261,
78,
78,
67,
23,
54,
67,
5718,
10756,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
10684,
67,
9871,
917,
422,
10684,
67,
2722,
917,
13,
327,
629,
31,
565,
327,
629,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
67,
3461,
1435,
288,
565,
3155,
619,
1752,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
261,
78,
78,
67,
23,
54,
67,
5026,
10756,
10684,
67,
9871,
917,
273,
619,
1752,
31,
565,
469,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
10684,
67,
9871,
917,
422,
10684,
67,
2722,
917,
13,
327,
629,
31,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
3665,
67,
4307,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
10684,
67,
9871,
917,
422,
10684,
67,
2722,
917,
13,
327,
629,
31,
565,
619,
1752,
273,
10684,
67,
9871,
917,
31,
565,
309,
2
] |
validCheck(); | updateValidState(); | private void createEncodingGroup(Composite parent) { Font font = parent.getFont(); Group group = new Group(parent, SWT.NONE); GridData data = new GridData(GridData.FILL_HORIZONTAL); group.setLayoutData(data); GridLayout layout = new GridLayout(); layout.numColumns = 2; group.setLayout(layout); group.setText(WorkbenchMessages.getString("WorkbenchPreference.encoding")); //$NON-NLS-1$ group.setFont(font); SelectionAdapter buttonListener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateEncodingState(defaultEncodingButton.getSelection()); validCheck(); } }; defaultEncodingButton = new Button(group, SWT.RADIO); defaultEnc = System.getProperty("file.encoding", "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$ defaultEncodingButton.setText(WorkbenchMessages.format("WorkbenchPreference.defaultEncoding", new String[] { defaultEnc })); //$NON-NLS-1$ data = new GridData(); data.horizontalSpan = 2; defaultEncodingButton.setLayoutData(data); defaultEncodingButton.addSelectionListener(buttonListener); defaultEncodingButton.setFont(font); otherEncodingButton = new Button(group, SWT.RADIO); otherEncodingButton.setText(WorkbenchMessages.getString("WorkbenchPreference.otherEncoding")); //$NON-NLS-1$ otherEncodingButton.addSelectionListener(buttonListener); otherEncodingButton.setFont(font); encodingCombo = new Combo(group, SWT.NONE); data = new GridData(); data.widthHint = convertWidthInCharsToPixels(15); encodingCombo.setFont(font); encodingCombo.setLayoutData(data); encodingCombo.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validCheck(); } }); ArrayList encodings = new ArrayList(); int n = 0; try { n = Integer.parseInt(WorkbenchMessages.getString("WorkbenchPreference.numDefaultEncodings")); //$NON-NLS-1$ } catch (NumberFormatException e) { // Ignore; } for (int i = 0; i < n; ++i) { String enc = WorkbenchMessages.getString("WorkbenchPreference.defaultEncoding" + (i+1), null); //$NON-NLS-1$ if (enc != null) { encodings.add(enc); } } if (!encodings.contains(defaultEnc)) { encodings.add(defaultEnc); } String enc = ResourcesPlugin.getPlugin().getPluginPreferences().getString(ResourcesPlugin.PREF_ENCODING); boolean isDefault = enc == null || enc.length() == 0; if (!isDefault && !encodings.contains(enc)) { encodings.add(enc); } Collections.sort(encodings); for (int i = 0; i < encodings.size(); ++i) { encodingCombo.add((String) encodings.get(i)); } encodingCombo.setText(isDefault ? defaultEnc : enc); updateEncodingState(isDefault); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/8fc39c6c5c4051d3443ea99b16ce2eea05f7ff81/EditorsPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
4705,
1114,
12,
9400,
982,
13,
288,
9506,
202,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
202,
202,
1114,
1041,
273,
394,
3756,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
6313,
751,
501,
273,
394,
7145,
751,
12,
6313,
751,
18,
29818,
67,
44,
20344,
1769,
202,
202,
1655,
18,
542,
3744,
751,
12,
892,
1769,
202,
202,
6313,
3744,
3511,
273,
394,
7145,
3744,
5621,
202,
202,
6741,
18,
2107,
3380,
273,
576,
31,
202,
202,
1655,
18,
542,
3744,
12,
6741,
1769,
202,
202,
1655,
18,
542,
1528,
12,
2421,
22144,
5058,
18,
588,
780,
2932,
2421,
22144,
9624,
18,
5999,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
1655,
18,
542,
5711,
12,
5776,
1769,
9506,
202,
6233,
4216,
3568,
2223,
273,
394,
12977,
4216,
1435,
288,
1082,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
9506,
202,
2725,
4705,
1119,
12,
1886,
4705,
3616,
18,
588,
6233,
10663,
9506,
202,
877,
1564,
5621,
1082,
202,
97,
202,
202,
20451,
9506,
202,
1886,
4705,
3616,
273,
394,
12569,
12,
1655,
16,
348,
8588,
18,
28829,
4294,
1769,
202,
202,
1886,
4280,
273,
2332,
18,
588,
1396,
2932,
768,
18,
5999,
3113,
315,
5159,
17,
28,
8863,
225,
4329,
3993,
17,
5106,
17,
21,
8,
225,
4329,
3993,
17,
5106,
17,
22,
8,
202,
202,
1886,
4705,
3616,
18,
542,
1528,
12,
2421,
22144,
5058,
18,
2139,
2932,
2421,
22144,
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,
752,
4705,
1114,
12,
9400,
982,
13,
288,
9506,
202,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
202,
202,
1114,
1041,
273,
394,
3756,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
6313,
751,
501,
273,
394,
7145,
751,
12,
6313,
751,
18,
29818,
67,
44,
20344,
1769,
202,
202,
1655,
18,
542,
3744,
751,
12,
892,
1769,
202,
202,
6313,
3744,
3511,
273,
394,
7145,
3744,
5621,
202,
202,
6741,
18,
2107,
3380,
273,
576,
31,
202,
202,
1655,
18,
542,
3744,
12,
6741,
1769,
202,
202,
1655,
18,
542,
1528,
12,
2421,
22144,
5058,
18,
588,
780,
2932,
2421,
22144,
9624,
18,
5999,
7923,
1769,
4329,
3993,
17,
5106,
17,
2
] |
System.out.printf("Invoking addNumbers(%d, %d)\n", number1, number2); int result = port.addNumbers(number1, number2); System.out.printf("The result of adding %d and %d is %d.\n\n", number1, number2, result); | System.out.printf ("Invoking addNumbers(%d, %d)\n", number1, number2); int result = port.addNumbers (number1, number2); System.out.printf ("The result of adding %d and %d is %d.\n\n", number1, number2, result); | public static void main(String[] args) { try { ServiceFactory serviceFactory = ServiceFactory.newInstance(); AddNumbersImplService service = (AddNumbersImplService)serviceFactory.createService((java.net.URL)null, AddNumbersImplService.class); AddNumbersImpl port = service.getAddNumbersImpl(); int number1 = 10; int number2 = 20; System.out.printf("Invoking addNumbers(%d, %d)\n", number1, number2); int result = port.addNumbers(number1, number2); System.out.printf("The result of adding %d and %d is %d.\n\n", number1, number2, result); number1 = -10; System.out.printf("Invoking addNumbers(%d, %d)\n", number1, number2); result = port.addNumbers(number1, number2); System.out.printf("The result of adding %d and %d is %d.\n", number1, number2, result); } catch (RemoteException ex) { ex.printStackTrace(); } catch (AddNumbersException_Exception ex) { System.out.printf("Caught AddNumbersException_Exception: %s\n", ex.getFaultInfo().getDetail()); } } | 9667 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9667/c4381a689728bbcb1f7b68842ed328aa1ac450f8/AddNumbersClient.java/buggy/jaxws-ri/samples/fromjava/src/fromjava/client/AddNumbersClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
775,
288,
5411,
1956,
1733,
1156,
1733,
273,
1956,
1733,
18,
2704,
1442,
5621,
5411,
1436,
10072,
2828,
1179,
1156,
273,
261,
986,
10072,
2828,
1179,
13,
3278,
1733,
18,
2640,
1179,
12443,
6290,
18,
2758,
18,
1785,
13,
2011,
16,
1436,
10072,
2828,
1179,
18,
1106,
1769,
5411,
1436,
10072,
2828,
1756,
273,
1156,
18,
588,
986,
10072,
2828,
5621,
9506,
5411,
509,
1300,
21,
273,
1728,
31,
5411,
509,
1300,
22,
273,
4200,
31,
5411,
2332,
18,
659,
18,
1461,
2932,
11354,
310,
527,
10072,
9275,
72,
16,
738,
72,
5153,
82,
3113,
1300,
21,
16,
1300,
22,
1769,
5411,
509,
563,
273,
1756,
18,
1289,
10072,
12,
2696,
21,
16,
1300,
22,
1769,
5411,
2332,
18,
659,
18,
1461,
2932,
1986,
563,
434,
6534,
738,
72,
471,
738,
72,
353,
738,
72,
8403,
82,
64,
82,
3113,
1300,
21,
16,
1300,
22,
16,
563,
1769,
5411,
1300,
21,
273,
300,
2163,
31,
5411,
2332,
18,
659,
18,
1461,
2932,
11354,
310,
527,
10072,
9275,
72,
16,
738,
72,
5153,
82,
3113,
1300,
21,
16,
1300,
22,
1769,
5411,
563,
273,
1756,
18,
1289,
10072,
12,
2696,
21,
16,
1300,
22,
1769,
5411,
2332,
18,
659,
18,
1461,
2932,
1986,
563,
434,
6534,
738,
72,
471,
738,
72,
353,
738,
72,
8403,
82,
3113,
1300,
21,
16,
1300,
22,
16,
563,
1769,
202,
97,
1044,
261,
5169,
503,
431,
13,
288,
5411,
431,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
775,
288,
5411,
1956,
1733,
1156,
1733,
273,
1956,
1733,
18,
2704,
1442,
5621,
5411,
1436,
10072,
2828,
1179,
1156,
273,
261,
986,
10072,
2828,
1179,
13,
3278,
1733,
18,
2640,
1179,
12443,
6290,
18,
2758,
18,
1785,
13,
2011,
16,
1436,
10072,
2828,
1179,
18,
1106,
1769,
5411,
1436,
10072,
2828,
1756,
273,
1156,
18,
588,
986,
10072,
2828,
5621,
9506,
5411,
509,
1300,
21,
273,
1728,
31,
5411,
509,
1300,
22,
273,
4200,
31,
5411,
2332,
18,
659,
18,
1461,
2932,
11354,
310,
527,
10072,
9275,
72,
16,
738,
72,
5153,
82,
3113,
1300,
21,
16,
1300,
22,
1769,
5411,
509,
563,
273,
1756,
18,
2
] |
if(attackTarget!=null) attackTarget.attackSource=null; | if(attackTarget!=null) { attackTarget.attackSource.remove(this); } | public void stopAttack() { if(has("risk")) remove("risk"); if(has("damage")) remove("damage"); if(has("target")) remove("target"); if(attackTarget!=null) attackTarget.attackSource=null; attackTarget=null; } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/32352214a251e730149977a3f9c81970c3a35b93/RPEntity.java/clean/src/games/stendhal/server/entity/RPEntity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2132,
3075,
484,
1435,
565,
288,
565,
309,
12,
5332,
2932,
86,
10175,
6,
3719,
1206,
2932,
86,
10175,
8863,
565,
309,
12,
5332,
2932,
72,
301,
410,
6,
3719,
1206,
2932,
72,
301,
410,
8863,
565,
309,
12,
5332,
2932,
3299,
6,
3719,
1206,
2932,
3299,
8863,
3639,
309,
12,
4558,
484,
2326,
5,
33,
2011,
13,
288,
13843,
2326,
18,
4558,
484,
1830,
18,
4479,
12,
2211,
1769,
289,
377,
13843,
2326,
33,
2011,
31,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2132,
3075,
484,
1435,
565,
288,
565,
309,
12,
5332,
2932,
86,
10175,
6,
3719,
1206,
2932,
86,
10175,
8863,
565,
309,
12,
5332,
2932,
72,
301,
410,
6,
3719,
1206,
2932,
72,
301,
410,
8863,
565,
309,
12,
5332,
2932,
3299,
6,
3719,
1206,
2932,
3299,
8863,
3639,
309,
12,
4558,
484,
2326,
5,
33,
2011,
13,
288,
13843,
2326,
18,
4558,
484,
1830,
18,
4479,
12,
2211,
1769,
289,
377,
13843,
2326,
33,
2011,
31,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
propertyListener = new PropertyChangeListener( ) { | propertyListener = new PropertyChangeListener( ) { | public void setGraphicalViewer( ScrollingGraphicalViewer primaryViewer ) { // pre-conditions Assert.isNotNull( primaryViewer ); Assert.isNotNull( primaryViewer.getControl( ) ); Assert.isTrue( diagramViewer == null ); diagramViewer = primaryViewer; editor = (FigureCanvas) diagramViewer.getControl( ); getZoomManager( ).addZoomListener( zoomListener ); // layout whenever the scrollBars are shown or hidden, and whenever the // RulerComposite // is resized layoutListener = new Listener( ) { public void handleEvent( Event event ) { // @TODO: If you use Display.asyncExec(runnable) here, // some flashing // occurs. You can see it when the palette is in the editor, and // you hit // the button to show/hide it. layout( true ); } }; addListener( SWT.Resize, layoutListener ); editor.getHorizontalBar( ).addListener( SWT.Show, layoutListener ); editor.getHorizontalBar( ).addListener( SWT.Hide, layoutListener ); editor.getVerticalBar( ).addListener( SWT.Show, layoutListener ); editor.getVerticalBar( ).addListener( SWT.Hide, layoutListener ); propertyListener = new PropertyChangeListener( ) { public void propertyChange( PropertyChangeEvent evt ) { String property = evt.getPropertyName( ); if ( DeferredGraphicalViewer.PROPERTY_MARGIN_VISIBILITY.equals( property ) ) { Object obj = ( (RulerProvider) diagramViewer.getProperty( RulerProvider.PROPERTY_HORIZONTAL_RULER ) ); if ( obj instanceof EditorRulerProvider ) { Object ruler = ( (RulerProvider) obj ).getRuler( ); if ( ruler instanceof EditorRuler ) { ( (EditorRuler) ruler ).setMarginOff( !( (Boolean) evt.getNewValue( ) ).booleanValue( ) ); setMargin( TOP_LEFT ); setMargin( TOP_RIGHT ); } } obj = ( (RulerProvider) diagramViewer.getProperty( RulerProvider.PROPERTY_VERTICAL_RULER ) ); if ( obj instanceof EditorRulerProvider ) { Object ruler = ( (RulerProvider) obj ).getRuler( ); if ( ruler instanceof EditorRuler ) { ( (EditorRuler) ruler ).setMarginOff( !( (Boolean) evt.getNewValue( ) ).booleanValue( ) ); setMargin( LEFT_TOP ); setMargin( LEFT_BOTTOM ); } } } else if ( DeferredGraphicalViewer.LAYOUT_SIZE.equals( property ) ) { processProvider( ); } else if ( RulerProvider.PROPERTY_HORIZONTAL_RULER.equals( property ) ) { setRuler( (RulerProvider) diagramViewer.getProperty( RulerProvider.PROPERTY_HORIZONTAL_RULER ), PositionConstants.NORTH ); } else if ( RulerProvider.PROPERTY_VERTICAL_RULER.equals( property ) ) { setRuler( (RulerProvider) diagramViewer.getProperty( RulerProvider.PROPERTY_VERTICAL_RULER ), PositionConstants.WEST ); } else if ( RulerProvider.PROPERTY_RULER_VISIBILITY.equals( property ) ) setRulerVisibility( ( (Boolean) diagramViewer.getProperty( RulerProvider.PROPERTY_RULER_VISIBILITY ) ).booleanValue( ) ); } }; diagramViewer.addPropertyChangeListener( propertyListener ); Boolean rulerVisibility = (Boolean) diagramViewer.getProperty( RulerProvider.PROPERTY_RULER_VISIBILITY ); if ( rulerVisibility != null ) setRulerVisibility( rulerVisibility.booleanValue( ) ); setRuler( (RulerProvider) diagramViewer.getProperty( RulerProvider.PROPERTY_HORIZONTAL_RULER ), PositionConstants.NORTH ); setRuler( (RulerProvider) diagramViewer.getProperty( RulerProvider.PROPERTY_VERTICAL_RULER ), PositionConstants.WEST ); resetAllGuide( ); setUnit( getUnitFromDesign( getReportDesignHandle( ).getDefaultUnits( ) ) ); getReportDesignHandle( ).addListener( designListener ); getMasterPageHandle( ).addListener( designListener ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/61cce071e25248ce85d293e05344845aab740350/EditorRulerComposite.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/rulers/EditorRulerComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
4137,
1706,
18415,
12,
2850,
15742,
4137,
1706,
18415,
3354,
18415,
262,
202,
95,
202,
202,
759,
675,
17,
6381,
202,
202,
8213,
18,
291,
5962,
12,
3354,
18415,
11272,
202,
202,
8213,
18,
291,
5962,
12,
3354,
18415,
18,
588,
3367,
12,
262,
11272,
202,
202,
8213,
18,
291,
5510,
12,
19750,
18415,
422,
446,
11272,
202,
202,
12264,
1940,
18415,
273,
3354,
18415,
31,
202,
202,
9177,
273,
261,
42,
15906,
12971,
13,
19750,
18415,
18,
588,
3367,
12,
11272,
202,
202,
588,
11497,
1318,
12,
262,
18,
1289,
11497,
2223,
12,
7182,
2223,
11272,
202,
202,
759,
3511,
17334,
326,
5532,
5190,
87,
854,
12188,
578,
5949,
16,
471,
17334,
326,
202,
202,
759,
534,
17040,
9400,
202,
202,
759,
353,
21615,
202,
202,
6741,
2223,
273,
394,
10652,
12,
262,
288,
1082,
202,
482,
918,
1640,
1133,
12,
2587,
871,
262,
1082,
202,
95,
9506,
202,
759,
632,
6241,
30,
971,
1846,
999,
9311,
18,
3810,
1905,
12,
2681,
6914,
13,
2674,
16,
9506,
202,
759,
2690,
9563,
310,
9506,
202,
759,
9938,
18,
4554,
848,
2621,
518,
1347,
326,
12127,
353,
316,
326,
4858,
16,
471,
9506,
202,
759,
1846,
6800,
9506,
202,
759,
326,
3568,
358,
2405,
19,
11248,
518,
18,
9506,
202,
6741,
12,
638,
11272,
1082,
202,
97,
202,
202,
20451,
202,
202,
1289,
2223,
12,
348,
8588,
18,
12182,
16,
3511,
2223,
11272,
202,
202,
9177,
18,
588,
14457,
5190,
12,
262,
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,
918,
444,
4137,
1706,
18415,
12,
2850,
15742,
4137,
1706,
18415,
3354,
18415,
262,
202,
95,
202,
202,
759,
675,
17,
6381,
202,
202,
8213,
18,
291,
5962,
12,
3354,
18415,
11272,
202,
202,
8213,
18,
291,
5962,
12,
3354,
18415,
18,
588,
3367,
12,
262,
11272,
202,
202,
8213,
18,
291,
5510,
12,
19750,
18415,
422,
446,
11272,
202,
202,
12264,
1940,
18415,
273,
3354,
18415,
31,
202,
202,
9177,
273,
261,
42,
15906,
12971,
13,
19750,
18415,
18,
588,
3367,
12,
11272,
202,
202,
588,
11497,
1318,
12,
262,
18,
1289,
11497,
2223,
12,
7182,
2223,
11272,
202,
202,
759,
3511,
17334,
326,
5532,
5190,
87,
854,
12188,
578,
5949,
16,
471,
17334,
326,
2
] |
out.println(" protected AssetSkeleton(AssetSkeleton prototype) {\n"+ | println(out," protected AssetSkeleton(AssetSkeleton prototype) {\n"+ | public void writeAsset () throws IOException { String outname = "AssetSkeleton.java"; if (cleanp) { (new File(outname)).delete(); return ; } debug("Writing AssetSkeleton to \""+outname+"\""); noteFile(outname); FileOutputStream fos = new FileOutputStream(new File(getTargetDir(),outname)); OutputStreamWriter osw = new OutputStreamWriter(fos); PrintWriter out = new PrintWriter(osw); writeCR(out); out.println("/** Abstract Asset Skeleton implementation"); out.println(" * Implements default property getters, and additional property"); out.println(" * lists."); out.println(" * Intended to be extended by org.cougaar.domain.planning.ldm.asset.Asset"); out.println(" **/"); out.println(); doPackaging(out,"global"); out.println("import java.io.Serializable;"); out.println("import java.beans.PropertyDescriptor;" ); out.println("import java.beans.IndexedPropertyDescriptor;" ); out.println(); String baseclass = p.get("global","skeletonBase"); if (baseclass == null) baseclass = "org.cougaar.domain.planning.ldm.asset.Asset"; out.println("public abstract class AssetSkeleton extends "+baseclass+" {"); out.println(); // default constructor out.println(" protected AssetSkeleton() {}"); out.println(); // copy constructor out.println(" protected AssetSkeleton(AssetSkeleton prototype) {\n"+ " super(prototype);\n"+ " }"); out.println(); out.println(" /** Default PG accessors **/"); out.println(); Enumeration contexts = p.getContexts(); while ( contexts.hasMoreElements()) { String context = (String) contexts.nextElement(); if (! context.equals("global") && (p.get(context, "abstract") == null)) { out.println(" /** Search additional properties for a "+ context+ " instance."); out.println(" * @return instance of "+context+" or null."); out.println(" **/"); boolean timephased = (p.get(context, PGParser.TIMEPHASED) != null); String timeVar = ""; if (timephased) { timeVar = "long time"; } out.println(" public "+context+" get"+context+"("+timeVar+")"); out.println(" {"); if (timephased) { timeVar = ", time"; } out.println(" "+context+" _tmp = ("+context+") resolvePG("+ context+".class"+timeVar+");"); out.println(" return (_tmp=="+context+".nullPG)?null:_tmp;"); out.println(" }"); out.println(); out.println(" /** Test for existence of a "+context+"\n"+ " **/"); if (timephased) { timeVar = "long time"; } out.println(" public boolean has"+context+"("+timeVar+") {\n"); if (timephased) { timeVar = "time"; } out.println(" return (get"+context+"("+timeVar+") != null);\n"+ " }"); out.println(); String vr = "a"+context; out.println(" /** Set the "+context+" property.\n"+ " * The default implementation will create a new "+context+"\n"+ " * property and add it to the otherPropertyGroup list.\n"+ " * Many subclasses override with local slots.\n"+ " **/\n"+ " public void set"+context+"(PropertyGroup "+vr+") {\n"+ " if ("+vr+" == null) {\n"+ " removeOtherPropertyGroup("+context+".class);\n"+ " } else {\n"+ " addOtherPropertyGroup(a"+context+");\n"+ " }\n"+ " }"); out.println(); if (timephased) { out.println(" public PropertyGroupSchedule get"+context+"Schedule()"); out.println(" {"); out.println(" return searchForPropertyGroupSchedule("+context+ ".class);"); out.println(" }"); out.println(); out.println(" public void set"+context+"Schedule(PropertyGroupSchedule schedule) {\n"+ " removeOtherPropertyGroup("+context+".class);\n"+ " if (schedule != null) {\n"+ " addOtherPropertyGroupSchedule(schedule);\n"+ " }\n"+ " }"); out.println(); } } } out.println("}"); out.close(); } | 8708 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8708/9fadfb620dfbadc3fa0c7a899195b84a369fc304/PGWriter.java/buggy/build/src/org/cougaar/tools/build/PGWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
6672,
1832,
1216,
1860,
288,
1377,
514,
596,
529,
273,
315,
6672,
28070,
18,
6290,
14432,
1377,
309,
261,
6200,
84,
13,
288,
3639,
261,
2704,
1387,
12,
659,
529,
13,
2934,
3733,
5621,
3639,
327,
274,
1377,
289,
1377,
1198,
2932,
18835,
10494,
28070,
358,
11843,
15,
659,
529,
9078,
8530,
1769,
1377,
4721,
812,
12,
659,
529,
1769,
1377,
12942,
17615,
273,
394,
12942,
12,
2704,
1387,
12,
588,
2326,
1621,
9334,
659,
529,
10019,
1377,
24248,
1140,
91,
273,
394,
24248,
12,
5075,
1769,
1377,
14071,
596,
273,
394,
14071,
12,
538,
91,
1769,
1377,
1045,
5093,
12,
659,
1769,
5411,
596,
18,
8222,
2932,
26873,
4115,
10494,
10362,
12143,
4471,
8863,
1377,
596,
18,
8222,
2932,
380,
29704,
805,
1272,
23849,
16,
471,
3312,
1272,
8863,
1377,
596,
18,
8222,
2932,
380,
6035,
1199,
1769,
1377,
596,
18,
8222,
2932,
380,
657,
8140,
358,
506,
7021,
635,
2358,
18,
2894,
637,
69,
297,
18,
4308,
18,
412,
10903,
18,
1236,
81,
18,
9406,
18,
6672,
8863,
1377,
596,
18,
8222,
2932,
2826,
4898,
1769,
1377,
596,
18,
8222,
5621,
1377,
741,
4420,
5755,
12,
659,
10837,
6347,
8863,
1377,
596,
18,
8222,
2932,
5666,
2252,
18,
1594,
18,
21682,
4868,
1769,
1377,
596,
18,
8222,
2932,
5666,
2252,
18,
2196,
634,
18,
1396,
3187,
4868,
11272,
1377,
596,
18,
8222,
2932,
5666,
2252,
18,
2196,
634,
18,
15034,
1396,
3187,
4868,
11272,
1377,
596,
18,
8222,
5621,
1377,
514,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
6672,
1832,
1216,
1860,
288,
1377,
514,
596,
529,
273,
315,
6672,
28070,
18,
6290,
14432,
1377,
309,
261,
6200,
84,
13,
288,
3639,
261,
2704,
1387,
12,
659,
529,
13,
2934,
3733,
5621,
3639,
327,
274,
1377,
289,
1377,
1198,
2932,
18835,
10494,
28070,
358,
11843,
15,
659,
529,
9078,
8530,
1769,
1377,
4721,
812,
12,
659,
529,
1769,
1377,
12942,
17615,
273,
394,
12942,
12,
2704,
1387,
12,
588,
2326,
1621,
9334,
659,
529,
10019,
1377,
24248,
1140,
91,
273,
394,
24248,
12,
5075,
1769,
1377,
14071,
596,
273,
394,
14071,
12,
538,
91,
1769,
1377,
1045,
5093,
12,
659,
1769,
5411,
596,
18,
8222,
2932,
26873,
4115,
10494,
10362,
12143,
4471,
8863,
2
] |
keystore.load(is, getKeyPassword().toCharArray()); } catch (Exception e) { throw new InitialisationException(new Message(Messages.FAILED_LOAD_X, "KeyStore: " + getKeyStore()), e, this); } try { keyManagerFactory = KeyManagerFactory.getInstance(getKeyManagerAlgorithm()); keyManagerFactory.init(keystore, getStorePassword().toCharArray()); } catch (Exception e) { throw new InitialisationException(new Message(Messages.FAILED_LOAD_X, "Key Manager (" + getKeyManagerAlgorithm() + ")"), e, this); | try { keyManagerFactory = KeyManagerFactory.getInstance(getKeyManagerAlgorithm()); keyManagerFactory.init(keystore, getStorePassword().toCharArray()); } catch (Exception e) { throw new InitialisationException(new Message(Messages.FAILED_LOAD_X, "Key Manager (" + getKeyManagerAlgorithm() + ")"), e, this); } | public void doInitialise() throws InitialisationException { if (getProvider() == null) throw new NullPointerException("The security provider cannot be null"); if (getKeyStore() == null) throw new NullPointerException("The KeyStore location cannot be null"); if (getKeyPassword() == null) throw new NullPointerException("The Key password cannot be null"); if (getStorePassword() == null) throw new NullPointerException("The KeyStore password cannot be null"); if (getKeyManagerAlgorithm() == null) throw new NullPointerException("The Key Manager Algorithm cannot be null"); KeyStore keystore = null; try { Security.addProvider(getProvider()); // Create keyStore keystore = KeyStore.getInstance(keystoreType); InputStream is = Utility.loadResource(getKeyStore(), getClass()); if (is == null) { throw new FileNotFoundException("Failed to load keystore from classpath or local file: " + getKeyStore()); } keystore.load(is, getKeyPassword().toCharArray()); } catch (Exception e) { throw new InitialisationException(new Message(Messages.FAILED_LOAD_X, "KeyStore: " + getKeyStore()), e, this); } try { // Get key manager keyManagerFactory = KeyManagerFactory.getInstance(getKeyManagerAlgorithm()); // Initialize the KeyManagerFactory to work with our keyStore keyManagerFactory.init(keystore, getStorePassword().toCharArray()); } catch (Exception e) { throw new InitialisationException(new Message(Messages.FAILED_LOAD_X, "Key Manager (" + getKeyManagerAlgorithm() + ")"), e, this); } super.doInitialise(); if (protocolHandler != null) { System.setProperty("java.protocol.handler.pkgs", protocolHandler); } if (clientKeyStore != null) { try { String clientPath = Utility.getResourcePath(clientKeyStore, getClass()); System.setProperty("javax.net.ssl.keyStore", clientPath); System.setProperty("javax.net.ssl.keyStorePassword", clientKeyStorePassword); logger.info("Set Client Key store: javax.net.ssl.keyStore=" + clientPath); } catch (IOException e) { throw new InitialisationException(new Message(Messages.FAILED_LOAD_X, "Client KeyStore: " + clientKeyStore), e, this); } } if (trustStore != null) { System.setProperty("javax.net.ssl.trustStore", getTrustStore()); System.setProperty("javax.net.ssl.trustStorePassword", getTrustStorePassword()); logger.debug("Set Trust store: javax.net.ssl.trustStore=" + getTrustStore()); } else if (!isExplicitTrustStoreOnly()) { logger.info("Defaulting trust store to client Key Store"); trustStore = getClientKeyStore(); trustStorePassword = getClientKeyStorePassword(); System.setProperty("javax.net.ssl.trustStore", getTrustStore()); System.setProperty("javax.net.ssl.trustStorePassword", getTrustStorePassword()); logger.debug("Set Trust store: javax.net.ssl.trustStore=" + getTrustStore()); } } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/fb3304ee4a24de3c0e02ca3e16a743e869db7561/SslConnector.java/clean/providers/ssl/src/java/org/mule/providers/ssl/SslConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
4435,
784,
1435,
1216,
10188,
10742,
503,
565,
288,
3639,
309,
261,
588,
2249,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
4373,
2893,
2780,
506,
446,
8863,
3639,
309,
261,
588,
17250,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
17017,
2117,
2780,
506,
446,
8863,
3639,
309,
261,
588,
653,
3913,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
1929,
2201,
2780,
506,
446,
8863,
3639,
309,
261,
588,
2257,
3913,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
17017,
2201,
2780,
506,
446,
8863,
3639,
309,
261,
588,
653,
1318,
6801,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
1929,
8558,
15067,
2780,
506,
446,
8863,
3639,
17017,
16262,
273,
446,
31,
3639,
775,
288,
5411,
6036,
18,
1289,
2249,
12,
588,
2249,
10663,
5411,
368,
1788,
17901,
5411,
16262,
273,
17017,
18,
588,
1442,
12,
856,
2233,
559,
1769,
5411,
5037,
353,
273,
13134,
18,
945,
1420,
12,
588,
17250,
9334,
2900,
10663,
5411,
309,
261,
291,
422,
446,
13,
288,
7734,
604,
394,
13707,
2932,
2925,
358,
1262,
16262,
628,
10006,
578,
1191,
585,
30,
315,
13491,
397,
3579,
2257,
10663,
5411,
289,
5411,
16262,
18,
945,
12,
291,
16,
3579,
3913,
7675,
869,
15936,
10663,
3639,
289,
1044,
261,
503,
425,
13,
288,
5411,
604,
394,
10188,
10742,
503,
12,
2704,
2350,
12,
5058,
18,
11965,
67,
7783,
67,
60,
16,
315,
17250,
30,
315,
397,
3579,
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,
4435,
784,
1435,
1216,
10188,
10742,
503,
565,
288,
3639,
309,
261,
588,
2249,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
4373,
2893,
2780,
506,
446,
8863,
3639,
309,
261,
588,
17250,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
17017,
2117,
2780,
506,
446,
8863,
3639,
309,
261,
588,
653,
3913,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
1929,
2201,
2780,
506,
446,
8863,
3639,
309,
261,
588,
2257,
3913,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
17017,
2201,
2780,
506,
446,
8863,
3639,
309,
261,
588,
653,
1318,
6801,
1435,
422,
446,
13,
5411,
604,
394,
10108,
2932,
1986,
1929,
8558,
15067,
2
] |
IType paramType= project.findType(paramTypeName.toString()); IType varType= project.findType(varTypeName.toString()); | IType paramType= project.findType(getFQN(typePackage, typeName)); IType varType= project.findType(variable.getFQN()); | private boolean isAssignable(Variable variable, String typePackage, String typeName) throws JavaModelException { // check for an exact match (fast) StringBuffer paramTypeName= new StringBuffer(); if (typePackage.length() != 0) { paramTypeName.append(typePackage); paramTypeName.append('.'); } paramTypeName.append(typeName); StringBuffer varTypeName= new StringBuffer(); if (variable.typePackage.length() != 0) { varTypeName.append(variable.typePackage); varTypeName.append('.'); } varTypeName.append(variable.typeName); IJavaProject project= fCompilationUnit.getJavaProject(); IType paramType= project.findType(paramTypeName.toString()); IType varType= project.findType(varTypeName.toString()); if (varType == null || paramType == null) return false; ITypeHierarchy hierarchy= SuperTypeHierarchyCache.getTypeHierarchy(varType); return hierarchy.contains(paramType); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/a2e2d7a0ed3d6c4dc83ae2cbb9f301eeba047511/ParameterGuesser.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ParameterGuesser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
8540,
12,
3092,
2190,
16,
514,
618,
2261,
16,
514,
8173,
13,
1216,
5110,
1488,
503,
288,
9506,
202,
759,
866,
364,
392,
5565,
845,
261,
8076,
13,
202,
202,
780,
1892,
579,
7947,
33,
394,
6674,
5621,
202,
202,
430,
261,
723,
2261,
18,
2469,
1435,
480,
374,
13,
288,
1082,
202,
891,
7947,
18,
6923,
12,
723,
2261,
1769,
1082,
202,
891,
7947,
18,
6923,
2668,
1093,
1769,
202,
202,
97,
202,
202,
891,
7947,
18,
6923,
12,
723,
461,
1769,
202,
202,
780,
1892,
569,
7947,
33,
394,
6674,
5621,
202,
202,
430,
261,
6105,
18,
723,
2261,
18,
2469,
1435,
480,
374,
13,
288,
1082,
202,
1401,
7947,
18,
6923,
12,
6105,
18,
723,
2261,
1769,
1082,
202,
1401,
7947,
18,
6923,
2668,
1093,
1769,
202,
202,
97,
202,
202,
1401,
7947,
18,
6923,
12,
6105,
18,
723,
461,
1769,
9506,
202,
45,
5852,
4109,
1984,
33,
284,
19184,
2802,
18,
588,
5852,
4109,
5621,
202,
202,
45,
559,
20781,
33,
1984,
18,
4720,
559,
12,
891,
7947,
18,
10492,
10663,
202,
202,
45,
559,
569,
559,
33,
1984,
18,
4720,
559,
12,
1401,
7947,
18,
10492,
10663,
202,
202,
430,
261,
1401,
559,
422,
446,
747,
20781,
422,
446,
13,
1082,
202,
2463,
629,
31,
202,
202,
45,
559,
12074,
9360,
33,
14845,
559,
12074,
1649,
18,
588,
559,
12074,
12,
1401,
559,
1769,
202,
202,
2463,
9360,
18,
12298,
12,
891,
559,
1769,
202,
97,
2,
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,
1,
1,
1,
1,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
8540,
12,
3092,
2190,
16,
514,
618,
2261,
16,
514,
8173,
13,
1216,
5110,
1488,
503,
288,
9506,
202,
759,
866,
364,
392,
5565,
845,
261,
8076,
13,
202,
202,
780,
1892,
579,
7947,
33,
394,
6674,
5621,
202,
202,
430,
261,
723,
2261,
18,
2469,
1435,
480,
374,
13,
288,
1082,
202,
891,
7947,
18,
6923,
12,
723,
2261,
1769,
1082,
202,
891,
7947,
18,
6923,
2668,
1093,
1769,
202,
202,
97,
202,
202,
891,
7947,
18,
6923,
12,
723,
461,
1769,
202,
202,
780,
1892,
569,
7947,
33,
394,
6674,
5621,
202,
202,
430,
261,
6105,
18,
723,
2261,
18,
2469,
1435,
480,
374,
13,
288,
1082,
202,
1401,
7947,
18,
6923,
12,
2
] |
public static boolean getSVGFlag( HttpServletRequest request ) { boolean svg = false; if ( "true".equalsIgnoreCase( getParameter( request, PARAM_SVG ) ) ) //$NON-NLS-1$ { svg = true; } return svg; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/4f8d9ec70a9a4bdebe627870db17ed54ddb4e8ef/ParameterAccessor.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/utility/ParameterAccessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
1322,
9266,
4678,
12,
9984,
590,
262,
202,
95,
202,
202,
6494,
9804,
273,
629,
31,
9506,
202,
430,
261,
315,
3767,
9654,
14963,
5556,
12,
5575,
12,
590,
16,
4655,
67,
26531,
262,
262,
262,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
95,
1082,
202,
11451,
273,
638,
31,
202,
202,
97,
202,
202,
2463,
9804,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
1322,
9266,
4678,
12,
9984,
590,
262,
202,
95,
202,
202,
6494,
9804,
273,
629,
31,
9506,
202,
430,
261,
315,
3767,
9654,
14963,
5556,
12,
5575,
12,
590,
16,
4655,
67,
26531,
262,
262,
262,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
95,
1082,
202,
11451,
273,
638,
31,
202,
202,
97,
202,
202,
2463,
9804,
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
] | ||
Map<String, EventSetDescriptor> result = new HashMap<String, EventSetDescriptor>(); | Map<String, EventSetDescriptor> result = new HashMap<String, EventSetDescriptor>(); | public EventSetDescriptor[] getEventSetDescriptors() { if (eventSetDescriptors == null) { Map<String, EventSetDescriptor> result = new HashMap<String, EventSetDescriptor>(); List<Method> beanClassMethodsArrayList = getPublicMethods(beanClass); for (Method method : beanClassMethodsArrayList) { String methodName = method.getName(); String listenerCoreName = null; if (methodName.endsWith("Listener")) { //$NON-NLS-1$ listenerCoreName = methodName.substring(0, methodName .lastIndexOf("Listener")); //$NON-NLS-1$ if (methodName.startsWith("add")) { //$NON-NLS-1$ listenerCoreName = listenerCoreName.substring(3); } else if (methodName.startsWith("remove")) { //$NON-NLS-1$ listenerCoreName = listenerCoreName.substring(6); } else { continue; } if (result.get(listenerCoreName) == null) { Class<?>[] parameterTypes = method.getParameterTypes(); if (parameterTypes.length == 1) { Class<?> listenerType = parameterTypes[0]; // full and short names of classes String listenerTypeName = listenerType.getName(); // check if the listener name extracted from param // name and // listener name extracted from registration method // are the same int k = listenerTypeName.lastIndexOf('$'); String listenerNameFromParam; k = (k == -1 ? listenerTypeName.lastIndexOf('.') : k); listenerNameFromParam = listenerTypeName .substring(k + 1); //$NON-NLS-1$ String listenerNameFromMethod = listenerCoreName + "Listener"; //$NON-NLS-1$ if (!listenerNameFromParam .equals(listenerNameFromMethod)) { continue; } // FIXME valid only for events that have the same // package (and encapsulating type if any) // with listener String eventTypeName = listenerTypeName.substring( 0, k + 1) //$NON-NLS-1$ + listenerCoreName + "Event"; //$NON-NLS-1$ // classes generated from classes names Class<?> eventType = null; try { eventType = Class.forName(eventTypeName, true, beanClass.getClassLoader()); } catch (ClassNotFoundException cnfe) { System.out.println(Messages.getString( "beans.3A", eventTypeName)); //$NON-NLS-1$ } finally { if (eventType == null) { continue; } } Method[] methods = listenerType.getMethods(); Vector<Method> listenerMethodsVec = new Vector<Method>(); for (Method element : methods) { Class<?>[] listenerMethodParams = element .getParameterTypes(); if (listenerMethodParams.length == 1 && listenerMethodParams[0] == eventType) { listenerMethodsVec.add(element); } } Method[] listenerMethods = listenerMethodsVec.toArray( new Method[listenerMethodsVec.size()]); Method addListenerMethod = null; try { addListenerMethod = beanClass.getMethod( "add" + listenerCoreName //$NON-NLS-1$ + "Listener", //$NON-NLS-1$ new Class[] { listenerType }); } catch (NoSuchMethodException nsme) { // no adder found continue; } Method removeListenerMethod = null; try { removeListenerMethod = beanClass.getMethod( "remove" + listenerCoreName //$NON-NLS-1$ + "Listener", //$NON-NLS-1$ new Class[] { listenerType }); } catch (NoSuchMethodException nsme) { // no remover found continue; } Method getListenerMethod = null; try { getListenerMethod = beanClass.getMethod( "get" + listenerCoreName //$NON-NLS-1$ + "Listeners", //$NON-NLS-1$ new Class[] {}); } catch (NoSuchMethodException nsme) { // no action - getter is not a mandatory method // in event set descriptor pattern } try { listenerCoreName = Introspector .decapitalize(listenerCoreName); EventSetDescriptor esd = new EventSetDescriptor( listenerCoreName, listenerType, listenerMethods, addListenerMethod, removeListenerMethod, getListenerMethod); result.put(listenerCoreName, esd); } catch (IntrospectionException ie) { System.out.println(Messages.getString( "beans.39", listenerCoreName)); //$NON-NLS-1$ } } // if length of parameters list equals to 1 } // if no descriptors for given listener name yet } // if method name ends with Lister } // methods loop String[] eventSetDescriptorNames = result.keySet().toArray( new String[result.size()]); Arrays.sort(eventSetDescriptorNames); eventSetDescriptors = new EventSetDescriptor[eventSetDescriptorNames.length]; for (int j = 0; j < eventSetDescriptorNames.length; ++j) { eventSetDescriptors[j] = result.get(eventSetDescriptorNames[j]); } } return eventSetDescriptors; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/aaf17a681e792be3202c3c97b03608d3767d4a81/BeanInfoImpl.java/clean/modules/beans/src/main/java/java/beans/BeanInfoImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2587,
694,
3187,
8526,
9832,
694,
12705,
1435,
288,
3639,
309,
261,
2575,
694,
12705,
422,
446,
13,
288,
5411,
1635,
32,
780,
16,
2587,
694,
3187,
34,
563,
273,
394,
4317,
32,
780,
16,
2587,
694,
3187,
34,
5621,
5411,
987,
32,
1305,
34,
22066,
4712,
19558,
273,
17426,
4712,
12,
14496,
797,
1769,
5411,
364,
261,
1305,
707,
294,
22066,
4712,
19558,
13,
288,
7734,
514,
4918,
273,
707,
18,
17994,
5621,
7734,
514,
2991,
4670,
461,
273,
446,
31,
7734,
309,
261,
2039,
461,
18,
5839,
1190,
2932,
2223,
6,
3719,
288,
4329,
3993,
17,
5106,
17,
21,
8,
10792,
2991,
4670,
461,
273,
4918,
18,
28023,
12,
20,
16,
4918,
18701,
263,
2722,
31985,
2932,
2223,
7923,
1769,
4329,
3993,
17,
5106,
17,
21,
8,
10792,
309,
261,
2039,
461,
18,
17514,
1190,
2932,
1289,
6,
3719,
288,
4329,
3993,
17,
5106,
17,
21,
8,
13491,
2991,
4670,
461,
273,
2991,
4670,
461,
18,
28023,
12,
23,
1769,
10792,
289,
469,
309,
261,
2039,
461,
18,
17514,
1190,
2932,
4479,
6,
3719,
288,
4329,
3993,
17,
5106,
17,
21,
8,
13491,
2991,
4670,
461,
273,
2991,
4670,
461,
18,
28023,
12,
26,
1769,
10792,
289,
469,
288,
13491,
1324,
31,
10792,
289,
10792,
309,
261,
2088,
18,
588,
12,
12757,
4670,
461,
13,
422,
446,
13,
288,
13491,
1659,
12880,
34,
8526,
20173,
273,
707,
18,
588,
1662,
2016,
5621,
13491,
309,
261,
6775,
2016,
18,
2469,
422,
404,
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,
377,
1071,
2587,
694,
3187,
8526,
9832,
694,
12705,
1435,
288,
3639,
309,
261,
2575,
694,
12705,
422,
446,
13,
288,
5411,
1635,
32,
780,
16,
2587,
694,
3187,
34,
563,
273,
394,
4317,
32,
780,
16,
2587,
694,
3187,
34,
5621,
5411,
987,
32,
1305,
34,
22066,
4712,
19558,
273,
17426,
4712,
12,
14496,
797,
1769,
5411,
364,
261,
1305,
707,
294,
22066,
4712,
19558,
13,
288,
7734,
514,
4918,
273,
707,
18,
17994,
5621,
7734,
514,
2991,
4670,
461,
273,
446,
31,
7734,
309,
261,
2039,
461,
18,
5839,
1190,
2932,
2223,
6,
3719,
288,
4329,
3993,
17,
5106,
17,
21,
8,
10792,
2991,
4670,
461,
273,
4918,
18,
28023,
12,
20,
16,
4918,
18701,
263,
2722,
2
] |
cdiTarget.setLocationBreakpoint(0, location, cond, false); | cdiTarget.setFunctionBreakpoint(0, location, cond, false); | public void testCondBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException { boolean caught = false; session = CDebugHelper.createSession("main", testProject); assertNotNull(session); ICDITarget[] targets = session.getTargets(); assertNotNull(targets); assertTrue(targets.length > 0); ICDITarget cdiTarget = targets[0]; assertNotNull(cdiTarget); /*********************************************************************** * Create a break point on a generic function with an empty condition **********************************************************************/ ICDICondition cond = cdiTarget.createCondition(0, ""); ICDILocation location = cdiTarget.createLocation(null, "func1", 0); assertNotNull(location); cdiTarget.setLocationBreakpoint(0, location, cond, false); /*********************************************************************** * Create a break point on a generic function with an valid condition **********************************************************************/ cond = cdiTarget.createCondition(0, "x<10"); location = cdiTarget.createLocation(null, "func1", 0); assertNotNull(location); cdiTarget.setLocationBreakpoint(0, location, cond, false); /*********************************************************************** * Create a break point on a generic function with an invalid condition * We expect to get a CDIException when we try to set the breakpoint. **********************************************************************/ cond = cdiTarget.createCondition(0, "nonexist<10"); location = cdiTarget.createLocation(null, "func1", 0); assertNotNull(location); try { cdiTarget.setLocationBreakpoint(0, location, cond, false); } catch (CDIException e) { caught = true; } assertTrue(caught); /*********************************************************************** * Create a break point on a line number with a condition and make sure * it does not suspend execution of the application until the condition * is true **********************************************************************/ cdiTarget.deleteAllBreakpoints(); location = cdiTarget.createLocation(null, null, 23); assertNotNull(location); cond = cdiTarget.createCondition(0, "a>10"); cdiTarget.setLocationBreakpoint(0, location, cond, false); targets = session.getTargets(); /* * We better only have one target connected to this session or something * is not right... */ assertTrue(targets.length == 1); /* * Resume the target, this should cause it to run till it hits the * breakpoint */ targets[0].resume(); /** * Give the process up to 10 seconds to become either terminated or * suspended. It sould hit the breakponint almost immediatly so we * should only sleep for max 100 ms */ for (int x = 0; x < 100; x++) { if (targets[0].isSuspended() || targets[0].isTerminated()) break; Thread.sleep(100); } assertTrue("Suspended: " + targets[0].isSuspended() + " Termiunated: " + targets[0].isTerminated(), targets[0] .isSuspended()); ICDIStackFrame frame = targets[0].getCurrentThread().getStackFrames()[0]; location = frame.getLocation(); assertTrue(location.getLineNumber() == 23); assertTrue(location.getFunction().equals("main")); assertTrue(location.getFile().equals("main.c")); /* Get the value of a and and make sure it is 11 */ assertTrue(targets[0].evaluateExpressionToString(frame, "a"), targets[0].evaluateExpressionToString(frame, "a").equals("11")); /* clean up the session */ session.terminate(); session = null; targets = null; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/277bec9a0dc83467b896459505fd47fe3953b942/BreakpointTests.java/buggy/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
12441,
7634,
1435,
1216,
30015,
16,
20806,
503,
16,
1860,
16,
385,
2565,
503,
16,
7558,
288,
202,
202,
6494,
13537,
273,
629,
31,
202,
202,
3184,
273,
385,
2829,
2276,
18,
2640,
2157,
2932,
5254,
3113,
1842,
4109,
1769,
202,
202,
11231,
5962,
12,
3184,
1769,
202,
202,
2871,
40,
1285,
826,
8526,
5774,
273,
1339,
18,
588,
9432,
5621,
202,
202,
11231,
5962,
12,
11358,
1769,
202,
202,
11231,
5510,
12,
11358,
18,
2469,
405,
374,
1769,
202,
202,
2871,
40,
1285,
826,
276,
3211,
2326,
273,
5774,
63,
20,
15533,
202,
202,
11231,
5962,
12,
71,
3211,
2326,
1769,
202,
202,
19,
11125,
27243,
1082,
380,
1788,
279,
898,
1634,
603,
279,
5210,
445,
598,
392,
1008,
2269,
1082,
19756,
1007,
5549,
202,
202,
2871,
2565,
3418,
6941,
273,
276,
3211,
2326,
18,
2640,
3418,
12,
20,
16,
1408,
1769,
202,
202,
2871,
2565,
2735,
2117,
273,
276,
3211,
2326,
18,
2640,
2735,
12,
2011,
16,
315,
644,
21,
3113,
374,
1769,
202,
202,
11231,
5962,
12,
3562,
1769,
202,
202,
71,
3211,
2326,
18,
542,
2735,
20552,
12,
20,
16,
2117,
16,
6941,
16,
629,
1769,
202,
202,
19,
11125,
27243,
1082,
380,
1788,
279,
898,
1634,
603,
279,
5210,
445,
598,
392,
923,
2269,
1082,
19756,
1007,
5549,
202,
202,
10013,
273,
276,
3211,
2326,
18,
2640,
3418,
12,
20,
16,
315,
92,
32,
2163,
8863,
202,
202,
3562,
273,
276,
3211,
2326,
18,
2640,
2735,
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,
225,
202,
482,
918,
1842,
12441,
7634,
1435,
1216,
30015,
16,
20806,
503,
16,
1860,
16,
385,
2565,
503,
16,
7558,
288,
202,
202,
6494,
13537,
273,
629,
31,
202,
202,
3184,
273,
385,
2829,
2276,
18,
2640,
2157,
2932,
5254,
3113,
1842,
4109,
1769,
202,
202,
11231,
5962,
12,
3184,
1769,
202,
202,
2871,
40,
1285,
826,
8526,
5774,
273,
1339,
18,
588,
9432,
5621,
202,
202,
11231,
5962,
12,
11358,
1769,
202,
202,
11231,
5510,
12,
11358,
18,
2469,
405,
374,
1769,
202,
202,
2871,
40,
1285,
826,
276,
3211,
2326,
273,
5774,
63,
20,
15533,
202,
202,
11231,
5962,
12,
71,
3211,
2326,
1769,
202,
202,
19,
11125,
27243,
1082,
380,
1788,
279,
898,
1634,
603,
2
] |
throws MARSHAL, InvalidName, CannotProceed, NotFound | throws MARSHAL, InvalidName, CannotProceed, NotFound | protected void throw4(InputStream in, String id) throws MARSHAL, InvalidName, CannotProceed, NotFound { if (id.equals(NotFoundHelper.id())) throw NotFoundHelper.read(in); else if (id.equals(CannotProceedHelper.id())) throw CannotProceedHelper.read(in); else if (id.equals(InvalidNameHelper.id())) throw InvalidNameHelper.read(in); else throw new MARSHAL(id); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/389a8c811e91dbf626693fbb413506535b9ebd2e/_NamingContextStub.java/buggy/core/src/classpath/org/org/omg/CosNaming/_NamingContextStub.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
604,
24,
12,
4348,
316,
16,
514,
612,
13,
9079,
1216,
490,
985,
2664,
1013,
16,
1962,
461,
16,
14143,
626,
5288,
16,
8227,
7054,
225,
288,
565,
309,
261,
350,
18,
14963,
12,
2768,
2276,
18,
350,
1435,
3719,
1377,
604,
7054,
2276,
18,
896,
12,
267,
1769,
565,
469,
309,
261,
350,
18,
14963,
12,
4515,
626,
5288,
2276,
18,
350,
1435,
3719,
1377,
604,
14143,
626,
5288,
2276,
18,
896,
12,
267,
1769,
565,
469,
309,
261,
350,
18,
14963,
12,
1941,
461,
2276,
18,
350,
1435,
3719,
1377,
604,
1962,
461,
2276,
18,
896,
12,
267,
1769,
565,
469,
1377,
604,
394,
490,
985,
2664,
1013,
12,
350,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
604,
24,
12,
4348,
316,
16,
514,
612,
13,
9079,
1216,
490,
985,
2664,
1013,
16,
1962,
461,
16,
14143,
626,
5288,
16,
8227,
7054,
225,
288,
565,
309,
261,
350,
18,
14963,
12,
2768,
2276,
18,
350,
1435,
3719,
1377,
604,
7054,
2276,
18,
896,
12,
267,
1769,
565,
469,
309,
261,
350,
18,
14963,
12,
4515,
626,
5288,
2276,
18,
350,
1435,
3719,
1377,
604,
14143,
626,
5288,
2276,
18,
896,
12,
267,
1769,
565,
469,
309,
261,
350,
18,
14963,
12,
1941,
461,
2276,
18,
350,
1435,
3719,
1377,
604,
1962,
461,
2276,
18,
896,
12,
267,
1769,
565,
469,
1377,
604,
394,
490,
985,
2664,
1013,
12,
350,
1769,
225,
289,
2,
-100
] |
SourceInfo(String source, DebuggableScript[] functions, String normilizedUrl) { | private SourceInfo(String source, DebuggableScript[] functions, String normilizedUrl) { | SourceInfo(String source, DebuggableScript[] functions, String normilizedUrl) { this.source = source; this.url = normilizedUrl; int N = functions.length; int[][] lineArrays = new int[N][]; for (int i = 0; i != N; ++i) { lineArrays[i] = functions[i].getLineNumbers(); } int minAll = 0, maxAll = -1; int[] firstLines = new int[N]; for (int i = 0; i != N; ++i) { int[] lines = lineArrays[i]; if (lines == null || lines.length == 0) { firstLines[i] = -1; } else { int min, max; min = max = lines[0]; for (int j = 1; j != lines.length; ++j) { int line = lines[j]; if (line < min) { min = line; } else if (line > max) { max = line; } } firstLines[i] = min; if (minAll > maxAll) { minAll = min; maxAll = max; } else { if (min < minAll) { minAll = min; } if (max > maxAll) { maxAll = max; } } } } if (minAll > maxAll) { // No line information this.minLine = -1; this.breakableLines = EMPTY_BOOLEAN_ARRAY; this.breakpoints = EMPTY_BOOLEAN_ARRAY; } else { if (minAll < 0) { // Line numbers can not be negative throw new IllegalStateException(String.valueOf(minAll)); } this.minLine = minAll; int linesTop = maxAll + 1; this.breakableLines = new boolean[linesTop]; this.breakpoints = new boolean[linesTop]; for (int i = 0; i != N; ++i) { int[] lines = lineArrays[i]; if (lines != null && lines.length != 0) { for (int j = 0; j != lines.length; ++j) { int line = lines[j]; this.breakableLines[line] = true; } } } } this.functionSources = new FunctionSource[N]; for (int i = 0; i != N; ++i) { String name = functions[i].getFunctionName(); if (name == null) { name = ""; } this.functionSources[i] = new FunctionSource(this, firstLines[i], name); } } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/2d4fc75b74d717c754829dde488ff0a7456682cc/Dim.java/clean/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Dim.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4998,
966,
12,
780,
1084,
16,
4015,
8455,
3651,
8526,
4186,
16,
10402,
514,
4651,
330,
1235,
1489,
13,
3639,
288,
5411,
333,
18,
3168,
273,
1084,
31,
5411,
333,
18,
718,
273,
4651,
330,
1235,
1489,
31,
5411,
509,
423,
273,
4186,
18,
2469,
31,
5411,
509,
63,
6362,
65,
980,
12726,
273,
394,
509,
63,
50,
6362,
15533,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
480,
423,
31,
965,
77,
13,
288,
7734,
980,
12726,
63,
77,
65,
273,
4186,
63,
77,
8009,
588,
1670,
10072,
5621,
5411,
289,
5411,
509,
1131,
1595,
273,
374,
16,
943,
1595,
273,
300,
21,
31,
5411,
509,
8526,
1122,
5763,
273,
394,
509,
63,
50,
15533,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
480,
423,
31,
965,
77,
13,
288,
7734,
509,
8526,
2362,
273,
980,
12726,
63,
77,
15533,
7734,
309,
261,
3548,
422,
446,
747,
2362,
18,
2469,
422,
374,
13,
288,
10792,
1122,
5763,
63,
77,
65,
273,
300,
21,
31,
7734,
289,
469,
288,
10792,
509,
1131,
16,
943,
31,
10792,
1131,
273,
943,
273,
2362,
63,
20,
15533,
10792,
364,
261,
474,
525,
273,
404,
31,
525,
480,
2362,
18,
2469,
31,
965,
78,
13,
288,
13491,
509,
980,
273,
2362,
63,
78,
15533,
13491,
309,
261,
1369,
411,
1131,
13,
288,
18701,
1131,
273,
980,
31,
13491,
289,
469,
309,
261,
1369,
405,
943,
13,
288,
18701,
943,
273,
980,
31,
13491,
289,
10792,
289,
10792,
1122,
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,
4998,
966,
12,
780,
1084,
16,
4015,
8455,
3651,
8526,
4186,
16,
10402,
514,
4651,
330,
1235,
1489,
13,
3639,
288,
5411,
333,
18,
3168,
273,
1084,
31,
5411,
333,
18,
718,
273,
4651,
330,
1235,
1489,
31,
5411,
509,
423,
273,
4186,
18,
2469,
31,
5411,
509,
63,
6362,
65,
980,
12726,
273,
394,
509,
63,
50,
6362,
15533,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
480,
423,
31,
965,
77,
13,
288,
7734,
980,
12726,
63,
77,
65,
273,
4186,
63,
77,
8009,
588,
1670,
10072,
5621,
5411,
289,
5411,
509,
1131,
1595,
273,
374,
16,
943,
1595,
273,
300,
21,
31,
5411,
509,
8526,
1122,
5763,
273,
394,
509,
63,
50,
15533,
5411,
2
] |
String path = ome.io.nio.Helper.getFilesPath(new Long(999999999)); | String path = new PixelsService("/OME/OMEIS/").getFilesPath(new Long(999999999)); | public void testFilesThreeDirectoryUpperBoundsPath() { String path = ome.io.nio.Helper.getFilesPath(new Long(999999999)); assertEquals("/OME/OMEIS/Files/Dir-999/Dir-999/999999999", path); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ae0b01fad17fcacba3ec0999ca1ad645f389b5f9/HelperUnitTest.java/clean/components/omeio-nio/test/ome/io/nio/utests/HelperUnitTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2697,
28019,
2853,
5988,
5694,
743,
1435,
565,
288,
3639,
514,
589,
273,
394,
26070,
87,
1179,
2932,
19,
51,
958,
19,
51,
958,
5127,
4898,
2934,
588,
2697,
743,
12,
2704,
3407,
12,
7991,
31463,
10019,
3639,
1815,
8867,
2932,
19,
51,
958,
19,
51,
958,
5127,
19,
2697,
19,
1621,
17,
11984,
19,
1621,
17,
11984,
19,
7991,
31463,
3113,
589,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2697,
28019,
2853,
5988,
5694,
743,
1435,
565,
288,
3639,
514,
589,
273,
394,
26070,
87,
1179,
2932,
19,
51,
958,
19,
51,
958,
5127,
4898,
2934,
588,
2697,
743,
12,
2704,
3407,
12,
7991,
31463,
10019,
3639,
1815,
8867,
2932,
19,
51,
958,
19,
51,
958,
5127,
19,
2697,
19,
1621,
17,
11984,
19,
1621,
17,
11984,
19,
7991,
31463,
3113,
589,
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
] |
assertValidDay("tu"); | public void testIncorrectDayValues() throws Exception { String exceptionMessagePattern = "invalid format for day \\(use su,mo,tu,we,th,fr,sa\\): "; settings.setString(sessionID, Session.SETTING_START_DAY, "xx"); createSessionAndAssertConfigError("no exception", exceptionMessagePattern + "'xx'"); setUpDefaultSettings(); settings.setString(sessionID, Session.SETTING_END_DAY, "yy"); createSessionAndAssertConfigError("no exception", exceptionMessagePattern + "'yy'"); setUpDefaultSettings(); settings.setString(sessionID, Session.SETTING_START_DAY, "mo"); createSessionAndAssertConfigError("no exception", "StartDay used without EndDay"); setUpDefaultSettings(); settings.setString(sessionID, Session.SETTING_END_DAY, "mo"); createSessionAndAssertConfigError("no exception", "EndDay used without StartDay"); assertValidDay("mon"); assertValidDay("mond"); assertValidDay("monda"); assertValidDay("monday"); assertValidDay("tu"); assertValidDay("tuesday"); assertValidDay("we"); assertValidDay("wednes"); assertValidDay("th"); assertValidDay("thurs"); assertValidDay("fr"); assertValidDay("frid"); assertValidDay("sa"); assertValidDay("satur"); assertValidDay("su"); assertValidDay("sun"); } | 6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/c64396012cd88b23ea34709abc864ee2b49ed867/DefaultSessionFactoryTest.java/buggy/test/quickfix/DefaultSessionFactoryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
16268,
4245,
1972,
1435,
1216,
1185,
288,
3639,
514,
1520,
1079,
3234,
273,
315,
5387,
740,
364,
2548,
1736,
12,
1202,
1597,
16,
8683,
16,
88,
89,
16,
1814,
16,
451,
16,
4840,
16,
13098,
1695,
4672,
13636,
3639,
1947,
18,
542,
780,
12,
17255,
16,
3877,
18,
1090,
12239,
67,
7570,
67,
10339,
16,
315,
5279,
8863,
3639,
752,
2157,
1876,
8213,
809,
668,
2932,
2135,
1520,
3113,
1520,
1079,
3234,
397,
2491,
5279,
4970,
1769,
3639,
24292,
1868,
2628,
5621,
3639,
1947,
18,
542,
780,
12,
17255,
16,
3877,
18,
1090,
12239,
67,
4415,
67,
10339,
16,
315,
6795,
8863,
3639,
752,
2157,
1876,
8213,
809,
668,
2932,
2135,
1520,
3113,
1520,
1079,
3234,
397,
2491,
6795,
4970,
1769,
3639,
24292,
1868,
2628,
5621,
3639,
1947,
18,
542,
780,
12,
17255,
16,
3877,
18,
1090,
12239,
67,
7570,
67,
10339,
16,
315,
8683,
8863,
3639,
752,
2157,
1876,
8213,
809,
668,
2932,
2135,
1520,
3113,
315,
1685,
4245,
1399,
2887,
4403,
4245,
8863,
3639,
24292,
1868,
2628,
5621,
3639,
1947,
18,
542,
780,
12,
17255,
16,
3877,
18,
1090,
12239,
67,
4415,
67,
10339,
16,
315,
8683,
8863,
3639,
752,
2157,
1876,
8213,
809,
668,
2932,
2135,
1520,
3113,
315,
1638,
4245,
1399,
2887,
3603,
4245,
8863,
3639,
1815,
1556,
4245,
2932,
2586,
8863,
3639,
1815,
1556,
4245,
2932,
81,
1434,
8863,
3639,
1815,
1556,
4245,
2932,
81,
1434,
69,
8863,
3639,
1815,
1556,
4245,
2932,
81,
28612,
8863,
9079,
1815,
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,
16268,
4245,
1972,
1435,
1216,
1185,
288,
3639,
514,
1520,
1079,
3234,
273,
315,
5387,
740,
364,
2548,
1736,
12,
1202,
1597,
16,
8683,
16,
88,
89,
16,
1814,
16,
451,
16,
4840,
16,
13098,
1695,
4672,
13636,
3639,
1947,
18,
542,
780,
12,
17255,
16,
3877,
18,
1090,
12239,
67,
7570,
67,
10339,
16,
315,
5279,
8863,
3639,
752,
2157,
1876,
8213,
809,
668,
2932,
2135,
1520,
3113,
1520,
1079,
3234,
397,
2491,
5279,
4970,
1769,
3639,
24292,
1868,
2628,
5621,
3639,
1947,
18,
542,
780,
12,
17255,
16,
3877,
18,
1090,
12239,
67,
4415,
67,
10339,
16,
315,
6795,
8863,
3639,
752,
2157,
1876,
8213,
809,
668,
2932,
2135,
1520,
3113,
1520,
1079,
2
] | |
send(createAttackPacket(game.getActionsVector(), false)); send(createAttackPacket(game.getChargesVector(), true)); | send(connId, createAttackPacket(game.getActionsVector(), false)); send(connId, createAttackPacket(game.getChargesVector(), true)); | private void sendCurrentInfo(int connId) { //why are these two outside the player != null check below? transmitAllPlayerConnects(connId); send(connId, createGameSettingsPacket()); Player player = game.getPlayer(connId); if ( null != player ) { send(connId, new Packet(Packet.COMMAND_SENDING_MINEFIELDS, player.getMinefields())); switch (game.getPhase()) { case Game.PHASE_LOUNGE : send(connId, createMapSettingsPacket()); // Send Entities *after* the Lounge Phase Change send(connId, new Packet(Packet.COMMAND_PHASE_CHANGE, new Integer(game.getPhase()))); if (doBlind()) { send(connId, createFilteredFullEntitiesPacket(player)); } else { send(connId, createFullEntitiesPacket()); } break; default : send(connId, createReportPacket()); // Send Entites *before* other phase changes. if (doBlind()) { send(connId, createFilteredFullEntitiesPacket(player)); } else { send(connId, createFullEntitiesPacket()); } player.setDone( game.getEntitiesOwnedBy(player) <= 0 ); send(connId, createBoardPacket()); send(connId, new Packet(Packet.COMMAND_PHASE_CHANGE, new Integer(game.getPhase()))); break; } if (game.getPhase() == Game.PHASE_FIRING || game.getPhase() == Game.PHASE_TARGETING || game.getPhase() == Game.PHASE_OFFBOARD || game.getPhase() == Game.PHASE_PHYSICAL) { // can't go above, need board to have been sent send(createAttackPacket(game.getActionsVector(), false)); send(createAttackPacket(game.getChargesVector(), true)); } if (game.phaseHasTurns(game.getPhase())) { send(connId, createTurnVectorPacket()); send(connId, createTurnIndexPacket()); } } // Found the player. } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/d2e6a8a5c4b05d8dbf2b07e2aa7186f3391bfd94/Server.java/buggy/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1366,
3935,
966,
12,
474,
1487,
548,
13,
288,
3639,
368,
3350,
93,
854,
4259,
2795,
8220,
326,
7291,
480,
446,
866,
5712,
35,
3639,
23323,
1595,
12148,
21500,
12,
4646,
548,
1769,
3639,
1366,
12,
4646,
548,
16,
752,
12496,
2628,
6667,
10663,
3639,
19185,
7291,
273,
7920,
18,
588,
12148,
12,
4646,
548,
1769,
3639,
309,
261,
446,
480,
7291,
262,
288,
5411,
1366,
12,
4646,
548,
16,
394,
11114,
12,
6667,
18,
19104,
67,
21675,
1360,
67,
49,
3740,
12683,
16,
4766,
565,
7291,
18,
588,
49,
558,
2821,
1435,
10019,
5411,
1620,
261,
13957,
18,
588,
11406,
10756,
288,
5411,
648,
14121,
18,
8939,
4429,
67,
1502,
2124,
7113,
294,
7734,
1366,
12,
4646,
548,
16,
752,
863,
2628,
6667,
10663,
7734,
368,
2479,
16216,
380,
5205,
14,
326,
511,
465,
908,
19459,
7576,
7734,
1366,
12,
4646,
548,
16,
394,
11114,
12,
6667,
18,
19104,
67,
8939,
4429,
67,
14473,
16,
4766,
3639,
394,
2144,
12,
13957,
18,
588,
11406,
1435,
3719,
1769,
7734,
309,
261,
2896,
4802,
728,
10756,
288,
10792,
1366,
12,
4646,
548,
16,
752,
14478,
5080,
8108,
6667,
12,
14872,
10019,
7734,
289,
7734,
469,
288,
10792,
1366,
12,
4646,
548,
16,
752,
5080,
8108,
6667,
10663,
7734,
289,
7734,
898,
31,
5411,
805,
294,
7734,
1366,
12,
4646,
548,
16,
752,
4820,
6667,
10663,
7734,
368,
2479,
512,
496,
2997,
380,
5771,
14,
1308,
6855,
3478,
18,
7734,
309,
261,
2896,
4802,
728,
10756,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
3935,
966,
12,
474,
1487,
548,
13,
288,
3639,
368,
3350,
93,
854,
4259,
2795,
8220,
326,
7291,
480,
446,
866,
5712,
35,
3639,
23323,
1595,
12148,
21500,
12,
4646,
548,
1769,
3639,
1366,
12,
4646,
548,
16,
752,
12496,
2628,
6667,
10663,
3639,
19185,
7291,
273,
7920,
18,
588,
12148,
12,
4646,
548,
1769,
3639,
309,
261,
446,
480,
7291,
262,
288,
5411,
1366,
12,
4646,
548,
16,
394,
11114,
12,
6667,
18,
19104,
67,
21675,
1360,
67,
49,
3740,
12683,
16,
4766,
565,
7291,
18,
588,
49,
558,
2821,
1435,
10019,
5411,
1620,
261,
13957,
18,
588,
11406,
10756,
288,
5411,
648,
14121,
18,
8939,
4429,
67,
1502,
2124,
7113,
294,
7734,
1366,
2
] |
/* * create a new instance of the engine */ this.velocityEngine = new VelocityEngine(); /* * configure the engine. In this case, we are using ourselves as a * logger (see logging examples..) */ this.velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, this); /* * initialize the engine */ String userHomeWOLipsPath = System.getProperty("user.home") + File.separator + "Library" + File.separator + "WOLips"; URL url = null; url = Platform.resolve(TemplateEnginePlugin.baseURL()); String templatePaths = userHomeWOLipsPath + ", "; Path path = new Path(url.getPath()); templatePaths = templatePaths + path.append("templates").toOSString(); this.velocityEngine.setProperty("file.resource.loader.path", templatePaths); this.velocityEngine.init(); this.context = new VelocityContext(); this.templates = new ArrayList(); this.wolipsContext = new WOLipsContext(); this.setPropertyForKey(this.wolipsContext, WOLipsContext.Key); SAXBuilder builder; Document myContext = null; try { builder = new SAXBuilder(); myContext = builder.build(userHomeWOLipsPath + File.separator + "MyContext.xml"); } catch (Exception ee) { builder = null; myContext = null; } if (myContext != null) { this.setPropertyForKey(myContext, "MyContext"); } } | /* * create a new instance of the engine */ this.velocityEngine = new VelocityEngine(); /* * configure the engine. In this case, we are using ourselves as a * logger (see logging examples..) */ this.velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, this); /* * initialize the engine */ String userHomeWOLipsPath = System.getProperty("user.home") + File.separator + "Library" + File.separator + "WOLips"; URL url = null; url = Platform.resolve(TemplateEnginePlugin.baseURL()); String templatePaths = userHomeWOLipsPath + ", "; Path path = new Path(url.getPath()); templatePaths = templatePaths + path.append("templates").toOSString(); this.velocityEngine.setProperty("file.resource.loader.path", templatePaths); this.velocityEngine.init(); this.context = new VelocityContext(); this.templates = new ArrayList(); this.wolipsContext = new WOLipsContext(); this.setPropertyForKey(this.wolipsContext, WOLipsContext.Key); SAXBuilder builder; Document myContext = null; try { builder = new SAXBuilder(); myContext = builder.build(userHomeWOLipsPath + File.separator + "MyContext.xml"); } catch (Exception ee) { builder = null; myContext = null; } if (myContext != null) { this.setPropertyForKey(myContext, "MyContext"); } } | public void init() throws Exception { /* * create a new instance of the engine */ this.velocityEngine = new VelocityEngine(); /* * configure the engine. In this case, we are using ourselves as a * logger (see logging examples..) */ this.velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, this); /* * initialize the engine */ String userHomeWOLipsPath = System.getProperty("user.home") + File.separator + "Library" + File.separator + "WOLips"; URL url = null; url = Platform.resolve(TemplateEnginePlugin.baseURL()); String templatePaths = userHomeWOLipsPath + ", "; Path path = new Path(url.getPath()); templatePaths = templatePaths + path.append("templates").toOSString(); this.velocityEngine.setProperty("file.resource.loader.path", templatePaths); this.velocityEngine.init(); this.context = new VelocityContext(); this.templates = new ArrayList(); this.wolipsContext = new WOLipsContext(); this.setPropertyForKey(this.wolipsContext, WOLipsContext.Key); SAXBuilder builder; Document myContext = null; try { builder = new SAXBuilder(); myContext = builder.build(userHomeWOLipsPath + File.separator + "MyContext.xml"); } catch (Exception ee) { //We can ignore this exception, it`s thrown if the xml document is // not found. //Per default there is no such file builder = null; myContext = null; } if (myContext != null) { this.setPropertyForKey(myContext, "MyContext"); } } | 2575 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2575/0e8ef941f88bcab3370bfc93fb7a76df27c71bd2/TemplateEngine.java/buggy/projects/wolips/plugins/org.objectstyle.wolips.templateengine/java/org/objectstyle/wolips/templateengine/TemplateEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
1435,
1216,
1185,
288,
202,
202,
20308,
1082,
380,
752,
279,
394,
791,
434,
326,
4073,
1082,
1195,
202,
202,
2211,
18,
29418,
560,
4410,
273,
394,
24561,
4410,
5621,
202,
202,
20308,
1082,
380,
5068,
326,
4073,
18,
657,
333,
648,
16,
732,
854,
1450,
19801,
487,
279,
1082,
380,
1194,
261,
5946,
2907,
10991,
838,
13,
1082,
1195,
202,
202,
2211,
18,
29418,
560,
4410,
18,
542,
1396,
12,
5576,
2918,
18,
54,
25375,
67,
4842,
67,
4842,
14318,
16,
9506,
202,
2211,
1769,
202,
202,
20308,
1082,
380,
4046,
326,
4073,
1082,
1195,
202,
202,
780,
729,
8684,
59,
1741,
7146,
743,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
8712,
7923,
9506,
202,
15,
1387,
18,
11287,
397,
315,
9313,
6,
397,
1387,
18,
11287,
397,
315,
59,
1741,
7146,
14432,
202,
202,
1785,
880,
273,
446,
31,
202,
202,
718,
273,
11810,
18,
10828,
12,
2283,
4410,
3773,
18,
1969,
1785,
10663,
202,
202,
780,
1542,
4466,
273,
729,
8684,
59,
1741,
7146,
743,
397,
3104,
13636,
202,
202,
743,
589,
273,
394,
2666,
12,
718,
18,
588,
743,
10663,
202,
202,
3202,
4466,
273,
1542,
4466,
397,
589,
18,
6923,
2932,
8502,
20387,
869,
4618,
780,
5621,
202,
202,
2211,
18,
29418,
560,
4410,
18,
542,
1396,
2932,
768,
18,
3146,
18,
6714,
18,
803,
3113,
9506,
202,
3202,
4466,
1769,
202,
202,
2211,
18,
29418,
560,
4410,
18,
2738,
5621,
202,
202,
2211,
18,
2472,
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,
1208,
1435,
1216,
1185,
288,
202,
202,
20308,
1082,
380,
752,
279,
394,
791,
434,
326,
4073,
1082,
1195,
202,
202,
2211,
18,
29418,
560,
4410,
273,
394,
24561,
4410,
5621,
202,
202,
20308,
1082,
380,
5068,
326,
4073,
18,
657,
333,
648,
16,
732,
854,
1450,
19801,
487,
279,
1082,
380,
1194,
261,
5946,
2907,
10991,
838,
13,
1082,
1195,
202,
202,
2211,
18,
29418,
560,
4410,
18,
542,
1396,
12,
5576,
2918,
18,
54,
25375,
67,
4842,
67,
4842,
14318,
16,
9506,
202,
2211,
1769,
202,
202,
20308,
1082,
380,
4046,
326,
4073,
1082,
1195,
202,
202,
780,
729,
8684,
59,
1741,
7146,
743,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
8712,
2
] |
if (args[count].equals("-?") || args[count].equals("-help") || args[count].equals("--help") || args[count].equals("/?") || args[count].equals("/help")) { | if ("-?".equals( args[count] ) || "-help".equals( args[count] ) || "--help".equals( args[count] ) || "/?".equals( args[count] ) || "/help".equals( args[count] )) { | private static void parseCommandLine(String[] args) { int count = 0; try { while (args.length > count) { if (args[count].equals("-?") || args[count].equals("-help") || args[count].equals("--help") || args[count].equals("/?") || args[count].equals("/help")) { showHelp(); count++; } else if (args[count].equals("-lf")) { lookAndFeel = args[count + 1]; count = count + 2; } else if (args[count].equals("-lc")) { locale = args[count + 1]; count = count + 2; } else { showHelp(); } } } catch (ArrayIndexOutOfBoundsException exception) { showHelp(); } } | 47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/88402a3bc59123261d50a7cfed0ac20de2b772f6/Main.java/buggy/src/thaw/core/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1109,
21391,
12,
780,
8526,
833,
13,
288,
202,
202,
474,
1056,
273,
374,
31,
202,
202,
698,
288,
1082,
202,
17523,
261,
1968,
18,
2469,
405,
1056,
13,
288,
9506,
202,
430,
261,
1968,
63,
1883,
8009,
14963,
2932,
17,
7225,
13,
747,
833,
63,
1883,
8009,
14963,
2932,
17,
5201,
7923,
25083,
202,
20081,
833,
63,
1883,
8009,
14963,
2932,
413,
5201,
7923,
25083,
202,
20081,
833,
63,
1883,
8009,
14963,
2932,
19,
7225,
13,
25083,
202,
20081,
833,
63,
1883,
8009,
14963,
2932,
19,
5201,
6,
3719,
288,
6862,
202,
4500,
6696,
5621,
6862,
202,
1883,
9904,
31,
9506,
202,
97,
469,
309,
261,
1968,
63,
1883,
8009,
14963,
2932,
17,
20850,
6,
3719,
288,
6862,
202,
7330,
1876,
2954,
292,
273,
833,
63,
1883,
397,
404,
15533,
6862,
202,
1883,
273,
1056,
397,
576,
31,
9506,
202,
97,
469,
309,
261,
1968,
63,
1883,
8009,
14963,
2932,
17,
17704,
6,
3719,
288,
6862,
202,
6339,
273,
833,
63,
1883,
397,
404,
15533,
6862,
202,
1883,
273,
1056,
397,
576,
31,
9506,
202,
97,
469,
288,
6862,
202,
4500,
6696,
5621,
9506,
202,
97,
1082,
202,
97,
202,
202,
97,
1044,
261,
1076,
30548,
1520,
13,
288,
1082,
202,
4500,
6696,
5621,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1152,
760,
918,
1109,
21391,
12,
780,
8526,
833,
13,
288,
202,
202,
474,
1056,
273,
374,
31,
202,
202,
698,
288,
1082,
202,
17523,
261,
1968,
18,
2469,
405,
1056,
13,
288,
9506,
202,
430,
261,
1968,
63,
1883,
8009,
14963,
2932,
17,
7225,
13,
747,
833,
63,
1883,
8009,
14963,
2932,
17,
5201,
7923,
25083,
202,
20081,
833,
63,
1883,
8009,
14963,
2932,
413,
5201,
7923,
25083,
202,
20081,
833,
63,
1883,
8009,
14963,
2932,
19,
7225,
13,
25083,
202,
20081,
833,
63,
1883,
8009,
14963,
2932,
19,
5201,
6,
3719,
288,
6862,
202,
4500,
6696,
5621,
6862,
202,
1883,
9904,
31,
9506,
202,
97,
469,
309,
261,
1968,
63,
1883,
8009,
14963,
2932,
17,
2
] |
baseColor = "grey"; | baseColor = BallColor.GREY; | public String getIconColor() { if(!isBuilding()) { // already built if(result==Result.SUCCESS) return "blue"; if(result== Result.UNSTABLE) return "yellow"; else return "red"; } // a new build is in progress String baseColor; if(previousBuild==null) baseColor = "grey"; else baseColor = previousBuild.getIconColor(); return baseColor +"_anime"; } | 51053 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51053/84e0676229b1f5526d4ad0e0107998685f04a0e2/Run.java/buggy/core/src/main/java/hudson/model/Run.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
21724,
2957,
1435,
288,
3639,
309,
12,
5,
291,
16713,
10756,
288,
5411,
368,
1818,
6650,
5411,
309,
12,
2088,
631,
1253,
18,
12778,
13,
7734,
327,
315,
14081,
14432,
5411,
309,
12,
2088,
631,
3438,
18,
2124,
882,
2782,
13,
7734,
327,
315,
19227,
14432,
5411,
469,
7734,
327,
315,
1118,
14432,
3639,
289,
3639,
368,
279,
394,
1361,
353,
316,
4007,
3639,
514,
1026,
2957,
31,
3639,
309,
12,
11515,
3116,
631,
2011,
13,
5411,
1026,
2957,
273,
605,
454,
2957,
18,
43,
862,
61,
31,
3639,
469,
5411,
1026,
2957,
273,
2416,
3116,
18,
588,
5554,
2957,
5621,
3639,
327,
1026,
2957,
397,
6,
67,
304,
494,
14432,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
21724,
2957,
1435,
288,
3639,
309,
12,
5,
291,
16713,
10756,
288,
5411,
368,
1818,
6650,
5411,
309,
12,
2088,
631,
1253,
18,
12778,
13,
7734,
327,
315,
14081,
14432,
5411,
309,
12,
2088,
631,
3438,
18,
2124,
882,
2782,
13,
7734,
327,
315,
19227,
14432,
5411,
469,
7734,
327,
315,
1118,
14432,
3639,
289,
3639,
368,
279,
394,
1361,
353,
316,
4007,
3639,
514,
1026,
2957,
31,
3639,
309,
12,
11515,
3116,
631,
2011,
13,
5411,
1026,
2957,
273,
605,
454,
2957,
18,
43,
862,
61,
31,
3639,
469,
5411,
1026,
2957,
273,
2416,
3116,
18,
588,
5554,
2957,
5621,
3639,
327,
1026,
2957,
397,
6,
67,
304,
494,
14432,
565,
289,
2,
-100,
-100,
-100
] |
38, 152, 516, 468, 469, | 12, 13, 479, 497, | public NoAllocs() { super(78, 79, new int[] { 79, 661, 573, 366, 80, 467, 81, 208, 209, 161, 360, 361, 38, 152, 516, 468, 469, 153, 154, 119, 737, 120, 736, 155, 156, 159, 742, 741, 160, 576, 577, 635, 780, 172, 169, 170, 171, 0 } ); } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/9de6020a5c54160c44f2adec6dfba45f873da9bf/AllocationInstruction.java/buggy/src/java/src/org/quickfix/fix44/AllocationInstruction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2631,
8763,
87,
1435,
288,
377,
2240,
12,
8285,
16,
26517,
16,
377,
394,
509,
8526,
288,
7734,
26517,
16,
7734,
1666,
9498,
16,
7734,
1381,
9036,
16,
7734,
890,
6028,
16,
7734,
8958,
16,
7734,
1059,
9599,
16,
7734,
29424,
16,
7734,
4200,
28,
16,
7734,
4200,
29,
16,
7734,
2872,
21,
16,
7734,
12360,
16,
7734,
6580,
21,
16,
2868,
18012,
16,
2868,
4711,
22,
16,
2868,
1381,
2313,
16,
2868,
1059,
9470,
16,
2868,
1059,
8148,
16,
7734,
4711,
23,
16,
7734,
4711,
24,
16,
7734,
404,
3657,
16,
7734,
2371,
6418,
16,
7734,
15743,
16,
7734,
2371,
5718,
16,
7734,
404,
2539,
16,
7734,
404,
4313,
16,
7734,
4711,
29,
16,
7734,
2371,
9452,
16,
7734,
2371,
9803,
16,
7734,
25430,
16,
7734,
1381,
6669,
16,
7734,
1381,
4700,
16,
7734,
1666,
4763,
16,
7734,
2371,
3672,
16,
2868,
8043,
22,
16,
2868,
2872,
29,
16,
2868,
404,
7301,
16,
2868,
8043,
21,
16,
7734,
374,
289,
11272,
282,
289,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2631,
8763,
87,
1435,
288,
377,
2240,
12,
8285,
16,
26517,
16,
377,
394,
509,
8526,
288,
7734,
26517,
16,
7734,
1666,
9498,
16,
7734,
1381,
9036,
16,
7734,
890,
6028,
16,
7734,
8958,
16,
7734,
1059,
9599,
16,
7734,
29424,
16,
7734,
4200,
28,
16,
7734,
4200,
29,
16,
7734,
2872,
21,
16,
7734,
12360,
16,
7734,
6580,
21,
16,
2868,
18012,
16,
2868,
4711,
22,
16,
2868,
1381,
2313,
16,
2868,
1059,
9470,
16,
2868,
1059,
8148,
16,
7734,
4711,
23,
16,
7734,
4711,
24,
16,
7734,
404,
3657,
16,
7734,
2371,
6418,
16,
7734,
15743,
16,
7734,
2371,
5718,
16,
7734,
404,
2539,
16,
7734,
404,
4313,
16,
7734,
4711,
29,
16,
7734,
2371,
2
] |
} | private IJobProgressManagerListener getProgressListener(){ return new IJobProgressManagerListener(){ HashSet jobs = new HashSet(); /* (non-Javadoc) * @see org.eclipse.ui.internal.progress.IJobProgressManagerListener#add(org.eclipse.ui.internal.progress.JobInfo) */ public void add(JobInfo info) { incrementJobCount(info.getJob()); } /* (non-Javadoc) * @see org.eclipse.ui.internal.progress.IJobProgressManagerListener#refresh(org.eclipse.ui.internal.progress.JobInfo) */ public void refresh(JobInfo info) { // XXX Auto-generated method stub } /* (non-Javadoc) * @see org.eclipse.ui.internal.progress.IJobProgressManagerListener#refreshAll() */ public void refreshAll() { // XXX Auto-generated method stub } /* (non-Javadoc) * @see org.eclipse.ui.internal.progress.IJobProgressManagerListener#remove(org.eclipse.ui.internal.progress.JobInfo) */ public void remove(JobInfo info) { if (jobs.contains(info.getJob())) { decrementJobCount(info.getJob()); } } private void incrementJobCount(Job job) { //Don't count the animate job itself if (job.isSystem()) return; if (jobs.size() == 0) setAnimated(true); jobs.add(job); } private void decrementJobCount(Job job) { //Don't count the animate job itself if (job.isSystem()) return; jobs.remove(job); if(jobs.isEmpty()) setAnimated(false); } }; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/cc72ec84df4d93cc632406d8e555ffcc65f0b1b1/AnimationItem.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
2278,
5491,
1318,
2223,
3570,
2329,
2223,
1435,
95,
202,
202,
2463,
394,
467,
2278,
5491,
1318,
2223,
1435,
95,
25083,
202,
13482,
6550,
273,
394,
6847,
5621,
25083,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
45,
2278,
5491,
1318,
2223,
7,
1289,
12,
3341,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
2278,
966,
13,
9506,
1195,
1082,
202,
482,
918,
527,
12,
2278,
966,
1123,
13,
288,
9506,
202,
15016,
2278,
1380,
12,
1376,
18,
588,
2278,
10663,
1082,
202,
97,
25083,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
45,
2278,
5491,
1318,
2223,
7,
9144,
12,
3341,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
2278,
966,
13,
9506,
1195,
1082,
202,
482,
918,
4460,
12,
2278,
966,
1123,
13,
288,
9506,
202,
759,
11329,
8064,
17,
11168,
707,
7168,
1082,
202,
97,
25083,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
45,
2278,
5491,
1318,
2223,
7,
9144,
1595,
1435,
9506,
1195,
1082,
202,
482,
918,
4460,
1595,
1435,
288,
9506,
202,
759,
11329,
8064,
17,
11168,
707,
7168,
1082,
202,
97,
25083,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
45,
2278,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
2278,
5491,
1318,
2223,
3570,
2329,
2223,
1435,
95,
202,
202,
2463,
394,
467,
2278,
5491,
1318,
2223,
1435,
95,
25083,
202,
13482,
6550,
273,
394,
6847,
5621,
25083,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
45,
2278,
5491,
1318,
2223,
7,
1289,
12,
3341,
18,
20416,
18,
4881,
18,
7236,
18,
8298,
18,
2278,
966,
13,
9506,
1195,
1082,
202,
482,
918,
527,
12,
2278,
966,
1123,
13,
288,
9506,
202,
15016,
2278,
1380,
12,
1376,
18,
588,
2278,
10663,
1082,
202,
97,
25083,
202,
20308,
261,
5836,
17,
24060,
13,
9506,
380,
632,
5946,
2358,
18,
20416,
18,
4881,
2
] | |
if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_NOT_NULL)) | if ( modelOpr .equals( DesignChoiceConstants.FILTER_OPERATOR_NOT_NULL ) ) | protected int toDteFilterOperator(String modelOpr) { if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_EQ)) return IConditionalExpression.OP_EQ; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_NE)) return IConditionalExpression.OP_NE; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_LT)) return IConditionalExpression.OP_LT; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_LE)) return IConditionalExpression.OP_LE; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_GE)) return IConditionalExpression.OP_GE; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_GT)) return IConditionalExpression.OP_GT; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_BETWEEN)) return IConditionalExpression.OP_BETWEEN; if (modelOpr .equals(DesignChoiceConstants.FILTER_OPERATOR_NOT_BETWEEN)) return IConditionalExpression.OP_NOT_BETWEEN; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_NULL)) return IConditionalExpression.OP_NULL; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_NOT_NULL)) return IConditionalExpression.OP_NOT_NULL; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_TRUE)) return IConditionalExpression.OP_TRUE; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_FALSE)) return IConditionalExpression.OP_FALSE; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_LIKE)) return IConditionalExpression.OP_LIKE; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_TOP_N)) return IConditionalExpression.OP_TOP_N; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_BOTTOM_N)) return IConditionalExpression.OP_BOTTOM_N; if (modelOpr .equals(DesignChoiceConstants.FILTER_OPERATOR_TOP_PERCENT)) return IConditionalExpression.OP_TOP_PERCENT; if (modelOpr .equals(DesignChoiceConstants.FILTER_OPERATOR_BOTTOM_PERCENT)) return IConditionalExpression.OP_BOTTOM_PERCENT; if (modelOpr.equals(DesignChoiceConstants.FILTER_OPERATOR_ANY)) return IConditionalExpression.OP_ANY; return IConditionalExpression.OP_NONE; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/457851dcc056d96f2ec05106ceba68d3c8f9162c/ReportQueryBuilder.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/ReportQueryBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
509,
358,
40,
736,
1586,
5592,
12,
780,
938,
51,
683,
13,
288,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
27247,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
27247,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
5407,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
5407,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
12050,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
12050,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
900,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
900,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
7113,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
7113,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
16506,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
16506,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
38,
19311,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
38,
19311,
31,
1082,
202,
430,
261,
2284,
51,
683,
6862,
202,
18,
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,
3196,
202,
1117,
509,
358,
40,
736,
1586,
5592,
12,
780,
938,
51,
683,
13,
288,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
27247,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
27247,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
5407,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
5407,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
15478,
10538,
2918,
18,
11126,
67,
26110,
67,
12050,
3719,
9506,
202,
2463,
467,
14132,
2300,
18,
3665,
67,
12050,
31,
1082,
202,
430,
261,
2284,
51,
683,
18,
14963,
12,
2
] |
downloadedArtifacts.add( dep ); | downloadedArtifacts.add( dep.getId() ); | public void downloadDependencies( List files ) throws Exception { for ( Iterator j = files.iterator(); j.hasNext(); ) { Dependency dep = (Dependency) j.next(); if ( !downloadedArtifacts.contains( dep ) ) { String repositoryPath = dep.getRepositoryPath(); File destinationFile = new File( mavenRepoLocal, repositoryPath ); // The directory structure for this project may // not exists so create it if missing. File directory = destinationFile.getParentFile(); if ( directory.exists() == false ) { directory.mkdirs(); } if ( destinationFile.exists() && dep.getVersion().indexOf( SNAPSHOT_SIGNATURE ) < 0 ) { continue; } getRemoteArtifact( repositoryPath, destinationFile ); if ( !destinationFile.exists() ) { throw new Exception( "Failed to download " + dep ); } downloadedArtifacts.add( dep ); } } } | 1315 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1315/a5c95ef10e4fb60c32ac2eed355e9f3991f7b35b/ArtifactDownloader.java/buggy/maven-mboot2/src/main/java/download/ArtifactDownloader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4224,
8053,
12,
987,
1390,
262,
3639,
1216,
1185,
565,
288,
3639,
364,
261,
4498,
525,
273,
1390,
18,
9838,
5621,
525,
18,
5332,
2134,
5621,
262,
3639,
288,
5411,
11993,
5993,
273,
261,
7787,
13,
525,
18,
4285,
5621,
5411,
309,
261,
401,
2378,
4230,
16981,
18,
12298,
12,
5993,
262,
262,
5411,
288,
7734,
514,
3352,
743,
273,
5993,
18,
588,
3305,
743,
5621,
7734,
1387,
2929,
812,
273,
394,
1387,
12,
20499,
8791,
2042,
16,
3352,
743,
11272,
7734,
368,
1021,
1867,
3695,
364,
333,
1984,
2026,
7734,
368,
486,
1704,
1427,
752,
518,
309,
3315,
18,
7734,
1387,
1867,
273,
2929,
812,
18,
588,
3054,
812,
5621,
7734,
309,
261,
1867,
18,
1808,
1435,
422,
629,
262,
7734,
288,
10792,
1867,
18,
24816,
8291,
5621,
7734,
289,
7734,
309,
261,
2929,
812,
18,
1808,
1435,
597,
5993,
18,
588,
1444,
7675,
31806,
12,
14204,
31667,
67,
26587,
262,
411,
374,
262,
7734,
288,
10792,
1324,
31,
7734,
289,
7734,
14879,
7581,
12,
3352,
743,
16,
2929,
812,
11272,
7734,
309,
261,
401,
10590,
812,
18,
1808,
1435,
262,
7734,
288,
10792,
604,
394,
1185,
12,
315,
2925,
358,
4224,
315,
397,
5993,
11272,
7734,
289,
7734,
13549,
16981,
18,
1289,
12,
5993,
18,
26321,
1435,
11272,
5411,
289,
3639,
289,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4224,
8053,
12,
987,
1390,
262,
3639,
1216,
1185,
565,
288,
3639,
364,
261,
4498,
525,
273,
1390,
18,
9838,
5621,
525,
18,
5332,
2134,
5621,
262,
3639,
288,
5411,
11993,
5993,
273,
261,
7787,
13,
525,
18,
4285,
5621,
5411,
309,
261,
401,
2378,
4230,
16981,
18,
12298,
12,
5993,
262,
262,
5411,
288,
7734,
514,
3352,
743,
273,
5993,
18,
588,
3305,
743,
5621,
7734,
1387,
2929,
812,
273,
394,
1387,
12,
20499,
8791,
2042,
16,
3352,
743,
11272,
7734,
368,
1021,
1867,
3695,
364,
333,
1984,
2026,
7734,
368,
486,
1704,
1427,
752,
518,
309,
3315,
18,
7734,
1387,
1867,
273,
2929,
812,
18,
588,
3054,
812,
5621,
7734,
309,
261,
1867,
18,
2
] |
Composite parent = shell.getParent(); | Composite parent = shell.getParent(); | protected Point getInitialLocation(Point initialSize) { Composite parent = shell.getParent(); Monitor monitor = shell.getDisplay().getPrimaryMonitor(); if (parent != null) { monitor = parent.getMonitor(); } Rectangle monitorBounds = monitor.getClientArea(); Point centerPoint; if (parent != null) { centerPoint = Geometry.centerPoint(parent.getBounds()); } else { centerPoint = Geometry.centerPoint(monitorBounds); } return new Point(centerPoint.x - (initialSize.x / 2), Math.max( monitorBounds.y, Math.min(centerPoint.y - (initialSize.y * 2 / 3), monitorBounds.y + monitorBounds.height - initialSize.y))); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/981750d591ad92d3cf184a5ea61ad6b63139a974/Window.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4686,
24044,
2735,
12,
2148,
2172,
1225,
13,
288,
3639,
14728,
982,
273,
5972,
18,
588,
3054,
5621,
3639,
14086,
6438,
273,
5972,
18,
588,
4236,
7675,
588,
6793,
7187,
5621,
3639,
309,
261,
2938,
480,
446,
13,
288,
5411,
6438,
273,
982,
18,
588,
7187,
5621,
3639,
289,
3639,
13264,
6438,
5694,
273,
6438,
18,
588,
1227,
5484,
5621,
3639,
4686,
4617,
2148,
31,
3639,
309,
261,
2938,
480,
446,
13,
288,
5411,
4617,
2148,
273,
8344,
18,
5693,
2148,
12,
2938,
18,
588,
5694,
10663,
3639,
289,
469,
288,
5411,
4617,
2148,
273,
8344,
18,
5693,
2148,
12,
10259,
5694,
1769,
3639,
289,
3639,
327,
394,
4686,
12,
5693,
2148,
18,
92,
300,
261,
6769,
1225,
18,
92,
342,
576,
3631,
2361,
18,
1896,
12,
7734,
6438,
5694,
18,
93,
16,
2361,
18,
1154,
12,
5693,
2148,
18,
93,
13491,
300,
261,
6769,
1225,
18,
93,
380,
576,
342,
890,
3631,
6438,
5694,
18,
93,
13491,
397,
6438,
5694,
18,
4210,
300,
2172,
1225,
18,
93,
3719,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
4750,
4686,
24044,
2735,
12,
2148,
2172,
1225,
13,
288,
3639,
14728,
982,
273,
5972,
18,
588,
3054,
5621,
3639,
14086,
6438,
273,
5972,
18,
588,
4236,
7675,
588,
6793,
7187,
5621,
3639,
309,
261,
2938,
480,
446,
13,
288,
5411,
6438,
273,
982,
18,
588,
7187,
5621,
3639,
289,
3639,
13264,
6438,
5694,
273,
6438,
18,
588,
1227,
5484,
5621,
3639,
4686,
4617,
2148,
31,
3639,
309,
261,
2938,
480,
446,
13,
288,
5411,
4617,
2148,
273,
8344,
18,
5693,
2148,
12,
2938,
18,
588,
5694,
10663,
3639,
289,
469,
288,
5411,
4617,
2148,
273,
8344,
18,
5693,
2148,
12,
10259,
5694,
1769,
3639,
289,
3639,
327,
394,
4686,
12,
5693,
2148,
18,
92,
300,
261,
6769,
2
] |
if (!dst.hasArray ()) | if (dst.hasArray()) | public int read (ByteBuffer dst) throws IOException { byte[] data; int bytes = 0; int len = dst.remaining (); if (!dst.hasArray ()) { data = new byte [len]; dst.get (data, 0, len); } else { data = dst.array (); } return socket.getInputStream().read (data, 0, len); } | 5916 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5916/7113237bf329e1245f096787093aed051ea2dd23/SocketChannelImpl.java/clean/libjava/gnu/java/nio/SocketChannelImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
855,
261,
12242,
3046,
13,
1216,
1860,
225,
288,
565,
1160,
8526,
501,
31,
565,
509,
1731,
273,
374,
31,
565,
509,
562,
273,
3046,
18,
17956,
261,
1769,
202,
565,
309,
261,
11057,
18,
5332,
1076,
10756,
1377,
288,
3639,
501,
273,
394,
1160,
306,
1897,
15533,
3639,
3046,
18,
588,
261,
892,
16,
374,
16,
562,
1769,
1377,
289,
565,
469,
1377,
288,
3639,
501,
273,
3046,
18,
1126,
261,
1769,
1377,
289,
3639,
327,
2987,
18,
588,
4348,
7675,
896,
261,
892,
16,
374,
16,
562,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
855,
261,
12242,
3046,
13,
1216,
1860,
225,
288,
565,
1160,
8526,
501,
31,
565,
509,
1731,
273,
374,
31,
565,
509,
562,
273,
3046,
18,
17956,
261,
1769,
202,
565,
309,
261,
11057,
18,
5332,
1076,
10756,
1377,
288,
3639,
501,
273,
394,
1160,
306,
1897,
15533,
3639,
3046,
18,
588,
261,
892,
16,
374,
16,
562,
1769,
1377,
289,
565,
469,
1377,
288,
3639,
501,
273,
3046,
18,
1126,
261,
1769,
1377,
289,
3639,
327,
2987,
18,
588,
4348,
7675,
896,
261,
892,
16,
374,
16,
562,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
private static final String propToString(int propType) { | private static final String propToString(int propType) { | private static final String propToString(int propType) { if (Token.printTrees) { // If Context.printTrees is false, the compiler // can remove all these strings. switch (propType) { case FUNCTION_PROP: return "function"; case LOCAL_PROP: return "local"; case LOCAL_BLOCK_PROP: return "local_block"; case REGEXP_PROP: return "regexp"; case CASES_PROP: return "cases"; case DEFAULT_PROP: return "default"; case CASEARRAY_PROP: return "casearray"; case SPECIAL_PROP_PROP: return "special_prop"; case TARGETBLOCK_PROP: return "targetblock"; case VARIABLE_PROP: return "variable"; case ISNUMBER_PROP: return "isnumber"; case DIRECTCALL_PROP: return "directcall"; case SPECIALCALL_PROP: return "specialcall"; default: Kit.codeBug(); } } return null; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/37be8f9cfb362f40c2f19056693cb9e21cb13bcb/Node.java/buggy/js/rhino/src/org/mozilla/javascript/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
727,
514,
2270,
5808,
12,
474,
2270,
559,
13,
288,
3639,
309,
261,
1345,
18,
1188,
26590,
13,
288,
5411,
368,
971,
1772,
18,
1188,
26590,
353,
629,
16,
326,
5274,
5411,
368,
848,
1206,
777,
4259,
2064,
18,
5411,
1620,
261,
5986,
559,
13,
288,
7734,
648,
13690,
67,
15811,
30,
1377,
327,
315,
915,
14432,
7734,
648,
15234,
67,
15811,
30,
540,
327,
315,
3729,
14432,
7734,
648,
15234,
67,
11403,
67,
15811,
30,
282,
327,
315,
3729,
67,
2629,
14432,
7734,
648,
11980,
16109,
67,
15811,
30,
3639,
327,
315,
17745,
14432,
7734,
648,
18403,
55,
67,
15811,
30,
540,
327,
315,
22186,
14432,
7734,
648,
3331,
67,
15811,
30,
4202,
327,
315,
1886,
14432,
7734,
648,
18403,
8552,
67,
15811,
30,
377,
327,
315,
3593,
1126,
14432,
7734,
648,
22872,
6365,
67,
15811,
67,
15811,
30,
225,
327,
315,
9371,
67,
5986,
14432,
7734,
648,
16964,
11403,
67,
15811,
30,
282,
327,
315,
3299,
2629,
14432,
7734,
648,
22965,
67,
15811,
30,
1377,
327,
315,
6105,
14432,
7734,
648,
4437,
9931,
67,
15811,
30,
1377,
327,
315,
291,
2696,
14432,
7734,
648,
29100,
13730,
67,
15811,
30,
565,
327,
315,
7205,
1991,
14432,
7734,
648,
22872,
6365,
13730,
67,
15811,
30,
282,
327,
315,
9371,
1991,
14432,
7734,
805,
30,
1475,
305,
18,
710,
19865,
5621,
5411,
289,
3639,
289,
3639,
327,
446,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
727,
514,
2270,
5808,
12,
474,
2270,
559,
13,
288,
3639,
309,
261,
1345,
18,
1188,
26590,
13,
288,
5411,
368,
971,
1772,
18,
1188,
26590,
353,
629,
16,
326,
5274,
5411,
368,
848,
1206,
777,
4259,
2064,
18,
5411,
1620,
261,
5986,
559,
13,
288,
7734,
648,
13690,
67,
15811,
30,
1377,
327,
315,
915,
14432,
7734,
648,
15234,
67,
15811,
30,
540,
327,
315,
3729,
14432,
7734,
648,
15234,
67,
11403,
67,
15811,
30,
282,
327,
315,
3729,
67,
2629,
14432,
7734,
648,
11980,
16109,
67,
15811,
30,
3639,
327,
315,
17745,
14432,
7734,
648,
18403,
55,
67,
15811,
30,
540,
327,
315,
22186,
14432,
7734,
648,
3331,
67,
15811,
30,
4202,
327,
315,
2
] |
minimum = left + right + SASH_WIDTH * 2; | minimum = left + right; if (children[0].isVisible() && children[1].isVisible()) { minimum += SASH_WIDTH; } | public int getMinimumHeight() { int left = children[0].getMinimumHeight(); int right = children[1].getMinimumHeight(); int minimum = 0; if (getSash().isVertical()) minimum = Math.max(left, right); else if (left > 0 || right > 0) { //consider the top and bottom borders? minimum = left + right + SASH_WIDTH * 2; } return minimum;} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/81d75f462a6f523bd5ca620a01da08560eb0329f/LayoutTreeNode.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/LayoutTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
509,
30665,
2686,
1435,
288,
202,
474,
2002,
273,
2325,
63,
20,
8009,
588,
13042,
2686,
5621,
202,
474,
2145,
273,
2325,
63,
21,
8009,
588,
13042,
2686,
5621,
202,
474,
5224,
273,
374,
31,
202,
430,
261,
588,
55,
961,
7675,
291,
15704,
10756,
202,
202,
15903,
273,
2361,
18,
1896,
12,
4482,
16,
2145,
1769,
202,
12107,
309,
261,
4482,
405,
374,
747,
2145,
405,
374,
13,
288,
202,
202,
759,
8559,
3585,
326,
1760,
471,
5469,
24028,
35,
202,
202,
15903,
273,
2002,
397,
2145,
397,
348,
10793,
67,
10023,
380,
576,
31,
202,
97,
202,
202,
2463,
5224,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
509,
30665,
2686,
1435,
288,
202,
474,
2002,
273,
2325,
63,
20,
8009,
588,
13042,
2686,
5621,
202,
474,
2145,
273,
2325,
63,
21,
8009,
588,
13042,
2686,
5621,
202,
474,
5224,
273,
374,
31,
202,
430,
261,
588,
55,
961,
7675,
291,
15704,
10756,
202,
202,
15903,
273,
2361,
18,
1896,
12,
4482,
16,
2145,
1769,
202,
12107,
309,
261,
4482,
405,
374,
747,
2145,
405,
374,
13,
288,
202,
202,
759,
8559,
3585,
326,
1760,
471,
5469,
24028,
35,
202,
202,
15903,
273,
2002,
397,
2145,
397,
348,
10793,
67,
10023,
380,
576,
31,
202,
97,
202,
202,
2463,
5224,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100
] |
add(slidetrigger3 = new Label("slidetrigger3","click here to slide fromto")); add(sliderdiv3 = new Label("sliderdiv3","I'm sliding fromto! I'm sliding fromto!")); | slidetrigger3 = new Label(this, "slidetrigger3","click here to slide fromto"); sliderdiv3 = new Label(this, "sliderdiv3","I'm sliding fromto! I'm sliding fromto!"); | public DojoFXTestPage(PageParameters parameters) { add(new Image("topimg", new Model("menu-top.gif") )); add(menuItem1 = new Label("menuitem1", new Model("About"))); add(menuItem2 = new Label("menuitem2", new Model("Documentation"))); add(menuItem3 = new Label("menuitem3", new Model("Tutorials"))); add(submenu1 = new WebMarkupContainer("submenu1")); add(submenu2 = new WebMarkupContainer("submenu2")); add(submenu3 = new WebMarkupContainer("submenu3")); submenu1.add(submenu11 = new Label("submenu11", new Model("About us"))); submenu2.add(submenu21 = new Label("submenu21", new Model("JavaDoc"))); submenu3.add(submenu31 = new Label("submenu31", new Model("Tutorial 1"))); submenu3.add(submenu32 = new Label("submenu32", new Model("Tutoral 2"))); submenu3.add(submenu31x = new WebMarkupContainer("submenu31x")); submenu31x.add(submenu311 = new Label("submenu311","Part 1. Basics")); submenu31x.add(submenu312 = new Label("submenu312","Part 2. Bloody complicated")); add(new Image("bottomimg", new Model("menu-bottom.gif") )); submenu1.add(new FXOnClickWiper(duration, menuItem1)); submenu2.add(new FXOnClickWiper(duration, menuItem2)); submenu3.add(new FXOnClickWiper(duration, menuItem3)); submenu31x.add(new FXOnClickWiper(duration, submenu31)); add(table1 = new WebMarkupContainer("cdinfo")); table1.add(new Label("title", new Model("Hello nasty"))); table1.add(explodeimg = new Image("explodeimg", "hello_nasty_small.jpg")); table1.add(new Label("artist", new Model("Beasty boys"))); table1.add(new Label("year", new Model("1998"))); table1.add(new Label("genre", new Model("Hip Hop"))); add(table2 = new WebMarkupContainer("infotable")); table2.add(explodedimg = new Image("explodedimg", "hello_nasty.jpg")); table2.add(close = new Label("close", new Model("(X)"))); FXOnClickExploder d = new FXOnClickExploder(duration, explodeimg); table2.add(d); d.addTrigger(close); //slidertest add(slidetrigger = new Label("slidetrigger","click here to slide relative")); add(sliderdiv = new Label("sliderdiv","I'm sliding by! I'm sliding by!")); sliderdiv.add(new FXOnClickSlider(duration, slidetrigger, 200, 200, true)); add(slidetrigger2 = new Label("slidetrigger2","click here to slide absolute")); add(sliderdiv2 = new Label("sliderdiv2","I'm sliding to! I'm sliding to!")); sliderdiv2.add(new FXOnClickSlider(duration, slidetrigger2, 500, 500, false)); add(slidetrigger3 = new Label("slidetrigger3","click here to slide fromto")); add(sliderdiv3 = new Label("sliderdiv3","I'm sliding fromto! I'm sliding fromto!")); sliderdiv3.add(new FXOnClickSlider(duration, slidetrigger3, 500, 500, 700, 700)); //Fadertest add(imagecontainer = new WebMarkupContainer("imgcontainer")); imagecontainer.add(pic1 = new Image("pic1", "pic1.jpg")); imagecontainer.add(pic2 = new Image("pic2", "pic2.jpg")); imagecontainer.add(pic3 = new Image("pic3", "pic3.jpg")); imagecontainer.add(pic4 = new Image("pic4", "pic4.jpg")); imagecontainer.add(pic5 = new Image("pic5", "pic5.jpg")); pic1.add(new FXOnMouseOverFader(duration, pic1, false, 0.2, 1.0)); pic2.add(new FXOnMouseOverFader(duration, pic2, false, 0.2, 1.0)); pic3.add(new FXOnMouseOverFader(duration, pic3, false, 0.2, 1.0)); pic4.add(new FXOnMouseOverFader(duration, pic4, false, 0.2, 1.0)); pic5.add(new FXOnMouseOverFader(duration, pic5, false, 0.2, 1.0)); add(menubar = new WebMarkupContainer("menubar")); menubar.add(filemenu = new Label("filemenu", new Model("File"))); menubar.add(editmenu = new Label("editmenu", new Model("Edit"))); menubar.add(viewmenu = new Label("viewmenu", new Model("View"))); menubar.add(insertmenu = new Label("insertmenu", new Model("Insert"))); menubar.add(modifymenu = new Label("modifymenu", new Model("Modify"))); filemenu.add(new FXOnMouseOverHighlighter(200, filemenu, 255,102,0)); editmenu.add(new FXOnMouseOverHighlighter(200, editmenu, 255,102,0)); viewmenu.add(new FXOnMouseOverHighlighter(200, viewmenu, 255,102,0)); insertmenu.add(new FXOnMouseOverHighlighter(200, insertmenu, 255,102,0)); modifymenu.add(new FXOnMouseOverHighlighter(200, modifymenu, 255,102,0)); //menu2 example menu2 = new WebMarkupContainer("menu2"); menuhead = new WebMarkupContainer("menuhead"); menutitle = new Label("menutitle","File menu"); menutoggle = new Label("menutoggle","()"); menubody = new WebMarkupContainer("menubody"); item1 = new WebMarkupContainer("item1"); item1label = new Label("item1label","Move file"); item2 = new WebMarkupContainer("item2"); item2label = new Label("item2label","Rename file"); item3 = new WebMarkupContainer("item3"); item3label = new Label("item3label","Mail file"); item4 = new WebMarkupContainer("item4"); item4label = new Label("item4label","Copy file"); item5 = new WebMarkupContainer("item5"); item5label = new Label("item5label","Print file"); //menu3 menu3 = new WebMarkupContainer("menu3"); menu3head = new WebMarkupContainer("menu3head"); menu3title = new Label("menu3title","Other places"); menu3toggle = new Label("menu3toggle","()"); menu3body = new WebMarkupContainer("menu3body"); item13 = new WebMarkupContainer("item13"); item1label3 = new Label("item1label3","Notulen"); item23 = new WebMarkupContainer("item23"); item2label3 = new Label("item2label3","My Documents"); item33 = new WebMarkupContainer("item33"); item3label3 = new Label("item3label3","My Computer"); item43 = new WebMarkupContainer("item43"); item4label3 = new Label("item4label3","My Network places"); //images //wiper + fader menubody.add(new FXOnClickWiper(250, menutoggle, true)); menubody.add(new FXOnClickFader(250, menutoggle, true)); add(menu2); menu2.add(menuhead); menuhead.add(menutitle); menuhead.add(menutoggle); menu2.add(menubody); menubody.add(item1); item1.add(item1label); item1.add(new Image("item1img", new Model("move.jpg"))); menubody.add(item2); item2.add(item2label); item2.add(new Image("item2img", new Model("rename.gif"))); menubody.add(item3); item3.add(item3label); item3.add(new Image("item3img", new Model("mail.jpg"))); menubody.add(item4); item4.add(item4label); item4.add(new Image("item4img", new Model("copy.jpg"))); menubody.add(item5); item5.add(item5label); item5.add(new Image("item5img", new Model("print.jpg"))); //menu3 add(menu3); menu3.add(menu3head); menu3head.add(menu3title); menu3head.add(menu3toggle); menu3.add(menu3body); menu3body.add(item13); item13.add(item1label3); item13.add(new Image("item1img3", new Model("Notulen.jpg"))); menu3body.add(item23); item23.add(item2label3); item23.add(new Image("item2img3", new Model("documents.jpg"))); menu3body.add(item33); item33.add(item3label3); item33.add(new Image("item3img3", new Model("myComputer.jpg"))); menu3body.add(item43); item43.add(item4label3); item43.add(new Image("item4img3", new Model("network.jpg"))); menu3body.add(new FXOnClickWiper(250, menu3toggle, true)); menu3body.add(new FXOnClickFader(250, menu3toggle, true)); } | 51612 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51612/ddd2a88f85254ce8cf229fdf8dce093a99393528/DojoFXTestPage.java/clean/wicket-contrib-dojo-examples/src/main/java/wicket/contrib/dojo/examples/DojoFXTestPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2256,
30952,
42,
3983,
395,
1964,
12,
1964,
2402,
1472,
13,
202,
95,
202,
202,
1289,
12,
2704,
3421,
2932,
3669,
6081,
3113,
394,
3164,
2932,
5414,
17,
3669,
18,
13905,
7923,
262,
1769,
202,
202,
1289,
12,
5414,
1180,
21,
273,
394,
5287,
2932,
5414,
1726,
21,
3113,
394,
3164,
2932,
24813,
6,
3719,
1769,
202,
202,
1289,
12,
5414,
1180,
22,
273,
394,
5287,
2932,
5414,
1726,
22,
3113,
394,
3164,
2932,
18905,
6,
3719,
1769,
202,
202,
1289,
12,
5414,
1180,
23,
273,
394,
5287,
2932,
5414,
1726,
23,
3113,
394,
3164,
2932,
56,
22378,
87,
6,
3719,
1769,
25083,
202,
1289,
12,
1717,
5414,
21,
273,
394,
2999,
13111,
2170,
2932,
1717,
5414,
21,
7923,
1769,
202,
202,
1289,
12,
1717,
5414,
22,
273,
394,
2999,
13111,
2170,
2932,
1717,
5414,
22,
7923,
1769,
202,
202,
1289,
12,
1717,
5414,
23,
273,
394,
2999,
13111,
2170,
2932,
1717,
5414,
23,
7923,
1769,
9506,
202,
1717,
5414,
21,
18,
1289,
12,
1717,
5414,
2499,
273,
394,
5287,
2932,
1717,
5414,
2499,
3113,
394,
3164,
2932,
24813,
584,
6,
3719,
1769,
202,
202,
1717,
5414,
22,
18,
1289,
12,
1717,
5414,
5340,
273,
394,
5287,
2932,
1717,
5414,
5340,
3113,
394,
3164,
2932,
5852,
1759,
6,
3719,
1769,
202,
202,
1717,
5414,
23,
18,
1289,
12,
1717,
5414,
6938,
273,
394,
5287,
2932,
1717,
5414,
6938,
3113,
394,
3164,
2932,
56,
22378,
404,
6,
3719,
1769,
202,
202,
1717,
5414,
23,
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,
2256,
30952,
42,
3983,
395,
1964,
12,
1964,
2402,
1472,
13,
202,
95,
202,
202,
1289,
12,
2704,
3421,
2932,
3669,
6081,
3113,
394,
3164,
2932,
5414,
17,
3669,
18,
13905,
7923,
262,
1769,
202,
202,
1289,
12,
5414,
1180,
21,
273,
394,
5287,
2932,
5414,
1726,
21,
3113,
394,
3164,
2932,
24813,
6,
3719,
1769,
202,
202,
1289,
12,
5414,
1180,
22,
273,
394,
5287,
2932,
5414,
1726,
22,
3113,
394,
3164,
2932,
18905,
6,
3719,
1769,
202,
202,
1289,
12,
5414,
1180,
23,
273,
394,
5287,
2932,
5414,
1726,
23,
3113,
394,
3164,
2932,
56,
22378,
87,
6,
3719,
1769,
25083,
202,
1289,
12,
1717,
5414,
21,
273,
394,
2999,
13111,
2170,
2932,
1717,
2
] |
public AboutDialog( IWorkbenchWindow window, AboutInfo primaryInfo, AboutInfo[] featureInfos) { super(window.getShell()); this.primaryInfo = primaryInfo; this.featureInfos = featureInfos; | public AboutDialog(Shell parentShell) { super(parentShell); IProduct product = Platform.getProduct(); IBundleGroupProvider[] providers = Platform.getBundleGroupProviders(); String productId = ""; if (product == null) productName = IDEWorkbenchMessages .getString("AboutDialog.defaultProductName"); else { productId = product.getId(); productName = product.getName(); } LinkedList groups = new LinkedList(); if (providers != null) for (int i = 0; i < providers.length; ++i) { IBundleGroup[] bundleGroups = providers[i].getBundleGroups(); for (int j = 0; j < bundleGroups.length; ++j) { AboutBundleGroupData info = new AboutBundleGroupData( bundleGroups[j]); if (info.getId().equals(productId)) groups.addFirst(info); else groups.add(info); } } bundleGroupInfos = (AboutBundleGroupData[]) groups .toArray(new AboutBundleGroupData[0]); | public AboutDialog( IWorkbenchWindow window, AboutInfo primaryInfo, AboutInfo[] featureInfos) { super(window.getShell()); this.primaryInfo = primaryInfo; this.featureInfos = featureInfos; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/922a37ecfef1f6db512173bdfc248a42376c1f05/AboutDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/AboutDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9771,
659,
6353,
12,
202,
202,
45,
2421,
22144,
3829,
2742,
16,
202,
202,
24813,
966,
3354,
966,
16,
202,
202,
24813,
966,
8526,
2572,
7655,
13,
288,
202,
202,
9565,
12,
5668,
18,
588,
13220,
10663,
202,
202,
2211,
18,
8258,
966,
273,
3354,
966,
31,
202,
202,
2211,
18,
7238,
7655,
273,
2572,
7655,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
9771,
659,
6353,
12,
202,
202,
45,
2421,
22144,
3829,
2742,
16,
202,
202,
24813,
966,
3354,
966,
16,
202,
202,
24813,
966,
8526,
2572,
7655,
13,
288,
202,
202,
9565,
12,
5668,
18,
588,
13220,
10663,
202,
202,
2211,
18,
8258,
966,
273,
3354,
966,
31,
202,
202,
2211,
18,
7238,
7655,
273,
2572,
7655,
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
] |
if (strlen > 0) | m_array = newarray; } chunk = m_array[++m_lastChunk]; if (chunk == null) | public final void append(char[] chars, int start, int length) { int strlen = length; if (0 == strlen) return; int copyfrom = start; char[] chunk = m_array[m_lastChunk]; int available = m_chunkSize - m_firstFree; // Repeat while data remains to be copied while (strlen > 0) { // Copy what fits if (available > strlen) available = strlen; System.arraycopy(chars, copyfrom, m_array[m_lastChunk], m_firstFree, available); strlen -= available; copyfrom += available; // If there's more left, allocate another chunk and continue if (strlen > 0) { // Extend array? int i = m_array.length; if (m_lastChunk + 1 == i) { char[][] newarray = new char[i + 16][]; System.arraycopy(m_array, 0, newarray, 0, i); m_array = newarray; } // Advance one chunk chunk = m_array[++m_lastChunk]; if (chunk == null) { // Hierarchical encapsulation if (m_lastChunk == 1 << m_rebundleBits && m_chunkBits < m_maxChunkBits) { // Should do all the work of both encapsulating // existing data and establishing new sizes/offsets m_innerFSB = new FastStringBuffer(this); } // Add a chunk. chunk = m_array[m_lastChunk] = new char[m_chunkSize]; } available = m_chunkSize; m_firstFree = 0; } } // Adjust the insert point in the last chunk, when we've reached it. m_firstFree += available; } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/0b044b8c37fa8980dc216f4d8a005974d197f955/FastStringBuffer.java/buggy/src/org/apache/xml/utils/FastStringBuffer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
714,
12,
3001,
8526,
5230,
16,
509,
787,
16,
509,
769,
13,
225,
288,
565,
509,
3203,
273,
769,
31,
565,
309,
261,
20,
422,
3203,
13,
1377,
327,
31,
565,
509,
1610,
2080,
273,
787,
31,
565,
1149,
8526,
2441,
273,
312,
67,
1126,
63,
81,
67,
2722,
5579,
15533,
565,
509,
2319,
273,
312,
67,
6551,
1225,
300,
312,
67,
3645,
9194,
31,
565,
368,
20742,
1323,
501,
22632,
358,
506,
9268,
565,
1323,
261,
10835,
405,
374,
13,
565,
288,
1377,
368,
5631,
4121,
13351,
1377,
309,
261,
5699,
405,
3203,
13,
3639,
2319,
273,
3203,
31,
1377,
2332,
18,
1126,
3530,
12,
7549,
16,
1610,
2080,
16,
312,
67,
1126,
63,
81,
67,
2722,
5579,
6487,
312,
67,
3645,
9194,
16,
15604,
2319,
1769,
1377,
3203,
3947,
2319,
31,
1377,
1610,
2080,
1011,
2319,
31,
1377,
368,
971,
1915,
1807,
1898,
2002,
16,
10101,
4042,
2441,
471,
1324,
377,
312,
67,
1126,
273,
394,
1126,
31,
289,
282,
2441,
273,
312,
67,
1126,
63,
9904,
81,
67,
2722,
5579,
15533,
225,
309,
261,
6551,
422,
446,
13,
1377,
288,
3639,
368,
27686,
526,
35,
3639,
509,
277,
273,
312,
67,
1126,
18,
2469,
31,
3639,
309,
261,
81,
67,
2722,
5579,
397,
404,
422,
277,
13,
3639,
288,
1850,
1149,
63,
6362,
65,
394,
1126,
273,
394,
1149,
63,
77,
397,
2872,
6362,
15533,
1850,
2332,
18,
1126,
3530,
12,
81,
67,
1126,
16,
374,
16,
394,
1126,
16,
2
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
714,
12,
3001,
8526,
5230,
16,
509,
787,
16,
509,
769,
13,
225,
288,
565,
509,
3203,
273,
769,
31,
565,
309,
261,
20,
422,
3203,
13,
1377,
327,
31,
565,
509,
1610,
2080,
273,
787,
31,
565,
1149,
8526,
2441,
273,
312,
67,
1126,
63,
81,
67,
2722,
5579,
15533,
565,
509,
2319,
273,
312,
67,
6551,
1225,
300,
312,
67,
3645,
9194,
31,
565,
368,
20742,
1323,
501,
22632,
358,
506,
9268,
565,
1323,
261,
10835,
405,
374,
13,
565,
288,
1377,
368,
5631,
4121,
13351,
1377,
309,
261,
5699,
405,
3203,
13,
3639,
2319,
273,
3203,
31,
1377,
2332,
18,
1126,
3530,
12,
7549,
16,
1610,
2080,
16,
312,
67,
1126,
63,
2
] |
protected void readStartupEntropy(EntropySource startupEntropy) { // Consume the current time acceptEntropy(startupEntropy, System.currentTimeMillis(), 0); //Logger.minor(this, "Time: "+System.currentTimeMillis()+" on "+this); // Free memory acceptEntropy(startupEntropy, Runtime.getRuntime().freeMemory(), 0); //Logger.minor(this, "Free memory: "+Runtime.getRuntime().freeMemory()+" on "+this); // Total memory acceptEntropy(startupEntropy, Runtime.getRuntime().totalMemory(), 0); //Logger.minor(this, "Total memory: "+Runtime.getRuntime().totalMemory()+" on "+this); } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/bc50c0ab3552700dd11500ebecd9c37ad70a191e/Yarrow.java/buggy/src/freenet/crypt/Yarrow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6459,
896,
22178,
28727,
12,
28727,
55,
477,
5710,
485,
416,
28727,
15329,
202,
202,
759,
11911,
546,
557,
3761,
957,
202,
202,
9436,
28727,
12,
23939,
28727,
16,
3163,
18,
2972,
28512,
9334,
20,
1769,
202,
202,
759,
3328,
18,
17364,
12,
2211,
10837,
950,
2773,
15,
3163,
18,
2972,
28512,
1435,
9078,
265,
6,
15,
2211,
1769,
202,
202,
759,
42,
266,
351,
351,
630,
202,
202,
9436,
28727,
12,
23939,
28727,
16,
5576,
18,
588,
5576,
7675,
9156,
6031,
9334,
20,
1769,
202,
202,
759,
3328,
18,
17364,
12,
2211,
10837,
42,
266,
351,
351,
630,
2773,
15,
5576,
18,
588,
5576,
7675,
9156,
6031,
1435,
9078,
265,
6,
15,
2211,
1769,
202,
202,
759,
5269,
7858,
202,
202,
9436,
28727,
12,
23939,
28727,
16,
5576,
18,
588,
5576,
7675,
4963,
6031,
9334,
20,
1769,
202,
202,
759,
3328,
18,
17364,
12,
2211,
10837,
5269,
7858,
2773,
15,
5576,
18,
588,
5576,
7675,
4963,
6031,
1435,
9078,
265,
6,
15,
2211,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6459,
896,
22178,
28727,
12,
28727,
55,
477,
5710,
485,
416,
28727,
15329,
202,
202,
759,
11911,
546,
557,
3761,
957,
202,
202,
9436,
28727,
12,
23939,
28727,
16,
3163,
18,
2972,
28512,
9334,
20,
1769,
202,
202,
759,
3328,
18,
17364,
12,
2211,
10837,
950,
2773,
15,
3163,
18,
2972,
28512,
1435,
9078,
265,
6,
15,
2211,
1769,
202,
202,
759,
42,
266,
351,
351,
630,
202,
202,
9436,
28727,
12,
23939,
28727,
16,
5576,
18,
588,
5576,
7675,
9156,
6031,
9334,
20,
1769,
202,
202,
759,
3328,
18,
17364,
12,
2211,
10837,
42,
266,
351,
351,
630,
2773,
15,
5576,
18,
588,
5576,
7675,
9156,
6031,
1435,
9078,
265,
6,
15,
2211,
1769,
202,
2
] | ||
private void visitArithmetic(Node node, byte opCode, Node child, | private void visitArithmetic(Node node, int opCode, Node child, | private void visitArithmetic(Node node, byte opCode, Node child, Node parent) { int childNumberFlag = node.getIntProp(Node.ISNUMBER_PROP, -1); if (childNumberFlag != -1) { generateExpression(child, node); generateExpression(child.getNext(), node); cfw.add(opCode); } else { boolean childOfArithmetic = isArithmeticNode(parent); generateExpression(child, node); if (!isArithmeticNode(child)) addObjectToDouble(); generateExpression(child.getNext(), node); if (!isArithmeticNode(child.getNext())) addObjectToDouble(); cfw.add(opCode); if (!childOfArithmetic) { addDoubleWrap(); } } } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/22644d0e62d87924a341469f715d13055cb347cc/Codegen.java/buggy/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
686,
16368,
12,
907,
756,
16,
509,
1061,
1085,
16,
2029,
1151,
16,
4766,
2029,
982,
13,
565,
288,
3639,
509,
1151,
1854,
4678,
273,
756,
18,
588,
1702,
4658,
12,
907,
18,
5127,
9931,
67,
15811,
16,
300,
21,
1769,
3639,
309,
261,
3624,
1854,
4678,
480,
300,
21,
13,
288,
5411,
2103,
2300,
12,
3624,
16,
756,
1769,
5411,
2103,
2300,
12,
3624,
18,
588,
2134,
9334,
756,
1769,
5411,
6080,
91,
18,
1289,
12,
556,
1085,
1769,
3639,
289,
3639,
469,
288,
5411,
1250,
1151,
951,
686,
16368,
273,
353,
686,
16368,
907,
12,
2938,
1769,
5411,
2103,
2300,
12,
3624,
16,
756,
1769,
5411,
309,
16051,
291,
686,
16368,
907,
12,
3624,
3719,
7734,
31311,
774,
5265,
5621,
5411,
2103,
2300,
12,
3624,
18,
588,
2134,
9334,
756,
1769,
5411,
309,
16051,
291,
686,
16368,
907,
12,
3624,
18,
588,
2134,
1435,
3719,
5375,
31311,
774,
5265,
5621,
5411,
6080,
91,
18,
1289,
12,
556,
1085,
1769,
5411,
309,
16051,
3624,
951,
686,
16368,
13,
288,
7734,
527,
5265,
2964,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
686,
16368,
12,
907,
756,
16,
509,
1061,
1085,
16,
2029,
1151,
16,
4766,
2029,
982,
13,
565,
288,
3639,
509,
1151,
1854,
4678,
273,
756,
18,
588,
1702,
4658,
12,
907,
18,
5127,
9931,
67,
15811,
16,
300,
21,
1769,
3639,
309,
261,
3624,
1854,
4678,
480,
300,
21,
13,
288,
5411,
2103,
2300,
12,
3624,
16,
756,
1769,
5411,
2103,
2300,
12,
3624,
18,
588,
2134,
9334,
756,
1769,
5411,
6080,
91,
18,
1289,
12,
556,
1085,
1769,
3639,
289,
3639,
469,
288,
5411,
1250,
1151,
951,
686,
16368,
273,
353,
686,
16368,
907,
12,
2938,
1769,
5411,
2103,
2300,
12,
3624,
16,
756,
1769,
5411,
309,
16051,
291,
686,
16368,
907,
12,
2
] |
public static String jsFunction_toUpperCase(Context cx, Scriptable thisObj, Object[] args, Function funObj) { String target = ScriptRuntime.toString(thisObj); | private static String jsFunction_toUpperCase(String target) { | public static String jsFunction_toUpperCase(Context cx, Scriptable thisObj, Object[] args, Function funObj) { String target = ScriptRuntime.toString(thisObj); return target.toUpperCase(); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/b631b3e8574543a4d24a0048cc710f305deb8ff5/NativeString.java/buggy/src/org/mozilla/javascript/NativeString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3828,
2083,
67,
869,
8915,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
7734,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
514,
1018,
273,
7739,
5576,
18,
10492,
12,
2211,
2675,
1769,
3639,
327,
1018,
18,
869,
8915,
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
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
] | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3828,
2083,
67,
869,
8915,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
7734,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
514,
1018,
273,
7739,
5576,
18,
10492,
12,
2211,
2675,
1769,
3639,
327,
1018,
18,
869,
8915,
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
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.